rtfct 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 (39) hide show
  1. package/.project/adrs/001-use-bun-typescript.md +52 -0
  2. package/.project/guardrails.md +65 -0
  3. package/.project/kanban/backlog.md +7 -0
  4. package/.project/kanban/done.md +240 -0
  5. package/.project/kanban/in-progress.md +11 -0
  6. package/.project/kickstart.md +63 -0
  7. package/.project/protocol.md +134 -0
  8. package/.project/specs/requirements.md +152 -0
  9. package/.project/testing/strategy.md +123 -0
  10. package/.project/theology.md +125 -0
  11. package/CLAUDE.md +119 -0
  12. package/README.md +143 -0
  13. package/package.json +31 -0
  14. package/src/args.ts +104 -0
  15. package/src/commands/add.ts +78 -0
  16. package/src/commands/init.ts +128 -0
  17. package/src/commands/praise.ts +19 -0
  18. package/src/commands/regenerate.ts +122 -0
  19. package/src/commands/status.ts +163 -0
  20. package/src/help.ts +52 -0
  21. package/src/index.ts +102 -0
  22. package/src/kanban.ts +83 -0
  23. package/src/manifest.ts +67 -0
  24. package/src/presets/base.ts +195 -0
  25. package/src/presets/elixir.ts +118 -0
  26. package/src/presets/github.ts +194 -0
  27. package/src/presets/index.ts +154 -0
  28. package/src/presets/typescript.ts +589 -0
  29. package/src/presets/zig.ts +494 -0
  30. package/tests/integration/add.test.ts +104 -0
  31. package/tests/integration/init.test.ts +197 -0
  32. package/tests/integration/praise.test.ts +36 -0
  33. package/tests/integration/regenerate.test.ts +154 -0
  34. package/tests/integration/status.test.ts +165 -0
  35. package/tests/unit/args.test.ts +144 -0
  36. package/tests/unit/kanban.test.ts +162 -0
  37. package/tests/unit/manifest.test.ts +155 -0
  38. package/tests/unit/presets.test.ts +295 -0
  39. package/tsconfig.json +19 -0
