@magic-spells/constellation 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/constellation/agent/AGENT-GUIDANCE.md +22 -0
- package/constellation/component/COMPONENT-EDITABLE.md +9 -0
- package/constellation/component/COMPONENT-STATUS-PILL.md +9 -0
- package/constellation/component/COMPONENT-SYNC-PILL.md +9 -0
- package/constellation/decision/DECISION-FEATURE-RELEASE-TYPES.md +50 -0
- package/constellation/decision/DECISION-NATIVE-DECISION-TYPE.md +58 -0
- package/constellation/diagram/DIAGRAM-ARCHITECTURE.md +28 -0
- package/constellation/doc/DOC-CARD-TYPES.md +39 -0
- package/constellation/doc/DOC-CHANGE-TRACKING.md +26 -0
- package/constellation/doc/DOC-CONNECTED-REPOS.md +25 -0
- package/constellation/doc/DOC-DIAGRAMS.md +22 -0
- package/constellation/doc/DOC-FILE-FORMAT.md +54 -0
- package/constellation/doc/DOC-LINT-CODES.md +35 -0
- package/constellation/doc/DOC-MCP-SERVER.md +59 -0
- package/constellation/doc/DOC-MCP-UPGRADES.md +57 -0
- package/constellation/external/EXTERNAL-AJV.md +7 -0
- package/constellation/external/EXTERNAL-GIT.md +7 -0
- package/constellation/external/EXTERNAL-GRAY-MATTER.md +7 -0
- package/constellation/external/EXTERNAL-MCP-SDK.md +7 -0
- package/constellation/external/EXTERNAL-ZOD.md +7 -0
- package/constellation/file/FILE-CLI.md +9 -0
- package/constellation/file/FILE-CODE.md +9 -0
- package/constellation/file/FILE-EXTRACT.md +9 -0
- package/constellation/file/FILE-GIT.md +9 -0
- package/constellation/file/FILE-HANDLES.md +9 -0
- package/constellation/file/FILE-INDEXER.md +11 -0
- package/constellation/file/FILE-LINT.md +9 -0
- package/constellation/file/FILE-MCP-SEARCH.md +12 -0
- package/constellation/file/FILE-MCP-SERVER.md +9 -0
- package/constellation/file/FILE-PARSE.md +9 -0
- package/constellation/file/FILE-RENAME.md +18 -0
- package/constellation/file/FILE-REPOS.md +9 -0
- package/constellation/file/FILE-RESOLVE.md +9 -0
- package/constellation/file/FILE-SCAFFOLD.md +12 -0
- package/constellation/file/FILE-SERVE.md +9 -0
- package/constellation/file/FILE-SYNC.md +9 -0
- package/constellation/file/FILE-TYPES.md +9 -0
- package/constellation/file/FILE-VALIDATE.md +11 -0
- package/constellation/file/FILE-WRITER.md +11 -0
- package/constellation/flow/FLOW-DRIFT-DETECT.md +11 -0
- package/constellation/flow/FLOW-LINT-PIPELINE.md +14 -0
- package/constellation/flow/FLOW-SYNC-PLAN.md +13 -0
- package/constellation/page/PAGE-VIEWER-CARD.md +9 -0
- package/constellation/page/PAGE-VIEWER-HOME.md +9 -0
- package/constellation/plan.md +59 -0
- package/constellation/test/TEST-SUITE.md +9 -0
- package/dist/cli/index.js +37 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/code.d.ts +4 -2
- package/dist/core/code.js +22 -7
- package/dist/core/code.js.map +1 -1
- package/dist/core/git.d.ts +2 -0
- package/dist/core/git.js +6 -0
- package/dist/core/git.js.map +1 -1
- package/dist/core/handles.d.ts +1 -1
- package/dist/core/handles.js +4 -1
- package/dist/core/handles.js.map +1 -1
- package/dist/core/indexer.js +1 -1
- package/dist/core/rename.d.ts +24 -0
- package/dist/core/rename.js +72 -0
- package/dist/core/rename.js.map +1 -0
- package/dist/core/repos.d.ts +2 -0
- package/dist/core/repos.js +5 -1
- package/dist/core/repos.js.map +1 -1
- package/dist/core/sync.d.ts +2 -0
- package/dist/core/sync.js +3 -1
- package/dist/core/sync.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.js +3 -2
- package/dist/core/types.js.map +1 -1
- package/dist/core/validate.js +14 -1
- package/dist/core/validate.js.map +1 -1
- package/dist/core/writer.d.ts +29 -0
- package/dist/core/writer.js +98 -3
- package/dist/core/writer.js.map +1 -1
- package/dist/mcp/search.d.ts +2 -2
- package/dist/mcp/search.js +27 -5
- package/dist/mcp/search.js.map +1 -1
- package/dist/mcp/server.js +311 -101
- package/dist/mcp/server.js.map +1 -1
- package/dist/serve/server.js +6 -7
- package/dist/serve/server.js.map +1 -1
- package/examples/constellation/decision/DECISION-NO-HARD-DELETE.md +31 -0
- package/examples/constellation/feature/FEATURE-AUTO-ASSIGNMENT.md +24 -0
- package/examples/constellation/release/RELEASE-V1-1-0.md +14 -0
- package/package.json +2 -2
- package/schemas/decision.json +14 -0
- package/schemas/doc.json +1 -1
- package/schemas/feature.json +19 -0
- package/schemas/plan.json +1 -1
- package/schemas/release.json +14 -0
- package/skill/SKILL.md +39 -7
- package/skill/methodology.md +10 -3
- package/skill/types/decision.md +59 -0
- package/skill/types/doc.md +2 -2
- package/skill/types/feature.md +53 -0
- package/skill/types/plan.md +1 -1
- package/skill/types/release.md +37 -0
- package/viewer/dist/assets/{arc-YuzGWkw8.js → arc-DcXsmPgw.js} +1 -1
- package/viewer/dist/assets/architecture-7EHR7CIX-CXZxmtF5.js +1 -0
- package/viewer/dist/assets/{architectureDiagram-3BPJPVTR-BgksqMlF.js → architectureDiagram-3BPJPVTR-Cfq3OC2M.js} +1 -1
- package/viewer/dist/assets/{blockDiagram-GPEHLZMM-Bc6JILFK.js → blockDiagram-GPEHLZMM-CPuRJqEW.js} +1 -1
- package/viewer/dist/assets/{c4Diagram-AAUBKEIU-CRVt42df.js → c4Diagram-AAUBKEIU-CcVcItWo.js} +1 -1
- package/viewer/dist/assets/channel-DjvAjJNc.js +1 -0
- package/viewer/dist/assets/{chunk-2J33WTMH-CpuwKeX6.js → chunk-2J33WTMH-C_N821rH.js} +1 -1
- package/viewer/dist/assets/{chunk-3OPIFGDE-BG_ijJhE.js → chunk-3OPIFGDE-C5c2MY1i.js} +1 -1
- package/viewer/dist/assets/{chunk-4BX2VUAB-Bgz1tnDP.js → chunk-4BX2VUAB-BjYatXZ-.js} +1 -1
- package/viewer/dist/assets/{chunk-55IACEB6-NdWURd2K.js → chunk-55IACEB6-A3JXj2W_.js} +1 -1
- package/viewer/dist/assets/{chunk-5ZQYHXKU-wzW5x_7z.js → chunk-5ZQYHXKU-zDiW1Z3e.js} +1 -1
- package/viewer/dist/assets/{chunk-727SXJPM-BxKeJXYf.js → chunk-727SXJPM-CI3VBaXr.js} +1 -1
- package/viewer/dist/assets/{chunk-AQP2D5EJ-gPm6xhPX.js → chunk-AQP2D5EJ-DHpkJ1wF.js} +1 -1
- package/viewer/dist/assets/{chunk-BSJP7CBP-C30ZXEUD.js → chunk-BSJP7CBP-DXx1-_Zs.js} +1 -1
- package/viewer/dist/assets/{chunk-CSCIHK7Q-C9h7yfl1.js → chunk-CSCIHK7Q-DQOe6SQo.js} +6 -6
- package/viewer/dist/assets/{chunk-FMBD7UC4-BcSnkYc3.js → chunk-FMBD7UC4-DSvwBCfP.js} +1 -1
- package/viewer/dist/assets/{chunk-KSCS5N6A-rxSD5-MD.js → chunk-KSCS5N6A-C3haQOao.js} +1 -1
- package/viewer/dist/assets/{chunk-L5ZTLDWV-DGwFsVWy.js → chunk-L5ZTLDWV-DyHfVaRK.js} +1 -1
- package/viewer/dist/assets/{chunk-LZXEDZCA-BY3sTuvt.js → chunk-LZXEDZCA-CtMQqok_.js} +2 -2
- package/viewer/dist/assets/{chunk-ND2GUHAM-PqmKwdzq.js → chunk-ND2GUHAM-Cfp2zN_i.js} +1 -1
- package/viewer/dist/assets/{chunk-NZK2D7GU-BAZbzxhl.js → chunk-NZK2D7GU-Cn753oIP.js} +1 -1
- package/viewer/dist/assets/{chunk-O5CBEL6O-SvZfZ-0j.js → chunk-O5CBEL6O-BO32_B2k.js} +1 -1
- package/viewer/dist/assets/chunk-QZHKN3VN-uc4X3bta.js +1 -0
- package/viewer/dist/assets/chunk-WU5MYG2G-D-wARmLR.js +1 -0
- package/viewer/dist/assets/{chunk-XPW4576I-1OXPbRQX.js → chunk-XPW4576I-DQFQAfwD.js} +1 -1
- package/viewer/dist/assets/classDiagram-4FO5ZUOK-CosoTts2.js +1 -0
- package/viewer/dist/assets/classDiagram-v2-Q7XG4LA2-CosoTts2.js +1 -0
- package/viewer/dist/assets/{cose-bilkent-S5V4N54A-DtCvLpah.js → cose-bilkent-S5V4N54A-Ibe8V5Cm.js} +1 -1
- package/viewer/dist/assets/{dagre-BM42HDAG-B55Ilz10.js → dagre-BM42HDAG-BlOzR9WP.js} +1 -1
- package/viewer/dist/assets/{diagram-2AECGRRQ-ClqSMarp.js → diagram-2AECGRRQ-l8omQVTU.js} +1 -1
- package/viewer/dist/assets/{diagram-5GNKFQAL-Dx74UdxY.js → diagram-5GNKFQAL-_rHQzAtO.js} +1 -1
- package/viewer/dist/assets/{diagram-KO2AKTUF-Vj0buH8e.js → diagram-KO2AKTUF-DCLRVRMY.js} +1 -1
- package/viewer/dist/assets/{diagram-LMA3HP47-DpEm8RZd.js → diagram-LMA3HP47-14HnEIqk.js} +1 -1
- package/viewer/dist/assets/{diagram-OG6HWLK6-Crl3BdwC.js → diagram-OG6HWLK6-CVKNCbkR.js} +1 -1
- package/viewer/dist/assets/{dist-C2uHOEFB.js → dist-BcVVfWxM.js} +1 -1
- package/viewer/dist/assets/{erDiagram-TEJ5UH35-B-Mf-EHP.js → erDiagram-TEJ5UH35-CNjpEfJD.js} +1 -1
- package/viewer/dist/assets/eventmodeling-FCH6USID-Dv27utnc.js +1 -0
- package/viewer/dist/assets/{flowDiagram-I6XJVG4X-B9stChWN.js → flowDiagram-I6XJVG4X-Bvekb5gu.js} +1 -1
- package/viewer/dist/assets/{ganttDiagram-6RSMTGT7-DzWlclwM.js → ganttDiagram-6RSMTGT7-2TpeWF0N.js} +1 -1
- package/viewer/dist/assets/{gitGraph-WXDBUCRP-CdVI3GTp.js → gitGraph-WXDBUCRP-CPfybYvf.js} +1 -1
- package/viewer/dist/assets/{gitGraphDiagram-PVQCEYII-Dn9yRc1N.js → gitGraphDiagram-PVQCEYII-BWZNJ9lY.js} +1 -1
- package/viewer/dist/assets/index-BEJYsfzU.css +2 -0
- package/viewer/dist/assets/{index-BsGRgBOD.js → index-Cqx2pndu.js} +3 -3
- package/viewer/dist/assets/{info-J43DQDTF-CXV3Mm9T.js → info-J43DQDTF-CxgngY4X.js} +1 -1
- package/viewer/dist/assets/{infoDiagram-5YYISTIA-zIUka_J2.js → infoDiagram-5YYISTIA-CARF_viY.js} +1 -1
- package/viewer/dist/assets/{ishikawaDiagram-YF4QCWOH-DsZwNuE3.js → ishikawaDiagram-YF4QCWOH-DcxZvtur.js} +1 -1
- package/viewer/dist/assets/{journeyDiagram-JHISSGLW-BhSTSB2s.js → journeyDiagram-JHISSGLW-Wu7zolY5.js} +1 -1
- package/viewer/dist/assets/{kanban-definition-UN3LZRKU-sCAldj86.js → kanban-definition-UN3LZRKU--LMKLf5s.js} +1 -1
- package/viewer/dist/assets/{line-D7b3fopb.js → line-DH7DV7uw.js} +1 -1
- package/viewer/dist/assets/{linear-BWlvVc_d.js → linear-C6xJ2LrZ.js} +1 -1
- package/viewer/dist/assets/{mermaid-parser.core-BdEYBvaj.js → mermaid-parser.core-DkqLwTDu.js} +2 -2
- package/viewer/dist/assets/{mermaid.core-C9bGWeJU.js → mermaid.core-H-eI9axh.js} +3 -3
- package/viewer/dist/assets/{mindmap-definition-RKZ34NQL-DbTvvku-.js → mindmap-definition-RKZ34NQL-xjt8VE8m.js} +1 -1
- package/viewer/dist/assets/{packet-YPE3B663-DRfLruyq.js → packet-YPE3B663-BX0W_wIa.js} +1 -1
- package/viewer/dist/assets/{pie-LRSECV5Y-47xXMkK-.js → pie-LRSECV5Y-B8cD_uBh.js} +1 -1
- package/viewer/dist/assets/{pieDiagram-4H26LBE5-Ckno9E1M.js → pieDiagram-4H26LBE5-DpM-20zS.js} +1 -1
- package/viewer/dist/assets/{quadrantDiagram-W4KKPZXB-XB5kJ_2c.js → quadrantDiagram-W4KKPZXB-CLS4_FQ4.js} +1 -1
- package/viewer/dist/assets/{radar-GUYGQ44K-CLwIH5Zr.js → radar-GUYGQ44K-CQKcm4b5.js} +1 -1
- package/viewer/dist/assets/{requirementDiagram-4Y6WPE33-D3fApL0X.js → requirementDiagram-4Y6WPE33-ESLvOyQ5.js} +1 -1
- package/viewer/dist/assets/{sankeyDiagram-5OEKKPKP-6UdaRhuZ.js → sankeyDiagram-5OEKKPKP-BT6w9JdP.js} +1 -1
- package/viewer/dist/assets/{sequenceDiagram-3UESZ5HK-ClIrrs0w.js → sequenceDiagram-3UESZ5HK-DJNAaEbv.js} +1 -1
- package/viewer/dist/assets/{src-BPb55SrS.js → src-ituc2uBy.js} +1 -1
- package/viewer/dist/assets/{stateDiagram-AJRCARHV-CCsrcv5R.js → stateDiagram-AJRCARHV-Bw7VoMlA.js} +1 -1
- package/viewer/dist/assets/stateDiagram-v2-BHNVJYJU-DZdCGd2U.js +1 -0
- package/viewer/dist/assets/{timeline-definition-PNZ67QCA-BkiWQlVI.js → timeline-definition-PNZ67QCA-Ddr17PAT.js} +1 -1
- package/viewer/dist/assets/{treeView-BLDUP644-m1mGpAE8.js → treeView-BLDUP644-mqjp8QBZ.js} +1 -1
- package/viewer/dist/assets/{treemap-LRROVOQU-Bapvwi0Q.js → treemap-LRROVOQU-BeaxV5lr.js} +1 -1
- package/viewer/dist/assets/{vennDiagram-CIIHVFJN-BlH71Nmx.js → vennDiagram-CIIHVFJN-ySQYfWol.js} +1 -1
- package/viewer/dist/assets/{wardley-L42UT6IY-CPRSoKgV.js → wardley-L42UT6IY-BvtBpxdo.js} +1 -1
- package/viewer/dist/assets/{wardleyDiagram-YWT4CUSO-C-ptFJ9t.js → wardleyDiagram-YWT4CUSO-DRZFQiXX.js} +1 -1
- package/viewer/dist/assets/{xychartDiagram-2RQKCTM6-C4rfeH4W.js → xychartDiagram-2RQKCTM6-kXPrRy2n.js} +1 -1
- package/viewer/dist/index.html +2 -2
- package/docs/001-file-format.md +0 -265
- package/docs/002-mcp.md +0 -186
- package/docs/003-mcp-upgrade-plan.md +0 -138
- package/viewer/dist/assets/architecture-7EHR7CIX-BAboPvK1.js +0 -1
- package/viewer/dist/assets/channel-D8YnBgqu.js +0 -1
- package/viewer/dist/assets/chunk-QZHKN3VN-ClYnv9g5.js +0 -1
- package/viewer/dist/assets/chunk-WU5MYG2G-CvL2Yleq.js +0 -1
- package/viewer/dist/assets/classDiagram-4FO5ZUOK-B8YUd1jx.js +0 -1
- package/viewer/dist/assets/classDiagram-v2-Q7XG4LA2-B8YUd1jx.js +0 -1
- package/viewer/dist/assets/eventmodeling-FCH6USID-CZ5gxAxG.js +0 -1
- package/viewer/dist/assets/index-Bqs39Itl.css +0 -2
- package/viewer/dist/assets/stateDiagram-v2-BHNVJYJU-C1phrPNi.js +0 -1
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ Requires Node ≥ 22.
|
|
|
38
38
|
```sh
|
|
39
39
|
constellation init # scaffold constellation/ with a starter plan.md
|
|
40
40
|
constellation lint # validate handles, references, folders, schemas
|
|
41
|
+
constellation rename A-X A-Y # rename a card + rewrite every reference to it
|
|
41
42
|
constellation mcp # run the MCP server (stdio) for AI agents
|
|
42
43
|
constellation serve # open the local viewer (editable; --readonly to disable)
|
|
43
44
|
constellation repos # list sibling repos declared in connected_repos
|
|
@@ -53,12 +54,11 @@ unknown fields, dangling prose links) don't block.
|
|
|
53
54
|
|
|
54
55
|
| Path | What |
|
|
55
56
|
|---|---|
|
|
56
|
-
| `
|
|
57
|
-
| `docs/002-mcp.md` | MCP design: tool surface, hydration, write semantics, git layer |
|
|
57
|
+
| `constellation/` | Constellation's own plan — the format spec, MCP design, and architecture as connected cards (formerly `docs/`); also a flagship real-world plan |
|
|
58
58
|
| `schemas/` | JSON Schemas: `card.json` (reserved keys) + one per type |
|
|
59
59
|
| `skill/` | AI authoring skill: `SKILL.md` + per-type references with golden examples |
|
|
60
60
|
| `src/core/` | Parser, reference extraction, indexer, schema validation, lint |
|
|
61
|
-
| `src/cli/` | The `constellation` binary (`init`, `lint`, `mcp`, `serve`, `repos`) |
|
|
61
|
+
| `src/cli/` | The `constellation` binary (`init`, `lint`, `rename`, `mcp`, `serve`, `repos`) |
|
|
62
62
|
| `src/mcp/` | MCP server: hydrated retrieval, validated writes, git tools |
|
|
63
63
|
| `examples/constellation/` | Golden sample plan — one card of every type, lints clean, doubles as the test fixture |
|
|
64
64
|
|
|
@@ -77,11 +77,18 @@ npm run build # tsc → dist/
|
|
|
77
77
|
|
|
78
78
|
- **Hydrated retrieval**: `get_card`, `search`, and `traverse` can return
|
|
79
79
|
connected cards with their complete frontmatter and body in one call.
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
`list_cards` and `traverse` filter by status — `["planned", "building", "none"]`
|
|
81
|
+
is the backlog view (everything not yet built).
|
|
82
|
+
- **Validated writes**: `create_card` / `create_cards`, `update_card`,
|
|
83
|
+
`append_note` / `edit_section` (byte-cheap memory writes), `set_verified`,
|
|
84
|
+
`rename_card` (rewrites every reference plan-wide), `delete_card`,
|
|
85
|
+
`add_connection(s)`, `remove_connection` — every write lints and returns issues.
|
|
82
86
|
Body-only updates never reformat frontmatter.
|
|
87
|
+
- **Queryable memory**: `search` matches appended note text; `list_notes` lists
|
|
88
|
+
notes across cards by kind (every gotcha / decision in one call).
|
|
83
89
|
- **Git-powered change tracking**: `diff_plan` (per-card changes since the sync
|
|
84
|
-
marker), `plan_log`, `set_sync_point`, `
|
|
90
|
+
marker), `plan_log`, `set_sync_point`, `stale_report` / `check_sync`
|
|
91
|
+
(bound-code drift since a card was verified), `check_integrity`.
|
|
85
92
|
- **Connected repos (multi-repo)**: a plan can declare sibling repos
|
|
86
93
|
(`add_connected_repo` / `list_connected_repos` / `remove_connected_repo`); every
|
|
87
94
|
tool takes an optional `repo` selector to read or write a sibling's plan. Omit it
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Agent guidance (three copies)
|
|
3
|
+
kind: policy
|
|
4
|
+
status: built
|
|
5
|
+
code_refs:
|
|
6
|
+
- skill/SKILL.md
|
|
7
|
+
- skill/methodology.md
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Agent guidance
|
|
11
|
+
|
|
12
|
+
How AI agents are taught to use Constellation. The guidance lives in **three unshared copies
|
|
13
|
+
that must stay consistent**: the MCP `INSTRUCTIONS` string ([[FILE-MCP-SERVER]]) and the skill
|
|
14
|
+
(`skill/SKILL.md` + `skill/methodology.md`). None imports another, so any change to how an
|
|
15
|
+
agent should use the plan must land in all three.
|
|
16
|
+
|
|
17
|
+
Core stance: treat the plan as **durable, cross-session memory** (read the neighborhood before
|
|
18
|
+
changing code; update cards as part of "done"); be **plan-first** when changing behavior
|
|
19
|
+
(express the end state as cards, get sign-off on the plan diff, then bring code up to match —
|
|
20
|
+
[[FLOW-SYNC-PLAN]]); act as an **orchestrator** for large work (partition into file-disjoint
|
|
21
|
+
neighborhoods, one card per agent, then verify). `skill/methodology.md` also backs the MCP
|
|
22
|
+
`bootstrap_plan` / `audit_plan` prompts. See [[DOC-MCP-UPGRADES]] for the why.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: SyncPill
|
|
3
|
+
kind: ui
|
|
4
|
+
status: built
|
|
5
|
+
code_refs:
|
|
6
|
+
- viewer/src/components/SyncPill.svelte
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Glanceable freshness pill — renders `computeSyncStatus` ([[FILE-SYNC]]) state (in-sync / drifted / dirty / never-synced), including the marker-unreachable case.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: FEATURE and RELEASE are native card types
|
|
3
|
+
status: built
|
|
4
|
+
connections:
|
|
5
|
+
- DOC-CARD-TYPES
|
|
6
|
+
- FILE-TYPES
|
|
7
|
+
- DECISION-NATIVE-DECISION-TYPE
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# FEATURE and RELEASE are native card types
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
Constellation modeled the *initial* build well — PLAN cards and phases, work
|
|
15
|
+
marked `status: planned` — but had no primitive for how projects actually grow
|
|
16
|
+
afterwards: feature branches that ship in release versions. `planned` marks
|
|
17
|
+
individual cards, yet nothing groups a coherent slice of work; and a version's
|
|
18
|
+
intent (theme, upgrade notes) had no home that isn't a changelog.
|
|
19
|
+
|
|
20
|
+
## Decision
|
|
21
|
+
|
|
22
|
+
Add two types (the 19th and 20th). **FEATURE** — a coherent unit of future
|
|
23
|
+
work, connected to every card it adds or touches; fields `release` (handle of
|
|
24
|
+
the RELEASE it targets — structured ref, auto-connects) and `branch`
|
|
25
|
+
(informational). **RELEASE** — a version milestone; field `version`. Status
|
|
26
|
+
carries each card's arc: a FEATURE goes `planned → building → built` as its
|
|
27
|
+
branch merges; a RELEASE goes `planned → built` as it ships.
|
|
28
|
+
|
|
29
|
+
Two guardrails hold the philosophy:
|
|
30
|
+
|
|
31
|
+
- **FEATURE is not a ticket tracker.** Work that is one card's status flip
|
|
32
|
+
needs no FEATURE card; the backlog stays a `status` query.
|
|
33
|
+
- **RELEASE is not a changelog.** What shipped is git's job ([[DOC-CHANGE-TRACKING]]);
|
|
34
|
+
the card holds only what git can't say — theme, intent, migration notes.
|
|
35
|
+
|
|
36
|
+
## Alternatives
|
|
37
|
+
|
|
38
|
+
- **Scoped PLAN cards per feature** — rejected: plans are living summaries, not
|
|
39
|
+
units of work with an arc; and retrieval by type ("show open features") needs
|
|
40
|
+
a prefix.
|
|
41
|
+
- **External trackers only (issues/boards)** — rejected: the plan is the
|
|
42
|
+
agent-facing memory; work the graph can't see can't be traversed, assembled,
|
|
43
|
+
or drift-checked.
|
|
44
|
+
|
|
45
|
+
## Consequences
|
|
46
|
+
|
|
47
|
+
- The iteration loop is now first-class: feature branch ↔ FEATURE card,
|
|
48
|
+
release version ↔ RELEASE card, wired by `release:`.
|
|
49
|
+
- A shipped FEATURE card stays, like a DECISION card
|
|
50
|
+
([[DECISION-NATIVE-DECISION-TYPE]]) — provenance of why the system grew.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: DECISION is a native card type
|
|
3
|
+
status: built
|
|
4
|
+
connections:
|
|
5
|
+
- DOC-CARD-TYPES
|
|
6
|
+
- DOC-MCP-UPGRADES
|
|
7
|
+
- FILE-TYPES
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# DECISION is a native card type
|
|
11
|
+
|
|
12
|
+
Reverses the earlier call in [[DOC-MCP-UPGRADES]] ("decided AGAINST a dedicated
|
|
13
|
+
`DECISION` card type"). This card is itself the first native decision card — the
|
|
14
|
+
new type records the *why*; [[DOC-CARD-TYPES]] records the *what*.
|
|
15
|
+
|
|
16
|
+
## Context
|
|
17
|
+
|
|
18
|
+
The original reasoning was that co-location beats a separate filing system:
|
|
19
|
+
decisions live as `append_note(kind: decision)` on the cards they concern, or as
|
|
20
|
+
a DOC card (`kind: decision`) when bigger. Field use broke that model two ways:
|
|
21
|
+
|
|
22
|
+
- **Volume.** Real projects accumulated 30+ `DOC-…` decision cards, burying the
|
|
23
|
+
actual documentation (guides, rules) in `doc/` and making "every decision" a
|
|
24
|
+
kind-filter query instead of a folder and a type.
|
|
25
|
+
- **Fan-out.** A decision routinely shapes *several* cards, so there is no single
|
|
26
|
+
card to co-locate a note on. The graph already had the right primitive —
|
|
27
|
+
connections — but no node type for the decision itself.
|
|
28
|
+
|
|
29
|
+
The skill also already mandated one-file-per-decision ("Decisions (ADRs) get one
|
|
30
|
+
DOC card each"), so the "separate filing system" existed either way; it was just
|
|
31
|
+
typed as documentation.
|
|
32
|
+
|
|
33
|
+
## Decision
|
|
34
|
+
|
|
35
|
+
Add `DECISION-` / `decision/` as the 18th type. A DECISION card is an ADR — the
|
|
36
|
+
choice, the why, the alternatives rejected — **connected to every card it
|
|
37
|
+
shaped**. One structured field, `supersedes` (an earlier DECISION handle; must
|
|
38
|
+
resolve, and connects the two). Superseded decisions are kept, never deleted.
|
|
39
|
+
|
|
40
|
+
`append_note(kind: decision)` stays: it remains the right home for a choice local
|
|
41
|
+
to a single card. Promote a note to a DECISION card when the choice touches more
|
|
42
|
+
than one card or the rejected alternatives are worth recording.
|
|
43
|
+
|
|
44
|
+
## Alternatives
|
|
45
|
+
|
|
46
|
+
- **Status quo (DOC `kind: decision`)** — rejected: pollutes `doc/`, invisible in
|
|
47
|
+
the type system, and retrieval (viewer nav, `list_cards`, `describe_type`)
|
|
48
|
+
can't treat decisions as first-class.
|
|
49
|
+
- **Notes only, no decision cards** — rejected: cross-cutting decisions have no
|
|
50
|
+
co-location target; splitting one rationale across N notes drifts.
|
|
51
|
+
|
|
52
|
+
## Consequences
|
|
53
|
+
|
|
54
|
+
- `doc/` is documentation again: suggested DOC kinds shrink to guide / rule / meta.
|
|
55
|
+
- Adding the type touched the usual four places ([[DOC-CARD-TYPES]]) plus the
|
|
56
|
+
three agent-guidance copies and the viewer palette.
|
|
57
|
+
- Existing plans with `DOC-…` decision cards can migrate one card at a time with
|
|
58
|
+
`rename_card` (e.g. `DOC-DECISION-X` → `DECISION-X`); nothing forces it.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Architecture pipeline
|
|
3
|
+
kind: flowchart
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Architecture
|
|
8
|
+
|
|
9
|
+
One direction: **files → index → (lint | serve | mcp)**. Every consumer reloads the index from
|
|
10
|
+
disk per operation, so it's always correct under parallel edits.
|
|
11
|
+
|
|
12
|
+
```mermaid
|
|
13
|
+
flowchart TD
|
|
14
|
+
files["constellation/ files"] --> FILE-INDEXER
|
|
15
|
+
FILE-PARSE --> FILE-INDEXER
|
|
16
|
+
FILE-EXTRACT --> FILE-INDEXER
|
|
17
|
+
FILE-HANDLES --> FILE-INDEXER
|
|
18
|
+
FILE-VALIDATE --> FILE-LINT
|
|
19
|
+
FILE-INDEXER --> FILE-LINT
|
|
20
|
+
FILE-INDEXER --> FILE-MCP-SERVER
|
|
21
|
+
FILE-INDEXER --> FILE-SERVE
|
|
22
|
+
FILE-LINT --> FILE-CLI
|
|
23
|
+
FILE-MCP-SERVER --> FILE-CODE
|
|
24
|
+
FILE-MCP-SERVER --> FILE-GIT
|
|
25
|
+
FILE-MCP-SERVER --> FILE-WRITER
|
|
26
|
+
FILE-SERVE --> FILE-WRITER
|
|
27
|
+
FILE-SERVE --> PAGE-VIEWER-HOME
|
|
28
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: The 20 card types
|
|
3
|
+
kind: reference
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The 20 card types
|
|
8
|
+
|
|
9
|
+
The prefix before the first dash determines a card's type and must be one of these 20. Folder
|
|
10
|
+
placement matches the type (a misfiled card warns W001, not errors — the prefix is
|
|
11
|
+
authoritative). Defined in [[FILE-TYPES]] (`TYPE_NAMES`) and [[FILE-HANDLES]] (`TYPE_FOLDERS`).
|
|
12
|
+
|
|
13
|
+
| Type | Prefix | Folder | What it is |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| API | `API-` | `api/` | HTTP/RPC endpoints |
|
|
16
|
+
| DB | `DB-` | `db/` | Database tables / collections |
|
|
17
|
+
| DATATYPE | `DATATYPE-` | `datatype/` | Data type schemas (interfaces, Zod, etc.) |
|
|
18
|
+
| ROLE | `ROLE-` | `role/` | User roles / permission groups |
|
|
19
|
+
| DOC | `DOC-` | `doc/` | Documentation cards |
|
|
20
|
+
| DECISION | `DECISION-` | `decision/` | Architecture decision records — the why + rejected alternatives |
|
|
21
|
+
| FILE | `FILE-` | `file/` | Source file references (require `path`) |
|
|
22
|
+
| TEST | `TEST-` | `test/` | Test specs |
|
|
23
|
+
| EXTERNAL | `EXTERNAL-` | `external/` | External services / integrations |
|
|
24
|
+
| EVENT | `EVENT-` | `event/` | Domain events / signals |
|
|
25
|
+
| COMPONENT | `COMPONENT-` | `component/` | Reusable UI components |
|
|
26
|
+
| PAGE | `PAGE-` | `page/` | Frontend routes / screens |
|
|
27
|
+
| JOB | `JOB-` | `job/` | Background / scheduled / queued work |
|
|
28
|
+
| FLOW | `FLOW-` | `flow/` | Multi-step sequenced processes |
|
|
29
|
+
| STATE | `STATE-` | `state/` | State machines |
|
|
30
|
+
| DIAGRAM | `DIAGRAM-` | `diagram/` | Architecture diagrams |
|
|
31
|
+
| AGENT | `AGENT-` | `agent/` | AI agent instructions / policies |
|
|
32
|
+
| PLAN | `PLAN-` | `plan/` | Plan documents (`plan.md` = PLAN-PROJECT) |
|
|
33
|
+
| FEATURE | `FEATURE-` | `feature/` | Future work units — the iteration primitive |
|
|
34
|
+
| RELEASE | `RELEASE-` | `release/` | Version milestones — theme + upgrade notes, never a changelog |
|
|
35
|
+
|
|
36
|
+
**Adding or renaming a type touches four places that must agree:** `TYPE_NAMES`
|
|
37
|
+
([[FILE-TYPES]]) + `TYPE_FOLDERS` ([[FILE-HANDLES]]); `schemas/<folder>.json`;
|
|
38
|
+
`skill/types/<folder>.md`; and a sample card in `examples/` + this table. Each type's
|
|
39
|
+
frontmatter schema + golden example is served live by the MCP `describe_type` tool.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Change tracking & sync
|
|
3
|
+
kind: spec
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Change tracking & sync
|
|
8
|
+
|
|
9
|
+
**What changed is git's job**, never stamped into cards: `git diff <ref> -- constellation/`
|
|
10
|
+
*is* the plan diff. [[FILE-GIT]] exposes it as `diff_plan` / `plan_log`; plan changes ride
|
|
11
|
+
branches and PRs, and reviewing a plan PR is the human approval gate before an AI syncs code.
|
|
12
|
+
|
|
13
|
+
**Sync marker** — a reconciling agent records the last plan commit it synced code against in
|
|
14
|
+
`constellation/.sync.json` (plan-global, via `set_sync_point`). [[FILE-SYNC]]'s
|
|
15
|
+
`computeSyncStatus` reports `drifted` when the plan moved past the marker or code commits land
|
|
16
|
+
after it, and `marker_error` → `drifted` when the marker sha is unreachable (rebase / shallow
|
|
17
|
+
clone / hand-edited marker).
|
|
18
|
+
|
|
19
|
+
**Lifecycle** — `status` (`planned`→`building`→`built`→`verified`) is a card property,
|
|
20
|
+
orthogonal to history. Verify only against real code.
|
|
21
|
+
|
|
22
|
+
**Verification provenance vs. change tracking** — the one recorded per-card baseline is
|
|
23
|
+
`verified_sha` / `verified_at`: `set_verified` stamps the sha a card was checked at. That's the
|
|
24
|
+
basis of a *claim*, not a change flag — and the drift *verdict* ("has the bound code moved
|
|
25
|
+
since?") is recomputed live by `stale_report` / `check_sync` ([[FILE-CODE]]), never stored.
|
|
26
|
+
This reconciles the "no per-card stamping" rule rather than breaking it. See [[DOC-MCP-UPGRADES]].
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Connected repos (multi-repo)
|
|
3
|
+
kind: spec
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Connected repos (multi-repo)
|
|
8
|
+
|
|
9
|
+
A project spanning several repos declares its siblings on PLAN-PROJECT — the one cross-repo
|
|
10
|
+
concept in the format, deliberately minimal. Each repo's `constellation/` is a standalone plan,
|
|
11
|
+
references only its own cards, and lints clean alone; **connections never cross repos.**
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
# plan.md frontmatter
|
|
15
|
+
connected_repos:
|
|
16
|
+
- name: pyramid-server # the `repo` selector (lowercase id)
|
|
17
|
+
path: ../pyramid-server # relative to this repo's root (or absolute)
|
|
18
|
+
description: Back-end API for Pyramid.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Paths are local topology and are **never linted** — reachability is computed at call time.
|
|
22
|
+
[[FILE-REPOS]] resolves the `repo` selector; every MCP read/write tool accepts it to target a
|
|
23
|
+
sibling. **Plan resolution still never crosses a repo boundary** on its own ([[FILE-RESOLVE]])
|
|
24
|
+
— a sibling is reached only when explicitly named. Management tools: `list_connected_repos`,
|
|
25
|
+
`add_connected_repo` (`reciprocate` writes the reverse link too), `remove_connected_repo`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Diagrams and flows
|
|
3
|
+
kind: reference
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Diagrams and flows
|
|
8
|
+
|
|
9
|
+
Three tiers, cheapest first:
|
|
10
|
+
|
|
11
|
+
1. **Derived subgraphs** — the viewer/MCP render any card's neighborhood from the real
|
|
12
|
+
connection graph on demand. Never stored, never stale. The default for "what does this area
|
|
13
|
+
look like."
|
|
14
|
+
2. **Authored Mermaid** — a DIAGRAM card whose body is a mermaid block; use handles as node IDs
|
|
15
|
+
so the diagram joins the graph ([[FILE-EXTRACT]] reads them). Sequence diagrams and
|
|
16
|
+
`stateDiagram-v2` work the same way in FLOW and STATE cards.
|
|
17
|
+
3. **Pinned layouts** — structured `nodes`/`edges`/`phases` with explicit positions in DIAGRAM
|
|
18
|
+
frontmatter (`schemas/diagram.json`). Only when layout carries meaning; positions make noisy
|
|
19
|
+
diffs.
|
|
20
|
+
|
|
21
|
+
**FLOW cards are linear** — steps are a numbered markdown list, nested items for error/edge
|
|
22
|
+
cases. Real branching belongs in a mermaid flowchart or a STATE card.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: File format
|
|
3
|
+
kind: spec
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# File format
|
|
8
|
+
|
|
9
|
+
Constellation stores a project's architecture plan as markdown files under a `constellation/`
|
|
10
|
+
folder. Each file is one **card** — one typed piece of the plan, linked to others by
|
|
11
|
+
**connections**. ("Node" is reserved for diagram elements inside DIAGRAM cards.) This is the
|
|
12
|
+
normative format; the JSON Schemas in `schemas/` define per-type frontmatter and
|
|
13
|
+
[[FILE-INDEXER]] is the reference implementation.
|
|
14
|
+
|
|
15
|
+
## Files are handles
|
|
16
|
+
|
|
17
|
+
The filename IS the handle: `api/API-TICKETS.md` defines the card `API-TICKETS`. There is no
|
|
18
|
+
`handle:` or `type:` field — the path already says it. Handle grammar:
|
|
19
|
+
`^[A-Z][A-Z0-9]*-[A-Z0-9][A-Z0-9-]*$` (3–135 chars; uppercase, digits, dashes). The prefix
|
|
20
|
+
before the first dash is the type and must be one of the 20 canonical prefixes (see
|
|
21
|
+
[[DOC-CARD-TYPES]]). `plan.md` at the root is the one special file — the card `PLAN-PROJECT`.
|
|
22
|
+
|
|
23
|
+
## Frontmatter
|
|
24
|
+
|
|
25
|
+
YAML frontmatter is optional; a card with none is valid. Four keys are **reserved**
|
|
26
|
+
(`schemas/card.json`): `name`, `kind` (lowercase-slug subtype), `status`
|
|
27
|
+
(`planned`→`building`→`built`→`verified`), `connections` (list of handles). Beyond those,
|
|
28
|
+
card.json also defines **cross-type metadata** valid on any card, tool-managed rather than
|
|
29
|
+
hand-authored: `code_refs` (code binding, `path` or `path:symbol`), `verified_sha` /
|
|
30
|
+
`verified_at` (the drift baseline — see [[DOC-CHANGE-TRACKING]]), and `notes` (append-only
|
|
31
|
+
typed memory `{kind,text,sha?}`). Everything else is a type-specific field. Schemas are
|
|
32
|
+
permissive: almost nothing is required; unknown fields warn (W003) rather than fail.
|
|
33
|
+
|
|
34
|
+
## The graph (four connection sources)
|
|
35
|
+
|
|
36
|
+
[[FILE-INDEXER]] derives the connection set, in all cards, from: (1) the `connections:` list;
|
|
37
|
+
(2) any handle-shaped string elsewhere in frontmatter (so `response_schema: DATATYPE-TICKET`
|
|
38
|
+
connects automatically); (3) `[[HANDLE]]` wiki-links in the body; (4) handle-shaped IDs inside
|
|
39
|
+
mermaid blocks. Connections are **undirected** and deduped by pair — declare on whichever card
|
|
40
|
+
you're editing; the reverse view is the indexer's job, never written to disk. Extraction lives
|
|
41
|
+
in [[FILE-EXTRACT]].
|
|
42
|
+
|
|
43
|
+
## Body conventions
|
|
44
|
+
|
|
45
|
+
Markdown narrative. DATATYPE: the type as a fenced code block. FLOW: a numbered list of steps
|
|
46
|
+
(linear — branch via mermaid or a STATE card). STATE: a mermaid `stateDiagram-v2`. DIAGRAM: a
|
|
47
|
+
mermaid flowchart with handles as node IDs. See [[DOC-DIAGRAMS]]. Lint codes: [[DOC-LINT-CODES]].
|
|
48
|
+
|
|
49
|
+
## Deliberately not in the format
|
|
50
|
+
|
|
51
|
+
No IDs but handles. No cross-repo card references (siblings link at the project level — see
|
|
52
|
+
[[DOC-CONNECTED-REPOS]]). No connection kinds / directions / metadata — put nuance in prose. No
|
|
53
|
+
revision/diff machinery — git does that. No required fields beyond the filename, except FILE
|
|
54
|
+
cards require `path`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Lint codes
|
|
3
|
+
kind: reference
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Lint codes
|
|
8
|
+
|
|
9
|
+
Errors break the graph (CLI exit 1; CI should block). Warnings are quality signals (exit 0).
|
|
10
|
+
Structural codes come from [[FILE-INDEXER]]; schema codes (W002/W003) from [[FILE-VALIDATE]];
|
|
11
|
+
[[FILE-LINT]] composes and sorts them.
|
|
12
|
+
|
|
13
|
+
**Errors**
|
|
14
|
+
|
|
15
|
+
| Code | Rule |
|
|
16
|
+
|---|---|
|
|
17
|
+
| E001 | Filename is not a valid handle |
|
|
18
|
+
| E002 | Handle prefix is not one of the 20 canonical prefixes |
|
|
19
|
+
| E003 | Duplicate handle (two files resolve to the same handle) |
|
|
20
|
+
| E004 | `connections` entry is not a handle-shaped string |
|
|
21
|
+
| E005 | `connections` or frontmatter-field target resolves to no card |
|
|
22
|
+
| E006 | Frontmatter is not valid YAML |
|
|
23
|
+
|
|
24
|
+
**Warnings**
|
|
25
|
+
|
|
26
|
+
| Code | Rule |
|
|
27
|
+
|---|---|
|
|
28
|
+
| W001 | Card is not in the folder matching its type |
|
|
29
|
+
| W002 | Frontmatter violates the type's JSON Schema |
|
|
30
|
+
| W003 | Unknown frontmatter field (not a reserved/cross-type key from card.json, not in the type schema) |
|
|
31
|
+
| W004 | Body `[[link]]` or mermaid reference resolves to no card |
|
|
32
|
+
|
|
33
|
+
The E005/W004 split is deliberate: **structured references are contracts** (a frontmatter
|
|
34
|
+
target must resolve → error); **prose references are aspirational** (a body `[[link]]` may
|
|
35
|
+
point at a card not yet written → warning).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: MCP server design
|
|
3
|
+
kind: reference
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MCP server
|
|
8
|
+
|
|
9
|
+
`constellation mcp` (stdio) gives AI agents graph queries, hydrated retrieval, validated
|
|
10
|
+
writes, and git-powered change tracking over a plan folder. It is a thin layer over
|
|
11
|
+
[[FILE-MCP-SERVER]] + `src/core/`: every tool call reloads the index from disk (tens of ms at
|
|
12
|
+
realistic sizes), so it is always correct while files are edited in parallel — no watcher, no
|
|
13
|
+
cache invalidation. Bootstrap is folder discovery, bounded by the repo root ([[FILE-RESOLVE]]);
|
|
14
|
+
a repo with no plan returns `NO_PLAN_FOUND`. The agent-facing INSTRUCTIONS string is embedded
|
|
15
|
+
in the server — one of three guidance copies, see [[AGENT-GUIDANCE]].
|
|
16
|
+
|
|
17
|
+
## Hydrated retrieval
|
|
18
|
+
|
|
19
|
+
Any read tool can return connected cards with full data in one call — `connected: none |
|
|
20
|
+
summary | full`. The acceptance test: one `get_card` returns an API card plus the complete
|
|
21
|
+
content of every card connected to it (its datatypes, table, tests, docs).
|
|
22
|
+
|
|
23
|
+
## Tool surface
|
|
24
|
+
|
|
25
|
+
- **Read** — `get_card` (+ `code: none|paths|direct`, notes filters), `list_cards`,
|
|
26
|
+
`list_notes` (cross-card notes query by kind/handles), `search` (bodies **and** notes),
|
|
27
|
+
`traverse`, `assemble`, `describe_type` (the type reference, plan-independent).
|
|
28
|
+
`list_cards`/`traverse` filter by status (value or list; `"none"` = unset), so
|
|
29
|
+
`["planned","building","none"]` is the backlog view. On `traverse` status is a
|
|
30
|
+
*post-filter* — the walk passes through non-matching cards so a built hub never hides
|
|
31
|
+
planned work — while `types` prunes the walk itself.
|
|
32
|
+
- **Write** — `create_card`, `create_cards` (batched, lints once), `update_card` (+ `if_mtime`
|
|
33
|
+
stale-write guard), `append_note`, `edit_section`, `set_verified`, `rename_card` (rename a
|
|
34
|
+
handle and rewrite every reference plan-wide, whole-token; the file moves with the prefix —
|
|
35
|
+
shared engine with the CLI `constellation rename`, [[FILE-RENAME]]),
|
|
36
|
+
`delete_card`, `add_connection`, `add_connections`, `remove_connection`. Every write reloads
|
|
37
|
+
+ lints and returns the issues for the file it touched; **a card is created even when issues
|
|
38
|
+
come back** (issues are lint state, not failure). Writes are serialized per file behind an
|
|
39
|
+
in-process lock and land atomically (temp + rename); the cheap writes apply their change to
|
|
40
|
+
the file's *current* content, so concurrent small updates compose instead of clobbering.
|
|
41
|
+
- **Git** — `diff_plan`, `plan_log`, `set_sync_point`, `stale_report`, `check_sync`,
|
|
42
|
+
`check_integrity` (see [[DOC-CHANGE-TRACKING]]).
|
|
43
|
+
- **Viewer** — `start_viewer` / `stop_viewer` ([[PAGE-VIEWER-HOME]]).
|
|
44
|
+
- **Connected repos** — `list` / `add` / `remove_connected_repo`; every tool takes a `repo`
|
|
45
|
+
selector (see [[DOC-CONNECTED-REPOS]]).
|
|
46
|
+
|
|
47
|
+
## Code binding, drift & assembly
|
|
48
|
+
|
|
49
|
+
A card binds to code via a connected FILE `path:` or its own `code_refs`, resolved by
|
|
50
|
+
[[FILE-CODE]]. `get_card(code:"paths"|"direct")` attaches it (capped, repo-contained);
|
|
51
|
+
`stale_report` / `check_sync` flag reverse drift; `assemble` builds file-disjoint work packages.
|
|
52
|
+
Byte-preserving cheap writes ([[FILE-WRITER]]) make a correction cost less than a full rewrite.
|
|
53
|
+
|
|
54
|
+
## What v1 tools deliberately died
|
|
55
|
+
|
|
56
|
+
`expand_handles` (handles ARE the identifiers); `init_project` / `link_project` /
|
|
57
|
+
`check_health` (bootstrap is finding a folder — `init_plan` just creates it);
|
|
58
|
+
`read_plan` / `update_plan` (use `get_card("PLAN-PROJECT")` / `update_card`). Bulk variants were
|
|
59
|
+
kept: `create_cards` / `add_connections` batch and lint once so intra-batch references resolve.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: MCP upgrades & memory model
|
|
3
|
+
kind: decision
|
|
4
|
+
status: built
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MCP upgrades & memory model (decisions)
|
|
8
|
+
|
|
9
|
+
The rationale behind Constellation's role as **durable, cross-session, cross-agent memory**
|
|
10
|
+
for AI agents — the "003" upgrade plan, shipped in v0.2.2 (phases 0–6). This card replaces the
|
|
11
|
+
former `docs/003`; it is the ADR for the memory/durability design.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
Every session an agent pays a "discovery tax" — rebuilding a mental model of the code before it
|
|
16
|
+
can act. Without a place to bank that understanding it evaporates at session end and the next
|
|
17
|
+
agent re-pays it. Constellation's value is that understanding **compounds**. Two failure modes
|
|
18
|
+
erode it: **drift** (a card's claim silently diverges from code — a card you can't trust is
|
|
19
|
+
worse than none) and **friction** (updating a card is expensive, so agents skip it, which
|
|
20
|
+
*causes* drift).
|
|
21
|
+
|
|
22
|
+
## Principles
|
|
23
|
+
|
|
24
|
+
- **`built` is a claim that outlives its author** — claims must be re-verifiable, not taken on
|
|
25
|
+
faith. Durability, not distrust (the same reason you keep tests).
|
|
26
|
+
- **Card what code can't say** — intent, decisions, current state, gotchas, cross-cutting rules.
|
|
27
|
+
Don't duplicate DDL / signatures / code; link to it (copies drift).
|
|
28
|
+
- **Make the honest path the cheap path** — most drift is skipped updates; lower the cost of a
|
|
29
|
+
small correction (`append_note`, `edit_section`) and cards stay true.
|
|
30
|
+
- **Purpose belongs in the intro** — the MCP instructions load every session, so framing changes
|
|
31
|
+
agent defaults more than any tool. See [[AGENT-GUIDANCE]].
|
|
32
|
+
|
|
33
|
+
## Two headline capabilities
|
|
34
|
+
|
|
35
|
+
**Hand me the delta** — what changed since I last looked: plan-side (`diff_plan`) and code-side
|
|
36
|
+
reverse drift (`stale_report`, the core new capability). **Hand me the code behind a card** —
|
|
37
|
+
attach the bound file ([[FILE-CODE]]), so an agent starts from intent + current reality in one
|
|
38
|
+
call. `assemble` fuses both into a fan-out-ready work package.
|
|
39
|
+
|
|
40
|
+
## Decisions on record
|
|
41
|
+
|
|
42
|
+
- **Binding granularity** — FILE-`path:` is the default (zero authoring tax); optional
|
|
43
|
+
`code_refs` add precision (`path` or `path:symbol`) only where drift precision earns its keep.
|
|
44
|
+
Drift is detected at file granularity; the symbol is an informational hint.
|
|
45
|
+
- **No-per-card-stamping, reconciled** — `verified_sha` is verification *provenance*, not a
|
|
46
|
+
change flag; the drift verdict stays live and unstored ([[DOC-CHANGE-TRACKING]], [[FILE-SYNC]]).
|
|
47
|
+
- **Code attach is same-repo** — cards never bind across repos; reach a sibling's code via the
|
|
48
|
+
`repo` selector ([[DOC-CONNECTED-REPOS]]).
|
|
49
|
+
- **Decided AGAINST a dedicated `DECISION` card type** — *superseded by
|
|
50
|
+
[[DECISION-NATIVE-DECISION-TYPE]]*: real projects accumulated dozens of DOC decision cards,
|
|
51
|
+
and cross-cutting decisions have no single card to co-locate a note on. Card-local choices
|
|
52
|
+
still live as `append_note(kind: decision)` on the card they concern.
|
|
53
|
+
- **Memory must be retrievable to be memory** — `search` indexes note text alongside bodies,
|
|
54
|
+
and `list_notes` gives the cross-card view (every gotcha / every decision in one call). A
|
|
55
|
+
note that full-text search can't find would silently defeat the point of appending it.
|
|
56
|
+
- **Deferred** — a structured partial-status model (`{built, pending}`); typed `notes` cover most
|
|
57
|
+
of that need for now.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli/index.ts
|
|
3
|
+
status: built
|
|
4
|
+
path: src/cli/index.ts
|
|
5
|
+
language: typescript
|
|
6
|
+
summary: The constellation binary (commander)
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Commands: `init`, `lint`, `rename`, `mcp`, `serve`, `repos`, `version`/`v`, `upgrade`. `lint` exits 1 on errors, 0 otherwise (warnings never fail), 2 when no plan is found. `rename OLD NEW` is the human-facing wrapper over [[FILE-RENAME]] — it prints the rewritten references and a lint-error count.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code.ts
|
|
3
|
+
status: built
|
|
4
|
+
path: src/core/code.ts
|
|
5
|
+
language: typescript
|
|
6
|
+
summary: Code binding + attach (same-repo, contained, capped)
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Resolves a card's bound files — connected FILE `path:` + own `code_refs` — and attaches their contents under per-file (64 KB) and total (256 KB) caps, skipping binaries / lockfiles / generated and rejecting paths (incl. symlinks) that escape the repo root. A file over the per-file cap attaches its head with `truncated: true` rather than being skipped. Shared by `get_card` code mode, stale_report, and assemble.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: extract.ts
|
|
3
|
+
status: built
|
|
4
|
+
path: src/core/extract.ts
|
|
5
|
+
language: typescript
|
|
6
|
+
summary: Pull references out of a card body and frontmatter
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Extracts the four connection sources: `[[HANDLE]]` wiki-links, handle-shaped frontmatter values, and mermaid node IDs. Only handle-shaped tokens count.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git.ts
|
|
3
|
+
status: built
|
|
4
|
+
path: src/core/git.ts
|
|
5
|
+
language: typescript
|
|
6
|
+
summary: Git plumbing for change tracking + drift
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
`diffPlan` (per-card delta), `planLog`, sync-marker read/write, `headSha`, `changedFilesSince`, `countCodeCommitsSince`, `recentPlanActivity`. Every caller-supplied revision is guarded by `safeRev` + `--end-of-options` so a dash-leading value can't be parsed as a git option.
|