Conversation
…task Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update project to PLAN.md and open issues
feat: automate GitHub milestone, label, and issue creation from PLAN.md / TODO.md
Mar 13, 2026
devlux76
approved these changes
Mar 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an idempotent Node script to synchronize repo planning docs with GitHub tracking primitives (milestones, labels, issues) to reduce manual drift between TODO.md / PLAN.md and GitHub.
Changes:
- Introduces
scripts/sync-github-project.mjsto create milestones, labels, and issues (with--dry-runsupport). - Adds
sync:github-projectnpm script for easy invocation. - Updates ESLint config to recognize Node’s global
fetchin.mjsscripts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| scripts/sync-github-project.mjs | Implements parsing + GitHub REST sync for milestones/labels/issues via gh auth token + fetch. |
| package.json | Adds sync:github-project script entry. |
| eslint.config.mjs | Declares fetch as a readonly global for *.mjs linting. |
Comment on lines
+15
to
+22
| * Usage: | ||
| * node scripts/sync-github-project.mjs [--dry-run] | ||
| * | ||
| * --dry-run Print every action that would be taken; make no API calls. | ||
| * | ||
| * Prerequisites: | ||
| * gh CLI installed and authenticated (run: gh auth status) | ||
| */ |
| await fetchAllPages(token, `${base}/issues?state=all&per_page=100`) | ||
| ); | ||
|
|
||
| const existingTitles = new Set(existingIssues.map((i) => i.title)); |
Comment on lines
+151
to
+159
| const LAYER_KEYWORD_MAP = /** @type {[string, string[]][]} */ ([ | ||
| ["layer: hippocampus", ["hippocampus", "Hippocampus", "Chunker", "Ingest", "PageBuilder", "FastMetroid", "HierarchyBuilder"]], | ||
| ["layer: cortex", ["cortex/", "Ranking.ts", "Query.ts", "OpenTSPSolver", "QueryResult", "SeedSelection"]], | ||
| ["layer: daydreamer", ["daydreamer", "Daydreamer", "IdleScheduler", "HebbianUpdater", "FullMetroidRecalc", "PrototypeRecomputer", "ExperienceReplay", "ClusterStability"]], | ||
| ["layer: embeddings", ["embeddings/", "EmbeddingBackend", "OrtWebgl", "TransformersJs", "ProviderResolver"]], | ||
| ["layer: testing", ["tests/integration", "tests/benchmarks", "Integration", "Benchmark", "bench.ts"]], | ||
| ["layer: ci", ["CI", "GitHub Actions", ".github/workflows", "guard-model-derived", "ci.yml"]], | ||
| ["layer: documentation",["docs/", "documentation", "API reference", "architecture diagram"]], | ||
| ]); |
Comment on lines
+6
to
+15
| * Reads PLAN.md and TODO.md and creates the corresponding GitHub structure: | ||
| * - Milestones (one per release phase, sourced from PLAN.md) | ||
| * - Labels (priority P0–P3 and layer labels) | ||
| * - Issues (one per ### task-group in TODO.md) | ||
| * | ||
| * Re-run safe: existing milestones, labels, and issues with matching titles | ||
| * are detected and skipped. Completed groups (✅ COMPLETE) are created and | ||
| * immediately closed. | ||
| * | ||
| * Usage: |
Comment on lines
+451
to
+457
| // Verify gh CLI is available | ||
| try { | ||
| await execFileAsync("gh", ["auth", "status"]); | ||
| } catch { | ||
| globalThis.console.error( | ||
| "❌ gh CLI is not authenticated. Run: gh auth login", | ||
| ); |
Comment on lines
+6
to
+12
| * Reads PLAN.md and TODO.md and creates the corresponding GitHub structure: | ||
| * - Milestones (one per release phase, sourced from PLAN.md) | ||
| * - Labels (priority P0–P3 and layer labels) | ||
| * - Issues (one per ### task-group in TODO.md) | ||
| * | ||
| * Re-run safe: existing milestones, labels, and issues with matching titles | ||
| * are detected and skipped. Completed groups (✅ COMPLETE) are created and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manual sync between planning docs and GitHub project state risks drift and transcription errors. This adds a single idempotent script that drives GitHub structure directly from the source-of-truth markdown files.
New:
scripts/sync-github-project.mjsParses
TODO.mdand creates:P0: critical→P3: low) + layer (layer: hippocampus,layer: cortex, …)###task-group; body = full checklist; labels and milestone auto-inferredIssues for groups already marked
✅ COMPLETEare created then immediately closed (preserves history). Every resource is keyed by title — re-runs skip existing items.Supporting changes
package.json— addssync:github-projectscripteslint.config.mjs— declaresfetchas a readonly global for.mjsfiles (Node 18+ built-in, previously unknown to ESLint)Original prompt
Created from VS Code.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.