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.
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/bin/religion.js +209 -0
- package/dist/lib/dashboard.js +123 -0
- package/dist/lib/doctor.js +164 -0
- package/dist/lib/install.js +170 -0
- package/dist/lib/paths.js +40 -0
- package/dist/lib/state.js +117 -0
- package/dist/lib/status.js +88 -0
- package/package.json +40 -0
- package/template/.agents/skills/audit/SKILL.md +169 -0
- package/template/.agents/skills/auto/SKILL.md +110 -0
- package/template/.agents/skills/browser-tests/SKILL.md +65 -0
- package/template/.agents/skills/check/SKILL.md +86 -0
- package/template/.agents/skills/ci/SKILL.md +79 -0
- package/template/.agents/skills/complete/SKILL.md +184 -0
- package/template/.agents/skills/debug/SKILL.md +72 -0
- package/template/.agents/skills/discovery/SKILL.md +83 -0
- package/template/.agents/skills/distill/SKILL.md +95 -0
- package/template/.agents/skills/doctor/SKILL.md +65 -0
- package/template/.agents/skills/extend/SKILL.md +102 -0
- package/template/.agents/skills/feature/SKILL.md +172 -0
- package/template/.agents/skills/feature/reference/spec-template.md +67 -0
- package/template/.agents/skills/fix/SKILL.md +76 -0
- package/template/.agents/skills/implement/SKILL.md +174 -0
- package/template/.agents/skills/overview/SKILL.md +150 -0
- package/template/.agents/skills/overview/reference/project-overview-template.md +101 -0
- package/template/.agents/skills/prototype/SKILL.md +90 -0
- package/template/.agents/skills/release/SKILL.md +88 -0
- package/template/.agents/skills/rollback/SKILL.md +114 -0
- package/template/.agents/skills/setup/SKILL.md +105 -0
- package/template/.agents/skills/status/SKILL.md +63 -0
- package/template/.agents/skills/tests/SKILL.md +90 -0
- package/template/.agents/skills/try/SKILL.md +59 -0
- package/template/.claude/hooks/guard-rendered-output.mjs +49 -0
- package/template/.claude/hooks/guard-tier-one.mjs +63 -0
- package/template/.claude/hooks/write-handoff.mjs +83 -0
- package/template/.claude/skills/audit/SKILL.md +169 -0
- package/template/.claude/skills/auto/SKILL.md +110 -0
- package/template/.claude/skills/browser-tests/SKILL.md +65 -0
- package/template/.claude/skills/check/SKILL.md +86 -0
- package/template/.claude/skills/ci/SKILL.md +79 -0
- package/template/.claude/skills/complete/SKILL.md +184 -0
- package/template/.claude/skills/debug/SKILL.md +72 -0
- package/template/.claude/skills/discovery/SKILL.md +83 -0
- package/template/.claude/skills/distill/SKILL.md +95 -0
- package/template/.claude/skills/doctor/SKILL.md +65 -0
- package/template/.claude/skills/extend/SKILL.md +102 -0
- package/template/.claude/skills/feature/SKILL.md +172 -0
- package/template/.claude/skills/feature/reference/spec-template.md +67 -0
- package/template/.claude/skills/fix/SKILL.md +76 -0
- package/template/.claude/skills/implement/SKILL.md +174 -0
- package/template/.claude/skills/overview/SKILL.md +150 -0
- package/template/.claude/skills/overview/reference/project-overview-template.md +101 -0
- package/template/.claude/skills/prototype/SKILL.md +90 -0
- package/template/.claude/skills/release/SKILL.md +88 -0
- package/template/.claude/skills/rollback/SKILL.md +114 -0
- package/template/.claude/skills/setup/SKILL.md +105 -0
- package/template/.claude/skills/status/SKILL.md +63 -0
- package/template/.claude/skills/tests/SKILL.md +90 -0
- package/template/.claude/skills/try/SKILL.md +59 -0
- package/template/AGENTS.md +206 -0
- package/template/CLAUDE.md +175 -0
- package/template/religion/.state/README.md +10 -0
- package/template/religion/.state/settings-template.json +19 -0
- package/template/religion/build-plan.md +43 -0
- package/template/religion/config.json +26 -0
- package/template/religion/context/ai-interaction.md +84 -0
- package/template/religion/context/coding-standards.md +77 -0
- package/template/religion/context/current-work.md +8 -0
- package/template/religion/context/findings.md +9 -0
- package/template/religion/context/handoff.md +8 -0
- package/template/religion/context/project-overview.md +8 -0
- package/template/religion/history/features/README.md +8 -0
- package/template/religion/history/fixes/README.md +6 -0
- package/template/religion/history/rollbacks/README.md +7 -0
- package/template/religion/learning/journal.md +7 -0
- package/template/religion/learning/lessons.md +8 -0
- package/template/religion/project-plan.md +49 -0
- package/template/religion/reference/README.md +7 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# <Project Name> - Project Overview
|
|
2
|
+
|
|
3
|
+
<!-- religion:source-hash <computed> -->
|
|
4
|
+
|
|
5
|
+
> <one line on what this project is>
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
What is broken today and why it matters, distilled from section 1 of the project plan.
|
|
10
|
+
Two or three sentences.
|
|
11
|
+
|
|
12
|
+
## Users
|
|
13
|
+
|
|
14
|
+
Who this is for, from section 2. A short list of user kinds and what each needs. Note any
|
|
15
|
+
access tiers, such as anonymous versus signed in.
|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
What this product already does, from section 3 of the plan. One line each. This is the
|
|
20
|
+
product's identity, not a work queue, and on an established project most of it is already
|
|
21
|
+
built. Mark the headline capability.
|
|
22
|
+
|
|
23
|
+
- **<capability>** - what it gives someone.
|
|
24
|
+
|
|
25
|
+
## Roadmap
|
|
26
|
+
|
|
27
|
+
What is queued, in build-plan order, with its number. This is the work list, and it is a
|
|
28
|
+
different thing from the section above: on an established project the two barely overlap.
|
|
29
|
+
|
|
30
|
+
1. **<item>** - what it delivers.
|
|
31
|
+
2. **<item>** - what it delivers.
|
|
32
|
+
|
|
33
|
+
## Domain model
|
|
34
|
+
|
|
35
|
+
The concrete shapes this project works with, derived from section 4 and the features that
|
|
36
|
+
use them. Real types with fields and relationships, not a restatement of the vague list in
|
|
37
|
+
the plan. This is usually the section a spec cannot be written without, and the one the
|
|
38
|
+
plan does not directly contain.
|
|
39
|
+
|
|
40
|
+
What belongs here depends on what the project is:
|
|
41
|
+
|
|
42
|
+
- **Stores data** - the persisted models: entities, fields, types, relationships.
|
|
43
|
+
- **Transforms input** (a compiler, a framework, a CLI, a parser) - the shapes it reads,
|
|
44
|
+
the shapes it emits, and the stages between them.
|
|
45
|
+
- **Provides an interface** (a library, a design system) - the public types and the
|
|
46
|
+
contracts they promise.
|
|
47
|
+
|
|
48
|
+
A project with no database is not a project with no domain model. Write the shapes it
|
|
49
|
+
actually works with, and say what kind they are.
|
|
50
|
+
|
|
51
|
+
### <Shape>
|
|
52
|
+
|
|
53
|
+
- `field` (type) - what it holds
|
|
54
|
+
- relates to <other shape> by <field>
|
|
55
|
+
|
|
56
|
+
Mark anything later work depends on as load-bearing, so a change to it is understood as a
|
|
57
|
+
breaking change rather than an edit.
|
|
58
|
+
|
|
59
|
+
## Code map
|
|
60
|
+
|
|
61
|
+
Where things live, so that work can name the files it will touch without re-deriving the
|
|
62
|
+
layout every time.
|
|
63
|
+
|
|
64
|
+
- `<path>` - what lives here, and when work belongs in it
|
|
65
|
+
|
|
66
|
+
For a repository with several packages, list them with the boundary each one owns, so it is
|
|
67
|
+
clear which one a given change belongs in.
|
|
68
|
+
|
|
69
|
+
## Tech stack
|
|
70
|
+
|
|
71
|
+
From section 5, one line each on what it is for.
|
|
72
|
+
|
|
73
|
+
- **<technology>** - its role here
|
|
74
|
+
|
|
75
|
+
## Monetization
|
|
76
|
+
|
|
77
|
+
From section 6. Omit this heading entirely when the plan has no such section.
|
|
78
|
+
|
|
79
|
+
## UI and UX
|
|
80
|
+
|
|
81
|
+
From section 7: the look and feel, and the main routes or screens. Omit this heading
|
|
82
|
+
entirely when the plan has no such section.
|
|
83
|
+
|
|
84
|
+
- `/<route>` - what is there
|
|
85
|
+
|
|
86
|
+
## Deployment
|
|
87
|
+
|
|
88
|
+
From section 8: host, app type, build and start commands, output directory, environment
|
|
89
|
+
variables by name, storage needs, background jobs, health path, domain notes. Omit this
|
|
90
|
+
heading entirely when the plan has no such section.
|
|
91
|
+
|
|
92
|
+
## Open questions
|
|
93
|
+
|
|
94
|
+
Contradictions and gaps found between the two plans. Each one names what it affects, so
|
|
95
|
+
that work touching that area can be blocked while work elsewhere continues.
|
|
96
|
+
|
|
97
|
+
- **<short title>** (affects: <areas, features, or models>) - what the two plans say that
|
|
98
|
+
cannot both be true, or what is missing that later work will need. Resolve it in the
|
|
99
|
+
plans, then regenerate.
|
|
100
|
+
|
|
101
|
+
Delete this heading when there are none.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prototype
|
|
3
|
+
summary: explore the look before building, as throwaway mockups or real components
|
|
4
|
+
description: "Explore how a project should look before the build loop starts. Asks what feel is wanted and which screens to draft, proposes a plan, then writes static mockups sharing one theme file to prototypes/. When the project already uses a component system, offers to prototype in that system instead, so the result is real components rather than something to port. Sits outside the reviewed loop, like scaffolding. Use when the user runs /prototype, names screens to mock up, or asks to explore the layout, theme, or look and feel."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# prototype - lock the look before building it
|
|
8
|
+
|
|
9
|
+
Exploratory work, deliberately outside the spec loop. Deciding how something should look is
|
|
10
|
+
not a reviewable build step, and forcing it through one wastes both.
|
|
11
|
+
|
|
12
|
+
## Step 1 - decide which kind
|
|
13
|
+
|
|
14
|
+
Look at the project. If it already has a component system with tokens and primitives, offer
|
|
15
|
+
to prototype **in that system**. Otherwise write **static mockups**.
|
|
16
|
+
|
|
17
|
+
| | Static mockups | In the component system |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| Output | HTML and CSS in `prototypes/` | Real components in the project |
|
|
20
|
+
| Fidelity | Approximate | Exactly what ships |
|
|
21
|
+
| Afterwards | Tokens ported, folder deleted | Nothing to port, nothing to delete |
|
|
22
|
+
| Good for | Deciding a look from nothing | A project whose look is already decided |
|
|
23
|
+
|
|
24
|
+
Static mockups are the default because they are faster to throw away, and throwing away is
|
|
25
|
+
what usually happens to the first three attempts. Prototyping in the real system is better
|
|
26
|
+
once the direction is settled, because the port step is where the approximation creeps back
|
|
27
|
+
in.
|
|
28
|
+
|
|
29
|
+
Say which you propose and why. The user decides.
|
|
30
|
+
|
|
31
|
+
## Step 2 - ask what is wanted
|
|
32
|
+
|
|
33
|
+
Do not start drawing. Ask:
|
|
34
|
+
|
|
35
|
+
- **The feel**, in adjectives, plus anything to look at: a site, a screenshot, a product
|
|
36
|
+
whose look is close.
|
|
37
|
+
- **Which screens**, and which one matters most. Draft that one first and get it right
|
|
38
|
+
before the others copy its decisions.
|
|
39
|
+
- **Constraints**: dark, light, or both; density; an existing brand.
|
|
40
|
+
|
|
41
|
+
Propose a short plan and get agreement before writing files.
|
|
42
|
+
|
|
43
|
+
## Step 3 - static mockups
|
|
44
|
+
|
|
45
|
+
Write to `prototypes/`, one file per screen, all sharing `prototypes/theme.css`.
|
|
46
|
+
|
|
47
|
+
**Every colour, size, and spacing value lives in `theme.css` as a variable.** No exceptions.
|
|
48
|
+
That file is the actual output of this work: the mockups are disposable, the token set is
|
|
49
|
+
the decision, and a value hardcoded in one screen is a decision that will not survive.
|
|
50
|
+
|
|
51
|
+
Use realistic content. Placeholder text hides every layout problem worth finding: real
|
|
52
|
+
labels are longer than expected, real lists are emptier, real names break alignment.
|
|
53
|
+
|
|
54
|
+
Draft the primary screen, show it, iterate until it is right, then do the others.
|
|
55
|
+
|
|
56
|
+
## Step 4 - prototyping in the component system
|
|
57
|
+
|
|
58
|
+
Build the screens with the project's own primitives and tokens, in the project.
|
|
59
|
+
|
|
60
|
+
Add tokens where the design needs values that do not exist yet, in the token layer, never
|
|
61
|
+
inline in a component. If the design fights the system repeatedly, that is a finding worth
|
|
62
|
+
reporting: either the design or the system is wrong, and knowing which is worth more than
|
|
63
|
+
the mockup.
|
|
64
|
+
|
|
65
|
+
These are not throwaway. Say what should be kept, what was a sketch, and what a later work
|
|
66
|
+
item should build on.
|
|
67
|
+
|
|
68
|
+
## Step 5 - hand off
|
|
69
|
+
|
|
70
|
+
Say which mockups exist and where the tokens live.
|
|
71
|
+
|
|
72
|
+
For static mockups, note that the first build step of the first visual work item ports
|
|
73
|
+
`theme.css` into the project's real stylesheet, and that the folder is deleted once that
|
|
74
|
+
lands. For component prototypes, note there is nothing to port.
|
|
75
|
+
|
|
76
|
+
Then point at /feature. Prototypes inform the plan; they are not a work item.
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- Ask before drawing. A mockup built from a guess wastes the round trip that would have
|
|
81
|
+
prevented it.
|
|
82
|
+
- Every value is a token.
|
|
83
|
+
- Real content, never placeholder text.
|
|
84
|
+
- Static mockups are throwaway and are deleted once consumed. Component prototypes are not.
|
|
85
|
+
- No product logic, no data layer, no routing. This is the look.
|
|
86
|
+
|
|
87
|
+
## Formatting
|
|
88
|
+
|
|
89
|
+
Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
|
|
90
|
+
markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
summary: prepare deployment readiness for Railway, Render, or Vercel
|
|
4
|
+
description: "Prepare a project to deploy to Railway, Render, or Vercel. Reads the plans, commands, package files, and existing provider configuration; creates or updates local configuration and an environment example; runs build and start checks; and reports the environment variables, the smoke-test path, and the blockers. Stops before deploying, creating a remote service, changing a remote environment, pushing, or publishing. Use when the user runs /release, asks about deployment readiness or provider configuration, or names a provider."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# release - get ready to deploy, without deploying
|
|
8
|
+
|
|
9
|
+
Prepares. Does not deploy. Deploying, creating a remote service, changing remote
|
|
10
|
+
environment values, pushing, and publishing all need their own explicit yes, and this skill
|
|
11
|
+
stops before every one of them.
|
|
12
|
+
|
|
13
|
+
Run it after a completed item or a milestone, not as part of the build loop.
|
|
14
|
+
|
|
15
|
+
## Step 1 - target and shape
|
|
16
|
+
|
|
17
|
+
Take the provider from the argument: `/release railway`, `/release render`, `/release vercel`.
|
|
18
|
+
Without one, read the deployment section of the project plan, and ask if it is not there.
|
|
19
|
+
|
|
20
|
+
Then establish what is actually being deployed, because the answer changes everything: a
|
|
21
|
+
static site, a server-rendered application, a service, a worker, a scheduled job, or several
|
|
22
|
+
of these together.
|
|
23
|
+
|
|
24
|
+
| Provider | Fits |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| **Railway** | Long-running services, workers, scheduled jobs, and anything wanting a managed database beside it |
|
|
27
|
+
| **Render** | Similar shapes, with static sites and cron as first-class kinds |
|
|
28
|
+
| **Vercel** | Front-end and edge-first applications, static output, serverless functions |
|
|
29
|
+
|
|
30
|
+
If the project's shape fits the chosen provider badly, say so once, plainly, with the
|
|
31
|
+
specific mismatch. Then proceed with what was asked.
|
|
32
|
+
|
|
33
|
+
## Step 2 - survey
|
|
34
|
+
|
|
35
|
+
- Build and start commands, and the output directory for static output.
|
|
36
|
+
- The runtime version, and whether it is pinned.
|
|
37
|
+
- Every environment variable the code reads, **by name**, found by searching the source
|
|
38
|
+
rather than by trusting a checked-in example file which is usually stale.
|
|
39
|
+
- Data stores, caches, queues, and anything else it expects to exist.
|
|
40
|
+
- Background work: workers, scheduled jobs, migrations that must run before start.
|
|
41
|
+
- A health endpoint, if there is one.
|
|
42
|
+
- Existing provider configuration already in the repository.
|
|
43
|
+
|
|
44
|
+
## Step 3 - write local configuration
|
|
45
|
+
|
|
46
|
+
Create or update only local files: the provider's configuration file, and an environment
|
|
47
|
+
example listing every variable by name.
|
|
48
|
+
|
|
49
|
+
**Never put a real secret in a file.** The example lists names and describes what each is
|
|
50
|
+
for. A value that looks like a credential is never copied into it, and never printed.
|
|
51
|
+
|
|
52
|
+
Preserve configuration that already exists. Show a diff for anything you change, and say
|
|
53
|
+
why.
|
|
54
|
+
|
|
55
|
+
Migrations that must run before start belong in the release or pre-deploy step the provider
|
|
56
|
+
offers, not in the build. Getting that wrong deploys code against a schema that has not
|
|
57
|
+
moved yet, which is the failure that takes a site down rather than failing a build.
|
|
58
|
+
|
|
59
|
+
## Step 4 - check locally what can be checked
|
|
60
|
+
|
|
61
|
+
Run the build. Run the start command far enough to see it come up. Hit the health path if
|
|
62
|
+
there is one.
|
|
63
|
+
|
|
64
|
+
A failure here is a blocker, and finding it locally is the entire point of doing this
|
|
65
|
+
before deploying.
|
|
66
|
+
|
|
67
|
+
## Step 5 - report
|
|
68
|
+
|
|
69
|
+
- **Blockers** first: what would fail, and why.
|
|
70
|
+
- **Environment variables**, by name, marking which have no local value yet.
|
|
71
|
+
- **The exact next step** for that provider, as a command or a console action, so the user
|
|
72
|
+
can take it themselves.
|
|
73
|
+
- **The smoke test**: what to hit after deploying and what should come back.
|
|
74
|
+
- **What was not verified** and cannot be locally: the real database, real credentials,
|
|
75
|
+
cold starts, the domain.
|
|
76
|
+
|
|
77
|
+
## Rules
|
|
78
|
+
|
|
79
|
+
- Never deploy, create a remote service, change a remote environment, push, or publish.
|
|
80
|
+
Preparing is the whole job.
|
|
81
|
+
- Never write, print, or copy a secret value.
|
|
82
|
+
- Never claim a deployment will work. Report what was checked and what was not.
|
|
83
|
+
- Provider tooling may be used to read state. Using it to change anything is a separate yes.
|
|
84
|
+
|
|
85
|
+
## Formatting
|
|
86
|
+
|
|
87
|
+
Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
|
|
88
|
+
markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rollback
|
|
3
|
+
summary: plan a guarded reversal of completed work, preserving its history
|
|
4
|
+
description: "Plan the safe reversal of a completed item using its archive and the commits it recorded when it landed. Verifies the recorded commits still resolve and are ancestors of HEAD, reviews later commits for work that depends on them, then writes a Type: Rollback spec to religion/context/current-work.md and stops before any code changes. The reversal applies only the product diff in reverse, never a whole-commit revert, so the archive and plan bookkeeping that landed in the same commits survive. Use when the user runs /rollback, asks to remove or undo completed work, or wants the project returned to its behavior before an item without erasing the record that it existed."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# rollback - plan a guarded reversal
|
|
8
|
+
|
|
9
|
+
Where this sits:
|
|
10
|
+
|
|
11
|
+
history/ -> [rollback] -> implement -> complete
|
|
12
|
+
(archive) (plan it) (apply it) (record it)
|
|
13
|
+
|
|
14
|
+
Removing completed work is not `git revert`. The commits that landed an item also carry its
|
|
15
|
+
archive, its build-plan tick, and its ledger pruning. Reverting them whole would delete the
|
|
16
|
+
record that the work ever existed, and would fight with whatever the plan says now.
|
|
17
|
+
|
|
18
|
+
This skill plans. It writes a spec and stops. No product file changes here.
|
|
19
|
+
|
|
20
|
+
## Step 1 - identify the target
|
|
21
|
+
|
|
22
|
+
Take a build-plan number or name. Match it to a **checked** item and its archive under
|
|
23
|
+
`religion/history/features/`. If the item is not checked, it was never completed, and there
|
|
24
|
+
is nothing to roll back: say so.
|
|
25
|
+
|
|
26
|
+
Read the archive's `## Landed` section for the base commit, the item's commits, and the
|
|
27
|
+
product paths it touched.
|
|
28
|
+
|
|
29
|
+
**If there is no `## Landed` section**, the item was completed before that record existed.
|
|
30
|
+
Do not guess the commit range from messages or dates: reversing the wrong commits damages
|
|
31
|
+
unrelated work. Report what is missing, show the archive and the commits around it, and ask
|
|
32
|
+
the user to confirm the exact range before continuing.
|
|
33
|
+
|
|
34
|
+
## Step 2 - verify the record still holds
|
|
35
|
+
|
|
36
|
+
Stop on any failure. Do not repair a mismatch by choosing a nearby commit.
|
|
37
|
+
|
|
38
|
+
1. Every recorded identifier matches `^[0-9a-f]{40}$`. Reject abbreviated or uppercase
|
|
39
|
+
values.
|
|
40
|
+
2. Every recorded commit resolves in this repository and is an ancestor of `HEAD`.
|
|
41
|
+
3. The recorded base is the parent of the earliest recorded commit.
|
|
42
|
+
4. The working tree is clean apart from the rollback spec being written.
|
|
43
|
+
|
|
44
|
+
## Step 3 - preview the product diff
|
|
45
|
+
|
|
46
|
+
Compute the reversal exactly as it will be applied, excluding everything the workflow owns:
|
|
47
|
+
|
|
48
|
+
git diff --binary <base> <last-recorded-commit> -- . \
|
|
49
|
+
':(exclude).agents/**' ':(exclude).claude/**' \
|
|
50
|
+
':(exclude)religion/**' \
|
|
51
|
+
':(exclude)AGENTS.md' ':(exclude)CLAUDE.md' \
|
|
52
|
+
':(exclude)prototypes/**'
|
|
53
|
+
|
|
54
|
+
Confirm the result is non-empty and its paths match the product paths in the archive. A
|
|
55
|
+
mismatch means the record and the repository disagree, which is a stop.
|
|
56
|
+
|
|
57
|
+
Never drop those exclusions for convenience. They are what keeps the archive, the plan, and
|
|
58
|
+
the ledger intact while the product change goes away.
|
|
59
|
+
|
|
60
|
+
Under `git.mode: trunk` the item's commits sit among other commits on the same branch. The
|
|
61
|
+
recorded range is what separates them; the diff is still computed only across that range,
|
|
62
|
+
never from the branch tip.
|
|
63
|
+
|
|
64
|
+
## Step 4 - review what came after
|
|
65
|
+
|
|
66
|
+
Inspect commits after the target for work that depends on it: imports of things it added,
|
|
67
|
+
callers of its functions, columns or fields it introduced, configuration it established.
|
|
68
|
+
|
|
69
|
+
Report each dependency with its commit and file. A reversal that cascades into later work
|
|
70
|
+
is not a rollback, it is a second reversal that has not been planned. Say so plainly and
|
|
71
|
+
let the user decide before writing the spec.
|
|
72
|
+
|
|
73
|
+
## Step 5 - write the spec
|
|
74
|
+
|
|
75
|
+
Write `religion/context/current-work.md` marked `Type: Rollback`, recording:
|
|
76
|
+
|
|
77
|
+
- **Target** - the item, its number, and its archive path
|
|
78
|
+
- **Reason** - why it is being removed, in the user's words
|
|
79
|
+
- **Base** and **Commits** - the verified full identifiers
|
|
80
|
+
- **Product paths** - what the reverse patch will touch
|
|
81
|
+
- **Later dependencies** - what Step 4 found, and how each is handled
|
|
82
|
+
- **Build steps** - normally one: apply the reverse patch and confirm the tree
|
|
83
|
+
- **Done when** - the removed behavior is gone, and one named unaffected path still works
|
|
84
|
+
|
|
85
|
+
Include the exact command from Step 3 in the spec, so implementation applies the reviewed
|
|
86
|
+
diff rather than reconstructing it.
|
|
87
|
+
|
|
88
|
+
Then stop for review.
|
|
89
|
+
|
|
90
|
+
## What implementation will do
|
|
91
|
+
|
|
92
|
+
Recorded here so the spec and the build agree:
|
|
93
|
+
|
|
94
|
+
1. Recompute the diff from Step 3 and confirm it still matches.
|
|
95
|
+
2. Apply it in reverse with three-way conflict detection, and stage it:
|
|
96
|
+
`... | git apply --reverse --3way --index`
|
|
97
|
+
3. Show the staged diff and the status, and confirm no workflow-owned path is touched.
|
|
98
|
+
|
|
99
|
+
On a conflict: stop, report the exact paths and the later commit involved, and ask. Never
|
|
100
|
+
auto-resolve, discard, stash, reset, or check out broadly. A cascade into other completed
|
|
101
|
+
work needs its own plan.
|
|
102
|
+
|
|
103
|
+
## Rules
|
|
104
|
+
|
|
105
|
+
- The archive is never deleted or rewritten. Completion adds a rollback record beside it.
|
|
106
|
+
- Reverse only the recorded product diff. Never a whole-commit revert.
|
|
107
|
+
- The build-plan item is unticked and annotated, and keeps its number.
|
|
108
|
+
- Stop on any mismatch between the record and the repository. Guessing is what makes a
|
|
109
|
+
rollback dangerous.
|
|
110
|
+
|
|
111
|
+
## Formatting
|
|
112
|
+
|
|
113
|
+
Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
|
|
114
|
+
markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
summary: tune the installation to this project, greenfield or existing
|
|
4
|
+
description: "Set up Religion after installing it into a project. Detects whether the project is newly scaffolded or already has shipped work, and branches: a new project gets its entry file, standards, and configuration tuned before you write the plans, while an existing one is surveyed so the plans and standards are generated from what is actually there. Documents the real commands, reports existing checks, decides whether workflow files are committed, and says what to do next. Use when the user runs /setup, has just installed Religion, or asks what to do first."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# setup - make the installation match this project
|
|
8
|
+
|
|
9
|
+
Run once, after installing. It replaces the shipped assumptions with what is true here.
|
|
10
|
+
|
|
11
|
+
## Step 0 - which project is this
|
|
12
|
+
|
|
13
|
+
Look before asking. Count source files, read the git history, check whether the project has
|
|
14
|
+
shipped anything.
|
|
15
|
+
|
|
16
|
+
- **New** - a scaffold, little or no history, no meaningful features yet. The plans are
|
|
17
|
+
written from intent, by the user, after this runs.
|
|
18
|
+
- **Existing** - real features, real history, real users possibly. The plans are generated
|
|
19
|
+
from what already exists, in this run.
|
|
20
|
+
|
|
21
|
+
State which you concluded and why, and let the user correct you. Guessing wrong is
|
|
22
|
+
recoverable but wasteful: the existing path does substantially more work.
|
|
23
|
+
|
|
24
|
+
## Step 1 - survey the project
|
|
25
|
+
|
|
26
|
+
Both paths need this.
|
|
27
|
+
|
|
28
|
+
- **Stack** - languages, framework, package manager, module system, versions.
|
|
29
|
+
- **Commands** - the real ones, from the package manifest or task runner: dev, build, test,
|
|
30
|
+
lint, typecheck. Never invent one. A command that does not exist is worse than a missing
|
|
31
|
+
one, because it will be run.
|
|
32
|
+
- **Checks that already exist** - test runner, typecheck, lint, continuous integration.
|
|
33
|
+
Report them; do not add any.
|
|
34
|
+
- **Conventions** - file organization, naming, how components and modules are actually
|
|
35
|
+
structured, how data is accessed, how errors are handled. What the code does, not what a
|
|
36
|
+
style guide would say.
|
|
37
|
+
- **Layout** - the directories that matter and what each owns.
|
|
38
|
+
|
|
39
|
+
## Step 2 - write what you learned
|
|
40
|
+
|
|
41
|
+
**The entry file's Commands section.** Replace the placeholder with the real commands. If
|
|
42
|
+
the project has a single command that runs its checks in order, record it as `Verify`. If
|
|
43
|
+
it does not, leave that out; /ci defines one deliberately later.
|
|
44
|
+
|
|
45
|
+
**The coding standards' Stack conventions section.** Fill it from the survey: language
|
|
46
|
+
conventions, file organization, naming, framework patterns, data access, as this project
|
|
47
|
+
actually does them. Do not import opinions the project does not hold. If the project is
|
|
48
|
+
inconsistent, say so and pick the dominant pattern, noting that it was a choice.
|
|
49
|
+
|
|
50
|
+
**The project title** in the entry files, and the one-line description.
|
|
51
|
+
|
|
52
|
+
## Step 3 - the plans
|
|
53
|
+
|
|
54
|
+
**New project.** Leave both plans as templates and tell the user to fill them in, or to run
|
|
55
|
+
/discovery for a guided session. Do not write plans from a scaffold; there is
|
|
56
|
+
nothing there to derive intent from.
|
|
57
|
+
|
|
58
|
+
**Existing project.** Generate both, then have them reviewed:
|
|
59
|
+
|
|
60
|
+
- **Project plan** - problem, users, and features derived from the code, the README, and
|
|
61
|
+
the history. Tech and data from what is actually there. Mark anything you inferred rather
|
|
62
|
+
than found, because inferring intent from an implementation is exactly where this goes
|
|
63
|
+
wrong: the code says what was built, never why.
|
|
64
|
+
- **Build plan** - shipped features listed as **checked** items, so the history is honest
|
|
65
|
+
and numbering starts from reality. Unshipped work goes in unchecked, if the user names
|
|
66
|
+
any.
|
|
67
|
+
|
|
68
|
+
Ask for the intent the code cannot reveal: who this is for, what problem it solves, what
|
|
69
|
+
was deliberately excluded. That conversation is the whole value of this path. Then stop for
|
|
70
|
+
review before anything downstream runs.
|
|
71
|
+
|
|
72
|
+
## Step 4 - visibility
|
|
73
|
+
|
|
74
|
+
Ask whether the workflow files should be committed or kept local. Do not pick a default.
|
|
75
|
+
|
|
76
|
+
- **Committed** - plans, specs, and history are part of the repository: portable across
|
|
77
|
+
machines, visible to collaborators, reviewable.
|
|
78
|
+
- **Local** - added to `.gitignore`, so nothing about the workflow enters a shared
|
|
79
|
+
repository. Not portable: another machine needs it installed again.
|
|
80
|
+
|
|
81
|
+
If those paths are already tracked and the user chooses local, say that `.gitignore` alone
|
|
82
|
+
will not untrack them, and ask before running anything that would.
|
|
83
|
+
|
|
84
|
+
## Step 5 - report
|
|
85
|
+
|
|
86
|
+
- what was detected: stack, commands, existing checks
|
|
87
|
+
- what was changed, file by file
|
|
88
|
+
- what the user must do next, exactly: fill in the plans, or review generated ones
|
|
89
|
+
- optional things worth knowing about, without pushing: /tests if there is logic and
|
|
90
|
+
no runner, /ci if there are checks and no automation
|
|
91
|
+
|
|
92
|
+
Then stop. The next step is /overview, once the plans are real.
|
|
93
|
+
|
|
94
|
+
## Rules
|
|
95
|
+
|
|
96
|
+
- Detect before asking, then let the user correct the detection.
|
|
97
|
+
- Never invent a command, a convention, or a feature.
|
|
98
|
+
- Mark inferred intent as inferred.
|
|
99
|
+
- Do not install anything, add a test runner, or create continuous integration here.
|
|
100
|
+
- Generated plans are a draft for review, never a finished artifact.
|
|
101
|
+
|
|
102
|
+
## Formatting
|
|
103
|
+
|
|
104
|
+
Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
|
|
105
|
+
markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: status
|
|
3
|
+
summary: say where the work stands and what to do next
|
|
4
|
+
description: "Report where the project stands: build-plan progress, the active spec and which of its steps are done, open findings, git state, and the one action that makes sense next. Uses the religion command-line tool when it is installed, since the parsing is deterministic, and reads the state files directly when it is not. Read-only. Use when the user runs /status, asks where things stand, what is next, what is in progress, or is picking work back up after a break or a cleared context."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# status - where things stand
|
|
8
|
+
|
|
9
|
+
Read-only. It reports; it never advances anything.
|
|
10
|
+
|
|
11
|
+
## Step 1 - get the state
|
|
12
|
+
|
|
13
|
+
If the `religion` command is available, run `religion status --json` and use it. The
|
|
14
|
+
parsing is deterministic and a program does it more reliably than a reading of the files.
|
|
15
|
+
|
|
16
|
+
Otherwise read them directly: `religion/build-plan.md` for progress,
|
|
17
|
+
`religion/context/current-work.md` for the active spec and its ticked steps,
|
|
18
|
+
`religion/context/findings.md` for the ledger, `religion/context/project-overview.md` for
|
|
19
|
+
its source hash, and the git branch and working-tree state.
|
|
20
|
+
|
|
21
|
+
## Step 2 - report
|
|
22
|
+
|
|
23
|
+
Lead with the next action, because that is the question actually being asked.
|
|
24
|
+
|
|
25
|
+
- **Next** - the single command that makes sense now, and why in one clause.
|
|
26
|
+
- **Active work** - the item, and which step it is on out of how many. "Nothing in
|
|
27
|
+
progress" when the spec is the stub.
|
|
28
|
+
- **Plan** - items complete out of total, and the next unchecked one.
|
|
29
|
+
- **Findings** - counts by status, naming any P0 or P1 that is `open` or `fixed`, since
|
|
30
|
+
those block completion.
|
|
31
|
+
- **Git** - branch, whether the tree is dirty, and unpushed commits.
|
|
32
|
+
- **Warnings** - only real ones: a stale overview, an open question blocking queued work,
|
|
33
|
+
a spec whose steps are all ticked but which was never completed, a dirty tree with no
|
|
34
|
+
active spec.
|
|
35
|
+
|
|
36
|
+
Say "up to date" rather than inventing a warning when there is nothing wrong.
|
|
37
|
+
|
|
38
|
+
## Choosing the next action
|
|
39
|
+
|
|
40
|
+
| State | Next |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| Plans not filled in | Write them, or run /discovery |
|
|
43
|
+
| Overview missing or stale | /overview |
|
|
44
|
+
| No active spec, plan has unchecked items | /feature |
|
|
45
|
+
| Active spec, steps unticked | /implement |
|
|
46
|
+
| All steps ticked, not verified | /check |
|
|
47
|
+
| Verified, findings blocking | /audit, or repair via /implement |
|
|
48
|
+
| Verified, nothing blocking | /complete |
|
|
49
|
+
| Plan complete | Add to the plan, or /release |
|
|
50
|
+
|
|
51
|
+
When two apply, take the one further along: finishing beats starting.
|
|
52
|
+
|
|
53
|
+
## Rules
|
|
54
|
+
|
|
55
|
+
- Read-only. Never write a state file, tick a step, or advance anything.
|
|
56
|
+
- One next action. A list of options is not an answer to "what now".
|
|
57
|
+
- Do not guess at what is happening. If the state is contradictory, say what is
|
|
58
|
+
contradictory.
|
|
59
|
+
|
|
60
|
+
## Formatting
|
|
61
|
+
|
|
62
|
+
Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
|
|
63
|
+
markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tests
|
|
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."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# tests - turn the testing gate on, or backfill coverage
|
|
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.
|
|
11
|
+
|
|
12
|
+
## Setup mode
|
|
13
|
+
|
|
14
|
+
### Step 1 - look before installing
|
|
15
|
+
|
|
16
|
+
If a runner is already configured, use it. Adding a second is how a project ends up with
|
|
17
|
+
two test commands and no idea which one is authoritative.
|
|
18
|
+
|
|
19
|
+
If there is none, choose the stack-native one: vitest for a TypeScript or JavaScript
|
|
20
|
+
project, pytest for Python, the built-in tooling for Go or Rust. Do not import a preference
|
|
21
|
+
the ecosystem does not share.
|
|
22
|
+
|
|
23
|
+
Say what you found and what you propose before installing anything. Installing a dependency
|
|
24
|
+
needs a yes.
|
|
25
|
+
|
|
26
|
+
### Step 2 - wire it up
|
|
27
|
+
|
|
28
|
+
Install the runner, add the script or task, and add **one** small test that genuinely
|
|
29
|
+
exercises something real in this project. Not a test that asserts true is true: a test that
|
|
30
|
+
would fail if the thing it covers broke.
|
|
31
|
+
|
|
32
|
+
### Step 3 - record the command
|
|
33
|
+
|
|
34
|
+
Add the exact command to the Commands section of the entry file as `Test`.
|
|
35
|
+
|
|
36
|
+
**This is the switch.** Once that command is declared, a build step that adds logic ships a
|
|
37
|
+
passing test in the same diff, and completion will not finish while the suite is red. Say
|
|
38
|
+
that plainly, because it changes how every later work item behaves.
|
|
39
|
+
|
|
40
|
+
If a `Verify` command exists, add the test command to it in the right order: typecheck,
|
|
41
|
+
then tests, then build.
|
|
42
|
+
|
|
43
|
+
### Step 4 - prove it
|
|
44
|
+
|
|
45
|
+
Run the test command and show the output. Then run it again with the example test
|
|
46
|
+
deliberately broken, to show it actually fails. A suite that cannot fail is not a gate, and
|
|
47
|
+
an empty suite reporting success is the specific failure worth ruling out here.
|
|
48
|
+
|
|
49
|
+
Restore it, and report what changed.
|
|
50
|
+
|
|
51
|
+
## Backfill mode
|
|
52
|
+
|
|
53
|
+
For logic that shipped without tests. Deliberate, bounded, and never automatic.
|
|
54
|
+
|
|
55
|
+
### Step 1 - find what is worth covering
|
|
56
|
+
|
|
57
|
+
Only in-scope logic: parsers, formatters, validators, identifier builders, server actions,
|
|
58
|
+
anything with assertable inputs and outputs and real edge cases. Not components, not
|
|
59
|
+
integration surfaces, not anything whose test would just mirror the implementation.
|
|
60
|
+
|
|
61
|
+
Rank by risk, not by convenience: how badly a wrong answer would hurt, how likely a wrong
|
|
62
|
+
answer is, how often the code changes. Present the ranked list and how many to do now. Do
|
|
63
|
+
not attempt the whole project in one pass.
|
|
64
|
+
|
|
65
|
+
### Step 2 - write them, in reviewed batches
|
|
66
|
+
|
|
67
|
+
One module at a time, each as its own reviewable diff. For each, cover the normal case, the
|
|
68
|
+
edges the code actually handles, and the edges it does not.
|
|
69
|
+
|
|
70
|
+
**When a test fails, stop.** A backfilled test that fails has found a bug, and that is the
|
|
71
|
+
valuable outcome. Do not adjust the test to match the behavior: report it, and let it
|
|
72
|
+
become a fix. Writing the test around the bug destroys the only reason to have written it.
|
|
73
|
+
|
|
74
|
+
### Step 3 - report
|
|
75
|
+
|
|
76
|
+
What was covered, what was skipped and why, and every discrepancy found. Discrepancies are
|
|
77
|
+
the point; coverage is the side effect.
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- Never install a runner during unrelated work. This is a deliberate setup step.
|
|
82
|
+
- One runner per project.
|
|
83
|
+
- Never write a test that cannot fail.
|
|
84
|
+
- Never change behavior to make a backfilled test pass.
|
|
85
|
+
- Setup adds one example test, not a suite.
|
|
86
|
+
|
|
87
|
+
## Formatting
|
|
88
|
+
|
|
89
|
+
Match the conventions in `religion/context/ai-interaction.md`: concise, scannable
|
|
90
|
+
markdown, lists for enumerations and tables for matrices rather than dense paragraphs.
|