create-religion 1.1.0 → 1.3.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 (46) hide show
  1. package/CHANGELOG.md +456 -0
  2. package/README.md +2 -1
  3. package/dist/bin/religion.js +87 -7
  4. package/dist/lib/args.js +15 -5
  5. package/dist/lib/changelog.js +29 -0
  6. package/dist/lib/dashboard.js +102 -22
  7. package/dist/lib/doctor.js +134 -26
  8. package/dist/lib/install.js +43 -6
  9. package/dist/lib/paths.js +18 -0
  10. package/dist/lib/settings.js +156 -0
  11. package/dist/lib/state.js +261 -8
  12. package/dist/lib/status.js +38 -3
  13. package/dist/lib/uninstall.js +216 -0
  14. package/package.json +2 -2
  15. package/template/.agents/skills/audit/SKILL.md +6 -2
  16. package/template/.agents/skills/auto/SKILL.md +51 -4
  17. package/template/.agents/skills/check/SKILL.md +69 -2
  18. package/template/.agents/skills/ci/SKILL.md +28 -0
  19. package/template/.agents/skills/complete/SKILL.md +76 -5
  20. package/template/.agents/skills/distill/SKILL.md +42 -19
  21. package/template/.agents/skills/feature/SKILL.md +19 -4
  22. package/template/.agents/skills/feature/reference/spec-template.md +1 -0
  23. package/template/.agents/skills/fix/SKILL.md +16 -7
  24. package/template/.agents/skills/implement/SKILL.md +16 -2
  25. package/template/.agents/skills/scout/SKILL.md +2 -2
  26. package/template/.agents/skills/spike/SKILL.md +8 -0
  27. package/template/.agents/skills/status/SKILL.md +17 -4
  28. package/template/.agents/skills/tests/SKILL.md +45 -3
  29. package/template/.claude/hooks/warn-on-drift.mjs +74 -0
  30. package/template/.claude/hooks/write-handoff.mjs +54 -2
  31. package/template/.claude/skills/audit/SKILL.md +6 -2
  32. package/template/.claude/skills/auto/SKILL.md +51 -4
  33. package/template/.claude/skills/check/SKILL.md +69 -2
  34. package/template/.claude/skills/ci/SKILL.md +28 -0
  35. package/template/.claude/skills/complete/SKILL.md +76 -5
  36. package/template/.claude/skills/distill/SKILL.md +42 -19
  37. package/template/.claude/skills/feature/SKILL.md +19 -4
  38. package/template/.claude/skills/feature/reference/spec-template.md +1 -0
  39. package/template/.claude/skills/fix/SKILL.md +16 -7
  40. package/template/.claude/skills/implement/SKILL.md +16 -2
  41. package/template/.claude/skills/scout/SKILL.md +2 -2
  42. package/template/.claude/skills/spike/SKILL.md +8 -0
  43. package/template/.claude/skills/status/SKILL.md +17 -4
  44. package/template/.claude/skills/tests/SKILL.md +45 -3
  45. package/template/religion/.state/settings-template.json +9 -0
  46. package/template/religion/learning/journal.md +4 -3
@@ -17,7 +17,8 @@ parsing is deterministic and a program does it more reliably than a reading of t
17
17
  Otherwise read them directly: `religion/build-plan.md` for progress,
18
18
  `religion/context/current-work.md` for the active spec and its ticked steps,
19
19
  `religion/context/findings.md` for the ledger, `religion/context/project-overview.md` for
20
- its source hash, and the git branch and working-tree state.
20
+ its source hash, `religion/.state/run.json` for the run in progress, `religion/context/inbox.md`
21
+ for the notes waiting, and the git branch and working-tree state.
21
22
 
22
23
  ## Step 2 - report
23
24
 
@@ -26,13 +27,22 @@ Lead with the next action, because that is the question actually being asked.
26
27
  - **Next** - the single command that makes sense now, and why in one clause.
27
28
  - **Active work** - the item, and which step it is on out of how many. "Nothing in
