create-religion 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,12 +31,14 @@ generated separately, so they carry that tool's own invocation syntax.
31
31
  ## Commands
32
32
 
33
33
  ```bash
34
- religion status # where the work stands, and the one thing to do next
35
- religion doctor # is the setup healthy
36
- religion dashboard # a local read-only view
37
- religion update # update the workflow files, preserving yours
34
+ npx create-religion status # where the work stands, and the one thing to do next
35
+ npx create-religion doctor # is the setup healthy
36
+ npx create-religion dashboard # a local read-only view
37
+ npx create-religion update # update the workflow files, preserving yours
38
38
  ```
39
39
 
40
+ Installing the package globally shortens these to `religion status` and the rest.
41
+
40
42
  `update` will not overwrite a file you have edited. It tells you what conflicts and backs
41
43
  up the original if you choose to replace it.
42
44
 
@@ -189,11 +189,14 @@ function parse(argv) {
189
189
  function printHelp() {
190
190
  console.log(`religion - a file-backed, spec-driven AI development workflow
191
191
 
192
- religion install [dir] add the workflow to a project
193
- religion update [dir] update the workflow files, preserving your own
194
- religion status where the work stands, and what to do next
195
- religion doctor check the setup is healthy
196
- religion dashboard a local read-only view
192
+ Run as \`npx create-religion <command>\`, or as \`religion <command>\` when the package
193
+ is installed globally.
194
+
195
+ install [dir] add the workflow to a project
196
+ update [dir] update the workflow files, preserving your own
197
+ status where the work stands, and what to do next
198
+ doctor check the setup is healthy
199
+ dashboard a local read-only view
197
200
 
198
201
  Options
199
202
  --claude --codex --copilot --opencode pick adapters (default: all)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-religion",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A file-backed, spec-driven AI development workflow. Spec before code, small reviewed diffs, and project state in markdown so a cleared context costs nothing.",
5
5
  "license": "MIT",
6
6
  "author": "Nate",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: complete
3
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."
4
+ description: "Close out a finished feature, fix, rollback, or refactor campaign. 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
5
  ---
6
6
 
7
7
  # complete - close out the finished work
@@ -80,6 +80,9 @@ Read the spec's type.
80
80
  - **Rollback** - archive to `religion/history/rollbacks/YYYY-MM-DD-NN-name.md`, leaving
81
81
  the original feature archive intact. Untick the target item, and append a short note to
82
82
  that line with the date and the rollback's archive path. Keep the number stable.
83
+ - **Refactor** - archive to `religion/history/refactors/area-lens.md`. A campaign is not a
84
+ plan item, so there is nothing to tick. Carry the deferred candidates across into the
85
+ archive, since they are what the next campaign over that area starts from.
83
86
 
84
87
  The number lives in the path. It never appears in the commit message.
85
88
 
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: refactor
3
+ summary: simplify existing code in one behaviour-preserving campaign at a time
4
+ description: "Simplify code that already exists, one behaviour-preserving campaign at a time. Takes a target that must be named (a single file, a folder, one package, or a monorepo root) and surveys it across five lenses: bloat, structure, over-implementation, duplication, and reinvention of what the language, the standard library, or an installed dependency already provides. Specs one lens in one area into religion/context/current-work.md and stops, leaving $implement to build it. Refuses to start when no test reaches the target, since a change meant to preserve behaviour needs something able to notice when it does not. Use when the user runs $refactor, asks to simplify, shrink, tidy, consolidate, or clean up existing or inherited code, says something is bloated or over-engineered, or wants a hand-rolled implementation replaced by something already available."
5
+ ---
6
+
7
+ # refactor - simplify what is already there
8
+
9
+ Refactoring is the one kind of change defined by what it must **not** do. The code gets
10
+ smaller; what it does stays identical. That constraint is the whole skill, and every rule
11
+ below exists to protect it.
12
+
13
+ This skill surveys and plans. It writes one campaign into
14
+ `religion/context/current-work.md` and stops, the same as $feature and $fix.
15
+ $implement builds it under the usual review gates.
16
+
17
+ ## Input
18
+
19
+ A **target is required**, and may be any size:
20
+
21
+ $refactor src/lib/date.ts a single file
22
+ $refactor src/legacy a folder
23
+ $refactor packages/api one package
24
+ $refactor . a monorepo root
25
+
26
+ There is no default and no implicit whole-project mode. Refactoring without a named target
27
+ is how a work item becomes unbounded. If no target is given, ask for one rather than
28
+ guessing at what looks worst.
29
+
30
+ A **lens** may follow, to survey only that axis: `$refactor packages/api duplication`.
31
+
32
+ ## The five lenses
33
+
34
+ Ordered as the campaign order is ordered, by how much each depends on a judgement about
35
+ equivalence. The earlier ones are safe because nothing has to be judged equal to anything.
36
+
37
+ | Lens | Finds | The judgement it rests on |
38
+ | --- | --- | --- |
39
+ | `bloat` | comments restating the code, banner blocks and section dividers, dead code, unreachable branches, unused imports, variables and exports | none: the code is not reached |
40
+ | `structure` | files and functions past the configured size, god objects, control flow nested past following | none: a move preserves behaviour by construction |
41
+ | `over-implementation` | abstraction layers, configuration options, generality and extension points nothing calls | that nothing calls it |
42
+ | `duplication` | the same utility, type, component or constant defined repeatedly, when one definition would serve | that the copies are actually the same |
43
+ | `reinvention` | hand-rolled implementations of what the language, the standard library, or an already-installed dependency provides | that the replacement matches every edge case |
44
+
45
+ `structure` reads its thresholds from `refactor.maxFileLines` and
46
+ `refactor.maxFunctionLines` in `religion/config.json`. They are defaults rather than a
47
+ standard this project agreed to, so a project that has set its own limits in a linter
48
+ should have those numbers copied into the configuration and used instead.
49
+
50
+ ## Step 1 - resolve the target
51
+
52
+ Establish what was named: a file, a folder, a package, or a workspace root holding several.
53
+ For a package or a workspace, read the manifests to learn where each package begins and
54
+ what each one publishes. That boundary matters twice over, in Step 4 and in Step 5.
55
+
56
+ Exclude what is not the project's to simplify: dependencies, generated files, build output,
57
+ caches, vendored code, minified assets, and anything the project's ignore rules already
58
+ exclude. State the exclusions before surveying, so nobody mistakes a skipped directory for
59
+ a clean one.
60
+
61
+ ## Step 2 - establish the safety net, or stop
62
+
63
+ **A declared test command is not the gate. Tests that reach the target are the gate.**
64
+
65
+ Run the project's declared test command and confirm the suite both passes and exercises the
66
+ target. A suite of six hundred green tests proves nothing about a directory none of them
67
+ import, and proceeding on it is worse than proceeding on nothing, because it feels safe.
68
+
69
+ When no test command is declared, or none reaches the target, stop and say so plainly:
70
+ name the target, say what the suite does cover, and point at $tests to cover the
71
+ target first. A required check that cannot run is a blocker, not a pass.
72
+
73
+ When the net holds, record the exact command and its result. That green baseline goes into
74
+ the spec in Step 5, so every step can be measured against the state before anything moved.
75
+
76
+ ## Step 3 - survey
77
+
78
+ Read the target across the selected lenses, or all five when none was named. Read
79
+ `religion/context/findings.md` as well: quality findings recorded by $audit against
80
+ this area are candidates already identified, and folding them in avoids rediscovering them
81
+ under a second name. **Never write to the ledger.** $audit owns that file, and a
82
+ finding's status stays its to change.
83
+
84
+ Report what was found as counts per area and per lens, densest first:
85
+
86
+ packages/api bloat 41 structure 7 duplication 12
87
+ packages/shared bloat 6 structure 2 duplication 21
88
+ packages/cli bloat 3 structure 0 duplication 1
89
+
90
+ For a single file the map is one row, which is fine. The point is that the size of the job
91
+ is visible before anyone commits to it.
92
+
93
+ ## Step 4 - choose one lens, in one area
94
+
95
+ **A campaign is one lens in one area.** Not five lenses, not the whole monorepo. A spec
96
+ mixing safe deletions with semantic replacements cannot be reviewed as one thing, because
97
+ the reviewer's attention is spent on the easy half.
98
+
99
+ Propose the widest win, say why, and let the user choose. Everything else stays in the
100
+ report, unspecced, waiting for the next run after this campaign completes.
101
+
102
+ Two boundaries constrain what may enter the campaign:
103
+
104
+ - **The published surface stops and asks.** Anything reachable only from inside the project
105
+ can be merged, renamed or reshaped freely, which is what makes the duplication lens work
106
+ at all. Anything a consumer can import, taken from the manifest's entry points, is a
107
+ breaking change wearing a refactor's clothes. Name it, say what would break, and let the
108
+ user decide whether it belongs in this campaign or in a feature.
109
+ - **A new dependency needs its own yes, and has to earn it.** When the language and the
110
+ installed dependencies genuinely cannot replace hand-rolled code, a new dependency may be
111
+ proposed, never assumed. Propose one only when it would be used in **several places**. A
112
+ dependency that saves fifty lines in a single file is a bad trade: the code leaves and the
113
+ supply chain stays.
114
+
115
+ ## Step 5 - write the campaign
116
+
117
+ Write the spec into `religion/context/current-work.md`: the target, the lens, the green
118
+ baseline from Step 2, and the change broken into steps small enough to read as diffs.
119
+
120
+ Order the steps so each one stands alone and can be verified against the baseline. Record
121
+ what would prove the behaviour unchanged, which is the test command from Step 2 for logic,
122
+ and for anything with a visible surface a route to walk and what should appear.
123
+
124
+ Candidates that were found but not specced go in as a short list at the end, so the next run
125
+ has them and nothing is rediscovered from scratch.
126
+
127
+ Completion archives the campaign under `religion/history/refactors/`. Refactor campaigns
128
+ are their own kind of work: they are not build-plan items, they tick nothing, and keeping
129
+ them separate is what makes the refactoring history of an area readable later.
130
+
131
+ ## Step 6 - report and stop
132
+
133
+ The target and what it resolved to, the baseline and the command that produced it, the
134
+ density map, the lens and area chosen and why, what the campaign contains, what was deferred,
135
+ and any published-surface or dependency decision waiting on the user.
136
+
137
+ Then stop. This skill does not build. $implement does.
138
+
139
+ ## Rules
140
+
141
+ - **Behaviour is the invariant.** Every step must leave the target doing exactly what it did.
142
+ - **Never fix a bug in a refactor step.** A refactor that uncovers a genuine defect stops and
143
+ points at $fix. Discovering that four copies of a function behave differently means
144
+ choosing one is a behaviour change, not a merge, and the reviewer cannot see it inside a
145
+ diff that also moves code.
146
+ - **Never delete a comment that carries a why.** The bloat lens removes comments restating
147
+ the code. A comment recording a decision, a gotcha, a workaround, or a link to a spec is
148
+ the opposite of bloat, and it is unrecoverable once gone.
149
+ - **Never reformat alongside a change.** Whitespace, import order and style churn never share
150
+ a step with a structural edit. A diff where fifteen real lines hide among three hundred
151
+ cosmetic ones gets rubber-stamped, which costs more than the formatting saved.
152
+ - One lens, one area, one campaign.
153
+ - A target is always named. Never scan the project hoping to find something worth doing.
154
+ - Read the findings ledger; never write it.
155
+
156
+ ## Formatting
157
+
158
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
159
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: complete
3
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."
4
+ description: "Close out a finished feature, fix, rollback, or refactor campaign. 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
5
  ---
6
6
 
7
7
  # complete - close out the finished work
@@ -80,6 +80,9 @@ Read the spec's type.
80
80
  - **Rollback** - archive to `religion/history/rollbacks/YYYY-MM-DD-NN-name.md`, leaving
81
81
  the original feature archive intact. Untick the target item, and append a short note to
82
82
  that line with the date and the rollback's archive path. Keep the number stable.
83
+ - **Refactor** - archive to `religion/history/refactors/area-lens.md`. A campaign is not a
84
+ plan item, so there is nothing to tick. Carry the deferred candidates across into the
85
+ archive, since they are what the next campaign over that area starts from.
83
86
 
84
87
  The number lives in the path. It never appears in the commit message.
85
88
 
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: refactor
3
+ summary: simplify existing code in one behaviour-preserving campaign at a time
4
+ description: "Simplify code that already exists, one behaviour-preserving campaign at a time. Takes a target that must be named (a single file, a folder, one package, or a monorepo root) and surveys it across five lenses: bloat, structure, over-implementation, duplication, and reinvention of what the language, the standard library, or an installed dependency already provides. Specs one lens in one area into religion/context/current-work.md and stops, leaving /implement to build it. Refuses to start when no test reaches the target, since a change meant to preserve behaviour needs something able to notice when it does not. Use when the user runs /refactor, asks to simplify, shrink, tidy, consolidate, or clean up existing or inherited code, says something is bloated or over-engineered, or wants a hand-rolled implementation replaced by something already available."
5
+ ---
6
+
7
+ # refactor - simplify what is already there
8
+
9
+ Refactoring is the one kind of change defined by what it must **not** do. The code gets
10
+ smaller; what it does stays identical. That constraint is the whole skill, and every rule
11
+ below exists to protect it.
12
+
13
+ This skill surveys and plans. It writes one campaign into
14
+ `religion/context/current-work.md` and stops, the same as /feature and /fix.
15
+ /implement builds it under the usual review gates.
16
+
17
+ ## Input
18
+
19
+ A **target is required**, and may be any size:
20
+
21
+ /refactor src/lib/date.ts a single file
22
+ /refactor src/legacy a folder
23
+ /refactor packages/api one package
24
+ /refactor . a monorepo root
25
+
26
+ There is no default and no implicit whole-project mode. Refactoring without a named target
27
+ is how a work item becomes unbounded. If no target is given, ask for one rather than
28
+ guessing at what looks worst.
29
+
30
+ A **lens** may follow, to survey only that axis: `/refactor packages/api duplication`.
31
+
32
+ ## The five lenses
33
+
34
+ Ordered as the campaign order is ordered, by how much each depends on a judgement about
35
+ equivalence. The earlier ones are safe because nothing has to be judged equal to anything.
36
+
37
+ | Lens | Finds | The judgement it rests on |
38
+ | --- | --- | --- |
39
+ | `bloat` | comments restating the code, banner blocks and section dividers, dead code, unreachable branches, unused imports, variables and exports | none: the code is not reached |
40
+ | `structure` | files and functions past the configured size, god objects, control flow nested past following | none: a move preserves behaviour by construction |
41
+ | `over-implementation` | abstraction layers, configuration options, generality and extension points nothing calls | that nothing calls it |
42
+ | `duplication` | the same utility, type, component or constant defined repeatedly, when one definition would serve | that the copies are actually the same |
43
+ | `reinvention` | hand-rolled implementations of what the language, the standard library, or an already-installed dependency provides | that the replacement matches every edge case |
44
+
45
+ `structure` reads its thresholds from `refactor.maxFileLines` and
46
+ `refactor.maxFunctionLines` in `religion/config.json`. They are defaults rather than a
47
+ standard this project agreed to, so a project that has set its own limits in a linter
48
+ should have those numbers copied into the configuration and used instead.
49
+
50
+ ## Step 1 - resolve the target
51
+
52
+ Establish what was named: a file, a folder, a package, or a workspace root holding several.
53
+ For a package or a workspace, read the manifests to learn where each package begins and
54
+ what each one publishes. That boundary matters twice over, in Step 4 and in Step 5.
55
+
56
+ Exclude what is not the project's to simplify: dependencies, generated files, build output,
57
+ caches, vendored code, minified assets, and anything the project's ignore rules already
58
+ exclude. State the exclusions before surveying, so nobody mistakes a skipped directory for
59
+ a clean one.
60
+
61
+ ## Step 2 - establish the safety net, or stop
62
+
63
+ **A declared test command is not the gate. Tests that reach the target are the gate.**
64
+
65
+ Run the project's declared test command and confirm the suite both passes and exercises the
66
+ target. A suite of six hundred green tests proves nothing about a directory none of them
67
+ import, and proceeding on it is worse than proceeding on nothing, because it feels safe.
68
+
69
+ When no test command is declared, or none reaches the target, stop and say so plainly:
70
+ name the target, say what the suite does cover, and point at /tests to cover the
71
+ target first. A required check that cannot run is a blocker, not a pass.
72
+
73
+ When the net holds, record the exact command and its result. That green baseline goes into
74
+ the spec in Step 5, so every step can be measured against the state before anything moved.
75
+
76
+ ## Step 3 - survey
77
+
78
+ Read the target across the selected lenses, or all five when none was named. Read
79
+ `religion/context/findings.md` as well: quality findings recorded by /audit against
80
+ this area are candidates already identified, and folding them in avoids rediscovering them
81
+ under a second name. **Never write to the ledger.** /audit owns that file, and a
82
+ finding's status stays its to change.
83
+
84
+ Report what was found as counts per area and per lens, densest first:
85
+
86
+ packages/api bloat 41 structure 7 duplication 12
87
+ packages/shared bloat 6 structure 2 duplication 21
88
+ packages/cli bloat 3 structure 0 duplication 1
89
+
90
+ For a single file the map is one row, which is fine. The point is that the size of the job
91
+ is visible before anyone commits to it.
92
+
93
+ ## Step 4 - choose one lens, in one area
94
+
95
+ **A campaign is one lens in one area.** Not five lenses, not the whole monorepo. A spec
96
+ mixing safe deletions with semantic replacements cannot be reviewed as one thing, because
97
+ the reviewer's attention is spent on the easy half.
98
+
99
+ Propose the widest win, say why, and let the user choose. Everything else stays in the
100
+ report, unspecced, waiting for the next run after this campaign completes.
101
+
102
+ Two boundaries constrain what may enter the campaign:
103
+
104
+ - **The published surface stops and asks.** Anything reachable only from inside the project
105
+ can be merged, renamed or reshaped freely, which is what makes the duplication lens work
106
+ at all. Anything a consumer can import, taken from the manifest's entry points, is a
107
+ breaking change wearing a refactor's clothes. Name it, say what would break, and let the
108
+ user decide whether it belongs in this campaign or in a feature.
109
+ - **A new dependency needs its own yes, and has to earn it.** When the language and the
110
+ installed dependencies genuinely cannot replace hand-rolled code, a new dependency may be
111
+ proposed, never assumed. Propose one only when it would be used in **several places**. A
112
+ dependency that saves fifty lines in a single file is a bad trade: the code leaves and the
113
+ supply chain stays.
114
+
115
+ ## Step 5 - write the campaign
116
+
117
+ Write the spec into `religion/context/current-work.md`: the target, the lens, the green
118
+ baseline from Step 2, and the change broken into steps small enough to read as diffs.
119
+
120
+ Order the steps so each one stands alone and can be verified against the baseline. Record
121
+ what would prove the behaviour unchanged, which is the test command from Step 2 for logic,
122
+ and for anything with a visible surface a route to walk and what should appear.
123
+
124
+ Candidates that were found but not specced go in as a short list at the end, so the next run
125
+ has them and nothing is rediscovered from scratch.
126
+
127
+ Completion archives the campaign under `religion/history/refactors/`. Refactor campaigns
128
+ are their own kind of work: they are not build-plan items, they tick nothing, and keeping
129
+ them separate is what makes the refactoring history of an area readable later.
130
+
131
+ ## Step 6 - report and stop
132
+
133
+ The target and what it resolved to, the baseline and the command that produced it, the
134
+ density map, the lens and area chosen and why, what the campaign contains, what was deferred,
135
+ and any published-surface or dependency decision waiting on the user.
136
+
137
+ Then stop. This skill does not build. /implement does.
138
+
139
+ ## Rules
140
+
141
+ - **Behaviour is the invariant.** Every step must leave the target doing exactly what it did.
142
+ - **Never fix a bug in a refactor step.** A refactor that uncovers a genuine defect stops and
143
+ points at /fix. Discovering that four copies of a function behave differently means
144
+ choosing one is a behaviour change, not a merge, and the reviewer cannot see it inside a
145
+ diff that also moves code.
146
+ - **Never delete a comment that carries a why.** The bloat lens removes comments restating
147
+ the code. A comment recording a decision, a gotcha, a workaround, or a link to a spec is
148
+ the opposite of bloat, and it is unrecoverable once gone.
149
+ - **Never reformat alongside a change.** Whitespace, import order and style churn never share
150
+ a step with a structural edit. A diff where fifteen real lines hide among three hundred
151
+ cosmetic ones gets rubber-stamped, which costs more than the formatting saved.
152
+ - One lens, one area, one campaign.
153
+ - A target is always named. Never scan the project hoping to find something worth doing.
154
+ - Read the findings ledger; never write it.
155
+
156
+ ## Formatting
157
+
158
+ Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
159
+ markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
@@ -66,6 +66,7 @@ and follow directly.
66
66
  - `implement` - build the current spec one reviewed step at a time
67
67
  - `overview` - distill the two planning documents into the project's source of truth
68
68
  - `prototype` - explore the look before building, as throwaway mockups or real components
69
+ - `refactor` - simplify existing code in one behaviour-preserving campaign at a time
69
70
  - `release` - prepare deployment readiness for Railway, Render, or Vercel
70
71
  - `rollback` - plan a guarded reversal of completed work, preserving its history
71
72
  - `setup` - tune the installation to this project, greenfield or existing
@@ -18,6 +18,10 @@
18
18
  "audit": "when-sensitive",
19
19
  "check": "when-behavioral"
20
20
  },
21
+ "refactor": {
22
+ "maxFileLines": 400,
23
+ "maxFunctionLines": 50
24
+ },
21
25
  "auto": {
22
26
  "maxItems": null,
23
27
  "maxRepairAttempts": 2,
@@ -29,7 +29,8 @@ The spec for the work in progress lives in `religion/context/current-work.md`.
29
29
 
30
30
  1. **Spec.** Run `feature` with no argument to spec the first unchecked item in the
31
31
  build plan, or name one. Add ` preview` to see what it involves without writing
32
- anything. For a bug or small change that is not in the plan, run `fix`. Review
32
+ anything. For a bug or small change that is not in the plan, run `fix`. To simplify
33
+ code that already exists without changing what it does, run `refactor`. Review
33
34
  the spec before any code exists.
34
35
  2. **Implement.** Run `implement`. It builds one step at a time, never the whole
35
36
  item at once.
@@ -1,8 +1,10 @@
1
1
  # Current Work
2
2
 
3
- > **Generated file.** Holds the one feature, fix, or rollback being built right now. Run
4
- > `feature` to spec a build-plan item, `fix` for an unplanned bug or change,
5
- > or `rollback` to plan a safe reversal. Build one thing at a time;
6
- > `complete` archives it under `religion/history/` and resets this file.
3
+ > **Generated file.** Holds the one feature, fix, rollback, or refactor campaign being
4
+ > built right now. Run `feature` to spec a build-plan item, `fix` for an
5
+ > unplanned bug or change, `rollback` to plan a safe reversal, or `refactor` to
6
+ > simplify existing code. Build one thing at a time; `complete` archives it under
7
+ > `religion/history/` and resets this file.
7
8
 
8
- _Nothing in progress. Run `feature`, `fix`, or `rollback` to start._
9
+ _Nothing in progress. Run `feature`, `fix`, `rollback`, or
10
+ `refactor` to start._
@@ -0,0 +1,9 @@
1
+ # Completed refactors
2
+
3
+ One file per completed campaign, named for the area and the lens it covered. Written by
4
+ `complete`.
5
+
6
+ A campaign is not a build-plan item, so these carry no number and nothing is ticked when one
7
+ lands. They are kept apart from fixes because they answer a different question: not what went
8
+ wrong here, but what has already been simplified, so a later run does not repeat work or
9
+ undo a decision it cannot see.