Skip to content

feat: automate GitHub milestone, label, and issue creation from PLAN.md / TODO.md#11

Merged
devlux76 merged 2 commits intomainfrom
copilot/update-plan-md-and-open-issues
Mar 13, 2026
Merged

feat: automate GitHub milestone, label, and issue creation from PLAN.md / TODO.md#11
devlux76 merged 2 commits intomainfrom
copilot/update-plan-md-and-open-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 13, 2026

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.mjs

Parses TODO.md and creates:

Resource Detail
4 milestones One per PLAN.md release phase (v0.1, v0.5, v1.0, Polish & Ship)
14 labels Priority (P0: criticalP3: low) + layer (layer: hippocampus, layer: cortex, …)
22 issues One per ### task-group; body = full checklist; labels and milestone auto-inferred

Issues for groups already marked ✅ COMPLETE are created then immediately closed (preserves history). Every resource is keyed by title — re-runs skip existing items.

# Preview without side-effects
npm run sync:github-project -- --dry-run

# Apply (requires: gh auth login)
npm run sync:github-project

Supporting changes

  • package.json — adds sync:github-project script
  • eslint.config.mjs — declares fetch as a readonly global for .mjs files (Node 18+ built-in, previously unknown to ESLint)
Original prompt

I'm unsure if I'm in the right mode for this question. I have created a github project. I'd like to update the project to the PLAN.md then open issues on that plan to mirror the TODO.md. It seems to me that this is the natural path to delivery but I'm unsure how to do it without manually copying and pasting and risking introducing errors from that process. Can you help me with that?

The user has attached the following file paths as relevant context:

  • .github/copilot-instructions.md

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.

…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
Copilot AI requested a review from devlux76 March 13, 2026 00:56
@devlux76 devlux76 marked this pull request as ready for review March 13, 2026 00:59
Copilot AI review requested due to automatic review settings March 13, 2026 00:59
@devlux76 devlux76 merged commit 558d7d2 into main Mar 13, 2026
2 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.mjs to create milestones, labels, and issues (with --dry-run support).
  • Adds sync:github-project npm script for easy invocation.
  • Updates ESLint config to recognize Node’s global fetch in .mjs scripts.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants