Skip to content

Commit 600dfff

Browse files
authored
chore: open-source repo setup (#1)
* feat: Add CONTRIBUTING.md and LICENSE files for project guidelines and legal terms * chore(github): add issue and PR templates - ISSUE_TEMPLATE/bug_report.md: structured bug report (env, repro, logs; reminds reporters not to paste model contents or secrets). - ISSUE_TEMPLATE/feature_request.md: problem / proposal / scope hint, with optional OpenSpec change linkage. - ISSUE_TEMPLATE/config.yml: disables blank issues; routes questions to Discussions and security reports to GitHub Security Advisories. - PULL_REQUEST_TEMPLATE.md: summary, linked OpenSpec change folder, invariant checklist, and quality-gate checklist. * ci: remove docker image build from CI The docker job rebuilt placeholder images on every push and PR (~30s runner time) without catching regressions the backend/ui/contracts jobs miss. Image build is now exercised locally via docker-compose; see Makefile for the orchestration surface. * chore(docker): add compose and Makefile for local dev docker-compose.yml: one file, backend + ui services on a private bridge network. UI binds to host ${UI_PORT:-3000}; backend is reachable only from inside the network via the nginx /api proxy. Artifacts persist in the named volume cerebro-data. Backend CMD is overridden with sleep infinity while uvicorn is still placeholder; remove that line once the FastAPI app ships in docker/backend.Dockerfile. Makefile: thin wrappers over docker compose (up/down/build/rebuild/ restart/ps/logs/shell-backend/shell-ui/clean) plus the same lint/fmt/ test/contracts checks CI runs. `make help` auto-lists targets by parsing trailing `## doc` comments. * chore(github): convert templates to YAML Issue Forms - Replace bug_report.md / feature_request.md (markdown front-matter) with bug-report.yml / feature-request.yml (modern Issue Forms). Surfaces, environment fields, install-method, and OS dropdowns are enumerated so triage gets structured input instead of free-form prose. - Add openspec-change.yml: tracking-issue template for an OpenSpec change folder. Captures lane (v0.1 / v0.2 / v0.3), planned PRs, blast-radius from gitnexus_impact, and the pre-flight checklist (proposal / design / tasks / deltas / invariants reviewed). - Enhance PULL_REQUEST_TEMPLATE.md: classification, affected-surface matrix mapped to src/cerebro/ subpackages, test plan, invariant checklist, quality-gate checklist, branch + commit-style guards (Conventional Commits, no AI trailers, no spec IDs in code). markdownlint-disable-file MD041 added at the top because GitHub templates conventionally start at h2 (the PR title is the implicit h1). * docs: add Contributor Covenant 2.1 code of conduct Reports route to dgtalbug@gmail.com. CONTRIBUTING.md already links to this file from the root. * ci(ui): point pnpm/action-setup at ui/package.json pnpm/action-setup@v4 runs with the runner's CWD (repo root) and ignores the job-level `defaults.run.working-directory`, so the action looked for a non-existent root `package.json` and failed with 'No pnpm version is specified'. The pnpm version is already pinned in ui/package.json as packageManager=pnpm@11.1.2 — this just tells the action where to read it from.
1 parent fcf30e4 commit 600dfff

12 files changed

Lines changed: 841 additions & 22 deletions
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Bug report
2+
description: Report a defect in Cerebro.
3+
title: "[bug]: "
4+
labels:
5+
- type:bug
6+
- needs-triage
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for reporting a bug. Please fill out every required field —
12+
incomplete reports take longer to triage.
13+
14+
For security vulnerabilities, **do not** use this form. Use
15+
[GitHub Security Advisories](https://github.com/dgtalbug/cerebro/security/advisories/new)
16+
for private disclosure.
17+
18+
Do not paste model contents, training data, secrets, or PII. Counts
19+
and sizes are fine (`num_trees=187`, `num_features=24`).
20+
21+
- type: dropdown
22+
id: surface
23+
attributes:
24+
label: Affected surface
25+
description: Which part of Cerebro is misbehaving?
26+
multiple: true
27+
options:
28+
- Backend API (FastAPI)
29+
- CLI (`cerebro …`)
30+
- Extraction (LightGBM)
31+
- Canonical schema / contracts
32+
- Storage (artifact files / SQLite registry)
33+
- AI agent
34+
- UI (React dashboard)
35+
- Docker / compose
36+
- Documentation
37+
- Build / packaging / CI
38+
- Other (describe below)
39+
validations:
40+
required: true
41+
42+
- type: input
43+
id: cerebro-version
44+
attributes:
45+
label: Cerebro version
46+
description: Tag (`v0.x.y`) or commit SHA. From `git rev-parse --short HEAD` if running from source.
47+
placeholder: "git@<sha> or v0.x.y"
48+
validations:
49+
required: true
50+
51+
- type: input
52+
id: python-version
53+
attributes:
54+
label: Python version
55+
description: Output of `python --version` in the active environment.
56+
placeholder: "3.12.x"
57+
validations:
58+
required: true
59+
60+
- type: input
61+
id: node-version
62+
attributes:
63+
label: Node version
64+
description: Output of `node --version`. Leave blank if the bug is backend-only.
65+
placeholder: "22.x.x"
66+
67+
- type: dropdown
68+
id: install-method
69+
attributes:
70+
label: Install method
71+
options:
72+
- From source (uv + pnpm)
73+
- Docker compose (`make up`)
74+
- Other
75+
validations:
76+
required: true
77+
78+
- type: dropdown
79+
id: os
80+
attributes:
81+
label: Operating system
82+
options:
83+
- macOS (Apple Silicon)
84+
- macOS (Intel)
85+
- Linux (x86_64)
86+
- Linux (arm64)
87+
- Windows / WSL2
88+
- Other
89+
validations:
90+
required: true
91+
92+
- type: textarea
93+
id: reproduction
94+
attributes:
95+
label: Reproduction steps
96+
description: Minimal, ordered steps that reproduce the bug. If artifact-related, include framework, objective, and shape (num_trees / num_features) — never the artifact itself.
97+
placeholder: |
98+
1. Train a LightGBM binary classifier on …
99+
2. Run `cerebro extract model.txt`
100+
3. Observe …
101+
validations:
102+
required: true
103+
104+
- type: textarea
105+
id: expected
106+
attributes:
107+
label: Expected behavior
108+
validations:
109+
required: true
110+
111+
- type: textarea
112+
id: actual
113+
attributes:
114+
label: Actual behavior
115+
description: Exact error messages, stack traces, or structured-log lines. Redact PII / secrets before pasting.
116+
validations:
117+
required: true
118+
119+
- type: textarea
120+
id: logs
121+
attributes:
122+
label: Relevant logs
123+
description: Structured JSON log lines preferred. Cerebro emits one JSON object per line via structlog.
124+
render: json
125+
126+
- type: textarea
127+
id: extra
128+
attributes:
129+
label: Additional context
130+
description: Screenshots (UI bugs), related issues, recent changes, hunches.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions and discussion
4+
url: https://github.com/dgtalbug/cerebro/discussions
5+
about: Open-ended questions, design ideas, and general discussion belong in Discussions.
6+
- name: Security report
7+
url: https://github.com/dgtalbug/cerebro/security/advisories/new
8+
about: Report a security vulnerability privately via GitHub Security Advisories.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Feature request
2+
description: Propose a new capability or improvement.
3+
title: "[feat]: "
4+
labels:
5+
- type:feature
6+
- needs-triage
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for proposing a feature. Cerebro follows an OpenSpec workflow —
12+
accepted feature requests usually become a change folder under
13+
`openspec/changes/<name>/` (with `proposal.md`, `design.md`, `tasks.md`,
14+
and a delta spec) before implementation starts.
15+
16+
Discussion-style ideas live better in
17+
[Discussions](https://github.com/dgtalbug/cerebro/discussions);
18+
use this form when you have a concrete proposal.
19+
20+
- type: textarea
21+
id: problem
22+
attributes:
23+
label: Problem
24+
description: What's hard or impossible today? Describe the situation, not the solution.
25+
placeholder: |
26+
When inspecting a multiclass LightGBM model, the dashboard groups all
27+
K class trees under a single tab so per-class importance is hidden.
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: proposal
33+
attributes:
34+
label: Proposed behavior
35+
description: How would Cerebro behave if this feature shipped? Focus on user-visible behavior, not implementation.
36+
validations:
37+
required: true
38+
39+
- type: dropdown
40+
id: surface
41+
attributes:
42+
label: Primary surface(s)
43+
description: Where would this feature appear?
44+
multiple: true
45+
options:
46+
- Extraction (LightGBM / XGBoost / future framework)
47+
- Canonical schema (new field, semantics, versioning)
48+
- Backend API
49+
- CLI
50+
- Storage / registry
51+
- AI agent
52+
- UI (React dashboard)
53+
- Diagnostics / recommendations
54+
- Docker / compose
55+
- Documentation
56+
- Other
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: alternatives
62+
attributes:
63+
label: Alternatives considered
64+
description: Other approaches you've thought about and why they fall short.
65+
66+
- type: textarea
67+
id: success
68+
attributes:
69+
label: Definition of done
70+
description: How would we know the feature is finished? Ideally a user-visible, observable outcome.
71+
72+
- type: input
73+
id: openspec-change
74+
attributes:
75+
label: OpenSpec change folder (if already drafted)
76+
description: Path under `openspec/changes/`. Leave blank if triage will assign one.
77+
placeholder: "openspec/changes/<short-name>"
78+
79+
- type: checkboxes
80+
id: scope
81+
attributes:
82+
label: Scope
83+
options:
84+
- label: I've checked open issues and discussions; this is not a duplicate.
85+
- label: I'm willing to draft the OpenSpec change proposal for this.
86+
- label: I'm willing to implement this if accepted.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: OpenSpec change (tracking issue)
2+
description: Umbrella tracking issue for an OpenSpec change folder. Internal use by maintainers.
3+
title: "[openspec]: "
4+
labels:
5+
- type:openspec
6+
- needs-triage
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Use this template to open the visible tracking issue for an
12+
OpenSpec change. The actual artifacts (`proposal.md`, `design.md`,
13+
`tasks.md`, delta specs) live under `openspec/changes/<name>/`;
14+
this issue is the umbrella for the change's PRs, review
15+
checkpoints, and cross-references.
16+
17+
- type: input
18+
id: change-folder
19+
attributes:
20+
label: Change folder
21+
description: Path under `openspec/changes/`.
22+
placeholder: "openspec/changes/lightgbm-extraction"
23+
validations:
24+
required: true
25+
26+
- type: dropdown
27+
id: lane
28+
attributes:
29+
label: Lane
30+
description: Which release lane does this change target?
31+
options:
32+
- v0.1 — LightGBM artifact in / canonical JSON out
33+
- v0.2 — diagnostics, recommendations, XGBoost extractor
34+
- v0.3 — `cerebro train` (apply + retrain)
35+
- hygiene / contributors / docs
36+
- other
37+
validations:
38+
required: true
39+
40+
- type: textarea
41+
id: summary
42+
attributes:
43+
label: One-paragraph summary
44+
description: What does this change ship and why?
45+
validations:
46+
required: true
47+
48+
- type: textarea
49+
id: dependencies
50+
attributes:
51+
label: Depends on
52+
description: Other changes, decisions, or secrets that must land first.
53+
placeholder: |
54+
- openspec/changes/canonical-schema-v1 merged
55+
- `ANTHROPIC_API_KEY` configured for agent E2E tests
56+
57+
- type: textarea
58+
id: pr-plan
59+
attributes:
60+
label: Planned PRs
61+
description: One bullet per PR, in dependency order. Conventional Commit titles.
62+
placeholder: |
63+
- feat(extractor): canonical schema for LightGBM regression
64+
- feat(extractor): cover the 5 LightGBM variants
65+
- test(extractor): golden fixtures for each variant
66+
67+
- type: textarea
68+
id: blast-radius
69+
attributes:
70+
label: Blast radius
71+
description: Symbols / modules affected if this is a refactor. Paste the relevant `gitnexus_impact` output. Leave blank for greenfield changes.
72+
render: text
73+
74+
- type: checkboxes
75+
id: pre-flight
76+
attributes:
77+
label: Pre-flight
78+
options:
79+
- label: "`proposal.md` written and references the design narrative section it implements"
80+
- label: "`design.md` written (if structural)"
81+
- label: "`tasks.md` enumerates one Conventional Commit per task"
82+
- label: "Delta specs added under `openspec/changes/<name>/specs/`"
83+
- label: "Hard invariants from `openspec/project.md` reviewed for this change"
84+
- label: "Branch convention: `feat/<scope>-<short>` or matching prefix"

0 commit comments

Comments
 (0)