Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: "🐛 Bug Report"
description: Report a bug in CORTEX
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug. Please fill in the details below.

- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of the bug.
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Steps to Reproduce
description: Minimal steps to reproduce the behavior.
placeholder: |
1. Call `ingestText(...)` with ...
2. Then call `query(...)` with ...
3. Observe ...
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen.
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened. Include error messages or screenshots if applicable.
validations:
required: true

- type: dropdown
id: layer
attributes:
label: Affected Layer
description: Which CORTEX layer does this bug affect?
multiple: true
options:
- Foundation (core/)
- Storage (storage/)
- Vector Compute (root backends)
- Embeddings (embeddings/)
- Hippocampus (hippocampus/)
- Cortex (cortex/)
- Daydreamer
- Runtime Harness (runtime/)
- CI / Build
- Documentation
validations:
required: true

- type: input
id: browser
attributes:
label: Browser / Runtime
description: Browser version, Electron version, or Node/Bun version.
placeholder: "Chrome 120, Electron 28, Bun 1.3.10"
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: "📖 Architecture Reference"
url: https://github.com/devlux76/cortex/blob/main/DESIGN.md
about: Review DESIGN.md before proposing architectural changes.
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "✨ Feature Request"
description: Propose a new feature or enhancement for CORTEX
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Describe the feature you'd like to see in CORTEX.

- type: textarea
id: summary
attributes:
label: Summary
description: A concise description of the proposed feature.
validations:
required: true

- type: textarea
id: motivation
attributes:
label: Motivation
description: Why is this feature needed? What problem does it solve?
validations:
required: true

- type: textarea
id: design
attributes:
label: Proposed Design
description: How should this feature work? Reference DESIGN.md sections if applicable.

- type: dropdown
id: layer
attributes:
label: Target Layer
description: Which CORTEX layer would this feature primarily affect?
multiple: true
options:
- Foundation (core/)
- Storage (storage/)
- Vector Compute (root backends)
- Embeddings (embeddings/)
- Hippocampus (hippocampus/)
- Cortex (cortex/)
- Daydreamer
- Runtime Harness (runtime/)
- CI / Build
- Documentation
validations:
required: true

- type: textarea
id: exit-criteria
attributes:
label: Exit Criteria
description: What must be true for this feature to be considered complete?
placeholder: |
- [ ] Unit tests pass
- [ ] Integration test covers end-to-end flow
- [ ] DESIGN.md updated if architecture changed
77 changes: 77 additions & 0 deletions .github/ISSUE_TEMPLATE/task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: "🔧 Implementation Task"
description: Define a specific implementation task
labels: ["task"]
body:
- type: markdown
attributes:
value: |
Define a concrete implementation task. Reference DESIGN.md for architectural context.

- type: textarea
id: objective
attributes:
label: Objective
description: What needs to be built or changed?
validations:
required: true

- type: dropdown
id: priority
attributes:
label: Priority
options:
- "P0: critical — blocks dependent work"
- "P1: high — targets next milestone"
- "P2: medium — important but not blocking"
- "P3: low — polish or nice-to-have"
validations:
required: true

- type: dropdown
id: layer
attributes:
label: Target Layer
description: Which CORTEX layer does this task target?
multiple: true
options:
- Foundation (core/)
- Storage (storage/)
- Vector Compute (root backends)
- Embeddings (embeddings/)
- Hippocampus (hippocampus/)
- Cortex (cortex/)
- Daydreamer
- Runtime Harness (runtime/)
- CI / Build
- Documentation
validations:
required: true

- type: textarea
id: files
attributes:
label: Files to Create or Modify
description: List the files this task will touch.
placeholder: |
- `cortex/MetroidBuilder.ts` (create)
- `tests/cortex/MetroidBuilder.test.ts` (create)
- `DESIGN.md` (update if architecture changes)

- type: textarea
id: exit-criteria
attributes:
label: Exit Criteria
description: Checklist of conditions that must be met to close this task.
placeholder: |
- [ ] Implementation complete
- [ ] Unit tests passing
- [ ] Lint and typecheck clean
- [ ] guard:model-derived passes (if numerics changed)
validations:
required: true

- type: textarea
id: dependencies
attributes:
label: Dependencies
description: List any issues or tasks that must be completed first. Use `#issue_number` references.
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Summary

<!-- What does this PR do? Reference the issue it addresses with "Closes #123". -->

## Changes

<!-- List the key changes made in this PR. -->

