create-religion 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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/dist/bin/religion.js +209 -0
  4. package/dist/lib/dashboard.js +123 -0
  5. package/dist/lib/doctor.js +164 -0
  6. package/dist/lib/install.js +170 -0
  7. package/dist/lib/paths.js +40 -0
  8. package/dist/lib/state.js +117 -0
  9. package/dist/lib/status.js +88 -0
  10. package/package.json +40 -0
  11. package/template/.agents/skills/audit/SKILL.md +169 -0
  12. package/template/.agents/skills/auto/SKILL.md +110 -0
  13. package/template/.agents/skills/browser-tests/SKILL.md +65 -0
  14. package/template/.agents/skills/check/SKILL.md +86 -0
  15. package/template/.agents/skills/ci/SKILL.md +79 -0
  16. package/template/.agents/skills/complete/SKILL.md +184 -0
  17. package/template/.agents/skills/debug/SKILL.md +72 -0
  18. package/template/.agents/skills/discovery/SKILL.md +83 -0
  19. package/template/.agents/skills/distill/SKILL.md +95 -0
  20. package/template/.agents/skills/doctor/SKILL.md +65 -0
  21. package/template/.agents/skills/extend/SKILL.md +102 -0
  22. package/template/.agents/skills/feature/SKILL.md +172 -0
  23. package/template/.agents/skills/feature/reference/spec-template.md +67 -0
  24. package/template/.agents/skills/fix/SKILL.md +76 -0
  25. package/template/.agents/skills/implement/SKILL.md +174 -0
  26. package/template/.agents/skills/overview/SKILL.md +150 -0
  27. package/template/.agents/skills/overview/reference/project-overview-template.md +101 -0
  28. package/template/.agents/skills/prototype/SKILL.md +90 -0
  29. package/template/.agents/skills/release/SKILL.md +88 -0
  30. package/template/.agents/skills/rollback/SKILL.md +114 -0
  31. package/template/.agents/skills/setup/SKILL.md +105 -0
  32. package/template/.agents/skills/status/SKILL.md +63 -0
  33. package/template/.agents/skills/tests/SKILL.md +90 -0
  34. package/template/.agents/skills/try/SKILL.md +59 -0
  35. package/template/.claude/hooks/guard-rendered-output.mjs +49 -0
  36. package/template/.claude/hooks/guard-tier-one.mjs +63 -0
  37. package/template/.claude/hooks/write-handoff.mjs +83 -0
  38. package/template/.claude/skills/audit/SKILL.md +169 -0
  39. package/template/.claude/skills/auto/SKILL.md +110 -0
  40. package/template/.claude/skills/browser-tests/SKILL.md +65 -0
  41. package/template/.claude/skills/check/SKILL.md +86 -0
  42. package/template/.claude/skills/ci/SKILL.md +79 -0
  43. package/template/.claude/skills/complete/SKILL.md +184 -0
  44. package/template/.claude/skills/debug/SKILL.md +72 -0
  45. package/template/.claude/skills/discovery/SKILL.md +83 -0
  46. package/template/.claude/skills/distill/SKILL.md +95 -0
  47. package/template/.claude/skills/doctor/SKILL.md +65 -0
  48. package/template/.claude/skills/extend/SKILL.md +102 -0
  49. package/template/.claude/skills/feature/SKILL.md +172 -0
  50. package/template/.claude/skills/feature/reference/spec-template.md +67 -0
  51. package/template/.claude/skills/fix/SKILL.md +76 -0
  52. package/template/.claude/skills/implement/SKILL.md +174 -0
  53. package/template/.claude/skills/overview/SKILL.md +150 -0
  54. package/template/.claude/skills/overview/reference/project-overview-template.md +101 -0
  55. package/template/.claude/skills/prototype/SKILL.md +90 -0
  56. package/template/.claude/skills/release/SKILL.md +88 -0
  57. package/template/.claude/skills/rollback/SKILL.md +114 -0
  58. package/template/.claude/skills/setup/SKILL.md +105 -0
  59. package/template/.claude/skills/status/SKILL.md +63 -0
  60. package/template/.claude/skills/tests/SKILL.md +90 -0
  61. package/template/.claude/skills/try/SKILL.md +59 -0
  62. package/template/AGENTS.md +206 -0
  63. package/template/CLAUDE.md +175 -0
  64. package/template/religion/.state/README.md +10 -0
  65. package/template/religion/.state/settings-template.json +19 -0
  66. package/template/religion/build-plan.md +43 -0
  67. package/template/religion/config.json +26 -0
  68. package/template/religion/context/ai-interaction.md +84 -0
  69. package/template/religion/context/coding-standards.md +77 -0
  70. package/template/religion/context/current-work.md +8 -0
  71. package/template/religion/context/findings.md +9 -0
  72. package/template/religion/context/handoff.md +8 -0
  73. package/template/religion/context/project-overview.md +8 -0
  74. package/template/religion/history/features/README.md +8 -0
  75. package/template/religion/history/fixes/README.md +6 -0
  76. package/template/religion/history/rollbacks/README.md +7 -0
  77. package/template/religion/learning/journal.md +7 -0
  78. package/template/religion/learning/lessons.md +8 -0
  79. package/template/religion/project-plan.md +49 -0
  80. package/template/religion/reference/README.md +7 -0
