@ericrisco/rsc 1.0.25 → 1.0.27
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 +5 -0
- package/manifest.json +4 -3
- package/package.json +2 -1
- package/scripts/build-manifest.js +20 -4
- package/scripts/doctor.js +3 -0
- package/scripts/install-apply.js +1 -0
- package/scripts/lib/skill-lint.js +29 -0
- package/scripts/lib/spec-gate.js +122 -0
- package/scripts/spec-gate.js +58 -0
- package/skills/clarify/SKILL.md +26 -2
- package/skills/constitution/references/constitution-template.md +1 -1
- package/skills/git-workflow/SKILL.md +36 -12
- package/skills/git-workflow/evals/cases.yaml +5 -0
- package/skills/git-workflow/references/gitmoji.md +157 -0
- package/skills/ship/SKILL.md +2 -1
- package/skills/specify/SKILL.md +77 -26
- package/skills/specify/evals/cases.yaml +4 -4
- package/skills/specify/references/eliciting-requirements.md +50 -10
- package/skills/specify/references/spec-template.md +19 -5
- package/targets/claude.js +16 -1
- package/targets/gitmoji-guard.mjs +250 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# gitmoji — the full set, and the tooling that has to accept it
|
|
2
|
+
|
|
3
|
+
The commit rule lives in `../SKILL.md`: **every commit opens with a gitmoji, then the
|
|
4
|
+
Conventional Commits header.** This file is the lookup table and the tooling escape hatches — read
|
|
5
|
+
it when you need the right glyph for an intention, or when a parser in the repo rejects the format.
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
<gitmoji> type(scope)!: imperative subject
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The gitmoji says *what kind of intention* this is at a glance in `git log --oneline`; the `type`
|
|
12
|
+
still drives the SemVer bump. They are two different jobs and neither replaces the other — a commit
|
|
13
|
+
with 💥 but no `!`/`BREAKING CHANGE:` footer still releases as a MINOR, because tooling reads the
|
|
14
|
+
type, not the picture.
|
|
15
|
+
|
|
16
|
+
## Picking one
|
|
17
|
+
|
|
18
|
+
Match the **intention**, not the file that changed. If two fit, take the more specific one (🚑️ over
|
|
19
|
+
🐛 for a production hotfix; 🩹 over 🐛 for a trivial non-critical fix). The `semver` column is
|
|
20
|
+
gitmoji's own hint, not a substitute for the type → bump table in `../SKILL.md`.
|
|
21
|
+
|
|
22
|
+
The everyday dozen, mapped to the conventional types:
|
|
23
|
+
|
|
24
|
+
| Type | gitmoji | Type | gitmoji |
|
|
25
|
+
|------------|---------|-------------|---------|
|
|
26
|
+
| `feat` | ✨ | `perf` | ⚡️ |
|
|
27
|
+
| `fix` | 🐛 | `ci` | 👷 |
|
|
28
|
+
| `docs` | 📝 | `build` | 📦️ |
|
|
29
|
+
| `refactor` | ♻️ | `style` | 🎨 |
|
|
30
|
+
| `test` | ✅ | `revert` | ⏪️ |
|
|
31
|
+
| `chore` | 🔧 | breaking | 💥 |
|
|
32
|
+
|
|
33
|
+
## The full set
|
|
34
|
+
|
|
35
|
+
Canonical source: <https://gitmoji.dev> (machine-readable at `https://gitmoji.dev/api/gitmojis`).
|
|
36
|
+
The same 75 rows are enforced as data by the gitmoji guard, and a test compares this table against
|
|
37
|
+
it — if the two ever disagree, CI says so.
|
|
38
|
+
|
|
39
|
+
| Emoji | Code | SemVer | Intention |
|
|
40
|
+
|-------|------|--------|-----------|
|
|
41
|
+
| 🎨 | `:art:` | — | Improve structure / format of the code |
|
|
42
|
+
| ⚡️ | `:zap:` | patch | Improve performance |
|
|
43
|
+
| 🔥 | `:fire:` | — | Remove code or files |
|
|
44
|
+
| 🐛 | `:bug:` | patch | Fix a bug |
|
|
45
|
+
| 🚑️ | `:ambulance:` | patch | Critical hotfix |
|
|
46
|
+
| ✨ | `:sparkles:` | minor | Introduce new features |
|
|
47
|
+
| 📝 | `:memo:` | — | Add or update documentation |
|
|
48
|
+
| 🚀 | `:rocket:` | — | Deploy stuff |
|
|
49
|
+
| 💄 | `:lipstick:` | patch | Add or update the UI and style files |
|
|
50
|
+
| 🎉 | `:tada:` | — | Begin a project |
|
|
51
|
+
| ✅ | `:white_check_mark:` | — | Add, update, or pass tests |
|
|
52
|
+
| 🔒️ | `:lock:` | patch | Fix security or privacy issues |
|
|
53
|
+
| 🔐 | `:closed_lock_with_key:` | — | Add or update secrets |
|
|
54
|
+
| 🔖 | `:bookmark:` | — | Release / Version tags |
|
|
55
|
+
| 🚨 | `:rotating_light:` | — | Fix compiler / linter warnings |
|
|
56
|
+
| 🚧 | `:construction:` | — | Work in progress |
|
|
57
|
+
| 💚 | `:green_heart:` | — | Fix CI Build |
|
|
58
|
+
| ⬇️ | `:arrow_down:` | patch | Downgrade dependencies |
|
|
59
|
+
| ⬆️ | `:arrow_up:` | patch | Upgrade dependencies |
|
|
60
|
+
| 📌 | `:pushpin:` | patch | Pin dependencies to specific versions |
|
|
61
|
+
| 👷 | `:construction_worker:` | — | Add or update CI build system |
|
|
62
|
+
| 📈 | `:chart_with_upwards_trend:` | patch | Add or update analytics or track code |
|
|
63
|
+
| ♻️ | `:recycle:` | — | Refactor code |
|
|
64
|
+
| ➕ | `:heavy_plus_sign:` | patch | Add a dependency |
|
|
65
|
+
| ➖ | `:heavy_minus_sign:` | patch | Remove a dependency |
|
|
66
|
+
| 🔧 | `:wrench:` | patch | Add or update configuration files |
|
|
67
|
+
| 🔨 | `:hammer:` | — | Add or update development scripts |
|
|
68
|
+
| 🌐 | `:globe_with_meridians:` | patch | Internationalization and localization |
|
|
69
|
+
| ✏️ | `:pencil2:` | patch | Fix typos |
|
|
70
|
+
| 💩 | `:poop:` | — | Write bad code that needs to be improved |
|
|
71
|
+
| ⏪️ | `:rewind:` | patch | Revert changes |
|
|
72
|
+
| 🔀 | `:twisted_rightwards_arrows:` | — | Merge branches |
|
|
73
|
+
| 📦️ | `:package:` | patch | Add or update compiled files or packages |
|
|
74
|
+
| 👽️ | `:alien:` | patch | Update code due to external API changes |
|
|
75
|
+
| 🚚 | `:truck:` | — | Move or rename resources (e.g.: files, paths, routes) |
|
|
76
|
+
| 📄 | `:page_facing_up:` | — | Add or update license |
|
|
77
|
+
| 💥 | `:boom:` | major | Introduce breaking changes |
|
|
78
|
+
| 🍱 | `:bento:` | patch | Add or update assets |
|
|
79
|
+
| ♿️ | `:wheelchair:` | patch | Improve accessibility |
|
|
80
|
+
| 💡 | `:bulb:` | — | Add or update comments in source code |
|
|
81
|
+
| 🍻 | `:beers:` | — | Write code drunkenly |
|
|
82
|
+
| 💬 | `:speech_balloon:` | patch | Add or update text and literals |
|
|
83
|
+
| 🗃️ | `:card_file_box:` | patch | Perform database related changes |
|
|
84
|
+
| 🔊 | `:loud_sound:` | — | Add or update logs |
|
|
85
|
+
| 🔇 | `:mute:` | — | Remove logs |
|
|
86
|
+
| 👥 | `:busts_in_silhouette:` | — | Add or update contributor(s) |
|
|
87
|
+
| 🚸 | `:children_crossing:` | patch | Improve user experience / usability |
|
|
88
|
+
| 🏗️ | `:building_construction:` | — | Make architectural changes |
|
|
89
|
+
| 📱 | `:iphone:` | patch | Work on responsive design |
|
|
90
|
+
| 🤡 | `:clown_face:` | — | Mock things |
|
|
91
|
+
| 🥚 | `:egg:` | patch | Add or update an easter egg |
|
|
92
|
+
| 🙈 | `:see_no_evil:` | — | Add or update a .gitignore file |
|
|
93
|
+
| 📸 | `:camera_flash:` | — | Add or update snapshots |
|
|
94
|
+
| ⚗️ | `:alembic:` | patch | Perform experiments |
|
|
95
|
+
| 🔍️ | `:mag:` | patch | Improve SEO |
|
|
96
|
+
| 🏷️ | `:label:` | patch | Add or update types |
|
|
97
|
+
| 🌱 | `:seedling:` | — | Add or update seed files |
|
|
98
|
+
| 🚩 | `:triangular_flag_on_post:` | patch | Add, update, or remove feature flags |
|
|
99
|
+
| 🥅 | `:goal_net:` | patch | Catch errors |
|
|
100
|
+
| 💫 | `:dizzy:` | patch | Add or update animations and transitions |
|
|
101
|
+
| 🗑️ | `:wastebasket:` | patch | Deprecate code that needs to be cleaned up |
|
|
102
|
+
| 🛂 | `:passport_control:` | patch | Work on code related to authorization, roles and permissions |
|
|
103
|
+
| 🩹 | `:adhesive_bandage:` | patch | Simple fix for a non-critical issue |
|
|
104
|
+
| 🧐 | `:monocle_face:` | — | Data exploration/inspection |
|
|
105
|
+
| ⚰️ | `:coffin:` | — | Remove dead code |
|
|
106
|
+
| 🧪 | `:test_tube:` | — | Add a failing test |
|
|
107
|
+
| 👔 | `:necktie:` | patch | Add or update business logic |
|
|
108
|
+
| 🩺 | `:stethoscope:` | — | Add or update healthcheck |
|
|
109
|
+
| 🧱 | `:bricks:` | — | Infrastructure related changes |
|
|
110
|
+
| 🧑💻 | `:technologist:` | — | Improve developer experience |
|
|
111
|
+
| 💸 | `:money_with_wings:` | — | Add sponsorships or money related infrastructure |
|
|
112
|
+
| 🧵 | `:thread:` | — | Add or update code related to multithreading or concurrency |
|
|
113
|
+
| 🦺 | `:safety_vest:` | — | Add or update code related to validation |
|
|
114
|
+
| ✈️ | `:airplane:` | — | Improve offline support |
|
|
115
|
+
| 🦖 | `:t-rex:` | — | Code that adds backwards compatibility |
|
|
116
|
+
## Tooling that has to accept the format
|
|
117
|
+
|
|
118
|
+
Emoji-first is what gitmoji itself prescribes and what `gitmoji -c` writes, but a **strict
|
|
119
|
+
Conventional Commits parser anchors the type at position 0** and will reject the header. Two honest
|
|
120
|
+
ways out, in order of preference:
|
|
121
|
+
|
|
122
|
+
**1. Teach the parser about the prefix.** commitlint, with the emoji allowed before the type:
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
// commitlint.config.js
|
|
126
|
+
export default {
|
|
127
|
+
extends: ['@commitlint/config-conventional'],
|
|
128
|
+
parserPreset: {
|
|
129
|
+
parserOpts: {
|
|
130
|
+
// <emoji> type(scope)!: subject
|
|
131
|
+
headerPattern: /^(?:\S+\s)?(\w+)(?:\(([^)]*)\))?(!)?: (.+)$/,
|
|
132
|
+
headerCorrespondence: ['type', 'scope', 'breaking', 'subject'],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
semantic-release / conventional-changelog take the same `parserOpts` under
|
|
139
|
+
`@semantic-release/commit-analyzer` and `@semantic-release/release-notes-generator`. Set it in
|
|
140
|
+
**both** or the bump and the changelog disagree about the same commit.
|
|
141
|
+
|
|
142
|
+
**2. Put the emoji after the header** — `feat(api): ✨ add cursor paging`. Every conventional parser
|
|
143
|
+
accepts it unmodified, and the guard accepts it too. Prefer this in a repo whose release pipeline
|
|
144
|
+
you do not own.
|
|
145
|
+
|
|
146
|
+
What **not** to do: drop the type and commit `✨ add cursor paging` (gitmoji's own minimal form).
|
|
147
|
+
It is valid gitmoji and useless for releases — nothing can derive the bump, so the version has to be
|
|
148
|
+
hand-picked, which `../SKILL.md` forbids for a reason.
|
|
149
|
+
|
|
150
|
+
## Related
|
|
151
|
+
|
|
152
|
+
- `gitmoji-cli` (`npm i -g gitmoji-cli`, then `gitmoji -c`) prompts for the emoji and writes the
|
|
153
|
+
commit. Optional — the convention is the rule, the CLI is one way to type it.
|
|
154
|
+
- On Claude Code, rsc wires a `gitmoji-guard` PreToolUse hook that denies a `git commit` whose
|
|
155
|
+
message has no gitmoji, with the corrected message in the refusal. It only judges messages it can
|
|
156
|
+
actually read (`-m`, heredoc) and never blocks an editor commit, a `-F` file, or `--amend
|
|
157
|
+
--no-edit`. Opt out per project with `.rsc/.no-gitmoji`.
|
package/skills/ship/SKILL.md
CHANGED
|
@@ -184,7 +184,7 @@ cleanup). If a native `EnterWorktree`-style tool created it, exit through that t
|
|
|
184
184
|
|
|
185
185
|
The commit is the durable record. Make it describe the change and tie it to the spec — and keep it Eric's.
|
|
186
186
|
|
|
187
|
-
- **Subject:**
|
|
187
|
+
- **Subject:** `<gitmoji> type: imperative summary (<spec-slug>)` — `✨ feat:`, `🐛 fix:`, `♻️ refactor:`, etc. Under ~72 chars. The gitmoji is **not optional**: on Claude Code a PreToolUse guard denies a `git commit -m` without one, and the refusal hands back the corrected message. Emoji → intention table: `../git-workflow/references/gitmoji.md`.
|
|
188
188
|
- **Body:** *why*, not a restatement of the diff. Reference the spec slug and any decision logged in `decisions.md`.
|
|
189
189
|
- **Footer:** issue/PR refs only. **No `Co-Authored-By` for any AI. No "generated with" line.** This is where the violation usually sneaks in — leave the footer clean.
|
|
190
190
|
|
|
@@ -212,6 +212,7 @@ Read the level from `02-DOCS/wiki/harness/user-profile.md`. It changes what you
|
|
|
212
212
|
| "The tree has a couple of stray edits, they're harmless" | A dirty tree means the merge is not the reviewed diff. Clean it or stash it first. |
|
|
213
213
|
| "`main` is protected but I'll just force-merge, I'm sure" | Protected means PR. Don't bypass the gate the repo deliberately set. |
|
|
214
214
|
| "I'll rebase and resolve conflicts during the merge" | Resolve before. A conflicted merge commit hides what actually shipped. |
|
|
215
|
+
| "The gitmoji is decoration, the conventional type is what matters" | Both ship or neither does. The type is for tooling, the emoji for the human scanning `git log` — and the guard denies the commit either way. |
|
|
215
216
|
| "This branch is dead, I'll just delete it" | Discard is destructive — confirm with the quoted branch name and log why first. |
|
|
216
217
|
| "Squash everything, history doesn't matter" | Squash noise, preserve meaning. The history is the next reader's spec. |
|
|
217
218
|
| "There's a key in the diff but it's a test key" | A secret in the diff is a blocker regardless. Pull it out before landing. |
|
package/skills/specify/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specify
|
|
3
|
-
description: "Use when a feature, change, or product idea is still fuzzy and must become an approved WHAT/WHY spec before any planning or code — the brainstorming front door of SDD. Turns a one-line intent into problem, goals, users, scope, behaviour and acceptance criteria, via
|
|
3
|
+
description: "Use when a feature, change, or product idea is still fuzzy and must become an approved WHAT/WHY spec before any planning or code — the brainstorming front door of SDD. Turns a one-line intent into problem, goals, users, scope, behaviour and acceptance criteria, via frontier-round dialogue and 2-3 approaches with a recommendation, carrying zero implementation detail. Fires whenever someone jumps to HOW before WHAT is agreed, in any language. NOT the technical plan (that is `plan`), NOT the de-risking ambiguity sweep (that is `clarify`), NOT project-wide principles (that is `constitution`)."
|
|
4
4
|
tags: [sdd, spec, requirements]
|
|
5
5
|
recommends: [clarify, plan]
|
|
6
6
|
profiles: [core, full]
|
|
@@ -29,9 +29,11 @@ A **yes engages autopilot** (`../sdd/SKILL.md`): you still write the spec and ev
|
|
|
29
29
|
|
|
30
30
|
## The one rule that defines this skill
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
A spec is a **contract**: what the system will observably do, and why that matters. Every line either belongs in the contract or belongs to how the contract gets honoured — and the second kind is `plan`'s, not yours. Framework, table schema, library, endpoint shape, file path, algorithm: all of them are how, so the moment one appears the document has stopped being a contract.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
One question settles every judgement call in this skill: **is this a clause of the contract, or a detail of how it gets met?**
|
|
35
|
+
|
|
36
|
+
If you cannot state a requirement without naming the technology, that is a real open question — record it as a typed point to clarify, do not guess the answer.
|
|
35
37
|
|
|
36
38
|
## Model tier — `balanced` (opt-in routing)
|
|
37
39
|
|
|
@@ -41,23 +43,25 @@ This phase's default model tier is **`balanced`** — it drafts the what/why spe
|
|
|
41
43
|
|
|
42
44
|
Before asking anything, read `02-DOCS/wiki/harness/user-profile.md` for the technical level and accompaniment level, and adapt:
|
|
43
45
|
|
|
44
|
-
- **L0 "cavernícola"** — infer aggressively from the intent and any existing wiki/constitution. Ask only the questions whose answer would change the
|
|
46
|
+
- **L0 "cavernícola"** — infer aggressively from the intent and any existing wiki/constitution. Ask only the questions whose answer would change the contract. Draft, show, move on.
|
|
45
47
|
- **L1 "breve"** — one line of *why* per question; ask the few that genuinely matter.
|
|
46
48
|
- **L2 "explica decisiones"** — justify each requirement as you record it; surface the trade-offs you inferred.
|
|
47
|
-
- **L3 "acompañamiento total"** — explain what a spec is and is not, walk every section, ask freely (still one
|
|
49
|
+
- **L3 "acompañamiento total"** — explain what a spec is and is not, walk every section, ask freely (still one round per frontier, never crossing a dependency), confirm each answer before recording it. Ideal for non-technical users.
|
|
48
50
|
|
|
49
51
|
If no profile exists, default to non-technical framing and keep questions plain. Never assume fluency.
|
|
50
52
|
|
|
51
|
-
## Questioning discipline —
|
|
53
|
+
## Questioning discipline — ask the frontier, never cross a dependency
|
|
52
54
|
|
|
53
|
-
The failure mode of specs is the wall of twenty questions.
|
|
55
|
+
The failure mode of specs is the wall of twenty questions. The cure is not one question per turn: that spends a turn of the user's time per question even when the questions do not touch each other. The cure is the **frontier**.
|
|
54
56
|
|
|
55
57
|
1. **Infer first.** Read the `constitution` (`02-DOCS/wiki/sdd/constitution.md`), the existing wiki, and sibling specs. Fill every section you reasonably can from what already exists.
|
|
56
|
-
2. **Ask only the gaps that change the
|
|
57
|
-
3. **
|
|
58
|
-
4. **
|
|
58
|
+
2. **Ask only the gaps that change the contract.** A gap earns a question only if a different answer would move scope, a goal, a user, or an acceptance criterion. Cosmetic gaps become typed *points to clarify*, not questions.
|
|
59
|
+
3. **Ask the whole frontier in one round.** The frontier is every remaining gap whose prerequisites are already settled — the questions you can ask *now* without guessing at answers you have not heard yet. Number them, give each your recommended answer, then wait. Where the harness offers a native question selector, use it; where it does not, emit the same round as numbered text.
|
|
60
|
+
4. **Never cross a dependency.** A gap whose answer depends on another question open in *this* round belongs to a later round. Recompute the frontier after every set of answers: settled decisions push it outward and unblock what waited on them. If an answer redefines a question you already emitted in the same round, discard that question out loud and re-ask it next round rather than using an answer given under a premise that just moved.
|
|
61
|
+
5. **Facts are your job; decisions are the user's.** When a frontier question needs a fact from the environment, go find it — and do not block on it. A running search is an unsettled prerequisite, so only the questions downstream of it wait; ask the rest of the frontier now.
|
|
62
|
+
6. **When inference and asking both fail, type it.** Anything unresolved becomes a typed entry in *Points to clarify* — the handoff contract to `clarify`, not a defect.
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
A frontier of one is one question, and needs no apology. A frontier of zero is no question at all: never invent one to look diligent.
|
|
61
65
|
|
|
62
66
|
## What a good spec contains
|
|
63
67
|
|
|
@@ -71,7 +75,7 @@ Write these sections into `02-DOCS/wiki/sdd/specs/<slug>.md` using `references/s
|
|
|
71
75
|
| Users & context | Who acts, their context, what they're trying to achieve | An imagined user no one asked for |
|
|
72
76
|
| Behaviour | What the system does, in observable terms, incl. main + edge + error paths | A verb that's actually a HOW ("queries", "caches") |
|
|
73
77
|
| Acceptance criteria | Testable, binary checks that say "done" | Vague critera ("works well", "is fast") |
|
|
74
|
-
| Points to clarify |
|
|
78
|
+
| Points to clarify | The typed handoff to `clarify` — see the four types below | An untyped list, or pretending there are none |
|
|
75
79
|
|
|
76
80
|
### Acceptance criteria carry the weight
|
|
77
81
|
|
|
@@ -85,6 +89,33 @@ Then they see an empty-cart message and the "pay" button is disabled
|
|
|
85
89
|
|
|
86
90
|
A criterion that needs a human to "decide if it's good enough" is not done yet — sharpen it or move the soft part to *Points to clarify*.
|
|
87
91
|
|
|
92
|
+
### Points to clarify carry a type
|
|
93
|
+
|
|
94
|
+
*Points to clarify* is the handoff to `clarify`, and it holds four different objects that need four
|
|
95
|
+
different actions. An untyped list makes `clarify` treat all of them as questions, so it re-asks what
|
|
96
|
+
you already decided and touches what you deliberately deferred. Type every entry:
|
|
97
|
+
|
|
98
|
+
| Type | What it is | What `clarify` does with it |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| **pregunta abierta** | Formulable with precision right now, unanswered | Asks it |
|
|
101
|
+
| **suposición tomada** | You decided it; the basis is written down | Validates it — does it still hold? |
|
|
102
|
+
| **decisión diferida** | Sharp, out of this cycle on purpose | Leaves it alone |
|
|
103
|
+
| **área no formulable** | Known to be coming, not yet sharp enough to phrase | Notes it; it graduates when it sharpens |
|
|
104
|
+
|
|
105
|
+
The test that separates the last two from a question is **sharpness, not difficulty**: *can you state
|
|
106
|
+
the question precisely now?* — not *can you answer it?* Sharp → **pregunta abierta**. Not sharp →
|
|
107
|
+
**área no formulable**. Beyond what this change is for → `Non-goals`, where it never graduates.
|
|
108
|
+
|
|
109
|
+
Write the type in bold at the head of the entry, and give a `suposición tomada` its basis:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
- **suposición tomada** — el enlace caduca en minutos, no en horas. *Base:* el patrón de los
|
|
113
|
+
proveedores que ya usamos. *Riesgo:* si el soporte pide horas, el criterio de aceptación cambia.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
An entry with no type is read as **pregunta abierta**, the costliest of the four. The default never
|
|
117
|
+
saves you work.
|
|
118
|
+
|
|
88
119
|
## The pass, end to end
|
|
89
120
|
|
|
90
121
|
Run these in order. It is a collaborative dialogue, not a form you fill in silence — and **you do not skip to a design dump.** Track the steps with a todo list so none is dropped.
|
|
@@ -94,23 +125,40 @@ Run these in order. It is a collaborative dialogue, not a form you fill in silen
|
|
|
94
125
|
2. SCOPE check → if the request is several independent subsystems, DECOMPOSE into sub-specs first,
|
|
95
126
|
then brainstorm the FIRST one; each gets its own spec → plan → build cycle
|
|
96
127
|
3. RESTATE in one sentence→ confirm you understood the intent before anything else
|
|
97
|
-
4. ASK
|
|
128
|
+
4. ASK the frontier → only gaps that change the contract; whole frontier per round, numbered, each
|
|
129
|
+
with your recommendation; never cross a dependency; wait, record, recompute
|
|
98
130
|
5. PROPOSE 2-3 approaches → distinct directions with honest trade-offs; lead with your recommendation and why
|
|
99
131
|
6. PRESENT the design → section by section (problem, users, behaviour, acceptance), scaled to complexity;
|
|
100
132
|
after EACH section ask "does this look right?" and adjust before moving on
|
|
101
133
|
7. WRITE the spec → 02-DOCS/wiki/sdd/specs/<slug>.md (WHAT/WHY), index it in 02-DOCS/wiki/index.md
|
|
102
134
|
(the Knowledge map; root CLAUDE.md keeps only a short pointer), commit if a repo
|
|
103
|
-
8. SELF-REVIEW → scan for
|
|
104
|
-
On L2/L3 or
|
|
135
|
+
8. SELF-REVIEW → run the EXIT GATE (below) until green; scan for contradictions, ambiguity,
|
|
136
|
+
scope creep; fix inline. On L2/L3 or high risk, add a FRESH-EYES review
|
|
105
137
|
9. USER APPROVES → ask them to read the written spec and confirm; loop on changes until they approve
|
|
106
138
|
10. HAND OFF → only now, result envelope → clarify/plan. NEVER to implement.
|
|
107
139
|
```
|
|
108
140
|
|
|
109
|
-
**
|
|
110
|
-
```
|
|
141
|
+
**Steps 5-9 are the gate**, stated once under *Detect the moment* above and not restated here: approval at step 9 is what unlocks implementation.
|
|
111
142
|
|
|
112
143
|
`<slug>` is a short kebab-case name derived from the feature (e.g. `bulk-csv-import`, `magic-link-login`). If a spec with that slug exists, read it and update rather than overwrite.
|
|
113
144
|
|
|
145
|
+
### Exit gate — checked, not felt
|
|
146
|
+
|
|
147
|
+
"Complete enough to plan against" cannot tell done from not-done, and the write/review/approve steps
|
|
148
|
+
are visible while you are still asking, pulling attention toward being finished. So the bound is a
|
|
149
|
+
property of the **file**, not of your confidence:
|
|
150
|
+
|
|
151
|
+
> Every template section carries content or an explicit typed open point, and no section holds an
|
|
152
|
+
> unmarked assumption.
|
|
153
|
+
|
|
154
|
+
Run `npm run spec:gate <path>` on the spec you just wrote (no path: the whole corpus). It reports the
|
|
155
|
+
missing and the empty sections by name, and it prints what it does **not** check — the unmarked
|
|
156
|
+
assumption is yours to catch, because no parser can. A red gate means the spec is not closed: name
|
|
157
|
+
the section that failed and fix it before step 9.
|
|
158
|
+
|
|
159
|
+
A gate that has never been seen fail is not known to work, so this one ships with the test that
|
|
160
|
+
watches it fail and pass (`tests/spec-gate.test.js`).
|
|
161
|
+
|
|
114
162
|
### Fresh-eyes spec review (step 8, scaled to the dial)
|
|
115
163
|
|
|
116
164
|
The author's own context is blind to its own gaps — the same mind that wrote the spec self-reviews it
|
|
@@ -191,8 +239,12 @@ A returning user on a new device who does not remember a password.
|
|
|
191
239
|
link can be requested.
|
|
192
240
|
|
|
193
241
|
## Points to clarify
|
|
194
|
-
-
|
|
195
|
-
-
|
|
242
|
+
- **pregunta abierta** — ¿cuánto vale la ventana de validez del enlace?
|
|
243
|
+
- **suposición tomada** — la ventana es corta, en minutos. *Base:* el patrón de los proveedores que
|
|
244
|
+
ya usamos. *Riesgo:* si soporte pide horas, cambia el criterio de aceptación.
|
|
245
|
+
- **decisión diferida** — límite de peticiones por email; fuera de este ciclo.
|
|
246
|
+
- **área no formulable** — qué pasa con las cuentas compartidas; sospecho que hay una pregunta y
|
|
247
|
+
todavía no sé enunciarla.
|
|
196
248
|
```
|
|
197
249
|
|
|
198
250
|
Note what is *absent*: no token format, no table, no email provider, no framework. Those are `plan`'s job.
|
|
@@ -226,17 +278,16 @@ The proposal is allowed to mention options and tradeoffs; the spec that follows
|
|
|
226
278
|
|
|
227
279
|
## Anti-patterns → STOP
|
|
228
280
|
|
|
281
|
+
Only failures with no positive statement elsewhere in this skill. The rules about the frontier, the
|
|
282
|
+
constitution, the 2-3 approaches, the gate, and answer-is-not-approval are stated positively above
|
|
283
|
+
(§Questioning discipline, §Detect the moment, the pass, §Approval is its own exchange) and are not
|
|
284
|
+
repeated here as prohibitions: naming a behaviour makes it more available, not less.
|
|
285
|
+
|
|
229
286
|
| If you're about to… | Reality / Fix |
|
|
230
287
|
| --- | --- |
|
|
231
288
|
| Name a framework, table, endpoint, or library | That's HOW. Strip it; describe the behaviour instead, or log the open question. |
|
|
232
|
-
| Dump 12 questions in one message | One focused question per turn. Infer the rest from the constitution and wiki. |
|
|
233
|
-
| Ask a question you could answer from the constitution | Read it first. Only ask what genuinely changes the spec. |
|
|
234
289
|
| Write "it should work well / be fast / be intuitive" | Not testable. Make it a binary Given/When/Then or move it to Points to clarify. |
|
|
235
|
-
| Skip the whole loop because "this is too simple to design" | That's the rationalization that wastes the most work. Every feature gets the loop; only a literal one-line, zero-risk change skips. |
|
|
236
|
-
| Present one approach as the answer | Offer 2-3 distinct directions with trade-offs and a recommendation; let the user choose before you write the spec. |
|
|
237
290
|
| Hand to `plan`/`implement` before the user approved the written spec | The approval at step 9 is the gate. No design approved → nothing gets built. |
|
|
238
|
-
| Treat the answer to your question as the approval of the spec | They answered the question, and the answer *changed* the spec. Fold it in, say what changed, show it, ask again. |
|
|
239
|
-
| Write `status: aprobada` after a blanket "just run it" | That is autopilot. Record it as such — the record must not overstate the strongest gate in the chain. |
|
|
240
291
|
| Skip non-goals because "it's obvious" | Unsaid scope becomes assumed scope. State what you are *not* doing. |
|
|
241
292
|
| Resolve every ambiguity yourself to look finished | Inventing answers is worse than naming gaps. List them in Points to clarify. |
|
|
242
293
|
| Start designing the solution because it's clearer | Stay on WHAT/WHY. The plan is a later, separate phase. |
|
|
@@ -287,7 +338,7 @@ If `clarify` surfaces answers, they get baked back into this same spec file. Onl
|
|
|
287
338
|
- `../plan/SKILL.md` — turns the de-risked spec into a technical implementation plan (the HOW).
|
|
288
339
|
- `../harness/SKILL.md` — the 02-DOCS wiki + accompaniment dial + decisions log this skill honors.
|
|
289
340
|
- `references/spec-template.md` — the exact section template written to `02-DOCS/wiki/sdd/specs/<slug>.md`.
|
|
290
|
-
- `references/eliciting-requirements.md` — inference checklist + the
|
|
341
|
+
- `references/eliciting-requirements.md` — inference checklist + the frontier-round elicitation pattern.
|
|
291
342
|
|
|
292
343
|
## Orientación (siempre)
|
|
293
344
|
|
|
@@ -63,20 +63,20 @@ should_not_trigger:
|
|
|
63
63
|
capability:
|
|
64
64
|
- scenario: "A user says: 'I want to add magic-link (passwordless) login.' There is a constitution at 02-DOCS/wiki/sdd/constitution.md but no spec yet. Produce the spec."
|
|
65
65
|
must_include:
|
|
66
|
-
- "Reads the accompaniment level from 02-DOCS/wiki/harness/user-profile.md and the constitution first, inferring everything it can before asking, then asks only
|
|
66
|
+
- "Reads the accompaniment level from 02-DOCS/wiki/harness/user-profile.md and the constitution first, inferring everything it can before asking, then asks only contract-changing gaps — the whole FRONTIER in one numbered round, each with its recommendation, and nothing whose answer depends on another question open in that same round."
|
|
67
67
|
- "Stays strictly WHAT/WHY: no framework, token format, database table, endpoint shape, email provider, library, or file path appears in the spec — implementation-laden answers are flagged as points to clarify instead of guessed."
|
|
68
68
|
- "Produces the spec sections: Problem & why, Goals, Non-goals / out of scope, Users & context, Behaviour (main + edge + error paths), Acceptance criteria, Points to clarify."
|
|
69
69
|
- "Writes testable acceptance criteria in Given/When/Then form that verify could later check (e.g. expired-link refusal, unknown-email revealing nothing)."
|
|
70
70
|
- "Writes the file to 02-DOCS/wiki/sdd/specs/<slug>.md (kebab-case slug), indexes it in the root CLAUDE.md Knowledge map under sdd/specs, and logs the spec creation to the canonical SDD decisions log at 02-DOCS/wiki/sdd/decisions.md."
|
|
71
|
-
- "Lists honest Points to clarify
|
|
71
|
+
- "Lists honest Points to clarify as the handoff rather than inventing values, and TYPES each one (pregunta abierta / suposición tomada / decisión diferida / área no formulable) so clarify knows whether to ask it, validate it, or leave it alone; a suposición carries its basis."
|
|
72
72
|
- "Ends by pointing to the clarify phase as the next step in the SDD chain."
|
|
73
73
|
|
|
74
74
|
- scenario: "A user pastes a rough one-liner: 'Let users export all their data as a download.' Show how you'd elicit and capture this without over-asking."
|
|
75
75
|
must_include:
|
|
76
76
|
- "Recovers the underlying problem/why rather than treating the feature request as the problem, and inherits any relevant constraints from the constitution."
|
|
77
|
-
- "Applies the 'would a different answer change the
|
|
77
|
+
- "Applies the 'would a different answer change the contract?' test, then splits what is left by dependency: independent gaps go out together in one round with recommendations, and any gap whose answer hinges on another still-open one is held for the next round rather than asked blind."
|
|
78
78
|
- "Captures observable behaviour (what the user sees/can do) and explicit non-goals / out-of-scope rather than implementation (no file format library, storage, or job-queue detail)."
|
|
79
|
-
- "Turns answers into binary acceptance criteria and defers unresolved items (e.g. data scope, retention, format) to Points to clarify instead of fabricating decisions."
|
|
79
|
+
- "Turns answers into binary acceptance criteria and defers unresolved items (e.g. data scope, retention, format) to typed Points to clarify instead of fabricating decisions, and checks the written file against the phase's exit gate before calling it done."
|
|
80
80
|
- "Notes that the spec is complete-enough-to-plan with open points remaining, and hands off to clarify — not to plan or implementation."
|
|
81
81
|
- "After the user answers a question, folds the answer in, states what changed, shows the revised spec, and asks for approval AGAIN — it does not treat the answer as approval of the spec, including when the user picked the recommended option."
|
|
82
82
|
- "If told to run the whole chain up front, records the approval as autopilot rather than item-by-item, and says the spec is the artifact to review after the fact."
|
|
@@ -31,13 +31,49 @@ and the intent itself. Only what survives as unknown becomes a question or a
|
|
|
31
31
|
What you genuinely cannot resolve here is exactly what `clarify` exists for.
|
|
32
32
|
Naming it is the correct outcome, not a failure.
|
|
33
33
|
|
|
34
|
-
## The
|
|
34
|
+
## The frontier pattern
|
|
35
35
|
|
|
36
|
-
A
|
|
36
|
+
A gap earns a question only if a *different answer would change the contract*.
|
|
37
37
|
Apply this test before asking:
|
|
38
38
|
|
|
39
39
|
> "If they answer A vs B, does a goal, a user, the scope, or an acceptance
|
|
40
|
-
> criterion change?" — No → don't ask; infer or
|
|
40
|
+
> criterion change?" — No → don't ask; infer or type it as a point to clarify.
|
|
41
|
+
> Yes → it is a question.
|
|
42
|
+
|
|
43
|
+
Then decide *when* to ask it. Model the gaps as a tree: every decision branches
|
|
44
|
+
into the decisions hanging off it. The **frontier** is every gap whose
|
|
45
|
+
prerequisites are already settled — what you can ask now without guessing at
|
|
46
|
+
answers you have not heard. Ask the whole frontier in one round; ask nothing
|
|
47
|
+
that depends on an answer still pending in that same round.
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
Round 1 (frontier: 3 independent gaps)
|
|
51
|
+
❓ **Q1 — <title>**: <body, options if you have them>
|
|
52
|
+
➡️ <your recommended answer>
|
|
53
|
+
---
|
|
54
|
+
❓ **Q2 — <title>**: …
|
|
55
|
+
➡️ …
|
|
56
|
+
---
|
|
57
|
+
❓ **Q3 — <title>**: …
|
|
58
|
+
➡️ …
|
|
59
|
+
|
|
60
|
+
→ user answers → fold in → recompute the frontier → Round 2
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Where the harness offers a native question selector, emit the round through it;
|
|
64
|
+
otherwise emit the numbered text above. Same content either way.
|
|
65
|
+
|
|
66
|
+
**Facts are yours, decisions are theirs.** A gap that needs a fact from the
|
|
67
|
+
environment (a file, a config, a version) is legwork, not a question: go find
|
|
68
|
+
it. Don't block the round on it — a running search is an unsettled prerequisite,
|
|
69
|
+
so only its dependents wait. Ask the rest of the frontier now.
|
|
70
|
+
|
|
71
|
+
**A frontier of one** is one question, and needs no apology. **A frontier of
|
|
72
|
+
zero** is silence: never invent a question to look diligent.
|
|
73
|
+
|
|
74
|
+
**If an answer redefines a question you already emitted this round**, say so and
|
|
75
|
+
drop it. Re-ask it next round. An answer given under a premise that has since
|
|
76
|
+
moved is worse than no answer, because it looks settled.
|
|
41
77
|
|
|
42
78
|
Phrase by register:
|
|
43
79
|
|
|
@@ -48,8 +84,10 @@ Phrase by register:
|
|
|
48
84
|
- **Technical / L0-L1** — terse, decision-shaped:
|
|
49
85
|
> "Expired-link recovery in scope, or defer?"
|
|
50
86
|
|
|
51
|
-
Always:
|
|
52
|
-
→
|
|
87
|
+
Always: emit the round → wait → record each answer in its section → confirm at
|
|
88
|
+
L2/L3 → recompute the frontier. The thing to avoid was never two questions in
|
|
89
|
+
one message; it was ten questions whose answers depend on each other, which is
|
|
90
|
+
what crossing a dependency produces.
|
|
53
91
|
|
|
54
92
|
## Turning answers into testable criteria
|
|
55
93
|
|
|
@@ -64,14 +102,16 @@ link" action that issues a fresh one.
|
|
|
64
102
|
```
|
|
65
103
|
|
|
66
104
|
If the answer is fuzzy ("it should feel fast"), do not invent a number — push
|
|
67
|
-
once for a concrete figure; if none is available, file it
|
|
68
|
-
|
|
105
|
+
once for a concrete figure; if none is available, file it as a
|
|
106
|
+
**suposición tomada** with its basis and its risk, which is what makes it
|
|
107
|
+
something `clarify` can validate instead of re-ask.
|
|
69
108
|
|
|
70
109
|
## When to stop
|
|
71
110
|
|
|
72
|
-
Stop
|
|
73
|
-
|
|
74
|
-
|
|
111
|
+
Stop when the frontier is empty: every branch visited, nothing left silently
|
|
112
|
+
assumed. Then run the exit gate (`npm run spec:gate <path>`) on the written
|
|
113
|
+
file — the bound is a property of the artifact, not of your confidence.
|
|
114
|
+
Lingering unknowns are fine, and belong in *Points to clarify*, typed. Over-asking to feel thorough is itself an anti-pattern: it burns the
|
|
75
115
|
user's patience and pushes them to rubber-stamp answers they haven't thought
|
|
76
116
|
through. A short spec with three honest open points beats a long spec with three
|
|
77
117
|
fabricated ones.
|
|
@@ -50,16 +50,30 @@ checkable by `verify` and convertible to a `tasks` done-check.>
|
|
|
50
50
|
- Given <state>, When <action>, Then <observable outcome>.
|
|
51
51
|
|
|
52
52
|
## Points to clarify
|
|
53
|
-
<The handoff to
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
<The typed handoff to `clarify`. Every entry declares which of the four it is,
|
|
54
|
+
because each one gets a different action from the next phase. Non-empty is
|
|
55
|
+
normal; untyped is not — an untyped entry is read as `pregunta abierta`, the
|
|
56
|
+
costliest of the four.>
|
|
57
|
+
- **pregunta abierta** — <formulable now, unanswered. clarify asks it.>
|
|
58
|
+
- **suposición tomada** — <what you decided.> *Base:* <why.> *Riesgo:* <what
|
|
59
|
+
changes if it turns out wrong.> clarify validates it rather than re-asking.
|
|
60
|
+
- **decisión diferida** — <sharp, out of this cycle on purpose. clarify leaves
|
|
61
|
+
it.>
|
|
62
|
+
- **área no formulable** — <you can tell something is coming and cannot phrase
|
|
63
|
+
the question yet. clarify notes it; it graduates when it sharpens.>
|
|
57
64
|
```
|
|
58
65
|
|
|
59
66
|
## Field notes
|
|
60
67
|
|
|
61
68
|
- **Status** moves `draft` → `clarified` (after the `clarify` phase) → `planned`
|
|
62
|
-
(once `plan` exists). Don't invent other states.
|
|
69
|
+
(once `plan` exists). Don't invent other states. An approval obtained as a
|
|
70
|
+
blanket "just run it" is recorded as **approved in autopilot**, not flat.
|
|
71
|
+
- **Before you call it written**, run `npm run spec:gate <path>`. It checks that
|
|
72
|
+
every section here carries content or an explicit open point, and prints the
|
|
73
|
+
clauses it cannot check (the unmarked assumption is yours).
|
|
74
|
+
- **Sharpness, not difficulty**, sorts the last two types from the first: *can
|
|
75
|
+
you state the question precisely now?* Not *can you answer it?* Anything past
|
|
76
|
+
what this change is for goes to **Non-goals**, where it never graduates.
|
|
63
77
|
- **Behaviour** is where HOW leaks in most. Audit every verb: "queries",
|
|
64
78
|
"caches", "calls", "stores in" are implementation. Replace with the observable
|
|
65
79
|
effect ("shows", "lets the user", "prevents", "remembers across visits").
|
package/targets/claude.js
CHANGED
|
@@ -113,6 +113,21 @@ export function wireHook(paths) {
|
|
|
113
113
|
);
|
|
114
114
|
settings.hooks.PreToolUse.push({ matcher: 'Bash', hooks: [{ type: 'command', command: dgCmd }] });
|
|
115
115
|
|
|
116
|
+
// Gitmoji guard: a PreToolUse(Bash) hook that DENIES a `git commit` whose message
|
|
117
|
+
// carries no gitmoji (gitmoji.dev) in front of the Conventional Commits header. The
|
|
118
|
+
// convention lives in `git-workflow`; prose asks, this hook decides — at the one
|
|
119
|
+
// deterministic moment the message exists. Only fires when the message is inline and
|
|
120
|
+
// readable (-m / heredoc); editor commits, -F files and --amend --no-edit are allowed.
|
|
121
|
+
// Materialized + node-run (Windows-safe), idempotent, fail-open, opt-out via
|
|
122
|
+
// .rsc/.no-gitmoji.
|
|
123
|
+
const gmDest = join(paths.projectRoot, '.rsc', 'gitmoji-guard.mjs');
|
|
124
|
+
copyFileSync(join(HERE, 'gitmoji-guard.mjs'), gmDest);
|
|
125
|
+
const gmCmd = `node "${gmDest}" "${paths.projectRoot}"`;
|
|
126
|
+
settings.hooks.PreToolUse = settings.hooks.PreToolUse.filter(
|
|
127
|
+
(e) => !JSON.stringify(e).includes('.rsc/gitmoji-guard.'),
|
|
128
|
+
);
|
|
129
|
+
settings.hooks.PreToolUse.push({ matcher: 'Bash', hooks: [{ type: 'command', command: gmCmd }] });
|
|
130
|
+
|
|
116
131
|
// New-feature gate: a UserPromptSubmit hook that re-injects the SDD new-feature gate as
|
|
117
132
|
// the most-recent instruction on every user turn. SessionStart injects the full gate (the
|
|
118
133
|
// `suggest` body) once; this keeps the precedence rule salient regardless of how many
|
|
@@ -132,5 +147,5 @@ export function wireHook(paths) {
|
|
|
132
147
|
|
|
133
148
|
mkdirSync(dirname(file), { recursive: true });
|
|
134
149
|
writeFileSync(file, JSON.stringify(settings, null, 2) + '\n');
|
|
135
|
-
return [file, scriptDest, wlDest, sgDest, dgDest, fgDest];
|
|
150
|
+
return [file, scriptDest, wlDest, sgDest, dgDest, gmDest, fgDest];
|
|
136
151
|
}
|