@thebassclef/lite 1.1.0 → 1.2.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/cli.cjs +258 -63
  2. package/dist/cli.js +258 -63
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.claude/bassclef-configs.jsonc +56 -0
  7. package/dist/lite/.claude/bassclef-orientation.md +120 -0
  8. package/dist/lite/.claude/hooks/adr-discipline-check.sh +132 -0
  9. package/dist/lite/.claude/hooks/atomic-pr-check.sh +169 -0
  10. package/dist/lite/.claude/hooks/auto-save-idle.sh +51 -0
  11. package/dist/lite/.claude/hooks/bassclef-sync.sh +51 -13
  12. package/dist/lite/.claude/hooks/bet-doc-gate.sh +283 -0
  13. package/dist/lite/.claude/hooks/bug-diagnosis.sh +64 -0
  14. package/dist/lite/.claude/hooks/destructive-command-guard.sh +136 -0
  15. package/dist/lite/.claude/hooks/file-rename-discipline-check.sh +147 -0
  16. package/dist/lite/.claude/hooks/hook-classifier-canary.sh +158 -0
  17. package/dist/lite/.claude/hooks/kiss-default-check.sh +129 -0
  18. package/dist/lite/.claude/hooks/multi-tenancy-check.sh +83 -0
  19. package/dist/lite/.claude/hooks/oo-ad-entry-point-check.sh +216 -0
  20. package/dist/lite/.claude/hooks/operator-private-path-check.sh +203 -0
  21. package/dist/lite/.claude/hooks/pattern-annotation-validate.sh +142 -0
  22. package/dist/lite/.claude/hooks/plain-english-steering.sh +15 -1
  23. package/dist/lite/.claude/hooks/post-write-trace.sh +66 -0
  24. package/dist/lite/.claude/hooks/pr-body-scrub-check.sh +446 -0
  25. package/dist/lite/.claude/hooks/pre-commit-identifier-leak-scrub.sh +137 -0
  26. package/dist/lite/.claude/hooks/pre-gh-pr-body-scrub.sh +192 -0
  27. package/dist/lite/.claude/hooks/pre-gh-pr-title-scrub.sh +172 -0
  28. package/dist/lite/.claude/hooks/role-entry-gate.sh +115 -0
  29. package/dist/lite/.claude/hooks/save-state.sh +268 -0
  30. package/dist/lite/.claude/hooks/session-reflection.d/08-settings-drift.sh +8 -1
  31. package/dist/lite/.claude/hooks/session-reflection.d/10-abrupt-stop-recovery.sh +52 -0
  32. package/dist/lite/.claude/hooks/session-reflection.d/55-orientation-gate.sh +40 -4
  33. package/dist/lite/.claude/hooks/session-reflection.d/80-hook-heartbeat-check.sh +12 -5
  34. package/dist/lite/.claude/hooks/session-reflection.d/81-hook-manifest-staleness.sh +18 -2
  35. package/dist/lite/.claude/hooks/session-reflection.d/91-npm-version-drift.sh +54 -0
  36. package/dist/lite/.claude/hooks/session-reflection.d/tests/10-abrupt-stop-recovery.test.sh +95 -0
  37. package/dist/lite/.claude/hooks/session-reflection.sh +62 -15
  38. package/dist/lite/.claude/hooks/tool-failure-diagnosis.sh +50 -0
  39. package/dist/lite/.claude/luminaries/andrej-karpathy.md +165 -0
  40. package/dist/lite/.claude/luminaries/dave-gray.md +155 -0
  41. package/dist/lite/.claude/luminaries/gary-klein.md +166 -0
  42. package/dist/lite/.claude/luminaries/kaoru-ishikawa.md +162 -0
  43. package/dist/lite/.claude/luminaries/lean-product-canvas.md +33 -0
  44. package/dist/lite/.claude/luminaries/luke-wroblewski.md +224 -0
  45. package/dist/lite/.claude/luminaries/ryan-singer.md +113 -0
  46. package/dist/lite/.claude/luminaries/steve-krug.md +168 -0
  47. package/dist/lite/.claude/luminaries/tony-ulwick.md +134 -0
  48. package/dist/lite/.claude/rules/arc-level-orientation-before-leaf.md +60 -0
  49. package/dist/lite/.claude/rules/architect-review-discipline.md +71 -0
  50. package/dist/lite/.claude/rules/auto-fix-criteria.md +126 -0
  51. package/dist/lite/.claude/rules/bassclef-hook-drift-blocker.md +144 -0
  52. package/dist/lite/.claude/rules/bassclef-models-discovery.md +107 -0
  53. package/dist/lite/.claude/rules/bassclef-workflow-parity.md +104 -0
  54. package/dist/lite/.claude/rules/cost-governance.md +154 -0
  55. package/dist/lite/.claude/rules/file-rename-discipline.md +95 -0
  56. package/dist/lite/.claude/rules/mechanism-fidelity.md +88 -0
  57. package/dist/lite/.claude/rules/prototype-production-coupling.md +125 -0
  58. package/dist/lite/.claude/rules/quick-fix-criteria.md +90 -0
  59. package/dist/lite/.claude/rules/session-artifacts.md +30 -0
  60. package/dist/lite/.claude/rules/sibling-smoke-after-substrate-change.md +107 -0
  61. package/dist/lite/.claude/rules/substrate-as-system.md +67 -0
  62. package/dist/lite/.claude/rules/usability.md +22 -0
  63. package/dist/lite/.claude/settings.json +20 -0
  64. package/dist/lite/.claude/skills/agent-research-spawn/SKILL.md +100 -0
  65. package/dist/lite/.claude/skills/architect-review/SKILL.md +201 -0
  66. package/dist/lite/.claude/skills/auto-fix/SKILL.md +297 -0
  67. package/dist/lite/.claude/skills/autonomous/SKILL.md +300 -0
  68. package/dist/lite/.claude/skills/bind-subdomain/SKILL.md +232 -0
  69. package/dist/lite/.claude/skills/canvas/SKILL.md +41 -0
  70. package/dist/lite/.claude/skills/deploy-prod/SKILL.md +106 -0
  71. package/dist/lite/.claude/skills/docs-sync/SKILL.md +188 -0
  72. package/dist/lite/.claude/skills/eisenhower/SKILL.md +273 -0
  73. package/dist/lite/.claude/skills/empathy-map/SKILL.md +168 -0
  74. package/dist/lite/.claude/skills/frontend-design/SKILL.md +53 -0
  75. package/dist/lite/.claude/skills/interview-me/SKILL.md +171 -0
  76. package/dist/lite/.claude/skills/journal-export/SKILL.md +293 -0
  77. package/dist/lite/.claude/skills/jtbd-tasks/SKILL.md +203 -0
  78. package/dist/lite/.claude/skills/objectory-decompose/SKILL.md +256 -0
  79. package/dist/lite/.claude/skills/pick-luminaries/SKILL.md +100 -0
  80. package/dist/lite/.claude/skills/pre-mortem/SKILL.md +180 -0
  81. package/dist/lite/.claude/skills/prototype-gallery/SKILL.md +264 -0
  82. package/dist/lite/.claude/skills/provision-deploy-host/SKILL.md +257 -0
  83. package/dist/lite/.claude/skills/quick-fix/SKILL.md +273 -0
  84. package/dist/lite/.claude/skills/release/SKILL.md +311 -0
  85. package/dist/lite/.claude/skills/release-notes/SKILL.md +202 -0
  86. package/dist/lite/.claude/skills/rfc/SKILL.md +222 -0
  87. package/dist/lite/.claude/skills/riff-prototypes/SKILL.md +637 -0
  88. package/dist/lite/.claude/skills/secrets-bootstrap/SKILL.md +209 -0
  89. package/dist/lite/.claude/skills/skill/SKILL.md +304 -0
  90. package/dist/lite/.claude/skills/smoke-test/SKILL.md +100 -0
  91. package/dist/lite/.claude/skills/state/SKILL.md +204 -0
  92. package/dist/lite/.claude/skills/substrate-check/SKILL.md +218 -0
  93. package/dist/lite/.claude/skills/synthetic-user/SKILL.md +381 -0
  94. package/dist/lite/.claude/skills/task-scenarios/SKILL.md +105 -0
  95. package/dist/lite/.claude/skills/tier-dependency-audit/SKILL.md +139 -0
  96. package/dist/lite/.claude/skills/ux-migration/SKILL.md +424 -0
  97. package/dist/lite/.claude/skills/value-prop-canvas/SKILL.md +297 -0
  98. package/dist/lite/README.md +5 -1
  99. package/dist/lite/gitignore +6 -0
  100. package/dist/lite/lib/bassclef-dir-resolver.sh +85 -0
  101. package/dist/lite/lib/clone-failure-classifier.sh +59 -0
  102. package/dist/lite/lib/fixture-builder.sh +190 -0
  103. package/dist/lite/lib/fresh-install-check.sh +49 -0
  104. package/dist/lite/lib/hook-heartbeat.sh +0 -1
  105. package/dist/lite/lib/mechanism-fidelity.sh +569 -0
  106. package/dist/lite/lib/npm-version-check.sh +112 -0
  107. package/dist/lite/lib/preview-state.sh +229 -0
  108. package/dist/lite/lib/session-rescue.sh +0 -1
  109. package/dist/lite/scripts/generate-lite-manifest.sh +145 -4
  110. package/dist/lite/scripts/lite-manifest-drift-check.sh +5 -1
  111. package/dist/lite/standards/architect-review-discipline.md +222 -0
  112. package/dist/lite/standards/bassclef-platform.md +249 -0
  113. package/dist/lite/standards/bassclef-test-repos.md +97 -0
  114. package/dist/lite/standards/bassclef-wiring-manifest.json +25 -1
  115. package/dist/lite/standards/cold-adopter-harness.md +205 -0
  116. package/dist/lite/standards/data-management.md +135 -0
  117. package/dist/lite/standards/frontend-stack/nextjs-prisma.md +124 -0
  118. package/dist/lite/standards/lite-manifest-schema-changes.md +27 -0
  119. package/dist/lite/standards/lite-manifest.json +1456 -14
  120. package/dist/lite/standards/mechanism-fidelity.md +205 -0
  121. package/dist/lite/standards/operator-private-discipline.md +200 -0
  122. package/dist/lite/standards/operator-to-public-flow.md +195 -0
  123. package/dist/lite/standards/prototype-gallery.md +251 -0
  124. package/dist/lite/standards/pseudonym-key-schema.md +109 -0
  125. package/dist/lite/standards/sibling-validation-checklist.md +181 -0
  126. package/dist/lite/standards/slack-notifications.md +161 -0
  127. package/dist/lite/standards/synthetic-user-testing.md +173 -0
  128. package/dist/lite/standards/vendor-bindings.md +165 -0
  129. package/dist/lite/standards/vendor-plugins/frontend-design.md +66 -0
  130. package/dist/lite/standards/vpc-fit-validation.md +167 -0
  131. package/dist/lite/templates/gallery-yml.md +113 -0
  132. package/dist/lite/templates/product-canvas.md +169 -0
  133. package/dist/lite/templates/value-prop-canvas.md +180 -0
  134. package/package.json +12 -5
  135. /package/dist/lite/{whereami.md → docs/whereami.md} +0 -0