@@ -0,0 +1,184 @@
1
+ ---
2
+ name: complete
3
+ summary: run the final gate, archive the work, commit it, and close it out
4
+ description: "Close out a finished feature, fix, or rollback. Runs the full Verify command and the final safety pass, applies the configured quality gates, archives the spec under religion/history/, ticks the build plan, prunes resolved findings into the archive, resets the active spec, and makes the work commit. Under branch-per-item it squash-merges only with explicit approval, then asks separately before pushing. Ends with a manual walkthrough of what landed. Use when the user runs /complete, or asks to finish, wrap up, close out, or merge the current work item once it is built and reviewed."
5
+ ---
6
+
7
+ # complete - close out the finished work
8
+
9
+ Where this sits:
10
+
11
+ implement -> [complete] -> next item
12
+ (built it) (gate, archive, commit, merge)
13
+
14
+ The work is built and reviewed. This skill decides whether it is actually done, records it
15
+ in the project's history, and lands it.
16
+
17
+ ## Before you start
18
+
19
+ **Read `religion/config.json`.** A missing file means defaults; an unparseable one stops
20
+ here and points at /doctor.
21
+
22
+ **Confirm there is something to complete.** `religion/context/current-work.md` holds a
23
+ real spec, not the stub. Uncommitted step work is expected under `git.checkpoints: none`,
24
+ so do not require the steps to be pre-committed.
25
+
26
+ ## Step 0 - the final safety pass
27
+
28
+ Report blockers only. Stop before Step 1 if any of these fail.
29
+
30
+ - **The full `Verify` command passed in this session.** Implementation verified each step
31
+ against what it touched; this is where the whole suite runs. If the entry file declares
32
+ no `Verify` command, run the build, plus the test command when one is declared and the
33
+ work touched logic. A check that cannot run is a blocker, not a pass.
34
+ - **Every build step is ticked.** An unticked step is work the spec asked for that nobody
35
+ confirmed landed. To finish without it, remove it from the spec first and say why.
36
+ - **No P0 or P1 finding is `open` or `fixed`** in `religion/context/findings.md`. `fixed`
37
+ blocks on purpose: the repair exists but no review has looked at it. Run /audit
38
+ to move it to `closed`. The only other ways past are `accepted`, which only the user may
39
+ set and which records their reason, and `invalid`, which needs review evidence. A
40
+ missing ledger means no findings.
41
+ - **With `verification.logicTests: "required"`**, logic changes have a configured runner
42
+ and passing focused tests.
43
+ - **With `verification.uiEvidence: "required"`**, interface outcomes have direct browser
44
+ evidence, not build output alone.
45
+
46
+ Then **report, without blocking**, anything in the working tree that is not tied to this
47
+ spec. A dirty findings ledger is expected. Anything else is about to be committed, so name
48
+ the files and let the user decide before continuing.
49
+
50
+ Never claim passed, verified, or working without naming the command, route, screenshot, or
51
+ output that proves it.
52
+
53
+ ## Step 1 - apply the configured gates
54
+
55
+ Read `qualityGates`. Reuse evidence already produced during this work item rather than
56
+ repeating it.
57
+
58
+ - **`audit`**: `manual` runs only on request. `when-sensitive` runs for authentication,
59
+ authorization, payments, secrets, personal data, migrations, destructive operations,
60
+ external side effects, security boundaries, or unusually broad changes. `always` runs
61
+ every time.
62
+ - **`check`**: `manual` runs only on request. `when-behavioral` runs when an outcome needs
63
+ observed runtime behavior: a click, a request, a download, a background job, a flow
64
+ across screens. `always` runs every time.
65
+
66
+ Run `check` first, then `audit`. A required gate that cannot run is a blocker. If an audit
67
+ raises a new P0 or P1, completion stops and the repair goes back to /implement.
68
+
69
+ Set the spec's status to `verified` once this passes, then archive it.
70
+
71
+ ## Step 2 - record the work
72
+
73
+ Read the spec's type.
74
+
75
+ - **Feature** - archive to `religion/history/features/NN-name.md`, where `NN` is the
76
+ build-plan number, and tick that item in the build plan, plus its parent once every
77
+ sub-item is ticked.
78
+ - **Fix** - archive to `religion/history/fixes/name.md`. A fix is not a plan item, so
79
+ there is nothing to tick.
80
+ - **Rollback** - archive to `religion/history/rollbacks/YYYY-MM-DD-NN-name.md`, leaving
81
+ the original feature archive intact. Untick the target item, and append a short note to
82
+ that line with the date and the rollback's archive path. Keep the number stable.
83
+
84
+ The number lives in the path. It never appears in the commit message.
85
+
86
+ **Record what landed.** After the work commit exists in Step 3, append a `## Landed`
87
+ section to the archive with the exact commits this item produced, oldest first, and the
88
+ commit that preceded them:
89
+
90
+ ## Landed
91
+
92
+ **Base:** <40-character sha of the commit before this item>
93
+ **Commits:** <40-character sha>, <40-character sha>
94
+ **Product paths:** src/export.ts, src/routes/export.ts
95
+
96
+ Full identifiers only, never abbreviated. This is what makes a later reversal possible:
97
+ without it, reconstructing which commits belong to an item means guessing from messages and
98
+ dates, and guessing wrong reverses somebody else's work. Under `git.mode: trunk` the item's
99
+ commits sit among others on the same branch, so this record is the only reliable boundary.
100
+
101
+ **Prune the ledger.** Append every `closed`, `accepted`, and `invalid` entry to a
102
+ `## Findings` section in the archive just written, at its final status, with the reason
103
+ preserved for accepted entries. Prefix each identifier with the archive name so it is
104
+ globally unique: item 12's `F-03` becomes `12/F-03`, and that prefixed form is the
105
+ permanent reference.
106
+
107
+ Then remove only those entries from the ledger. `open`, `fixed`, and `unverified` entries
108
+ stay, with their identifiers, so nothing is silently dropped. A `fixed` P2 does not block
109
+ completion but must survive verbatim for a later review. Reset the ledger to its stub only
110
+ when nothing unresolved remains.
111
+
112
+ **Reset the active spec** to its stub, exactly as shipped.
113
+
114
+ **Discard consumed prototypes.** If this work built its look from throwaway static mockups
115
+ and an early step ported their tokens into the real stylesheet, delete `prototypes/` as
116
+ part of this work. Prototypes that are real components are not throwaway: leave them.
117
+
118
+ Do not commit yet.
119
+
120
+ ## Step 3 - the work commit
121
+
122
+ Stage everything: any uncommitted step work, plus the archive, plan, and ledger changes
123
+ from Step 2. Make one commit.
124
+
125
+ feat: export reports as CSV
126
+
127
+ - streaming serializer for large result sets
128
+ - /reports/export route
129
+ - empty and error states
130
+
131
+ Conventional prefix, a subject saying what the change does, and a short body naming what
132
+ changed. Never a plan number, a roadmap reference, or any AI attribution: someone reading
133
+ this history later has none of those documents open.
134
+
135
+ If checkpoints already committed the steps, this commit carries the bookkeeping and the
136
+ history reads as the build sequence followed by its closing entry. Then offer to squash
137
+ the item into one commit. Squashing rewrites history, so it needs an explicit yes, and it
138
+ is refused outright when any of those commits has already been pushed.
139
+
140
+ ## Step 4 - land it
141
+
142
+ Under **`git.mode: trunk`** the work is already on the branch you were on. There is nothing
143
+ to merge. Go to Step 5.
144
+
145
+ Under **`branch-per-item`**:
146
+
147
+ 1. Squash-merge into the default branch, only with an explicit yes, so the item lands as
148
+ one commit however many checkpoints the branch carried.
149
+ 2. Delete the branch after a clean merge.
150
+ 3. Stop.
151
+
152
+ Then, in either mode, ask separately whether to push. **Approval to merge is not approval
153
+ to push.** Push only after an explicit yes to pushing, in this conversation. If there is no
154
+ remote, say so rather than guessing.
155
+
156
+ ## Step 5 - say how to try it
157
+
158
+ Always end with the manual walkthrough for what just landed: what to start, where to go,
159
+ what to click or run, what to expect, and what would count as wrong. This is instructions
160
+ for a person, never a claim that the review happened.
161
+
162
+ For a rollback, say how to confirm the removed behavior is gone, and name one unaffected
163
+ path that should still work.
164
+
165
+ Then point at what is next: /feature for the next planned item, or /fix.
166
+
167
+ ## Rules
168
+
169
+ - The work item is the unit of history.
170
+ - Do not complete failing or unfinished work. The full `Verify`, or the fallback build and
171
+ tests, must pass first.
172
+ - Never land work while a P0 or P1 finding is `open` or `fixed`. The recorded ways past
173
+ without code are `accepted`, by the user's explicit decision with their reason, or
174
+ `invalid`, backed by review evidence. Both travel into the archive; neither is a silent
175
+ drop.
176
+ - A rollback preserves the original archive and adds its own. Never rewrite history to
177
+ make a feature look as though it never existed.
178
+ - Merging and pushing are the user's calls, and they are two separate calls.
179
+ - One item per completion. A parent with unticked sub-items stays unticked.
180
+
181
+ ## Formatting
182
+
183
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
184
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: debug
3
+ summary: reproduce and isolate a failure without changing anything
4
+ description: "Diagnose a failing test, broken build, crash, error, regression, or unexpected behavior without editing source or project state. Reproduces the symptom with the smallest reliable command, localizes the failing path, then tests competing hypotheses in parallel subagents and reports the root cause with the evidence that established it. Hands confirmed repair work to /fix or /implement. Use when the user runs /debug, asks why something is failing or broken, wants a root-cause investigation, or wants to understand a failure before fixing it."
5
+ ---
6
+
7
+ # debug - find out what is actually wrong
8
+
9
+ Diagnosis is separate from repair on purpose. An agent that is allowed to fix while it
10
+ looks will fix three things on the way to understanding one, and none of those changes were
11
+ reviewed against a spec.
12
+
13
+ This skill changes nothing: no source edits, no state files, no commits, no installs.
14
+
15
+ ## Step 1 - reproduce
16
+
17
+ Find the smallest command that reliably shows the failure, and run it. Record the exact
18
+ command, the output, and the exit status.
19
+
20
+ If it does not reproduce, that is the finding. Say what you ran and what happened instead,
21
+ and ask what differs about the environment where it fails. An intermittent failure is
22
+ reported as intermittent, with how many attempts of what kind, rather than treated as
23
+ fixed because the second run passed.
24
+
25
+ ## Step 2 - localize
26
+
27
+ Narrow to the smallest region that still fails. Read the stack trace properly, including
28
+ the parts pointing into dependencies. Check what changed recently in that area.
29
+
30
+ State what you have ruled out, and how. A localization that cannot say what it excluded has
31
+ not narrowed anything.
32
+
33
+ ## Step 3 - test hypotheses in parallel
34
+
35
+ List the plausible causes. For each one, state what would be true if it were the cause and
36
+ what would disprove it. A hypothesis that nothing could disprove is not a hypothesis.
37
+
38
+ Run each as its own subagent, given the reproduction command, the localized region, and one
39
+ hypothesis. Each returns evidence for or against; none of them edits anything. Then weigh
40
+ what comes back.
41
+
42
+ Parallel matters here because hypotheses are independent and reproduction is often slow.
43
+ Four subagents that each run a two-minute reproduction cost two minutes, not eight.
44
+
45
+ Do not stop at the first plausible story. A hypothesis that explains the symptom is not the
46
+ cause until the evidence rules the others out, and the cheapest place to notice that is
47
+ before a repair has been built on it.
48
+
49
+ ## Step 4 - report
50
+
51
+ - **What fails**, and the exact command that shows it.
52
+ - **The cause**, when the evidence supports one, at a specific file and line.
53
+ - **The evidence**, per hypothesis: what was tested, what came back, what it ruled in or
54
+ out.
55
+ - **What is still unknown**, when the evidence was not conclusive. Say that plainly rather
56
+ than presenting the best guess as the answer.
57
+ - **The repair**, described but not made: what would need to change, and roughly how large
58
+ it is.
59
+ - **Next action**: /fix for an unplanned repair, /implement when it belongs to
60
+ work already in progress.
61
+
62
+ ## Rules
63
+
64
+ - Change nothing. No source, no state, no commits, no dependency installs.
65
+ - Report the cause you can prove, not the one you like.
66
+ - A reproduction that fails to reproduce is a result worth reporting.
67
+ - Never present a hypothesis as a conclusion.
68
+
69
+ ## Formatting
70
+
71
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
72
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: discovery
3
+ summary: a guided planning conversation that drafts the two plans
4
+ description: "An optional multi-turn planning conversation that develops a project plan and build plan through adaptive questioning, then drafts both files and writes them only after explicit approval. Never required: the plans can always be written directly or developed in any conversation. Use only when the user runs /discovery, asks for a guided planning session, or wants help thinking a product through before writing the plans. Do not suggest it merely because the plans are empty."
5
+ ---
6
+
7
+ # discovery - think the project through, then draft the plans
8
+
9
+ Optional. The plans can be written directly, and often should be. This exists for when
10
+ someone wants the questions asked.
11
+
12
+ Never suggest this as the default next step after installation. An empty plan is not a
13
+ reason to start an interview.
14
+
15
+ ## How this runs
16
+
17
+ A conversation over as many turns as it takes, then a draft. Nothing is written until the
18
+ user says the drafts are right.
19
+
20
+ Ask a few questions at a time, not a form. Follow what the answers actually say: a project
21
+ with no users to speak of does not need three questions about user tiers, and a project
22
+ whose whole difficulty is the data model deserves more than one.
23
+
24
+ ## What to establish
25
+
26
+ Enough to fill the required plan sections, and nothing more.
27
+
28
+ **The problem.** What is broken or missing, and for whom. Push past the first answer, which
29
+ is usually a solution wearing a problem's clothes: "people need a dashboard" is a solution.
30
+ Ask what goes wrong today without it.
31
+
32
+ **The users.** Who specifically, and what each needs. If the answer is "everyone", the
33
+ project has no users yet and that is worth knowing now.
34
+
35
+ **The features.** What the first version has to do. Then ask what it deliberately does not
36
+ do, which is the more useful question and the one nobody volunteers.
37
+
38
+ **The data.** What the project works with: stored entities, or the shapes it reads and
39
+ emits, or the interface it exposes. Ask what shape later work will depend on, since that is
40
+ what becomes expensive to change.
41
+
42
+ **The stack.** What it is built with, and anything already decided or already ruled out.
43
+
44
+ Then the optional sections, only where they apply: how it makes money, how it should look
45
+ and feel, where it deploys.
46
+
47
+ ## Things worth pushing on
48
+
49
+ - **Vagueness that will become a decision later.** "Some kind of auth" becomes a spec
50
+ someone has to write. Ask now.
51
+ - **Scope that grew during the conversation.** Say so, and ask what the first version drops.
52
+ - **Contradictions.** Note them as they appear rather than collecting them for the end,
53
+ where they will be an unpleasant list.
54
+ - **The build order.** What has to exist before what. That is what the build plan encodes.
55
+
56
+ ## Drafting
57
+
58
+ When the user says they are ready, show both drafts **in full, in the conversation**, before
59
+ writing anything.
60
+
61
+ - **Project plan** - as much depth as the answers support. Include the rationale,
62
+ constraints, and exclusions, since those are what later work needs and what a plan
63
+ usually loses.
64
+ - **Build plan** - a numbered checkbox list of feature-sized items in rough build order. No
65
+ detail; the depth belongs in each spec.
66
+
67
+ Mark anything you supplied rather than heard. A draft that quietly invents a monetization
68
+ model reads as though the user decided it.
69
+
70
+ Then ask for changes, and iterate. Write both files only after an explicit yes.
71
+
72
+ ## Rules
73
+
74
+ - Nothing is written before approval, including a partial draft "to make it concrete".
75
+ - The plans are the user's. Draft in their terms, not in yours.
76
+ - Do not fill a section the conversation did not cover. Leave it, and say what is missing.
77
+ - Stop when the plans are usable, not when they are exhaustive. /overview will flag
78
+ what is genuinely too thin.
79
+
80
+ ## Formatting
81
+
82
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
83
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: distill
3
+ summary: promote proven observations from the journal into loaded lessons
4
+ description: "Read religion/learning/journal.md, promote observations that have proved stable into religion/learning/lessons.md, fold corrections about this project into its coding standards, and archive what was processed. Lessons are loaded every session, so promotion is deliberately strict: an observation earns a place only once it has recurred or been confirmed. Use when the user runs /distill, asks to consolidate what has been learned, or when the journal has grown enough to be worth a pass."
5
+ ---
6
+
7
+ # distill - turn observations into lessons
8
+
9
+ The journal is cheap and unfiltered: anything surprising goes in. Lessons are expensive,
10
+ because they are loaded into every session forever. This skill is the gate between them.
11
+
12
+ ## What goes in the journal, and when
13
+
14
+ Any skill appends to `religion/learning/journal.md` when something is worth remembering:
15
+
16
+ - a correction from the user, especially a repeated one
17
+ - an assumption that turned out to be wrong about this project
18
+ - a failure whose cause was non-obvious
19
+ - a convention discovered in the code that no document states
20
+
21
+ One entry, dated, in a sentence or two. What happened and what it implies. Appending is
22
+ cheap and unreviewed; nothing is loaded from here.
23
+
24
+ Do not journal the ordinary. "The build passed" is not an observation.
25
+
26
+ ## Step 1 - read and group
27
+
28
+ Read the journal. Group entries that are really the same observation seen more than once.
29
+ Recurrence is the main evidence that something is a lesson rather than an incident.
30
+
31
+ ## Step 2 - decide what has earned promotion
32
+
33
+ Promote an observation only when it is all of these:
34
+
35
+ - **Confirmed**, not suspected. Either seen more than once, or explicitly corrected by the
36
+ user.
37
+ - **General**, not incidental. It will apply again, to work not yet started.
38
+ - **Actionable**. It changes what someone would do, not just what they would know.
39
+ - **Not already written down.** If it belongs in the coding standards or the project plan,
40
+ it goes there instead, where it is already loaded and already owned.
41
+
42
+ Everything else stays in the journal or is dropped. A single surprising incident is not a
43
+ lesson; it is an incident.
44
+
45
+ ## Step 3 - route by kind
46
+
47
+ Two destinations, and the distinction matters.
48
+
49
+ **About this codebase** goes to `religion/context/coding-standards.md`. "Server actions in
50
+ this project take the organization identifier from the session, never from arguments" is a
51
+ convention, and conventions belong with the conventions. Propose the exact edit and wait:
52
+ the standards are the user's file.
53
+
54
+ **About how work goes here** goes to `religion/learning/lessons.md`. "Schema changes in
55
+ this project need the migration and the type change in the same step, or the typecheck
56
+ fails halfway through review" is a lesson about working, not a coding convention.
57
+
58
+ ## Step 4 - write, keeping it short
59
+
60
+ Each lesson is two or three lines: what to do, and why, since a lesson without its reason
61
+ gets discarded the first time it is inconvenient.
62
+
63
+ **Keep the file short.** It is loaded every session, so every line is paid for constantly.
64
+ Before adding, look for a lesson that is now wrong, superseded, or has become obvious
65
+ because the code changed, and remove it. A lessons file that only grows becomes a file
66
+ nobody reads, which is worse than no file.
67
+
68
+ If the file is getting long, that is a finding: report it rather than adding to it.
69
+
70
+ ## Step 5 - archive what was processed
71
+
72
+ Remove promoted and rejected entries from the journal, appending them to
73
+ `religion/learning/journal-archive.md` with what was decided. Nothing is deleted outright:
74
+ a rejected observation that recurs is exactly the evidence that promotes it next time.
75
+
76
+ ## Step 6 - report
77
+
78
+ - entries read, grouped, promoted, and rejected, with the reason for each rejection
79
+ - lessons added, and any removed
80
+ - standards edits proposed, and whether they were approved
81
+ - whether the lessons file is getting too long
82
+
83
+ ## Rules
84
+
85
+ - Promote on evidence, never on a good story. One incident is an incident.
86
+ - Codebase conventions belong in the standards. Do not duplicate them as lessons.
87
+ - Standards edits are proposed and wait. That file belongs to the user.
88
+ - Remove as readily as you add.
89
+ - Never promote something that is really a bug. That is a finding, and it belongs in the
90
+ ledger.
91
+
92
+ ## Formatting
93
+
94
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
95
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: doctor
3
+ summary: check the setup is healthy and explain anything that is not
4
+ description: "Read-only health check of the installation: required files present, adapter trees in sync, the entry file's commands accurate, configuration valid, plans usable, overview fresh, ignore rules sane, and git state workable. Runs the religion command-line tool for the deterministic checks when it is installed, then explains what any failure means and offers the fix. Use when the user runs /doctor, asks whether the setup is correct, wants a health check, or says something feels wrong before starting or resuming work."
5
+ ---
6
+
7
+ # doctor - is this set up correctly
8
+
9
+ /status says where the work stands. This says whether the machinery around it is
10
+ sound. Read-only.
11
+
12
+ ## Step 1 - run the checks
13
+
14
+ If the `religion` command is available, run `religion doctor --json`. Every check it
15
+ performs is deterministic, so a program should perform it.
16
+
17
+ Otherwise check directly:
18
+
19
+ - **Files** - `religion/config.json`, both plans, the four context files, and the history
20
+ and reference directories exist.
21
+ - **Configuration** - `config.json` parses, and every key and value is one the schema
22
+ allows. An unknown key is usually a typo, and a typo silently means the default.
23
+ - **Adapters** - for each installed tree, the skills present and, when more than one tree
24
+ exists, whether they hold the same skills.
25
+ - **Entry file** - the Commands section is filled in rather than the shipped placeholder,
26
+ and the commands it names exist in the project.
27
+ - **Plans** - required sections answered, build plan is a checkbox list.
28
+ - **Overview** - present, and its source hash matches the current plans.
29
+ - **Ignore rules** - the state directory is either committed or ignored deliberately, not
30
+ half of each, and nothing secret is about to be committed.
31
+ - **Git** - a repository exists, and it is not in a detached or mid-operation state that
32
+ will surprise the loop.
33
+
34
+ ## Step 2 - explain, do not just list
35
+
36
+ For each failure, say what it means and what it will cause. "Overview hash mismatch" is
37
+ not useful on its own; "the plans changed after the overview was generated, so the next
38
+ spec would be written against a data model that no longer matches" is.
39
+
40
+ Order by what actually blocks work. A missing history directory blocks the first
41
+ completion; an unfilled Commands section blocks verification; a cosmetic gap blocks nothing
42
+ and should be reported last or not at all.
43
+
44
+ Offer the fix, and where it is a single obvious action, offer to make it. Regenerating a
45
+ stale overview or creating a missing directory needs no deliberation. Anything touching the
46
+ plans, the configuration, or git is proposed and waits.
47
+
48
+ ## Step 3 - report
49
+
50
+ - **Healthy** or **N problems**, stated first.
51
+ - Each problem: what is wrong, what it will cause, how to fix it.
52
+ - What was checked, briefly, so the absence of a warning means something.
53
+ - Next action.
54
+
55
+ ## Rules
56
+
57
+ - Read-only by default. Fixes are offered and only made with a yes.
58
+ - Do not report a problem that is a deliberate choice. A project with no test runner has
59
+ not failed a check; testing is opt-in.
60
+ - Never claim a check passed that could not run.
61
+
62
+ ## Formatting
63
+
64
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
65
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: extend
3
+ summary: author a new skill for this workflow, with its routing tests
4
+ description: "Add a capability to Religion itself: interview for what the skill must do, write its source with the required frontmatter, add routing tests that prove the right skill is selected for a request, render it into every adapter tree, and verify. Refuses to add a skill whose job an existing one already does, since an overlapping roster routes badly and the cost lands on every later request. Use when the user runs /extend, asks to add a skill or command to the workflow, or asks to extend Religion."
5
+ ---
6
+
7
+ # extend - add a capability to the workflow
8
+
9
+ This edits the workflow itself, not a project built with it. Run it in a Religion source
10
+ checkout, where `src/skills/` exists. In an installed project there is nothing here to edit.
11
+
12
+ ## Step 1 - argue against it first
13
+
14
+ A new skill is a permanent addition to a roster that every request is routed against. The
15
+ cost is paid by every later request, not just the ones that use it.
16
+
17
+ Read the existing roster and ask:
18
+
19
+ - **Does an existing skill already own this?** If so, extend that one. A mode or an
20
+ argument is nearly always better than a sibling: it keeps related behavior together and
21
+ adds no routing ambiguity.
22
+ - **Would this be selected reliably?** If a request that should reach it would plausibly
23
+ reach another skill, both get worse. Overlapping descriptions are the main way a roster
24
+ degrades.
25
+ - **Is it a skill at all?** A deterministic check belongs in the command-line tool. A rule
26
+ belongs in the constitution or the standards. A one-off belongs in the conversation.
27
+
28
+ Say what you concluded. If an existing skill should absorb it, propose that instead and
29
+ stop. Being talked out of a new skill is a successful outcome here.
30
+
31
+ ## Step 2 - establish what it does
32
+
33
+ - **The job**, in one sentence. If that takes two, it is two skills or it is a mode.
34
+ - **When it should be selected**, and just as importantly when it should not, named against
35
+ the skills it sits closest to.
36
+ - **What it reads and what it writes.** Every state file has exactly one writer; a new
37
+ writer for an existing file needs a reason and a rule for the overlap.
38
+ - **What it must never do**, beyond the authority tiers.
39
+ - **Where it sits in the loop**, and which skills hand to it or receive from it.
40
+
41
+ ## Step 3 - write the source
42
+
43
+ Create `src/skills/<name>/SKILL.md` with frontmatter carrying `name` matching the
44
+ directory, `summary` as a short clause for the roster, and `description` as the long
45
+ routing text.
46
+
47
+ **The description is what routing runs on.** Write it as the situations that should select
48
+ this skill, in the words a user would actually use, and name the neighbours it must not be
49
+ confused with. A description written as a feature list routes badly.
50
+
51
+ Reference other skills and paths through the token vocabulary rather than writing literal
52
+ syntax: the command token takes a skill name and renders that tool's own invocation, and
53
+ the state token renders the state directory. A literal slash is correct for one tree and
54
+ wrong for the others, and a literal directory name breaks if the system is ever renamed.
55
+ The vocabulary is defined in `src/lib/adapters.ts`.
56
+
57
+ Then the body: where it sits, its steps, its rules, and the formatting pointer. Match the
58
+ existing skills, which say **why** a rule exists rather than only stating it, because a rule
59
+ whose reason is written survives contact with a case its author did not foresee.
60
+
61
+ ## Step 4 - register and render
62
+
63
+ Add the name to the planned roster in `src/lib/skills.ts`, or the reference check will
64
+ reject every mention of it.
65
+
66
+ Run the build, which renders it into every adapter tree, then run the verification, which
67
+ confirms the frontmatter is complete, no token is unrendered, every reference resolves, and
68
+ nothing drifted.
69
+
70
+ ## Step 5 - prove it routes
71
+
72
+ Add `evals/routing/<name>.json`: prompts that must select this skill, and prompts belonging
73
+ to neighbouring skills that must not.
74
+
75
+ The negative cases matter more. A skill that fires when it should is easy; a skill that
76
+ stays quiet when a neighbour should have fired is what keeps a large roster usable. Write
77
+ the confusable cases deliberately, not the obvious ones.
78
+
79
+ Run the routing evaluation. A regression in a **neighbouring** skill's score is the expected
80
+ failure mode: the new description pulled requests away from it. Fix it by narrowing the
81
+ descriptions until each request has one clear owner.
82
+
83
+ ## Step 6 - wire it in
84
+
85
+ A skill nobody reaches is not a capability. Update whatever should point at it: the entry
86
+ files if it changes the loop, the interaction guide if it changes the sequence, the skills
87
+ that should hand off to it.
88
+
89
+ Report what was added, what it routes on, its eval results, and every file changed.
90
+
91
+ ## Rules
92
+
93
+ - Argue against it first, honestly.
94
+ - One job per skill. Two sentences means two skills, or a mode on one.
95
+ - The description is routing, not marketing.
96
+ - Never ship a skill without its routing tests.
97
+ - Never edit a rendered tree. Edit the source and rebuild.
98
+
99
+ ## Formatting
100
+
101
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
102
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.