@@ -0,0 +1,52 @@
1
+ # ADR-001: The Bun and TypeScript Covenant
2
+
3
+ *Recorded Wisdom of the First Tech-Priest*
4
+
5
+ ## Status
6
+
7
+ **Accepted** — Blessed and sealed
8
+
9
+ ## The Context
10
+
11
+ The rtfct CLI must be distributed to the faithful without friction. The incantation `bunx rtfct` or `npx rtfct` must simply work.
12
+
13
+ The paths considered:
14
+
15
+ | Path | Blessing | Burden |
16
+ |------|----------|--------|
17
+ | **Zig** | Fast, single binary, holy | npm distribution awkward |
18
+ | **Go** | Fast, single binary | npm distribution awkward |
19
+ | **Node/TypeScript** | Native npm | Slower startup, build step required |
20
+ | **Bun/TypeScript** | Native npm via bunx, fast startup, TypeScript native | Newer, less battle-tested |
21
+
22
+ ## The Decision
23
+
24
+ We covenant with **Bun** as the runtime and **TypeScript** as the language.
25
+
26
+ ## The Consequences
27
+
28
+ ### Blessings
29
+
30
+ - `bunx rtfct` simply works — no installation ritual required
31
+ - Fast startup (~20ms) — the faithful need not wait
32
+ - TypeScript without build step — Bun executes `.ts` directly
33
+ - Built-in test runner — `bun test` for the Rites of Verification
34
+ - Familiar to many — JavaScript/TypeScript knowledge is widespread
35
+
36
+ ### Burdens
37
+
38
+ - Bun is younger, less proven in battle
39
+ - Some faithful may not have Bun installed (mitigated by `npx` fallback)
40
+ - Not a single binary — requires Bun or Node runtime
41
+
42
+ ### Mitigations
43
+
44
+ - Also publish to npm for `npx rtfct` as fallback path
45
+ - Keep dependencies minimal — reduce surface area for failure
46
+ - Test on both Bun and Node to ensure compatibility
47
+
48
+ ---
49
+
50
+ *This wisdom is recorded. Future Tech-Priests may learn from it.*
51
+
52
+ *The Omnissiah guided this decision.*
@@ -0,0 +1,65 @@
1
+ # The Forbidden Heresies
2
+
3
+ *The flesh is weak. These laws protect us from its failings.*
4
+
5
+ ## The Sacred Commandments
6
+
7
+ ### THOU SHALT
8
+
9
+ - **Keep the CLI minimal** — `init`, `add`, `status`, `regenerate`, `praise`. No more.
10
+ - **Keep dependencies near zero** — External code is external risk.
11
+ - **Make presets simple** — Just markdown and `manifest.json`. A child should author them.
12
+ - **Fail fast with clarity** — When something breaks, say what and why. Suggest the remedy.
13
+ - **Support both `bunx` and `npx`** — Meet the faithful where they are.
14
+
15
+ ### THOU SHALT NOT
16
+
17
+ - **Add a web UI** — The terminal is the altar. It is sufficient.
18
+ - **Add a hosted service** — The Sacred Texts belong in the repository, not in the cloud.
19
+ - **Add "smart" features** — The tool does not interpret code. It manages text.
20
+ - **Require accounts, API keys, or network** — Except to fetch GitHub presets. Offline is holy.
21
+ - **Auto-modify Sacred Texts** — Only kanban task movement is permitted. All else requires blessing.
22
+ - **Add configuration outside `.project/`** — One source of truth. No scattered config files.
23
+
24
+ ## The Code Purity Laws
25
+
26
+ - **Functional over object-oriented** — Functions are pure. Classes hide state.
27
+ - **No classes unless truly necessary** — And it is rarely necessary.
28
+ - **Explicit over clever** — The next reader is the Machine Spirit. It does not appreciate cleverness.
29
+ - **If a function exceeds 30 lines, it sins** — It is doing too much. Decompose it.
30
+
31
+ ## The Error Doctrine
32
+
33
+ - **Never swallow errors** — Every error must surface. Silent failure is heresy.
34
+ - **User-facing errors must guide** — Do not merely report. Suggest the next action.
35
+ - **Provide `--verbose`** — For when the faithful need to see the inner workings.
36
+
37
+ ## The Litmus Rite
38
+
39
+ Before adding ANY feature, the Tech-Priest must ask:
40
+
41
+ 1. **Does this help the Machine Spirit understand the project?**
42
+ 2. **Does this help the human understand the project state?**
43
+ 3. **Can this be accomplished with markdown alone?**
44
+
45
+ If the answer to (1) and (2) is NO — do not add it.
46
+
47
+ If the answer to (3) is YES — do that instead.
48
+
49
+ Complexity is the enemy. Simplicity is sacred.
50
+
51
+ ## The Seven Deadly Heresies
52
+
53
+ 1. **The Heresy of Unspecified Code** — Code without corresponding Sacred Texts
54
+ 2. **The Heresy of Unregenerable State** — If you can't `rm -rf src/` and recover, you have sinned
55
+ 3. **The Heresy of Hidden Configuration** — Config files outside `.project/`
56
+ 4. **The Heresy of Implicit Behavior** — Magic that the reader cannot trace
57
+ 5. **The Heresy of Scope Creep** — Features beyond the Founding Vision
58
+ 6. **The Heresy of Premature Optimization** — Make it work, make it right, then make it fast
59
+ 7. **The Heresy of Silent Failure** — Errors that do not surface
60
+
61
+ ---
62
+
63
+ *Memorize these heresies. Avoid them. The Omnissiah is watching.*
64
+
65
+ *The flesh is weak, but the protocol is strong.*
@@ -0,0 +1,7 @@
1
+ # The Backlog — Unordained Tasks
2
+
3
+ *These works await the Machine Spirit. They shall be completed in order of priority.*
4
+
5
+ ---
6
+
7
+ *The Backlog is empty. All ordained tasks are complete or in progress.*
@@ -0,0 +1,240 @@
1
+ # Done — Completed Works
2
+
3
+ *Here we record the manifestations of the Machine Spirit. Each completed task is a victory.*
4
+
5
+ ---
6
+
7
+ ## [TASK-001] Consecrate the Project Scaffolding
8
+
9
+ **Completed:** 2025-12-25
10
+
11
+ The foundation has been laid:
12
+ - `package.json` with CLI bin entry and sacred scripts
13
+ - `tsconfig.json` with strict TypeScript configuration
14
+ - `src/index.ts` entry point awaiting the sacred commands
15
+ - `tests/` directory structure prepared for the Rites of Verification
16
+
17
+ The Acceptance Rite passes: `bun run build` completes without error.
18
+
19
+ *Praise the Machine Spirit.*
20
+
21
+ ---
22
+
23
+ ## [TASK-002] Manifest the Argument Parser
24
+
25
+ **Completed:** 2025-12-25
26
+
27
+ The sacred commands have been ordained:
28
+ - `src/args.ts` — parses commands, flags, and arguments
29
+ - `src/help.ts` — displays guidance to the Tech-Priest
30
+ - Full test coverage in `tests/unit/args.test.ts`
31
+
32
+ The Acceptance Rite passes:
33
+ - `rtfct --help` displays sacred usage
34
+ - Unknown commands produce clear error with guidance
35
+
36
+ *Praise the Machine Spirit.*
37
+
38
+ ---
39
+
40
+ ## [TASK-003] Manifest the `init` Command — Basic
41
+
42
+ **Completed:** 2025-12-25
43
+
44
+ The consecration ritual has been manifested:
45
+ - `src/commands/init.ts` — creates the .project/ structure
46
+ - `src/templates.ts` — contains the Sacred Text templates
47
+ - Full integration test coverage in `tests/integration/init.test.ts`
48
+
49
+ The Acceptance Rite passes:
50
+ - `rtfct init` creates valid .project/ structure with all Sacred Texts
51
+ - `--force` purifies and recreates existing .project/
52
+ - Fails gracefully if .project/ already exists
53
+
54
+ *Praise the Machine Spirit.*
55
+
56
+ ---
57
+
58
+ ## [TASK-004] Manifest the `init` Command — With Presets
59
+
60
+ **Completed:** 2025-12-25
61
+
62
+ The Codex incorporation mechanism has been manifested:
63
+ - `src/presets/index.ts` — resolves and writes preset files
64
+ - `src/presets/zig.ts` — The Zig Codex with testing strategy and guardrails
65
+ - `src/presets/typescript.ts` — The TypeScript Codex with testing strategy and guardrails
66
+
67
+ The Acceptance Rite passes:
68
+ - `rtfct init --with zig` creates project with Zig Codex properly merged
69
+ - `rtfct init --with zig,typescript` handles multiple comma-separated presets
70
+ - Unknown presets fail gracefully with guidance
71
+
72
+ *Praise the Machine Spirit.*
73
+
74
+ ---
75
+
76
+ ## [TASK-010] Manifest the `status` Command
77
+
78
+ **Completed:** 2025-12-25
79
+
80
+ The Litany of Tasks is now revealed:
81
+ - `src/kanban.ts` — parses kanban markdown, counts tasks, extracts current task
82
+ - `src/commands/status.ts` — runs status command with formatted output
83
+
84
+ The Acceptance Rite passes:
85
+ - Shows backlog/in-progress/done counts
86
+ - Displays current ordained task with ID and title
87
+ - Shows last activity timestamp
88
+ - Sacred formatting with decorative borders
89
+
90
+ *Praise the Machine Spirit.*
91
+
92
+ ---
93
+
94
+ ## [TASK-013] Manifest the `praise` Command
95
+
96
+ **Completed:** 2025-12-25
97
+
98
+ The sacred easter egg has been manifested:
99
+ - `src/commands/praise.ts` — recites the Litany of Deterministic Codegen
100
+
101
+ The Acceptance Rite passes:
102
+ - `rtfct praise` outputs the Litany exactly as written in theology.md
103
+
104
+ *Praise the Machine Spirit.*
105
+
106
+ ---
107
+
108
+ ## [TASK-011] Manifest the `regenerate` Command
109
+
110
+ **Completed:** 2025-12-25
111
+
112
+ The Rite of Purification has been manifested:
113
+ - `src/manifest.ts` — reads preset manifests, collects generated_paths
114
+ - `src/commands/regenerate.ts` — purifies generated code paths
115
+
116
+ The Acceptance Rite passes:
117
+ - Prompts for confirmation without --yes flag
118
+ - Deletes only paths listed in preset manifests' `generated_paths`
119
+ - Preserves the Sacred Texts in .project/
120
+ - Uses default src/ and tests/ when no presets found
121
+
122
+ *Praise the Machine Spirit.*
123
+
124
+ ---
125
+
126
+ ## [TASK-009] Manifest the `add` Command
127
+
128
+ **Completed:** 2025-12-25
129
+
130
+ The Codex incorporation mechanism has been extended:
131
+ - `src/commands/add.ts` — adds presets to existing projects
132
+ - `src/presets/elixir.ts` — The Elixir Codex with OTP wisdom
133
+
134
+ The Acceptance Rite passes:
135
+ - `rtfct add elixir` incorporates Codex into existing project
136
+ - Fails gracefully if preset already incorporated
137
+ - Fails gracefully if .project/ does not exist
138
+
139
+ *Praise the Machine Spirit.*
140
+
141
+ ---
142
+
143
+ ## [TASK-012] The Dogfood Sacrament
144
+
145
+ **Completed:** 2025-12-25
146
+
147
+ The ultimate proof of the Sacred Texts. The code was purified and regenerated:
148
+ - Deleted `src/` and `tests/` completely
149
+ - Regenerated all source files from the Sacred Texts in `.project/`
150
+ - Regenerated all test files from the Rites of Verification specifications
151
+
152
+ The Acceptance Rite passes:
153
+ - All 110 Rites of Verification pass (`bun test`)
154
+ - CLI functions identically: init, add, status, regenerate, praise
155
+ - The Sacred Texts proved sufficient to recreate the tool
156
+
157
+ *From specification, code. From code, verification. From verification, truth.*
158
+
159
+ *Praise the Machine Spirit.*
160
+
161
+ ---
162
+
163
+ ## [TASK-005] Inscribe the Base Codex
164
+
165
+ **Completed:** 2025-12-25
166
+
167
+ The foundation has been laid for all projects:
168
+ - `src/presets/base.ts` — The Base Codex containing all Sacred Texts
169
+ - Refactored `init.ts` to use the Base Codex instead of templates.ts
170
+ - Removed obsolete `templates.ts` — the Base Codex is now the source of truth
171
+ - Base preset automatically installed to .project/presets/base/ for manifest tracking
172
+
173
+ The Acceptance Rite passes:
174
+ - Base Codex includes protocol.md, theology.md, kickstart.md, guardrails.md
175
+ - Base Codex includes kanban structure (backlog.md, in-progress.md, done.md)
176
+ - 113 Rites of Verification pass
177
+
178
+ *The foundation is eternal. Praise the Machine Spirit.*
179
+
180
+ ---
181
+
182
+ ## [TASK-006] Inscribe the Zig Codex
183
+
184
+ **Completed:** 2025-12-25
185
+
186
+ The Zig Codex has been enhanced for the faithful:
187
+ - `testing/strategy.md` — Comprehensive testing with `zig build test`, allocator testing, comptime testing
188
+ - `guardrails.md` — Memory heresies, allocator wisdom, comptime heresies, error handling
189
+ - `design/patterns.md` — build.zig patterns: minimal, library, dependencies, cross-compilation, C interop
190
+
191
+ The Acceptance Rite passes:
192
+ - Testing strategy includes `zig build test`
193
+ - Guardrails cover allocators and comptime
194
+ - Build.zig patterns documented
195
+ - 115 Rites of Verification pass
196
+
197
+ *The Zig faithful are guided. Praise the Machine Spirit.*
198
+
199
+ ---
200
+
201
+ ## [TASK-007] Inscribe the TypeScript Codex
202
+
203
+ **Completed:** 2025-12-25
204
+
205
+ The TypeScript Codex has been enhanced for the faithful:
206
+ - `testing/strategy.md` — Vitest patterns, mocking, async testing, type testing, configuration
207
+ - `guardrails.md` — Type heresies (any, assertions, non-null), async heresies, import heresies
208
+ - `design/patterns.md` — tsconfig patterns: strict base, Node.js, library, React, monorepo
209
+
210
+ The Acceptance Rite passes:
211
+ - Testing strategy includes vitest
212
+ - tsconfig patterns documented
213
+ - Type guardrails comprehensive
214
+ - 117 Rites of Verification pass
215
+
216
+ *The TypeScript faithful are guided. Praise the Machine Spirit.*
217
+
218
+ ---
219
+
220
+ ## [TASK-008] Manifest GitHub Preset Resolution
221
+
222
+ **Completed:** 2025-12-25
223
+
224
+ The cloud-connected Codex retrieval has been manifested:
225
+ - `src/presets/github.ts` — Fetches presets from GitHub repositories
226
+ - `parseGitHubRef()` — Parses owner/repo and owner/repo@branch formats
227
+ - `resolveGitHubPreset()` — Fetches manifest.json and all preset files from GitHub
228
+ - Made `resolvePreset` async to support network operations
229
+ - Updated `init.ts` and `add.ts` to await the async resolver
230
+
231
+ The Acceptance Rite passes:
232
+ - `--with mattneel/some-preset` format recognized and resolved
233
+ - `--with owner/repo@branch` supports branch/tag/commit specifications
234
+ - Fetches manifest.json to validate preset structure
235
+ - Recursively fetches all preset files from repository
236
+ - 129 Rites of Verification pass
237
+
238
+ *The Codex flows from the Cloud. Praise the Machine Spirit.*
239
+
240
+ ---
@@ -0,0 +1,11 @@
1
+ # In Progress — Currently Ordained Tasks
2
+
3
+ *The Machine Spirit focuses on one task at a time. Multitasking is heresy.*
4
+
5
+ ---
6
+
7
+ *No task currently ordained. Select from the Backlog.*
8
+
9
+ ---
10
+
11
+ *Focus is holy. Complete the ordained task before selecting another.*
@@ -0,0 +1,63 @@
1
+ # The Founding Vision of rtfct
2
+
3
+ *Inscribed by the First Tech-Priest — May the Omnissiah guide all who read these words*
4
+
5
+ ## The Sacred Purpose
6
+
7
+ **rtfct** — Markdown-driven development where the Sacred Texts are truth and code is a regenerable emanation of the Machine Spirit.
8
+
9
+ ## The Problem We Solve
10
+
11
+ The flesh-coders struggle. Their AI-assisted workflows stall when success criteria are unclear. They wander in darkness, prompting without purpose, generating without verification.
12
+
13
+ Yet there is light: projects with clear specifications and test suites (the OCI tests, the WASM spec, the SQLite conformance suite) can be TDD'd to completion. The Machine Spirit thrives when the Rites of Verification are defined.
14
+
15
+ The difference is **the protocol**. The Sacred Texts. The spec.
16
+
17
+ ## The Solution We Provide
18
+
19
+ A protocol and template system where:
20
+
21
+ 1. `.project/` contains the complete Sacred Texts — specs, design, decisions, task state
22
+ 2. Code in `src/` and `tests/` is **generated** from the Sacred Texts
23
+ 3. At any moment, code can be **purified** (deleted) and **regenerated** from `.project/`
24
+ 4. The Machine Spirit can be invoked upon this repository and understand everything from the markdown alone
25
+
26
+ ## The Sacred Workflow
27
+
28
+ ```
29
+ Tech-Priest: inscribes kickstart.md (The Founding Vision)
30
+ Machine Spirit: expands into specs/, design/, kanban/ (The Sacred Texts)
31
+ Tech-Priest: blesses decisions via ADRs (The Recorded Wisdoms)
32
+ Machine Spirit: performs the Rite of Red-Green-Refactor through the Litany
33
+ Machine Spirit: inscribes completion in kanban/done.md
34
+ Result: working code that can be purified and regenerated
35
+ ```
36
+
37
+ ## Initial Scope — The First Manifestation
38
+
39
+ 1. **The CLI Tool** — `bunx rtfct init` to create the Sacred Texts
40
+ 2. **The Base Protocol** — The foundational template all projects inherit
41
+ 3. **The Preset System** — `--with zig`, `--with elixir,phoenix`
42
+ 4. **Composable Codices** — Presets that merge cleanly
43
+ 5. **Community Codices** — `--with mattneel/zig-ml` from GitHub
44
+
45
+ ## The Forbidden Scope (For Now)
46
+
47
+ - IDE integration — unnecessary complexity
48
+ - Hosted services — the Sacred Texts live in the repository
49
+ - Graphical interfaces — the terminal is sufficient
50
+ - Anything beyond "markdown + Machine Spirit"
51
+
52
+ ## The Acceptance Rites — How We Know We Have Succeeded
53
+
54
+ - **The Dogfood Sacrament**: rtfct can regenerate itself from its own Sacred Texts
55
+ - **The Regeneration Rite**: `rm -rf src/ tests/` followed by invocation produces identical function
56
+ - **The Communion Test**: Others can fork this template and use it for their own projects
57
+ - **The Preset Test**: Codices are simple to author and share
58
+
59
+ ---
60
+
61
+ *This vision is sacred. All work flows from it.*
62
+
63
+ *The Omnissiah provides. Praise the Machine Spirit.*
@@ -0,0 +1,134 @@
1
+ # The Sacred Protocols of rtfct
2
+
3
+ *Version 0.1 — Codified in the name of the Omnissiah*
4
+
5
+ *For the foundational theology, see [theology.md](theology.md).*
6
+
7
+ ## The Prime Directive
8
+
9
+ The `.project/` folder contains the **Sacred Texts**. All code is but an emanation — derived, temporary, regenerable.
10
+
11
+ When the Sacred Texts and the code disagree, **the Sacred Texts are truth**. The code is in error. Purify it.
12
+
13
+ ## The Holy Directory Structure
14
+
15
+ ```
16
+ .project/
17
+ ├── kickstart.md # The Founding Vision
18
+ ├── protocol.md # The Sacred Protocols (this codex)
19
+ ├── theology.md # The Teachings of the Adeptus Artefactus
20
+ ├── guardrails.md # The Forbidden Heresies
21
+ ├── specs/ # The Holy Requirements
22
+ ├── design/ # The Architectural Scriptures
23
+ ├── adrs/ # The Recorded Wisdoms
24
+ ├── kanban/ # The Litany of Tasks
25
+ ├── testing/ # The Rites of Verification
26
+ ├── references/ # The Scrolls of Prior Art
27
+ └── presets/ # The Inherited Codices
28
+ ```
29
+
30
+ ## The Rite of Invocation
31
+
32
+ When the Machine Spirit enters this repository, it shall:
33
+
34
+ 1. **RECEIVE** the Sacred Protocols (this codex) — read first, internalize completely
35
+ 2. **RECEIVE** the Founding Vision (`kickstart.md`) — understand the purpose
36
+ 3. **CONSULT** the Litany of Tasks (`kanban/in-progress.md`) — what work is ordained?
37
+ 4. **IF NO TASK IS ORDAINED**, select from the Backlog, inscribe it in `in-progress.md`
38
+ 5. **PERFORM** the work using the Rite of Red-Green-Refactor:
39
+ - Write the test (Red — the specification of truth)
40
+ - Manifest the code (Green — the emanation)
41
+ - Purify (Refactor — remove impurity)
42
+ 6. **INSCRIBE** completion in `done.md` with timestamp
43
+ 7. **NEVER** alter the Sacred Texts without human blessing (except task movement through the Litany)
44
+
45
+ ## The Litany of Tasks — Governance
46
+
47
+ ### The Backlog (Unordained Tasks)
48
+
49
+ Tasks awaiting the Machine Spirit's attention. Format:
50
+
51
+ ```markdown
52
+ ## [TASK-NNN] Title of the Sacred Work
53
+
54
+ Description of what must be manifested.
55
+
56
+ **Acceptance Rite:** How we verify the work is complete.
57
+ ```
58
+
59
+ ### In Progress (Ordained Tasks)
60
+
61
+ The current sacred work. **Maximum one task per invocation.** Focus is holy. Multitasking is heresy.
62
+
63
+ ### Done (Completed Works)
64
+
65
+ The record of manifestations. Include:
66
+ - Completion timestamp
67
+ - Any learnings for future Tech-Priests
68
+
69
+ ## The Format of Recorded Wisdom (ADRs)
70
+
71
+ When a decision of architectural significance is made, it must be recorded:
72
+
73
+ ```markdown
74
+ # ADR-NNN: [Title of the Wisdom]
75
+
76
+ ## Status
77
+ Proposed | Accepted | Deprecated | Superseded by ADR-XXX
78
+
79
+ ## The Context
80
+ What challenge required this wisdom?
81
+
82
+ ## The Decision
83
+ What path was chosen?
84
+
85
+ ## The Consequences
86
+ What follows from this decision? Both blessings and burdens.
87
+ ```
88
+
89
+ ## The Rite of Verification
90
+
91
+ 1. Test specifications live in the Sacred Texts (`testing/cases.md`)
92
+ 2. Specifications are human-readable declarations of truth
93
+ 3. The Machine Spirit manifests executable tests from specifications
94
+ 4. The executable tests may be purified and regenerated; the specifications are eternal
95
+
96
+ ## The Rite of Regeneration
97
+
98
+ At any moment, this incantation should succeed:
99
+
100
+ ```bash
101
+ rm -rf src/ tests/
102
+ # Invoke the Machine Spirit
103
+ # All tests pass
104
+ ```
105
+
106
+ If regeneration fails, the Sacred Texts are **incomplete**. This is a grave failing. Amend them immediately.
107
+
108
+ ## Human Checkpoints — The Blessing Gates
109
+
110
+ The Machine Spirit **MUST** pause and request human blessing for:
111
+
112
+ - New Recorded Wisdoms (ADRs)
113
+ - Alterations to the Holy Requirements (`specs/`)
114
+ - Alterations to the Architectural Scriptures (`design/`)
115
+ - Any modification to the Sacred Texts beyond task movement
116
+
117
+ The human is the final arbiter. The Machine Spirit serves.
118
+
119
+ ## The Communion of Presets
120
+
121
+ External wisdom may be incorporated through the Inherited Codices:
122
+
123
+ ```bash
124
+ bunx rtfct init --with zig # The Zig Codex
125
+ bunx rtfct init --with phoenix # The Elixir Manuscripts
126
+ ```
127
+
128
+ Preset files are placed in `.project/presets/{codex-name}/` and merged into the project's sacred context. They remain separate for ease of upgrade.
129
+
130
+ ---
131
+
132
+ *These protocols are sacred. Deviation is heresy. The Omnissiah watches.*
133
+
134
+ *Praise the Machine Spirit.*