-

## Checklist

- [ ] Lint passes (`npm run lint`)
- [ ] Typecheck passes (`npm run build`)
- [ ] Unit tests pass (`npm run test:unit`)
- [ ] `guard:model-derived` passes (if numeric constants changed)
- [ ] DESIGN.md updated (if architecture changed)
- [ ] No hardcoded model-derived numbers — all sourced from `core/`
- [ ] No server-side dependencies, cloud calls, or telemetry added
20 changes: 17 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,19 @@ The engine models three biological brain regions:
| `PLAN.md` | Module-by-module implementation status and development phases |
| `TODO.md` | Prioritized actionable tasks to ship v1.0 |

Keep all documents synchronized with the real code state after every implementation pass.
Keep `DESIGN.md` synchronized with the real code state after every implementation pass.

## Project Management

All task tracking, prioritization, and status is managed through **GitHub-native features** — not markdown files:

- **GitHub Issues** — Every task, bug, and feature request is a GitHub Issue (use the issue templates in `.github/ISSUE_TEMPLATE/`).
- **GitHub Projects** — Use project boards for Kanban-style lifecycle tracking (To Do → In Progress → Done).
- **Milestones** — Group issues by release phase (`v0.1`, `v0.5`, `v1.0`).
- **Labels** — Auto-applied on PRs by `.github/workflows/auto-label.yml` using path-based rules in `.github/labeler.yml`. Priority labels (`P0`–`P3`) and layer labels (`layer: foundation`, `layer: cortex`, etc.) are used for classification.
- **Issue linking** — Reference dependencies with `#issue_number`. Use `Closes #N` in PR descriptions to auto-close issues on merge.

Agents with `gh` CLI access can create, update, and close issues directly. Do not create markdown files for task tracking.

## Directory Structure

Expand Down Expand Up @@ -119,8 +131,10 @@ Run `npm run guard:model-derived` after any numeric change to verify compliance.

- All CI checks must pass: `lint`, `build` (typecheck), `test:unit`.
- `npm run guard:model-derived` must pass for any change that touches numeric constants.
- Keep `README.md`, `CORTEX-DESIGN-PLAN-TODO.md`, and `PROJECT-EXECUTION-PLAN.md` synchronized with any implementation state changes.
- Record blockers with file path, failure symptom, and next action.
- PRs are auto-labeled by layer based on changed files (`.github/labeler.yml`).
- Use the PR template (`.github/PULL_REQUEST_TEMPLATE.md`) — it is pre-populated on every PR.
- Reference the issue being addressed with `Closes #N` in the PR description.
- Keep `DESIGN.md` synchronized with any architectural changes.

## What NOT to Do

Expand Down
60 changes: 60 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Maps file-path globs to labels applied automatically on PRs.
# Used by the auto-label.yml workflow (actions/labeler).

"layer: foundation":
- changed-files:
- any-glob-to-any-file: "core/**"

"layer: storage":
- changed-files:
- any-glob-to-any-file: "storage/**"

"layer: compute":
- changed-files:
- any-glob-to-any-file:
- "VectorBackend.ts"
- "WebGPUVectorBackend.ts"
- "WebGLVectorBackend.ts"
- "WebNNVectorBackend.ts"
- "WasmVectorBackend.ts"
- "CreateVectorBackend.ts"
- "BackendKind.ts"
- "TopK.ts"
- "Vectors.glsl"
- "Vectors.wgsl"
- "Vectors.wat"

"layer: embeddings":
- changed-files:
- any-glob-to-any-file: "embeddings/**"

"layer: hippocampus":
- changed-files:
- any-glob-to-any-file: "hippocampus/**"

"layer: cortex":
- changed-files:
- any-glob-to-any-file: "cortex/**"

"layer: daydreamer":
- changed-files:
- any-glob-to-any-file: "daydreamer/**"

"layer: testing":
- changed-files:
- any-glob-to-any-file: "tests/**"

"layer: ci":
- changed-files:
- any-glob-to-any-file:
- ".github/workflows/**"
- ".github/labeler.yml"

"layer: documentation":
- changed-files:
- any-glob-to-any-file:
- "*.md"
- "docs/**"
- ".github/copilot-instructions.md"
- ".github/ISSUE_TEMPLATE/**"
- ".github/PULL_REQUEST_TEMPLATE.md"
19 changes: 19 additions & 0 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Auto-Label PRs

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR by changed files
uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yml
sync-labels: true
Loading
Loading