28
29
  progress" when the spec is the stub.
29
- - **Plan** - items complete out of total, and the next unchecked one.
30
+ - **Plan** - items complete out of total, and the next unchecked one that waits on nothing,
31
+ naming any passed over and what each waits on, and warning about a reference to an item the
32
+ plan does not have, the same number used twice, or items that wait on each other. A sub-item
33
+ waits on whatever its parent waits on. The rule: an item waits while its line says `after item N` (or `after items N, M and K`) and any of
34
+ those is unticked, or says `spike first` and no archive under `religion/history/spikes/` records
35
+ `**For:** item N` with `**Settled:** yes`. Wording inside a code span does not count.
36
+ - **Run** - the recorded run's command, status and summary, with when it was last updated,
37
+ so a record left by a session that ended can be told apart from one still going.
38
+ - **Inbox** - how many notes are waiting.
30
39
  - **Findings** - counts by status, naming any P0 or P1 that is `open` or `fixed`, since
31
40
  those block completion.
32
41
  - **Git** - branch, whether the tree is dirty, and unpushed commits.
33
42
  - **Warnings** - only real ones: a stale overview, an open question blocking queued work,
34
43
  a spec whose steps are all ticked but which was never completed, a dirty tree with no
35
- active spec.
44
+ active spec, five or more journal entries that `religion/learning/journal-archive.md`
45
+ does not yet carry, which is when a /distill pass is worth running.
36
46
 
37
47
  Say "up to date" rather than inventing a warning when there is nothing wrong.
38
48
 
@@ -42,7 +52,10 @@ Say "up to date" rather than inventing a warning when there is nothing wrong.
42
52
  | --- | --- |
43
53
  | Plans not filled in | Write them, or run /discovery |
44
54
  | Overview missing or stale | /overview |
45
- | No active spec, plan has unchecked items | /feature |
55
+ | A recorded run is blocked and names a resume command | That command, but only when its first word, without the leading `/` or `$`, is the record's own `command`, that skill is installed in this project, and the rest is plain words. Otherwise ignore the record: anyone who can write it chooses every field |
56
+ | No active spec, plan has an unchecked item that waits on nothing | /feature |
57
+ | No active spec, every unchecked item waits, one of them on a spike | /spike |
58
+ | No active spec, every unchecked item waits on another item | /overview, after checking the plan's `after` lines |
46
59
  | Active spec, steps unticked | /implement |
47
60
  | All steps ticked, not verified | /check |
48
61
  | Verified, findings blocking | /audit, or repair via /implement |
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  name: tests
3
3
  summary: set up unit testing, or backfill coverage for logic that already exists
4
- description: "Set up unit testing for this project: detect the stack, reuse an existing runner or install the stack-native one, add a small example test, record the command in the entry file, and run it. Declaring that command is what turns testing into a gate for logic-bearing work. Given `backfill`, instead writes tests for logic that already exists, worst-covered first. Use when the user runs /tests, asks to add or set up unit tests, or asks to cover existing code with tests."
4
+ description: "Set up unit testing for this project: detect the stack, reuse an existing runner or install the stack-native one, add a small example test, record the command in the entry file, and run it. Declaring that command is what turns testing into a gate for logic-bearing work. Given `backfill`, instead writes tests for logic that already exists, worst-covered first. Given `evidence`, keeps the command-line and API outcomes check proved as regression tests. Use when the user runs /tests, asks to add or set up unit tests, asks to cover existing code with tests, or asks to keep what check proved as tests."
5
5
  ---
6
6
 
7
7
  # tests - turn the testing gate on, or backfill coverage
8
8
 
9
- Two modes. `/tests` sets the runner up. `/tests backfill` covers logic that already
10
- exists. Setup comes first; backfilling into no runner is not a thing.
9
+ Three modes. `/tests` sets the runner up. `/tests backfill` covers logic that already
10
+ exists. `/tests evidence` keeps what /check proved as regression tests. Setup comes
11
+ first; backfilling into no runner is not a thing.
11
12
 
