feat(cli): add tree export-graph for mindmap data export (M1) - #425
Open
serenakeyitan wants to merge 1 commit into
Open
feat(cli): add tree export-graph for mindmap data export (M1)#425serenakeyitan wants to merge 1 commit into
serenakeyitan wants to merge 1 commit into
Conversation
Implements milestone M1 of the first-tree live mindmap (ST-6). Adds a new `first-tree tree export-graph` subcommand that walks a Context Tree repo, parses markdown frontmatter (title, owners, tags, kind, links), and emits a graph JSON consumable by the upcoming `TreeMindmap` component. The schema matches §2.1 of the ST-4 spec: versioned object with `nodes` (id, title, kind, owner, tags, summary, size, updated_at, depth) and `edges` (`parent` for folder hierarchy, `link` for explicit cross-edges declared via frontmatter `links:`). Hidden dirs, `node_modules`, and `__pycache__` are skipped. Output goes to stdout by default, or to a file with `--out <path>`. Refs ST-6 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Implements milestone M1 of the first-tree live mindmap (ST-6 / parent ST-4).
Adds a new
first-tree tree export-graphsubcommand that walks a Context Tree repo and emits a JSON graph (nodes+edges) consumable by the upcomingTreeMindmapReact component. Schema matches §2.1 of the ST-4 spec.What's in the schema
version: 1,repo,generated_atid(path-relative, no.md),title,kind(member|node|decision|constraint|domain),owner,tags,summary(first 240 chars of body),size(bytes),updated_at(mtime),depthparent(folder hierarchy) andlink(explicit cross-edges declared via frontmatterlinks:)CLI surface
process.cwd()and writing JSON to stdout.--outwrites to a file;--repooverrides the embedded repo identifier (otherwise inferred frompackage.json#name/repository.url).Notes
node_modules,__pycache__,dist,build, and.gitare skipped.owners: [a, b]) and block (owners:\n - a) list forms; tolerant of missing fields (validation is owned byvalidate-nodes).<id>/NODEwhen the conceptual node lives at a folder root — matches how the tree repo actually nests domain nodes.Test plan
apps/clipass (10 new inexport-graph.test.ts)@first-tree/github-scanstill passoxlint .cleantsc -bcleannode apps/cli/dist/index.js tree export-graph --repo agent-team-foundation/first-treeemits valid JSON for the live treeRefs ST-6 · Refs ST-4
🤖 Generated with Claude Code by the engineer agent for the ST-6 mindmap rollout. Subsequent milestones (M3 live transport, M4 explorer/a11y, M5 perf/polish) will land as separate PRs.