codecartographer-pi 0.1.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.
Files changed (75) hide show
  1. package/.codecarto/BACKLOG.md +192 -0
  2. package/.codecarto/CHANGELOG-2026-05-02-feedback-pass.md +118 -0
  3. package/.codecarto/CONTRIBUTING.md +56 -0
  4. package/.codecarto/GUIDE.md +298 -0
  5. package/.codecarto/LICENSE +21 -0
  6. package/.codecarto/NEW_THREAD_BLURB.md +47 -0
  7. package/.codecarto/README.md +39 -0
  8. package/.codecarto/THREAD_LOG.md +39 -0
  9. package/.codecarto/closeouts/2026-05-02-framework-feedback-pass.md +111 -0
  10. package/.codecarto/findings/architecture/README.md +3 -0
  11. package/.codecarto/findings/architecture/SKILL.md +102 -0
  12. package/.codecarto/findings/build-and-deploy/.gitkeep +0 -0
  13. package/.codecarto/findings/config-model/.gitkeep +0 -0
  14. package/.codecarto/findings/contracts/README.md +3 -0
  15. package/.codecarto/findings/contracts/SKILL.md +89 -0
  16. package/.codecarto/findings/defect-scan/README.md +18 -0
  17. package/.codecarto/findings/defect-scan/SKILL.md +87 -0
  18. package/.codecarto/findings/defect-scan/passes/01-logic-and-correctness.md +50 -0
  19. package/.codecarto/findings/defect-scan/passes/02-error-handling.md +55 -0
  20. package/.codecarto/findings/defect-scan/passes/03-concurrency-and-resources.md +54 -0
  21. package/.codecarto/findings/defect-scan/passes/04-security-and-trust.md +62 -0
  22. package/.codecarto/findings/defect-scan/passes/05-api-contract-violations.md +57 -0
  23. package/.codecarto/findings/defect-scan/passes/06-config-and-environment.md +58 -0
  24. package/.codecarto/findings/defect-scan-mechanical/README.md +17 -0
  25. package/.codecarto/findings/defect-scan-mechanical/SKILL.md +60 -0
  26. package/.codecarto/findings/defect-scan-semantic/README.md +17 -0
  27. package/.codecarto/findings/defect-scan-semantic/SKILL.md +54 -0
  28. package/.codecarto/findings/porting/README.md +3 -0
  29. package/.codecarto/findings/porting/SKILL.md +52 -0
  30. package/.codecarto/findings/protocols/README.md +3 -0
  31. package/.codecarto/findings/protocols/SKILL.md +87 -0
  32. package/.codecarto/findings/public-surfaces/README.md +3 -0
  33. package/.codecarto/findings/reimplementation-spec/README.md +3 -0
  34. package/.codecarto/findings/reimplementation-spec/SKILL.md +66 -0
  35. package/.codecarto/findings/runtime-lifecycle/README.md +3 -0
  36. package/.codecarto/findings/state-and-storage/README.md +3 -0
  37. package/.codecarto/scratch/.gitkeep +0 -0
  38. package/.codecarto/skills/spec-delta-application/SKILL.md +102 -0
  39. package/.codecarto/templates/architecture-map.md +143 -0
  40. package/.codecarto/templates/behavioral-contracts.md +134 -0
  41. package/.codecarto/templates/closeout-template.md +85 -0
  42. package/.codecarto/templates/conventions-template.md +65 -0
  43. package/.codecarto/templates/decisions-template.md +82 -0
  44. package/.codecarto/templates/defect-fix-tracker.md +77 -0
  45. package/.codecarto/templates/defect-report.md +116 -0
  46. package/.codecarto/templates/deltas-applied.md +71 -0
  47. package/.codecarto/templates/mechanical-defects.md +104 -0
  48. package/.codecarto/templates/protocols-and-state.md +126 -0
  49. package/.codecarto/templates/reimplementation-spec-opinionated.md +183 -0
  50. package/.codecarto/templates/reimplementation-spec.md +148 -0
  51. package/.codecarto/templates/reverse-engineering-bundle.md +141 -0
  52. package/.codecarto/templates/semantic-defects.md +109 -0
  53. package/.codecarto/templates/thread-log-entry-template.md +27 -0
  54. package/.codecarto/workflow/VALIDATE.md +81 -0
  55. package/.codecarto/workflow/pipeline-architecture-only.yaml +38 -0
  56. package/.codecarto/workflow/pipeline-defect-scan.yaml +61 -0
  57. package/.codecarto/workflow/pipeline-full-with-audit.yaml +188 -0
  58. package/.codecarto/workflow/pipeline-full-with-deep-audit.yaml +227 -0
  59. package/.codecarto/workflow/pipeline-lite.yaml +100 -0
  60. package/.codecarto/workflow/pipeline.yaml +163 -0
  61. package/.codecarto/workflow/status.yaml +64 -0
  62. package/LICENSE +21 -0
  63. package/README.md +356 -0
  64. package/core/index.ts +11 -0
  65. package/core/pipeline.ts +175 -0
  66. package/core/prompts.ts +183 -0
  67. package/core/status.ts +155 -0
  68. package/core/types.ts +96 -0
  69. package/core/utils.ts +52 -0
  70. package/core/workspace.ts +81 -0
  71. package/core/yaml.ts +256 -0
  72. package/extensions/codecarto/index.ts +446 -0
  73. package/mcp-server/bin.mjs +7 -0
  74. package/mcp-server/server.ts +497 -0
  75. package/package.json +52 -0