@@ -0,0 +1,257 @@
1
+ ---
2
+ tier: lite
3
+ name: provision-deploy-host
4
+ description: "Run the consumer onboarding chain \u2014 read bassclef-platform.yml plus verify secrets, extend GHA scope, run aws amplify create-app with console-pivot fallback, open the consumer config PR, write an audit row. Replaces the 5-step flow."
5
+ problem: "Consumer onboarding chain runs manually. Secret checks and GHA scope grants get missed."
6
+ value: "Runs the consumer onboarding chain. Reads platform config plus verifies secrets and extends GHA scope."
7
+ inputs: [Consumer name and target host]
8
+ outputs: [Verified secrets, Extended GHA scope, Rollback token]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ ---
12
+
13
+ # /provision-deploy-host — One-Dispatch Consumer Onboarding
14
+
15
+ Replaces the 5-rumblestrip TwoDo onboarding flow (deploy-keys policy,
16
+ PAT scope ×2, GitHub App scope, Cloudflare token gap) with one
17
+ mechanical chain. Operator dispatches once per consumer; merges one
18
+ PR; consumer is ready for `/launch-preview`.
19
+
20
+ ## When to invoke
21
+
22
+ - **New consumer onboarding** — after `gh repo create <consumer>`
23
+ has run, before any prototype work
24
+ - **Re-provisioning** an existing consumer (idempotent — safe no-op
25
+ if already provisioned)
26
+ - **Adding a deploy tier** to an existing consumer (e.g., wiring up
27
+ production tier on an app that previously had only prototype)
28
+
29
+ ## When NOT to invoke
30
+
31
+ - Before the consumer repo exists — agent refuses with "consumer repo
32
+ must exist; run `gh repo create` first"
33
+ - Before `bassclef-platform.yml` exists — Phase 0 fails fast with
34
+ remediation hint
35
+ - For internal-only / docs-only repos — those use `hosting_platform: none`
36
+ in their substrate.config.md and don't need deploy provisioning
37
+
38
+ ## Sources read
39
+
40
+ - `~/src/<github_org>/platform-config/bassclef-platform.yml` —
41
+ org-baseline (read via `state_platform_get`)
42
+ - `substrate.secrets.md` (bassclef's; per-consumer if relevant) —
43
+ required env-var manifest (read via `/secrets-bootstrap`)
44
+ - Consumer's `substrate.config.md` — to determine if already provisioned
45
+ - `bassclef#457`, `bassclef#449`, `bassclef#450` — issues this skill
46
+ closes / depends on
47
+ - `standards/bassclef-platform.md` — schema + Backstage-positioning frame
48
+ - `standards/secrets-lifecycle.md` — secret storage type discriminator
49
+ - `standards/domain-and-dns.md` — subdomain pattern referenced for next-step
50
+
51
+ ## Prerequisites
52
+
53
+ 1. Consumer repo exists at `sunj-labs/<consumer>`
54
+ 2. `bassclef-platform.yml` exists at `~/src/sunj-labs/platform-config/bassclef-platform.yml`
55
+ 3. Operator's shell env has every `storage.type: env` secret named in
56
+ substrate.secrets.md (run `/secrets-bootstrap` to verify; happens
57
+ automatically as Phase 0 of this skill)
58
+ 4. Operator has a fine-grained GitHub PAT with `admin:org` scope (one-time)
59
+ 5. `aws amplify list-apps --region <region>` works (auth is set)
60
+
61
+ ## Phase 0 — Pre-flight (fail-fast)
62
+
63
+ Run before any external API call. Each check produces actionable
64
+ remediation; agent does NOT proceed until all green.
65
+
66
+ | Check | Command | Pass | Fail |
67
+ |-------|---------|------|------|
68
+ | platform.yml exists | `state_platform_path` resolves to existing file | ✓ | "bassclef-platform.yml not found at <path>; create via bassclef#462 or override BASSCLEF_PLATFORM_CONFIG_PATH" |
69
+ | Required platform.yml fields | `state_platform_get org.aws_account_id` etc. all non-empty | ✓ | "platform.yml is missing <field>; run /scaffold-platform-yml" |
70
+ | `/secrets-bootstrap` exit 0 | `bash scripts/secrets-bootstrap.sh` | ✓ | "secrets gap; rerun with --write to bootstrap, then re-run this skill" |
71
+ | `aws sts get-caller-identity` | shows the org's AWS account id | ✓ | "AWS auth missing or wrong account; run `aws configure` then retry" |
72
+ | `gh auth status` | logged in as expected user | ✓ | "gh not authenticated; run `gh auth login` then retry" |
73
+ | Consumer repo exists | `gh repo view sunj-labs/<consumer>` | ✓ | "consumer repo missing; run `gh repo create sunj-labs/<consumer>` then retry" |
74
+
75
+ ## Phase 0.5 — Extend GHA App scope (one-time per org)
76
+
77
+ AWS Amplify GitHub App needs `Repository contents: read` + `Pull requests:
78
+ write` + `Metadata: read` on the org. Without this, `aws amplify create-app`
79
+ fails with `Validation Failed` from the GitHub side.
80
+
81
+ ```bash
82
+ # Check current installation scope
83
+ gh api /user/installations --jq '.installations[] | select(.app_slug == "aws-amplify-application") | .repository_selection'
84
+
85
+ # If "selected" and the consumer repo isn't in the list:
86
+ gh api /user/installations/<id>/repositories \
87
+ --method POST \
88
+ -f repository_id=<consumer-repo-id>
89
+ ```
90
+
91
+ Idempotent: if scope already includes the consumer, no-op.
92
+
93
+ ## Phase 1a — `aws amplify create-app` (PAT path)
94
+
95
+ ```bash
96
+ aws amplify create-app \
97
+ --name <consumer> \
98
+ --region $(state_platform_get amplify.default_region) \
99
+ --repository "https://github.com/sunj-labs/<consumer>" \
100
+ --oauth-token "$AWS_AMPLIFY_GITHUB_PAT" \
101
+ --platform "$(state_platform_get amplify.default_framework)"
102
+ ```
103
+
104
+ Captures the resulting `appId` for Phase 2.
105
+
106
+ If this returns `403` / `Resource not accessible`: the deploy-keys
107
+ policy is blocking CLI creation. Pivot to Phase 1b.
108
+
109
+ ## Phase 1b — Console-pivot fallback
110
+
111
+ When `provisioning.amplify_create_path: console` is set in platform.yml
112
+ (sunj-labs's current state), Phase 1a is SKIPPED and operator is
113
+ directed to the console:
114
+
115
+ ```
116
+ Console-pivot:
117
+ 1. Open https://console.aws.amazon.com/amplify/home?region=eu-north-1
118
+ 2. Click "Create new app" → GitHub
119
+ 3. Select repo "sunj-labs/<consumer>"
120
+ 4. Branch: main
121
+ 5. App name: <consumer>
122
+ 6. Click "Save and deploy"
123
+ 7. Copy the resulting App ID (format: d12345abcdef)
124
+ 8. Paste into operator-prompt below
125
+ ```
126
+
127
+ Agent waits for operator to paste App ID, then resumes Phase 2.
128
+
129
+ ## Phase 2 — Create branch + start build
130
+
131
+ ```bash
132
+ # In Amplify, set the production branch
133
+ aws amplify update-branch \
134
+ --app-id <app-id> \
135
+ --branch-name main \
136
+ --enable-auto-build
137
+
138
+ # Trigger initial build
139
+ aws amplify start-job \
140
+ --app-id <app-id> \
141
+ --branch-name main \
142
+ --job-type RELEASE
143
+ ```
144
+
145
+ ## Phase 3 — Write consumer substrate.config.md
146
+
147
+ Open a PR against the consumer repo with the Amplify + DNS config block:
148
+
149
+ ```yaml
150
+ hosting_platform: amplify
151
+ amplify_app_id: d12345abcdef
152
+ amplify_region: eu-north-1
153
+ amplify_branch: main
154
+ subdomain: <consumer>.apps.your-domain.com
155
+ dns_provider: cloudflare
156
+ dns_zone: your-domain.com
157
+ cloudflare_token_env: CLOUDFLARE_API_TOKEN
158
+ ```
159
+
160
+ Consumer-side PR title: `chore: substrate.config.md — provisioned by bassclef /provision-deploy-host`
161
+
162
+ Operator merges. /provision-deploy-host pauses until operator confirms
163
+ merge (idempotent — re-running detects merged PR and skips).
164
+
165
+ ## Phase 4 — Audit row
166
+
167
+ When `audit.enabled: true` (per bassclef-platform.yml; default true),
168
+ write an audit row to `state/audit/<utc>-<skill>-<short-hash>.json`
169
+ capturing:
170
+
171
+ - `consumer` (e.g., "your-org/your-app")
172
+ - `env_vars_consulted` (names only, never values)
173
+ - `api_calls` (method + endpoint + status)
174
+ - `arns_created` (Amplify app ID, etc.)
175
+ - `operator_dispatch_context` (session ID, branch, intent)
176
+
177
+ This row survives a CIO compliance review without retrofit (bassclef#462
178
+ WU-3.5 primitive).
179
+
180
+ ## Phase 5 — Surface next-step
181
+
182
+ ```
183
+ ✓ <consumer> provisioned on amplify (eu-north-1)
184
+ ✓ App ID: d12345abcdef
185
+ ✓ DNS pending: <consumer>.apps.your-domain.com
186
+
187
+ Next:
188
+ /launch-preview <consumer> — bind subdomain + smoke-test
189
+ cd ~/src/sunj-labs/<consumer> — switch to consumer repo
190
+ git pull — pull the substrate.config PR you just merged
191
+ ```
192
+
193
+ ## Five known failure modes (covered by tests)
194
+
195
+ | Failure mode | Phase | Detection | Remediation |
196
+ |--------------|-------|-----------|-------------|
197
+ | platform.yml missing | 0 | `state_platform_path` returns no file | "Create bassclef-platform.yml; see standards/bassclef-platform.md" |
198
+ | Required env var unset | 0 | `/secrets-bootstrap` exit 1 | "Rerun with --write or set in shell" |
199
+ | GHA scope insufficient | 0.5 | `gh api` 403 on installation read | "Run `gh auth refresh -s admin:org` and retry" |
200
+ | Deploy-keys policy blocks CLI | 1a | `aws amplify create-app` returns 403 | "platform.yml has amplify_create_path: console — switch to Phase 1b" |
201
+ | Consumer PR conflict | 3 | `gh pr create` fails | "substrate.config.md already provisioned; surface diff for operator" |
202
+
203
+ ## Idempotency
204
+
205
+ - Phase 0 always runs (cheap)
206
+ - Phase 1a-2: skip if app already exists (`aws amplify list-apps | jq` lookup)
207
+ - Phase 3: skip if substrate.config.md already provisioned
208
+ - Phase 4: always writes audit row (each invocation is auditable)
209
+ - Phase 5: always prints next-steps
210
+
211
+ ## Composes with
212
+
213
+ | Skill | How it composes |
214
+ |---|---|
215
+ | `/secrets-bootstrap` | Phase 0 prerequisite |
216
+ | `/launch-preview` | Phase 5 next-step |
217
+ | `/bind-subdomain` | Sister skill — `/launch-preview` chains it |
218
+ | `.claude/rules/pr-body-shape.md` | Phase 3 PR body MUST open with Flash + Tweet + `## Goal` per shape contract |
219
+
220
+ ## Test plan
221
+
222
+ The runner script ships as a STUB that exercises Phase 0 fully but
223
+ stubs Phases 1-5 (per bet out-of-scope guarantee — "first live use
224
+ is the next consumer onboarding, operator-supervised").
225
+
226
+ Tests cover:
227
+
228
+ - [x] Phase 0 — platform.yml missing → fail-fast with directive
229
+ - [x] Phase 0 — secrets-bootstrap green → proceed; red → fail-fast
230
+ - [x] Phase 0 — consumer repo missing → fail-fast
231
+ - [x] Phase 0 — all checks green → proceed message
232
+ - [x] Phase 1b console-pivot prompt format (when amplify_create_path: console)
233
+ - [x] Phase 4 — audit row written under state/audit/ with required fields
234
+ - [x] Phase 5 — next-step surface includes correct subdomain pattern
235
+
236
+ ## Override paths
237
+
238
+ - `SKIP_PROVISION_PREFLIGHT=1` — skip Phase 0 (rare; for testing on
239
+ pre-provisioned consumers)
240
+ - `--dry-run` — run Phase 0 + print Phase 1-5 plan; don't make any
241
+ external API calls. Default for V1.
242
+ - `--phase <N>` — start at a specific phase (resume after partial run)
243
+
244
+ ## Refs
245
+
246
+ - bassclef#457 — issue this skill closes (WU-3 of 2026-05-04 bet)
247
+ - bassclef#449 — sibling: hosting_platform schema (already shipped)
248
+ - bassclef#450 — sibling: deploy-host pre-flight (already shipped 2026-05-03b)
249
+ - bassclef#462 — sibling: bassclef-platform.yml schema (WU-1)
250
+ - bassclef#461 — sibling: /secrets-bootstrap (WU-2)
251
+ - standards/bassclef-platform.md
252
+ - standards/secrets-lifecycle.md
253
+ - standards/domain-and-dns.md
254
+
255
+ ## Output discipline
256
+
257
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -0,0 +1,273 @@
1
+ ---
2
+ tier: lite
3
+ name: quick-fix
4
+ description: "Compressed fix workflow for trivial bugs with stated entry criteria. Operator-in-loop. Runs /diagnose in skip-criteria mode. Then operator writes the fix. Full /verify still mandatory. Commits carry [quick-fix] footer for audit."
5
+ problem: "Trivial bugs get over-ceremonied by full /diagnose. Small edits shouldn't need the whole chain."
6
+ value: "Compressed fix workflow for trivial bugs. Operator-in-loop with stated entry criteria."
7
+ inputs: [A failing test or error log]
8
+ outputs: [Fix commit, Entry criteria confirmed, Verify pass]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ no_user_modes: true
12
+ ---
13
+
14
+ # /quick-fix — Compressed Fix Workflow
15
+
16
+ Full bassclef /diagnose ceremony (Repro + Is/Is Not + Resolution Chain +
17
+ Five Whys + Hypothesis + Significance) is the right discipline for
18
+ non-trivial bugs. For trivial bugs it exceeds the bug's stakes.
19
+
20
+ Without a compressed lane, operators either:
21
+
22
+ - Grind through the ceremony for a typo (expensive, demoralizing)
23
+ - Skip /diagnose silently (governance erodes; blocked-items pattern we've
24
+ observed repeatedly)
25
+
26
+ `/quick-fix` is the compressed lane. Stated entry criteria keep it from
27
+ becoming the default. `[quick-fix]` commit footer enables auditing the
28
+ ratio over time.
29
+
30
+ ## Entry criteria (ALL must hold)
31
+
32
+ Strict. If any criterion fails, use full /diagnose instead.
33
+
34
+ 1. **Localized**: defect lives in a single file (or two files for
35
+ rename/type propagation). Cross-cutting concerns disqualify.
36
+ 2. **Obvious cause**: you can name the root cause in one sentence
37
+ without reading logs. Example: "missing null check on user
38
+ preference loaded from session."
39
+ 3. **Obvious fix**: fix is ≤10 lines, no new interfaces, no new
40
+ abstractions, no schema changes.
41
+ 4. **Low blast radius**: not auth, not middleware, not schema, not
42
+ security, not tenant boundary. If any of those — full /diagnose
43
+ and/or /auto-fix with blast-radius floors.
44
+ 5. **Reproducible OR trivially verifiable**: either Step 0 repro is
45
+ explicitly skippable (typo / env var / off-by-one) or repro is
46
+ fast enough to include in the same turn as the fix.
47
+
48
+ If ALL five hold → /quick-fix is appropriate. If ANY fail → escalate
49
+ to full /diagnose or /auto-fix.
50
+
51
+ ## When to use
52
+
53
+ - Typo in a rule/standard/skill doc
54
+ - Missing env var with clear error message
55
+ - Off-by-one in a single function
56
+ - Missing null check on a field the error names
57
+ - Broken link in a markdown doc
58
+ - Wrong default value in a config with obvious correct value
59
+
60
+ ## When NOT to use
61
+
62
+ - Any bug the operator can't describe in one sentence
63
+ - Anything touching auth, middleware, schema, security, tenant paths
64
+ - Intermittent failures (repro work = full /diagnose territory)
65
+ - Bugs that span multiple files or require refactor
66
+ - "I think this might be the fix" — if you're not sure, not trivial
67
+
68
+ ## Usage
69
+
70
+ ```
71
+ /quick-fix [issue-ref] → with issue context
72
+ /quick-fix for "description" → freeform description
73
+ /quick-fix → agent extracts from recent conversation
74
+ ```
75
+
76
+ ## Procedure
77
+
78
+ ### Step 1: Entry-criteria self-check
79
+
80
+ Before anything else, state explicitly which criteria are met:
81
+
82
+ ```
83
+ ## Quick-fix entry check
84
+ - Localized? ✅ / ❌
85
+ - Obvious cause? ✅ / ❌
86
+ - Obvious fix (≤10 lines)? ✅ / ❌
87
+ - Low blast radius? ✅ / ❌
88
+ - Reproducible or trivially verifiable? ✅ / ❌
89
+
90
+ If any ❌ → escalate to /diagnose (full) or /auto-fix
91
+ If all ✅ → proceed
92
+ ```
93
+
94
+ If escalating, invoke the appropriate skill and stop this procedure.
95
+
96
+ ### Step 2: Compressed diagnosis
97
+
98
+ Run /diagnose in skip-mode:
99
+
100
+ - Step 0 Reproduce: explicitly skip with reason ("typo" / "missing env var"
101
+ / "off-by-one" / "single-site null check with clear error message") OR
102
+ state a one-line repro
103
+ - Steps 1-4: compress to a one-sentence hypothesis — "Cause: X. Fix: Y.
104
+ Verify: Z."
105
+
106
+ Output:
107
+
108
+ ```
109
+ ## Compressed diagnosis
110
+ - **Repro**: [one-line OR "skipped — [reason]"]
111
+ - **Cause**: [one sentence]
112
+ - **Fix**: [one sentence]
113
+ - **Verify**: [one sentence — what test/command confirms]
114
+ ```
115
+
116
+ ### Step 3: Operator writes the fix
117
+
118
+ **Not the agent.** /quick-fix is operator-in-loop deliberately. The agent
119
+ surfaces the diagnosis and the proposed fix shape. Operator writes the
120
+ actual code.
121
+
122
+ Why operator-in-loop: entry criteria are agent-assessed. If the agent
123
+ is wrong about "obvious + localized," the operator catches it at write
124
+ time (not commit time). The human review is the safety net for the
125
+ compressed ceremony.
126
+
127
+ Exception: doc / config / markdown typos — agent writes, operator
128
+ confirms. (Still a /quick-fix; the "code" is text.)
129
+
130
+ ### Step 4: Full /verify
131
+
132
+ Skipping /verify is never part of /quick-fix. The ceremony compresses
133
+ at diagnosis, not verification. Fix still goes through:
134
+
135
+ - Change-type-matched verification (per /verify skill)
136
+ - Production build (if code change)
137
+ - Test suite (if tested code path)
138
+ - Marker write (both /tmp + `state/markers/verify/`)
139
+
140
+ If /verify fails, /quick-fix escalates to /diagnose full lane.
141
+
142
+ ### Step 5: Commit with audit marker
143
+
144
+ Commit message MUST carry `[quick-fix]` footer:
145
+
146
+ ```
147
+ fix: missing null check on user.preferences.locale
148
+
149
+ User object from session can have undefined preferences; guard with
150
+ optional chaining before locale lookup.
151
+
152
+ [quick-fix] — trivial null check; entry criteria verified.
153
+
154
+ Closes #NNN
155
+ ```
156
+
157
+ The `[quick-fix]` marker enables grep-able audit:
158
+
159
+ ```bash
160
+ git log --all --grep='\[quick-fix\]' --oneline | wc -l
161
+ ```
162
+
163
+ If quick-fix ratio exceeds 30% of all `fix/` branches in a month, the
164
+ entry criteria are too loose — re-shape.
165
+
166
+ ## Audit discipline
167
+
168
+ Run monthly or per-iteration:
169
+
170
+ ```bash
171
+ # Total fix branches in the period
172
+ FIX_COUNT=$(git log --all --oneline --since='30 days ago' --grep='^fix:' | wc -l)
173
+
174
+ # Quick-fix subset
175
+ QF_COUNT=$(git log --all --oneline --since='30 days ago' --grep='\[quick-fix\]' | wc -l)
176
+
177
+ echo "Quick-fix ratio: $QF_COUNT / $FIX_COUNT"
178
+ ```
179
+
180
+ Target ratio: ≤30%. Most fixes should justify the full /diagnose
181
+ ceremony. /quick-fix is the exception lane.
182
+
183
+ If the ratio drifts high, review the entry criteria — probably too
184
+ loose. Tighten criteria OR surface a finding that fixes are
185
+ systematically trivial (suggesting some class of defect is
186
+ over-represented and should be addressed architecturally).
187
+
188
+ ## Output format
189
+
190
+ ```markdown
191
+ ## /quick-fix — [short description]
192
+
193
+ ### Sources read
194
+ - [issue ref or conversation context]
195
+ - [relevant file paths]
196
+
197
+ ### Entry-criteria check
198
+ - Localized? ✅
199
+ - Obvious cause? ✅
200
+ - Obvious fix (≤10 lines)? ✅
201
+ - Low blast radius? ✅
202
+ - Reproducible or trivially verifiable? ✅ ([criterion]: [reason])
203
+
204
+ ### Compressed diagnosis
205
+ - Repro: [one-line OR "skipped — reason"]
206
+ - Cause: [one sentence]
207
+ - Fix: [one sentence]
208
+ - Verify: [one sentence]
209
+
210
+ ### Fix
211
+ [Operator writes — or for doc/config/markdown, agent writes here]
212
+
213
+ ### Verify evidence
214
+ [/verify output summary]
215
+
216
+ ### Commit
217
+ fix: [imperative subject]
218
+
219
+ [body]
220
+
221
+ [quick-fix] — [criteria holds verbatim]
222
+
223
+ Closes #NNN
224
+ ```
225
+
226
+ ## Rules
227
+
228
+ - Entry criteria are STRICT. "Four out of five" is not a pass.
229
+ - Silence is not a skip. State explicitly which criteria hold.
230
+ - Agent does not write the fix (except for doc/config/markdown typos).
231
+ Operator writes; agent guides.
232
+ - Full /verify is mandatory. No "it's trivial, skip verify."
233
+ - `[quick-fix]` footer is mandatory. Audit depends on it.
234
+ - Blast-radius floors are hard floors. Auth/middleware/schema/security/
235
+ tenant paths force full /diagnose or /auto-fix.
236
+
237
+ ## Relationship to other skills
238
+
239
+ | Skill | Relationship |
240
+ |-------|-------------|
241
+ | `/diagnose` | Quick-fix compresses /diagnose to Step 0 (repro-or-skip) + 1-line summary; full diagnose runs when entry criteria fail |
242
+ | `/auto-fix` | Autonomous counterpart for non-trivial narrow bugs — agent writes; /quick-fix is operator-in-loop for trivial ones |
243
+ | `/verify` | Full verify runs every time, regardless of quick-fix compression |
244
+ | `/incident-report` | Post-merge — if a /quick-fix class of defect warrants stakeholder communication |
245
+
246
+ ## Common pitfalls
247
+
248
+ - **Criteria creep** — "it's basically localized" / "the fix is mostly
249
+ obvious" is not a pass. Strict criteria or full /diagnose.
250
+ - **Skipping /verify because "it's a typo"** — never. Typos have
251
+ /verify markers too.
252
+ - **Missing [quick-fix] footer** — audit invisible. Enforce in commit
253
+ discipline (could be a future hook).
254
+ - **Using for bugs that are just small rather than trivial** — small
255
+ fixes (5 lines) in auth middleware are NOT quick-fix; blast radius
256
+ disqualifies.
257
+
258
+ ## Why this skill exists
259
+
260
+ Observed repeatedly: operators grinding through /diagnose ceremony for
261
+ typos and missing null checks. When ceremony > bug stakes, operators
262
+ rationalize skipping /diagnose entirely — producing the exact governance
263
+ erosion the ceremony was meant to prevent.
264
+
265
+ A compressed lane with strict entry criteria + audit marker gives the
266
+ trivial case its own path without eroding the default. The audit
267
+ catches drift.
268
+
269
+ Closes bassclef #151. Part of fix-workflow family 2026-04-16d.
270
+
271
+ ## Output discipline
272
+
273
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.