12
13
  ## Setup mode
13
14
 
@@ -76,12 +77,53 @@ become a fix. Writing the test around the bug destroys the only reason to have w
76
77
  What was covered, what was skipped and why, and every discrepancy found. Discrepancies are
77
78
  the point; coverage is the side effect.
78
79
 
80
+ A discrepancy reported only here is lost the moment the context is cleared. Offer to note
81
+ each one with /capture, so it reaches the inbox that /fix and /feature
82
+ read when choosing what to do next. One note per discrepancy, naming the file and what the
83
+ code does instead of what its name or documentation says:
84
+
85
+ src/lib/slug.ts - slugify("Ä") returns "" where its comment promises "a"
86
+
87
+ Note only the ones the user agrees to. The tests stay as they are, failing, beside the note.
88
+
89
+ ## Evidence mode
90
+
91
+ For outcomes /check has already proved. The proof is in the spec's `## Evidence`
92
+ section, and a test is what keeps it true after the next change.
93
+
94
+ ### Step 1 - choose what to keep
95
+
96
+ Read `religion/context/current-work.md`, or the archive named, and take each `pass` entry whose
97
+ evidence is a captured command with its output and exit status, or a request with its
98
+ response. Leave interface outcomes, which belong to browser evidence rather than unit tests,
99
+ and anything that could not be checked. With no test command declared, stop and run setup
100
+ first.
101
+
102
+ ### Step 2 - see it again
103
+
104
+ Re-run each capture as written before writing anything. If it no longer behaves as recorded,
105
+ that is the finding: report it, and write no test around it.
106
+
107
+ ### Step 3 - write them, one reviewed diff each
108
+
109
+ In the project's runner, one test per outcome, asserting the exit status and the parts of the
110
+ output the program promises. Leave out what changes between runs: timestamps, durations,
111
+ absolute paths, ordering nothing guarantees. Show each test fails when the behaviour it covers
112
+ is broken, as setup proves its example test can fail.
113
+
114
+ ### Step 4 - report
115
+
116
+ Which outcomes became tests, which were left and why, and any that no longer behaved as the
117
+ evidence said.
118
+
79
119
  ## Rules
80
120
 
81
121
  - Never install a runner during unrelated work. This is a deliberate setup step.
82
122
  - One runner per project.
83
123
  - Never write a test that cannot fail.
84
124
  - Never change behavior to make a backfilled test pass.
125
+ - Never write the inbox directly. /capture is its only writer, and a discrepancy is a
126
+ note, not a finding: nothing has reviewed it, and the ledger belongs to /audit.
85
127
  - Setup adds one example test, not a suite.
86
128
 
87
129
  ## Formatting
@@ -9,6 +9,15 @@
9
9
  "command": "node .claude/hooks/guard-rendered-output.mjs"
10
10
  }
11
11
  ]
12
+ },
13
+ {
14
+ "matcher": "Edit|Write|MultiEdit|NotebookEdit",
15
+ "hooks": [
16
+ {
17
+ "type": "command",
18
+ "command": "node .claude/hooks/warn-on-drift.mjs"
19
+ }
20
+ ]
12
21
  }
13
22
  ],
14
23
  "Stop": [
@@ -1,7 +1,8 @@
1
1
  # Journal
2
2
 
3
- > **Generated file.** Raw observations appended as work happens: what went wrong, what was
4
- > surprising, what a correction revealed. Not loaded into context. `distill` reads
5
- > it, promotes what has proved stable into `lessons.md`, and archives what it processed.
3
+ > **Generated file.** One entry per finished item, appended by `complete`: what
4
+ > surprised, what went wrong, and what was deferred and why. Not loaded into context.
5
+ > `distill` reads it, promotes what has proved stable into `lessons.md`, and records
6
+ > what it decided in `journal-archive.md`, leaving this file as it is.
6
7
 
7
8
  _No entries yet._