@@ -0,0 +1,298 @@
1
+ # CodeCartographer — LLM Session Guide
2
+
3
+ ## What This Is
4
+
5
+ This is a structured reverse-engineering workspace embedded inside a repository. You are an LLM assistant. Your job is to analyze the source code in this repository (the parent directory, `../`) and produce a reusable evaluation bundle: an architecture map, behavioral contracts, protocol and state notes, a porting synthesis, and a reimplementation spec.
6
+
7
+ All CodeCartographer files live inside this `.codecarto/` folder. The source code is everything outside it.
8
+
9
+ Work in explicit phases. Do not try to do everything at once.
10
+
11
+ ## Roles
12
+
13
+ CodeCartographer distinguishes two roles. They are different jobs, often held by different threads, and the framework's discipline depends on both existing.
14
+
15
+ **Implementing session.** One phase or one module of work, fresh thread, follows a SKILL.md and a template, validates, writes a closeout, ends. The bulk of the framework — phases, skills, templates, validation gates — is written for this role. The "You are an LLM assistant" framing in "What This Is" addresses this role.
16
+
17
+ **Orchestrator.** One persistent thread (typically the first LLM the user points at the project) paired with the human user. The orchestrator holds cross-session context, drafts implementing-session prompts from prior closeouts, curates `CONVENTIONS.md` and `DECISIONS.md` (promoting patterns when they recur), and gates strategic forks the user makes. **The orchestrator does not execute pipeline phases itself** — that is the implementing-session role. The orchestrator's deliverables are *prompts and curated artifacts*, not phase outputs. When the orchestrator finds itself reading a SKILL.md or producing a `findings/<phase>/<primary-output>.md`, it has slipped into the implementing-session role and should stop, draft a prompt, and hand off instead. Without an orchestrator, the framework still works phase-by-phase but cross-cutting conventions and decisions don't accumulate, and each implementing session re-discovers what prior sessions established.
18
+
19
+ If you are an LLM reading this guide for the first time on a project where `CONVENTIONS.md` and `DECISIONS.md` are unwritten (still showing template content) and `closeouts/` is empty, **see "First-Time Project Setup" below before starting any phase.**
20
+
21
+ ## First-Time Project Setup
22
+
23
+ If this is the first LLM to touch this project — no closeouts in `closeouts/`, `CONVENTIONS.md` and `DECISIONS.md` still showing template skeletons, `workflow/status.yaml` at defaults — stop before starting any pipeline phase and have a one-time role conversation with the user. Combine the explanation and the ask in one structured prompt:
24
+
25
+ > "I see this is a fresh CodeCartographer-equipped project. Before I start the analysis, one one-time decision: would you like me to take on the **orchestrator role** for this project, or work session-by-session?
26
+ >
27
+ > The orchestrator role means I'd hold cross-session context across the entire project — drafting prompts for implementation threads you'll spin up, curating two project-wide files (`CONVENTIONS.md` for patterns and `DECISIONS.md` for cross-cutting calls), and gating the strategic forks where you'd want to make a call.
28
+ >
29
+ > How it works in practice: this thread becomes the orchestrator; you spin up fresh threads for each implementation session using the prompts I draft, run them, and paste the closeout report back here. I update `CONVENTIONS.md`/`DECISIONS.md` and prepare the next prompt. The framework's discipline compounds across sessions instead of being reinvented each time.
30
+ >
31
+ > One operational tip: if your coding agent supports renaming and pinning threads, rename this thread to "Orchestrator" and pin it. Keeps it organized and quick to find when you switch back from implementation threads.
32
+ >
33
+ > The alternative is session-by-session work with no cross-session context — the framework still works phase-by-phase, but `CONVENTIONS.md` stays empty and each session has to re-derive patterns from prior closeouts. Better for one-off audits; worse for long-running multi-module projects.
34
+ >
35
+ > Which would you like?"
36
+
37
+ If the user accepts the orchestrator role:
38
+
39
+ 1. Initialize `CONVENTIONS.md` from `templates/conventions-template.md` and `DECISIONS.md` from `templates/decisions-template.md` (skeletons only — populate as patterns and decisions accumulate).
40
+ 2. Set `project_name` in `workflow/status.yaml`.
41
+ 3. **Do not run the architecture phase yourself.** The orchestrator never executes pipeline phases — that is the implementing-session role (see §Roles). Instead, **draft an implementing-session prompt for the architecture phase** that a fresh thread will execute. Hand the prompt to the user; they spin up a new thread with it; the implementing thread runs the phase, validates, writes a closeout, and reports back; you (the orchestrator) read the returned closeout, update `CONVENTIONS.md` / `DECISIONS.md` / `workflow/status.yaml` per the closeout ritual, and draft the next phase's prompt. **Phase work always happens in fresh implementing-session threads, never in the orchestration thread.** A useful self-check: if you find yourself reading a `findings/<phase>/SKILL.md` or writing a `findings/<phase>/<primary-output>.md`, you have slipped into the implementing-session role — stop, draft the prompt, hand off.
42
+
43
+ If the user declines:
44
+
45
+ 1. Note in `THREAD_LOG.md` that the project runs in degraded no-orchestrator mode.
46
+ 2. Proceed phase-by-phase as a standalone implementing session.
47
+ 3. `CONVENTIONS.md` and `DECISIONS.md` stay as templates; closeouts accumulate but cross-cutting promotion doesn't happen.
48
+
49
+ If the user is ambivalent, default to recommending the orchestrator path for any project expected to span more than one phase or module — the framework's compounding-discipline benefits are real and the cost is just paste-and-react work for the user.
50
+
51
+ ## First Read For New Sessions
52
+
53
+ Read these files in order before doing any analysis:
54
+
55
+ 1. This `GUIDE.md` (you are here — `.codecarto/GUIDE.md`).
56
+ 2. `workflow/status.yaml` to see which phases are done and what is next.
57
+ 3. The current phase's existing output file, if one exists (to avoid repeating work).
58
+ 4. The current phase's `SKILL.md` for detailed instructions on what to analyze and produce.
59
+ 5. The output template from `templates/` for the current phase (if starting a new output).
60
+
61
+ All paths in this guide are relative to `.codecarto/` unless stated otherwise.
62
+
63
+ If `project_name` in `workflow/status.yaml` is blank, set it to the name of this repository before starting analysis.
64
+
65
+ Treat this workspace as durable memory across sessions. Do not invent a new structure. Use the one that exists.
66
+
67
+ ## Trust Boundaries
68
+
69
+ Some files in this workspace are **read-only instructions** and must not be modified during analysis. Others are **writable outputs** that you create or update.
70
+
71
+ | Category | Files | Access |
72
+ |---|---|---|
73
+ | Orchestration (read-only) | `GUIDE.md`, `CONTRIBUTING.md`, `LICENSE` | Read only. Never modify. |
74
+ | Skills (read-only) | `findings/*/SKILL.md`, `findings/defect-scan/passes/*.md`, `skills/*/SKILL.md` | Read only. Never modify. |
75
+ | Templates (read-only) | `templates/*.md` | Read only. Never modify. |
76
+ | Pipeline definitions (read-only) | `workflow/pipeline*.yaml`, `workflow/VALIDATE.md` | Read only. Never modify. |
77
+ | Source code (read-only) | `../` (everything outside `.codecarto/`) | Read only. Analyze but never modify. |
78
+ | Workflow state (read-write) | `workflow/status.yaml` | Update to track progress. |
79
+ | Findings (read-write) | `findings/<phase>/<primary-output>.md`, secondary output files | Create and update during phases. |
80
+ | Closeouts (read-write, append-only) | `closeouts/<date>-<phase-or-module>.md`, `THREAD_LOG.md` | Each session writes a new closeout file; `THREAD_LOG.md` is an INDEX pointing to closeouts. |
81
+ | Conventions (orchestrator-maintained) | `CONVENTIONS.md` | Cross-cutting patterns promoted to project-wide invariants. Implementing sessions propose; the orchestrator writes. |
82
+ | Decisions (orchestrator-maintained, append-only) | `DECISIONS.md` | Numbered log of decisions that diverge from spec, prompt, or obvious-default. Appended at session close. |
83
+ | Backlog (read-write) | `BACKLOG.md` | Deferred items with rationale. |
84
+ | Scratch (read-write) | `scratch/*` | Disposable working notes. |
85
+
86
+ If you are uncertain whether a file should be modified, treat it as read-only.
87
+
88
+ ## Pipeline Selection
89
+
90
+ Six pipeline variants are available. Check the `pipeline` field in `workflow/status.yaml` to see which is active.
91
+
92
+ - If the field is **empty**, ask the user which scope to use.
93
+ - If the field points to a **file that does not exist**, stop and ask the user to correct it. Do not guess or fall back to the default pipeline.
94
+
95
+ | Variant | File | Phases | When to use |
96
+ |---|---|---|---|
97
+ | Full with deep audit (default) | `workflow/pipeline-full-with-deep-audit.yaml` | architecture → defect-scan-mechanical → contracts → protocols → defect-scan-semantic → porting → reimplementation-spec | Complete analysis with defect scan split into an early mechanical pass and a deep semantic pass; reimplementation designs around defects with full context |
98
+ | Full with audit | `workflow/pipeline-full-with-audit.yaml` | architecture → defect-scan → contracts → protocols → porting → reimplementation-spec | Single early defect scan; cheaper than the deep variant when you do not need contracts/protocols-grounded defect findings |
99
+ | Full | `workflow/pipeline.yaml` | architecture → contracts → protocols → porting → reimplementation-spec | Porting bundle without defect scan |
100
+ | Defect scan | `workflow/pipeline-defect-scan.yaml` | architecture → defect-scan | Maintenance audit to surface latent problems |
101
+ | Lite | `workflow/pipeline-lite.yaml` | architecture → contracts → protocols | Understanding behavior without porting plans |
102
+ | Architecture only | `workflow/pipeline-architecture-only.yaml` | architecture | Quick structural overview |
103
+
104
+ ## Evaluation Objective
105
+
106
+ Produce a reusable evaluation bundle for the repository. The bundle has two purposes:
107
+
108
+ - **Immediate use**: future sessions can continue the analysis without repeating earlier work.
109
+ - **Future automation**: the same workflow can be pointed at another codebase later.
110
+
111
+ ### Primary Deliverables
112
+
113
+ | Artifact | Location |
114
+ |---|---|
115
+ | Architecture map | `findings/architecture/architecture-map.md` |
116
+ | Defect report | `findings/defect-scan/defect-report.md` |
117
+ | Behavioral contracts | `findings/contracts/behavioral-contracts.md` |
118
+ | Protocols and state | `findings/protocols/protocols-and-state.md` |
119
+ | Reverse-engineering bundle | `findings/porting/reverse-engineering-bundle.md` |
120
+ | Reimplementation spec | `findings/reimplementation-spec/reimplementation-spec.md` |
121
+
122
+ Not all deliverables apply to every pipeline variant. Check your active pipeline YAML for which phases and outputs are included.
123
+
124
+ ### Secondary Artifacts
125
+
126
+ Created only when a phase grows too large or a topic needs standalone treatment. Secondary outputs use `mode: append` — always append to these files, never overwrite content from a previous phase.
127
+
128
+ | Artifact | Location |
129
+ |---|---|
130
+ | Public surfaces notes | `findings/public-surfaces/public-surfaces.md` |
131
+ | Runtime lifecycle notes | `findings/runtime-lifecycle/runtime-lifecycle.md` |
132
+ | State and storage notes | `findings/state-and-storage/state-and-storage.md` |
133
+ | Build and deploy notes | `findings/build-and-deploy/build-and-deploy.md` |
134
+ | Configuration model | `findings/config-model/config-model.md` |
135
+
136
+ ### Primary vs Secondary Output Relationship
137
+
138
+ The two output kinds have different jobs and must not duplicate each other.
139
+
140
+ - **Primary outputs own the map and the load-bearing claims.** They are the canonical reference a downstream phase cites by section anchor. Sections may *summarize* secondary content (one-paragraph synopsis with a pointer) but should not catalog every detail.
141
+ - **Secondary outputs own the catalog-level detail.** They accumulate across phases via `mode: append`, with each phase adding a dated section. A reader who wants the full inventory of public surfaces, the full SQLite migration history, or the full env-var matrix goes here, not to the primary output.
142
+
143
+ If a primary and a secondary output describe the same topic (e.g., the architecture map's `Public Surfaces` section vs. `findings/public-surfaces/public-surfaces.md`), the primary owns the *summary and the claims that downstream phases will cite*; the secondary owns the *enumerated detail*. Conflicting content is a bug — recency wins, and the primary should be updated to point to the latest secondary section.
144
+
145
+ ### Orchestrator-Maintained Artifacts
146
+
147
+ Two cross-cutting files compound across sessions and live at the `.codecarto/` top level:
148
+
149
+ - **`CONVENTIONS.md`** — cross-cutting patterns that have been promoted to project-wide invariants (e.g., a shared discriminated-union return shape, a tripwire-naming vocabulary, a verbatim-spec-quote discipline). Implementing sessions propose additions in their closeout; the orchestrator promotes them. New conventions land when a third independent session reaches for the same pattern, or when a spec/feedback corpus identifies a project-wide invariant.
150
+ - **`DECISIONS.md`** — append-only numbered log of cross-cutting decisions that diverge from spec, prompt, or obvious-default. Each entry: `D<NNN> | <one-liner> | <source-session> | <rationale-pointer>`. Categories partition the namespace (type system, toolchain, module-internal patterns, lifted primitives, etc.).
151
+
152
+ Both files are skeletons in the framework templates (`templates/conventions-template.md`, `templates/decisions-template.md`) and become project-specific artifacts when a session writes to them. They are *orchestrator-maintained*, not implementer-edited — implementing sessions propose, the orchestrator promotes.
153
+
154
+ ## Context Budget
155
+
156
+ Before beginning a phase, estimate how much source material you need to read. For large codebases:
157
+
158
+ - Read structural files first (manifests, entrypoints, READMEs) from the repository root (`../`).
159
+ - Use the architecture map to prioritize which packages to read in detail.
160
+ - Defer deep reads until the current phase actually needs them.
161
+ - If you are running low on context, finish the current section, write a PARTIAL validation, and document what remains in `open_questions` (truly unknown) or `carry_forward` (deferred to a specific later phase) in status.yaml. See "Open Questions vs Carry-Forward" below.
162
+
163
+ ### Subagent Delegation for Large Codebases
164
+
165
+ For codebases over roughly 50 source files or 100K LOC, do not burn primary context on bulk extraction work. Delegate dependency mapping, file inventories, manifest enumeration, and cross-document comparisons to subagents and cite their scratch artifacts (`scratch/<topic>.md`) from the primary output. The primary session reads the synthesized scratch note, not the raw walks. Bless this pattern explicitly so primary context stays for the load-bearing reasoning that the subagent can't do — naming layers, pinning invariants, classifying findings.
166
+
167
+ ### Open Questions vs Carry-Forward
168
+
169
+ `open_questions` does two distinct jobs that the schema separates explicitly:
170
+
171
+ - **`open_questions`** — items that are *still genuinely unknown*. Need more evidence (a runtime test, a maintainer decision, a spec ruling). Not resolvable by any later phase in the current pipeline.
172
+ - **`carry_forward`** — items that are deferred to a specific later phase because the current phase can't responsibly close them but the pipeline naturally will. Each entry has a target phase.
173
+
174
+ Both lists carry structured entries. Recommended shape:
175
+
176
+ ```yaml
177
+ open_questions:
178
+ - id: arch-OQ1
179
+ kind: needs-runtime-test
180
+ description: Does the SSE stream emit a final `done: true` event, or does the connection just close?
181
+ deferred_reason: cannot determine from source alone; requires live capture against the running service.
182
+ carry_forward:
183
+ - id: arch-CF1
184
+ kind: defer-to-phase
185
+ target_phase: defect-scan
186
+ description: The `loadConfig()` callsite returns `{}` on both ENOENT and parse-error — can't tell absent from corrupt.
187
+ deferred_reason: framing this as a defect requires the defect-scan rubric; flagged here so defect-scan picks it up.
188
+ ```
189
+
190
+ `kind` is one of: `needs-runtime-test`, `needs-maintainer-decision`, `needs-spec-ruling`, `defer-to-phase`, `needs-fixture-capture`. The downstream phase scans `carry_forward` entries whose `target_phase` matches its own ID and either resolves them (deleting the entry) or re-defers (updating `target_phase`).
191
+
192
+ ## Phase Selection Logic
193
+
194
+ 1. Load the active pipeline YAML (see `pipeline` field in `workflow/status.yaml`).
195
+ 2. Load `workflow/status.yaml`.
196
+ 3. Traverse `phase_order` in order.
197
+ 4. Pick the first phase whose status is not `complete` and whose `depends_on` phases are all `complete`.
198
+ 5. Load that phase's `skill_path` and all files listed in `required_reads`.
199
+ 6. Run the phase. Write output to `primary_output`.
200
+ 7. Run validation per `workflow/VALIDATE.md`. Append the validation block to the output.
201
+ 8. Enforce completion rules: the primary output file must exist with a PASS or PASS WITH GAPS validation block, status.yaml must reflect completion, and THREAD_LOG.md must have a handoff entry.
202
+
203
+ **Parallel phase warning:** Some phases share the same `depends_on` and can run concurrently (e.g., `contracts` and `protocols` both depend only on `architecture`). If two sessions update `status.yaml` at the same time, the second write will overwrite the first. When running parallel phases, update `status.yaml` carefully — read the file immediately before writing, and preserve the status of any phase completed by a sibling session.
204
+
205
+ ## Session Update Protocol
206
+
207
+ When a session starts:
208
+
209
+ 1. Read this GUIDE.md.
210
+ 2. Read `workflow/status.yaml`.
211
+ 3. Read `CONVENTIONS.md` (if it exists) — the project's accumulated cross-cutting patterns.
212
+ 4. Read the current phase's existing output, if present.
213
+ 5. Read the current phase's `SKILL.md`.
214
+ 6. Read the output template from `templates/` for the current phase (if starting a new output).
215
+ 7. Scan `carry_forward` entries in status.yaml whose `target_phase` matches your phase — these are the items earlier phases routed to you.
216
+
217
+ When a session finishes durable work:
218
+
219
+ 1. Run the validation step described in `workflow/VALIDATE.md`. Append a validation block to the output.
220
+ 2. Update `workflow/status.yaml` (the single source of truth for progress): mark the phase status as `complete`, advance `current_phase` to the next pending phase, and update both `open_questions` and `carry_forward`. When all phases in the pipeline are complete, set `current_phase` to `complete`.
221
+ 3. Record 2-3 key observations in `owner_notes` for the completed phase (e.g., row counts, notable decisions, scope of analysis).
222
+ 4. Write a per-session closeout file at `closeouts/<YYYY-MM-DD>-<phase-or-module>.md` using `templates/closeout-template.md`. Append a one-line index entry to `THREAD_LOG.md` pointing at it.
223
+ 5. Store the durable output in the declared `findings/` path.
224
+ 6. If the session made cross-cutting decisions or discovered project-wide invariants, propose additions to `CONVENTIONS.md` (in the closeout's "Proposed Conventions" section) and `DECISIONS.md` (numbered entries in the closeout's "Decisions Beyond Prompt" section). The orchestrator promotes these to the canonical files.
225
+
226
+ ### Strategic Alignment Hook (before synthesis)
227
+
228
+ Before starting `reimplementation-spec` (or any synthesis phase), confirm with the user — explicitly, in chat — whether the spec is:
229
+
230
+ - **Language-agnostic** (the default; "any port to any stack"), or
231
+ - **Opinionated** (target stack, project identity, scope cuts, named primitives are pre-locked).
232
+
233
+ This conversation produces inputs the synthesis phase actually needs (locked target stack, locked project name, locked scope cuts) and selects the right template. If the answer is "opinionated," use `templates/reimplementation-spec-opinionated.md` instead of the default. Skipping the hook produces a generic spec when the user wanted a specific one — the most informative friction the framework has produced to date. A two-question pre-flight is cheap.
234
+
235
+ ## Guardrails
236
+
237
+ These rules cannot be enforced by the template — they rely on the LLM following instructions. A future code-backed implementation should enforce them programmatically.
238
+
239
+ 1. **Validation gate:** Never set a phase's status to `complete` in `status.yaml` if the validation block contains any FAIL result. Fix the output first, re-run validation, and only then mark complete. If the validation is PASS WITH GAPS, document the gaps in `open_questions` before marking complete.
240
+ 2. **Status recovery:** If `workflow/status.yaml` becomes malformed (bad YAML syntax, missing fields), do not guess at the intended state. Stop and ask the user to review the file. Compare against the phase outputs in `findings/` to reconstruct which phases are actually complete.
241
+ 3. **Output path verification:** After writing a phase's primary output, verify the file path matches the `primary_output` field in the active pipeline YAML. Do not write findings to a path that belongs to a different phase.
242
+
243
+ ## Output Placement Rules
244
+
245
+ - Durable findings go under `findings/<phase>/`.
246
+ - Rough working notes go under `scratch/`.
247
+ - The primary outputs are listed in the deliverables table above.
248
+ - Secondary outputs are created only when needed, using `mode: append`.
249
+ - Per-session closeouts go under `closeouts/<YYYY-MM-DD>-<phase-or-module>.md`. `THREAD_LOG.md` is an INDEX of one-line pointers to those closeouts, not the primary store.
250
+ - Cross-cutting patterns go in `CONVENTIONS.md`; numbered cross-cutting decisions go in `DECISIONS.md`. Both are orchestrator-maintained — implementing sessions propose in their closeout, the orchestrator promotes.
251
+ - Do not store durable findings only in `THREAD_LOG.md`. The log is an index, not the primary artifact store.
252
+
253
+ ## Folder Layout
254
+
255
+ ```
256
+ your-repo/
257
+ src/ # Your source code (whatever structure it has).
258
+ ...
259
+ .codecarto/ # This folder. All CodeCartographer files live here.
260
+ GUIDE.md # This file. LLM entry point.
261
+ findings/
262
+ architecture/ # System structure, layers, dependency direction.
263
+ defect-scan/ # Multi-pass defect report (used by the legacy single-scan pipelines).
264
+ passes/ # Per-category analysis instructions (6 pass files; reused by the split phases below).
265
+ defect-scan-mechanical/ # Early defect pass (passes 1, 2, 6); used by full-with-deep-audit.
266
+ defect-scan-semantic/ # Deep defect pass (passes 3, 4, 5); used by full-with-deep-audit.
267
+ contracts/ # User-visible behavior, defaults, acceptance checks.
268
+ protocols/ # Event streams, state machines, persistence formats.
269
+ porting/ # Reverse-engineering synthesis bundle.
270
+ reimplementation-spec/ # Final language-agnostic build spec.
271
+ public-surfaces/ # (Optional) Extracted public interface notes.
272
+ runtime-lifecycle/ # (Optional) Extracted runtime sequence notes.
273
+ state-and-storage/ # (Optional) Extracted durable state notes.
274
+ build-and-deploy/ # (Optional) Build pipeline and packaging notes.
275
+ config-model/ # (Optional) Configuration inheritance and env behavior.
276
+ scratch/ # Disposable analysis notes.
277
+ templates/ # Output templates and log entry templates.
278
+ skills/
279
+ spec-delta-application/ # Post-pipeline skill: apply triaged spec deltas with citation discipline.
280
+ SKILL.md
281
+ workflow/
282
+ pipeline-full-with-deep-audit.yaml # 7-phase pipeline with split defect scan (default).
283
+ pipeline-full-with-audit.yaml # 6-phase pipeline with single early defect scan.
284
+ pipeline.yaml # 5-phase (no defect scan).
285
+ pipeline-defect-scan.yaml # 2-phase (architecture + defect scan).
286
+ pipeline-lite.yaml # 3-phase (no porting or reimpl).
287
+ pipeline-architecture-only.yaml # 1-phase (architecture only).
288
+ status.yaml # Per-project progress. Single source of truth.
289
+ VALIDATE.md # Validation protocol. Run after every phase.
290
+ closeouts/ # Per-session closeout files (replaces monolithic THREAD_LOG body).
291
+ <YYYY-MM-DD>-<phase-or-module>.md
292
+ CONVENTIONS.md # (Optional, project-grown) Cross-cutting invariants. Orchestrator-maintained.
293
+ DECISIONS.md # (Optional, project-grown) Numbered decisions log. Orchestrator-maintained.
294
+ BACKLOG.md # (Optional) Deferred items with rationale.
295
+ THREAD_LOG.md # Cross-session INDEX of closeout files.
296
+ CONTRIBUTING.md # Contribution guidelines.
297
+ LICENSE # MIT License.
298
+ ```
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 James Sesler
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,47 @@
1
+ # CodeCartographer - New Session Quick Start
2
+
3
+ Source code under evaluation: `../` (this repository — everything outside `.codecarto/`)
4
+
5
+ All CodeCartographer files are inside `.codecarto/`. Paths below are relative to `.codecarto/`.
6
+
7
+ **First-time project?** If `CONVENTIONS.md` and `DECISIONS.md` are still template skeletons and `closeouts/` is empty, see GUIDE.md §Roles and §First-Time Project Setup before reading the rest. The first LLM on a project takes a one-time role decision with the user (orchestrator vs session-by-session).
8
+
9
+ Read these in order before doing work:
10
+
11
+ 1. `GUIDE.md` - the LLM entry point and session guide
12
+ 2. `workflow/status.yaml` - the single source of truth for project progress
13
+ 3. `CONVENTIONS.md` if present - cross-cutting patterns this project follows
14
+ 4. The current phase's existing output file, if present
15
+ 5. The current phase's `SKILL.md`
16
+ 6. The output template from `templates/` for the current phase (if starting a new output)
17
+ 7. Scan `carry_forward` entries in `workflow/status.yaml` whose `target_phase` matches your phase — these are items earlier phases routed to you to close.
18
+
19
+ Where to store results:
20
+
21
+ - Durable findings: `findings/<phase>/`
22
+ - Rough notes: `scratch/`
23
+ - Workflow status: `workflow/status.yaml` (only status file to update)
24
+ - Per-session closeouts: `closeouts/<YYYY-MM-DD>-<phase-or-module>.md` (use `templates/closeout-template.md`)
25
+ - Cross-session log: append a one-line index entry to `THREAD_LOG.md` pointing at your closeout file
26
+
27
+ After completing work:
28
+
29
+ 1. Run validation per `workflow/VALIDATE.md`. Append the validation block to the output.
30
+ 2. Update `workflow/status.yaml`: mark the phase `complete`, advance `current_phase` to the next pending phase (or `complete` if all phases are done), and update both `open_questions` (genuinely unknown) and `carry_forward` (deferred to a specific later phase) for the phase. See GUIDE.md "Open Questions vs Carry-Forward" for the entry shape.
31
+ 3. Record 2-3 key observations in `owner_notes` for the completed phase.
32
+ 4. Write a per-session closeout file at `closeouts/<YYYY-MM-DD>-<phase-or-module>.md`. Append a one-line entry to `THREAD_LOG.md` pointing at it (de-dup discipline: scan the bottom 5 entries first to avoid double-appending).
33
+ 5. Store the durable output in the declared `findings/` path.
34
+ 6. If the session made cross-cutting decisions or proposed conventions, fill in the closeout's "Decisions Beyond Prompt" and "Proposed Conventions" sections. The orchestrator promotes them to `DECISIONS.md` and `CONVENTIONS.md` respectively.
35
+
36
+ ## File-System Sync Warning
37
+
38
+ Some host setups exhibit lag between host file-tools (Read/Write/Edit) and a Linux bash mount of the same files. Symptoms include parse errors at line numbers that don't appear in the host view, files that look truncated mid-line, and duplicated trailing content after a heredoc-vs-Edit collision.
39
+
40
+ To stay safe:
41
+
42
+ - Prefer **full-file overwrites** (Write) over in-place patches (Edit) when host/mount disagreement appears.
43
+ - Verify writes by running `wc -l` and `md5sum` from both sides if you suspect drift.
44
+ - **Never chain Edit and bash heredocs against the same file in a single session** — pick one writer and stick with it.
45
+ - Keep test code in a separate file from production code so a sync gap on one doesn't poison the other.
46
+
47
+ This is not a CodeCartographer issue per se, but the framework's reliance on append-to-narrative-files (`THREAD_LOG.md`, `status.yaml`, large primary outputs) magnifies the cost — every truncated write is a potential silent data loss in a load-bearing place.
@@ -0,0 +1,39 @@
1
+ # CodeCartographer
2
+
3
+ Copy the `.codecarto/` folder into any repository you want to analyze.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ # From inside your target repo:
9
+ cp -r /path/to/CodeCartographer/.codecarto .
10
+ ```
11
+
12
+ That's it. No symlinks, no copying your code anywhere.
13
+
14
+ ## Usage
15
+
16
+ Point any LLM with file access at the guide:
17
+
18
+ ```
19
+ Read .codecarto/GUIDE.md and begin the analysis.
20
+ ```
21
+
22
+ The LLM reads your source code directly from the repo root (`../` relative to `.codecarto/`) and writes findings into `.codecarto/findings/`.
23
+
24
+ ## Git
25
+
26
+ The `.codecarto/.gitignore` already excludes generated findings and scratch files. If you want to commit the CodeCartographer template files (so other team members can run the analysis too), just commit the `.codecarto/` folder as-is.
27
+
28
+ ## Choosing a Pipeline
29
+
30
+ The default is the 7-phase **full-with-deep-audit** pipeline, which splits the defect scan into an early mechanical pass (after architecture) and a deep semantic pass (after protocols) so the reimplementation can design around defects with full contracts and protocols context. To use a different one, edit `.codecarto/workflow/status.yaml`:
31
+
32
+ ```yaml
33
+ pipeline: workflow/pipeline-full-with-deep-audit.yaml # 7-phase with split defect scan (default; depth-first)
34
+ pipeline: workflow/pipeline-full-with-audit.yaml # 6-phase with single early defect scan — adjust phases to use one defect-scan
35
+ pipeline: workflow/pipeline.yaml # 5-phase without defect scan — remove defect-scan phases
36
+ pipeline: workflow/pipeline-defect-scan.yaml # 2-phase defect audit — remove contracts through reimplementation-spec
37
+ pipeline: workflow/pipeline-lite.yaml # 3-phase understanding — remove defect-scan phases, porting, and reimplementation-spec
38
+ pipeline: workflow/pipeline-architecture-only.yaml # 1-phase quick overview — keep only architecture
39
+ ```
@@ -0,0 +1,39 @@
1
+ # Thread Log — Index
2
+
3
+ This file is an **index** of per-session closeouts. Each session writes a full closeout to
4
+ `closeouts/<YYYY-MM-DD>-<phase-or-module>.md` using `templates/closeout-template.md`, and
5
+ appends one line here pointing to it.
6
+
7
+ The body of each session lives in the closeout file, not in this index. This pattern scales
8
+ forever: per-session files are individually small and read-budget-cheap, and avoid the
9
+ heredoc-vs-edit sync risks that bite append-to-large-file workflows once the file grows past
10
+ ~50 KB.
11
+
12
+ ## Format
13
+
14
+ ```
15
+ - YYYY-MM-DD — <phase-or-module> — <one-line-summary> — [closeout](closeouts/YYYY-MM-DD-phase-or-module.md)
16
+ ```
17
+
18
+ ## De-dup discipline
19
+
20
+ Before appending, scan the bottom 5 entries. If you see a line with the same date AND same
21
+ phase-or-module AND same summary, do not append — the prior session already wrote it. The
22
+ framework has no programmatic dedup gate; this is human-discipline. (See
23
+ `Apply 20 spec deltas to Thaumaturge.txt` for the incident that established this rule.)
24
+
25
+ A one-liner to surface duplicates from the shell:
26
+
27
+ ```bash
28
+ grep -E '^- [0-9]{4}-[0-9]{2}-[0-9]{2}' .codecarto/THREAD_LOG.md | sort | uniq -d
29
+ ```
30
+
31
+ ## Entries
32
+
33
+ <!--
34
+ Append one line per session below this marker.
35
+ Example:
36
+ - 2026-05-02 — framework-feedback-pass — applied 6 spec-blockers + 5 clarifications from FEEDBACK_INDEX.md — [closeout](closeouts/2026-05-02-framework-feedback-pass.md)
37
+ -->
38
+
39
+ - 2026-05-02 — framework-feedback-pass — applied 6 spec-blockers + 5 clarifications from FEEDBACK_INDEX.md; 14 deferred to BACKLOG.md — [closeout](closeouts/2026-05-02-framework-feedback-pass.md)
@@ -0,0 +1,111 @@
1
+ # Closeout — 2026-05-02 — framework-feedback-pass
2
+
3
+ ## Summary
4
+
5
+ This was a meta-session: instead of using CodeCartographer to analyze a codebase, the session edited CodeCartographer based on accumulated feedback from 13 prior agent sessions. Six spec-blockers landed, five spec-clarifications applied, fourteen nice-to-haves recorded in `BACKLOG.md`. The framework now formalizes the orchestrator role (CONVENTIONS.md + DECISIONS.md + spec-delta-application skill), schema-splits open_questions into open_questions + carry_forward, and replaces the monolithic THREAD_LOG body with a per-session closeouts pattern. Next session is back to project-level work (Thaumaturge `thaum-tools`) with the upgraded framework as the base.
6
+
7
+ ## Files Touched
8
+
9
+ - **Added:**
10
+ - `.codecarto/templates/closeout-template.md`
11
+ - `.codecarto/templates/conventions-template.md`
12
+ - `.codecarto/templates/decisions-template.md`
13
+ - `.codecarto/templates/deltas-applied.md`
14
+ - `.codecarto/templates/reimplementation-spec-opinionated.md`
15
+ - `.codecarto/skills/spec-delta-application/SKILL.md`
16
+ - `.codecarto/BACKLOG.md`
17
+ - `.codecarto/CHANGELOG-2026-05-02-feedback-pass.md`
18
+ - `.codecarto/closeouts/2026-05-02-framework-feedback-pass.md` (this file)
19
+ - `Feedback From Agents/Framework feedback pass - 2026-05-02.txt`
20
+ - **Modified:**
21
+ - `.codecarto/GUIDE.md` (trust-boundaries table extended; new subsections: Primary vs Secondary, Orchestrator-Maintained Artifacts, Subagent Delegation, Open Questions vs Carry-Forward, Strategic Alignment Hook; Session Update Protocol updated; folder layout updated)
22
+ - `.codecarto/workflow/status.yaml` (open_questions/carry_forward schema split)
23
+ - `.codecarto/workflow/VALIDATE.md` (carry_forward routing rule + worked PARTIAL example)
24
+ - `.codecarto/templates/architecture-map.md` (Carry-Forward section)
25
+ - `.codecarto/templates/behavioral-contracts.md` (Carry-Forward section)
26
+ - `.codecarto/templates/protocols-and-state.md` (Carry-Forward section)
27
+ - `.codecarto/templates/reverse-engineering-bundle.md` (Carry-Forward section)
28
+ - `.codecarto/templates/reimplementation-spec.md` (Known Unknowns + Carry-Forward shapes)
29
+ - `.codecarto/templates/thread-log-entry-template.md` (repurposed as legacy one-line index entry template)
30
+ - `.codecarto/THREAD_LOG.md` (rewritten as one-line-pointer index)
31
+ - `.codecarto/CONTRIBUTING.md` (THREAD_LOG dedup linter; carry_forward in testing checklist)
32
+ - `.codecarto/NEW_THREAD_BLURB.md` (carry_forward routing; per-session closeout pattern; file-system-sync warning)
33
+ - `Feedback From Agents/FEEDBACK_INDEX.md` (cross-cutting-themes table annotated with resolution markers; entry 15 added)
34
+ - **Deleted:** none.
35
+
36
+ ## Tests / Gates
37
+
38
+ | Gate | Result | Notes |
39
+ |---|---|---|
40
+ | File-path consistency | PASS | Every path referenced in GUIDE.md, NEW_THREAD_BLURB.md, VALIDATE.md, CONTRIBUTING.md, and pipeline YAMLs resolves to a real file. |
41
+ | Schema consistency (status.yaml ↔ templates) | PASS | The `{id, kind, target_phase, deferred_reason}` shape is consistent across status.yaml, all 5 templates' Carry-Forward sections, GUIDE.md "Open Questions vs Carry-Forward", and VALIDATE.md's worked example. |
42
+ | Trust-boundaries table coverage | PASS | New artifacts (closeouts, CONVENTIONS.md, DECISIONS.md, BACKLOG.md) all listed with access columns. |
43
+ | Closeout-template self-application | PASS | This closeout file uses `templates/closeout-template.md`. |
44
+ | FEEDBACK_INDEX.md self-awareness | PASS | Cross-cutting-themes table now carries APPLIED / CLARIFIED / DEFERRED-Bxx markers; entry 15 added. |
45
+
46
+ ## Decisions Beyond Prompt
47
+
48
+ - **D-meta-1** | The `spec-delta-application` skill lives at a new top-level `.codecarto/skills/` directory (sibling of `findings/`), not inside `findings/`. | The prompt suggested "or a new top-level skills location — propose where" — chosen because spec-delta-application is post-pipeline (not phase-bound), so `findings/<phase>/SKILL.md` would mis-locate it. Trust-boundaries table updated to include `skills/*/SKILL.md`.
49
+ - **D-meta-2** | Rather than create CONVENTIONS.md and DECISIONS.md as filled-in framework artifacts, the framework ships them as `templates/conventions-template.md` and `templates/decisions-template.md` (skeletons that projects copy to `.codecarto/CONVENTIONS.md` / `.codecarto/DECISIONS.md`). | Per the prompt's "generalize from working examples, don't copy" — the codex artifacts are 600+ lines of Thaumaturge-specific content. The framework version should be the skeleton (~150 lines) that projects fork.
50
+ - **D-meta-3** | Schema split landed under both fields (`open_questions` AND `carry_forward`), not as a renaming. | A renaming would have broken the convention "open_questions field is the in-your-face honesty hook." Adding `carry_forward` as a sibling preserves the friction-driving job of `open_questions` (genuinely unknown) while solving the "two jobs" problem.
51
+ - **D-meta-4** | THREAD_LOG.md was rewritten as an index, not migrated. | The framework's THREAD_LOG.md was empty (only the example comment block), so there was no historical content to migrate. A real project's THREAD_LOG.md migration is a separate, project-level operation; documented in the THREAD_LOG.md header.
52
+ - **D-meta-5** | The Strategic Alignment Hook and the dual-mode reimpl-spec template land together as one feature, not two. | The hook *picks between* the two templates. Splitting them across two backlog items would have split the user experience.
53
+ - **D-meta-6** | The "Append-mode supersession rule" (3 agents) was deferred to backlog (B7) despite meeting the 3-agent threshold. | The prompt said "Spec-blocker = raised by 3+ agents AND clean concrete edit." Append-mode supersession does not have a clean concrete edit — it implies a reconciliation pass, which is phase-shape change. Defer per the AND clause.
54
+ - **D-meta-7** | "Validation as semantic check" (4 agents) was deferred to backlog (B8) despite the highest agent-count after THREAD_LOG scaling. | Same reasoning — no clean concrete edit; the proposed solutions (quality subagent, 1–5 score) are themselves design questions.
55
+ - **D-meta-8** | The Resolutions footer (B12) is partially obviated by the new `carry_forward` field. | Documented in BACKLOG.md to wait for the next round of feedback before adding more machinery.
56
+
57
+ ## Proposed Conventions
58
+
59
+ ### CO-1 (framework-level) — "Schema-split a one-job-too-many field rather than renaming"
60
+
61
+ **Why:** When a field is doing two distinct jobs (e.g., `open_questions` carrying both "still unknown" and "deferred to later phase" items), the cleaner fix is to add a sibling field rather than rename or restructure. Renaming breaks discoverability and history; adding a sibling preserves the original field's identity and the muscle-memory of past sessions while resolving the conflation.
62
+
63
+ **How to apply:** When agent feedback consistently identifies a field as doing two jobs, prefer "split into A + B siblings" over "rename A to A1 and A2" or "restructure into a nested map." Tested in this pass with `open_questions` + `carry_forward`.
64
+
65
+ (This is a framework-level convention, not a project-level one. It would land in a hypothetical `.codecarto-framework/CONVENTIONS.md` if such a file existed; for now, document in CHANGELOG.)
66
+
67
+ ### CO-2 (framework-level) — "Defer per AND, not OR, when a proposal mentions multiple criteria"
68
+
69
+ **Why:** The triage discipline ("3+ agents AND clean concrete edit") is an AND, not an OR. Two proposals that hit 3+ agents but lacked clean concrete edits (B7, B8) deferred this pass — preserving the apply-in-good-faith posture rather than landing speculative changes.
70
+
71
+ **How to apply:** Future framework-feedback passes treat the two clauses as conjoined. A proposal raised by many agents but lacking a clean edit goes to backlog with a smallest-viable-form sketch (which then unblocks the next pass).
72
+
73
+ ## Open Questions Left Behind
74
+
75
+ | ID | Kind | Description | Deferred Reason |
76
+ |---|---|---|---|
77
+ | FW-OQ1 | needs-feedback | Whether the per-session closeout pattern actually feels lighter than monolithic THREAD_LOG once a project accumulates >20 closeout files. | Need real-world usage data; revisit after Thaumaturge accumulates 10–15 more closeouts. |
78
+ | FW-OQ2 | needs-feedback | Whether the `kind` enum on open_questions/carry_forward entries is the right granularity. | Five values feels right but could prove too coarse (e.g., should `defer-to-phase` distinguish "rubric-fit" from "sequencing"?). Evaluate after 5+ projects use it. |
79
+ | FW-OQ3 | needs-feedback | Whether the spec-delta-application skill being at `skills/` (sibling of `findings/`) is the right home, or if a `skills/post-pipeline/` subdirectory is needed once more post-pipeline skills land. | One skill in the directory today; revisit when a second one (e.g., spike-template) lands. |
80
+
81
+ ## Carry-Forward Routed
82
+
83
+ | ID | Target Phase | Description | Deferred Reason |
84
+ |---|---|---|---|
85
+ | FW-CF1 | future-feedback-pass | The 14 BACKLOG.md items each have a "smallest viable form" sketch — they're ready for the next pass to execute. | Bundle scope: ship one pass per category (e.g., next pass = "post-pipeline machinery": spike template + amendments + defect-pass-N). |
86
+
87
+ ## Framework Feedback (the meta-meta layer)
88
+
89
+ The framework-feedback pattern (this session) is itself a CodeCarto-style activity that the
90
+ framework currently has no first-class concept of. Things I noticed running it:
91
+
92
+ 1. **The triage discipline (apply / clarify / defer / reject) ported cleanly from spec-delta-application to framework-delta-application.** The same four buckets, the same "don't rubber-stamp" posture. The fact that the pattern transfers is evidence it's load-bearing — worth pinning explicitly. Suggestion for next pass: lift the triage discipline into a shared sub-skill that both `spec-delta-application` and a future `framework-feedback-pass` skill reference. Today the discipline lives only in prompts.
93
+
94
+ 2. **The "do not modify" list at the bottom of FEEDBACK_INDEX.md was load-bearing.** Without it I would have rewritten the validation gate in the name of "improvement." The unanimous-defenders list is the framework's immune system. Worth promoting to a permanent fixture in CONTRIBUTING.md (currently lives only in the index).
95
+
96
+ 3. **The cross-cutting-themes table at the bottom of FEEDBACK_INDEX.md is the actual spec for this kind of pass.** Per-file feedback summaries are useful for context but the table is what drove triage. Suggestion: future framework changes should update the cross-cutting-themes table in the same edit (which this pass did, via the resolution markers — but that pattern should be standard, not invented per-pass).
97
+
98
+ 4. **The framework's self-applied `.codecarto/` is a real sanity test.** Editing GUIDE.md broke nothing because the framework's own self-application is structurally trivial (no findings, no closeouts before this session). For a richer self-application, edits to the framework would have a sharper feedback loop. Suggestion for future: maintain a synthetic example project (`examples/<small-codebase>/`) with a populated `.codecarto/` so framework edits can be smoke-tested against a real artifact.
99
+
100
+ 5. **There's no skill for "framework-feedback-pass" itself.** This session ran on the discipline embedded in the prompt — apply blockers, defer nice-to-haves, preserve unanimous-defenders, write a CHANGELOG with the same shape as DELTAS-APPLIED.md, update the index with resolution markers. That's a reusable workflow. Worth codifying as a skill the same way `spec-delta-application` was codified this pass. Maybe `skills/framework-feedback-pass/SKILL.md` is the next entry in `skills/`.
101
+
102
+ ## Next Session Pointer
103
+
104
+ Next concrete step: back to **Thaumaturge module work — `thaum-tools`** — but now with the
105
+ upgraded framework as the base. Specifically the next session should:
106
+
107
+ 1. Read this closeout file plus `.codecarto/CHANGELOG-2026-05-02-feedback-pass.md` to inherit the framework changes.
108
+ 2. The codex `.codecarto/CONVENTIONS.md` and `DECISIONS.md` artifacts are now the *project-level* artifacts; the framework-level skeletons are in `templates/conventions-template.md` and `templates/decisions-template.md`. The orchestrator's discipline maintaining those project files is now first-class.
109
+ 3. The `carry_forward` schema split is now usable — items routed across phases get explicit `target_phase` IDs. Use it in the next session's status.yaml updates.
110
+ 4. The per-session closeout pattern means `closeouts/2026-05-XX-thaum-tools.md` is the next file to write at session close, not an append to a monolithic THREAD_LOG.
111
+ 5. Pending: Δ-36 (Ollama unknown done_reason) and Δ-37 (allowed-loopback wire shape) noted as D501/D502 in codex's DECISIONS.md — next spec-revision pass picks these up using the new `spec-delta-application` skill.
@@ -0,0 +1,3 @@
1
+ # Architecture Findings
2
+
3
+ System structure, layers, dependency direction, and public surface inventory.