mandrel 2.40.0 → 2.42.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/.agents/README.md +2 -2
- package/.agents/agents/story-worker.md +24 -14
- package/.agents/docs/agentrc-reference.json +7 -2
- package/.agents/docs/configuration.md +5 -2
- package/.agents/instructions.md +5 -6
- package/.agents/rules/api-conventions.md +43 -7
- package/.agents/rules/ci-remediation.md +3 -14
- package/.agents/rules/gherkin-standards.md +21 -6
- package/.agents/rules/git-conventions.md +6 -5
- package/.agents/rules/security-baseline.md +6 -7
- package/.agents/rules/testing-standards.md +75 -198
- package/.agents/schemas/agentrc.schema.json +17 -2
- package/.agents/schemas/validation-evidence.schema.json +3 -1
- package/.agents/scripts/acceptance-eval.js +68 -3
- package/.agents/scripts/coverage-capture.js +25 -8
- package/.agents/scripts/install-matrix-assert.js +2 -2
- package/.agents/scripts/lib/audit-to-stories/epic-grouping-directive.js +6 -0
- package/.agents/scripts/lib/baselines/crap-preview-incremental.js +7 -2
- package/.agents/scripts/lib/baselines/git-base.js +74 -38
- package/.agents/scripts/lib/close-validation/gates.js +153 -25
- package/.agents/scripts/lib/close-validation/process.js +30 -1
- package/.agents/scripts/lib/close-validation/runner.js +5 -0
- package/.agents/scripts/lib/config/gates/crap-incremental-coverage.schema.js +33 -12
- package/.agents/scripts/lib/config/quality.js +36 -21
- package/.agents/scripts/lib/config-settings-schema-delivery.js +6 -0
- package/.agents/scripts/lib/coverage-capture-incremental.js +12 -6
- package/.agents/scripts/lib/crap-baseline-join.js +11 -7
- package/.agents/scripts/lib/full-suite-lock.js +311 -0
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/orchestration/check-baselines/phases/evaluate.js +11 -104
- package/.agents/scripts/lib/orchestration/check-baselines/phases/refresh-ack.js +320 -0
- package/.agents/scripts/lib/orchestration/check-baselines/phases/report.js +8 -1
- package/.agents/scripts/lib/orchestration/dependency-candidates.js +139 -0
- package/.agents/scripts/lib/orchestration/epic-candidates.js +159 -0
- package/.agents/scripts/lib/orchestration/epic-checklist.js +103 -0
- package/.agents/scripts/lib/orchestration/epic-container.js +18 -2
- package/.agents/scripts/lib/orchestration/plan-context.js +97 -36
- package/.agents/scripts/lib/orchestration/plan-persist/cross-plan-links.js +80 -0
- package/.agents/scripts/lib/orchestration/plan-persist/epic-adoption.js +192 -0
- package/.agents/scripts/lib/orchestration/plan-persist/epic-ops.js +5 -1
- package/.agents/scripts/lib/orchestration/plan-persist/external-deps.js +164 -0
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +14 -2
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +26 -5
- package/.agents/scripts/lib/orchestration/single-story-close/failed-terminal.js +83 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +39 -7
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +70 -18
- package/.agents/scripts/lib/orchestration/ticket-validator.js +11 -1
- package/.agents/scripts/lib/orchestration/verify-credit.js +207 -0
- package/.agents/scripts/lib/single-story-sweep/sweep-lock.js +24 -0
- package/.agents/scripts/plan-persist.js +60 -1
- package/.agents/skills/core/browser-testing-with-devtools/SKILL.md +5 -10
- package/.agents/skills/core/browser-testing-with-devtools/reference.md +7 -46
- package/.agents/skills/core/code-review-and-quality/SKILL.md +0 -5
- package/.agents/skills/core/documentation-and-adrs/SKILL.md +0 -3
- package/.agents/skills/core/gates-and-baselines/SKILL.md +10 -137
- package/.agents/skills/core/gates-and-baselines/reference.md +103 -0
- package/.agents/skills/core/idea-refinement/SKILL.md +2 -18
- package/.agents/skills/core/security-and-hardening/SKILL.md +2 -4
- package/.agents/skills/core/security-and-hardening/reference.md +0 -70
- package/.agents/skills/skills.index.json +10 -70
- package/.agents/skills/stack/qa/gherkin-authoring/SKILL.md +4 -10
- package/.agents/skills/stack/qa/gherkin-authoring/reference.md +9 -113
- package/.agents/skills/stack/qa/playwright-bdd/SKILL.md +29 -154
- package/.agents/skills/stack/qa/qa-harness/SKILL.md +157 -98
- package/.agents/workflows/git-cleanup.md +3 -2
- package/.agents/workflows/git-deliver.md +3 -2
- package/.agents/workflows/helpers/acceptance-self-eval.md +12 -0
- package/.agents/workflows/helpers/deliver-digest.md +31 -10
- package/.agents/workflows/helpers/deliver-story-reference.md +50 -30
- package/.agents/workflows/helpers/deliver-story.md +23 -21
- package/.agents/workflows/helpers/plan-reference.md +82 -2
- package/.agents/workflows/mandrel-plan.md +45 -45
- package/.agents/workflows/qa-assist.md +20 -17
- package/.agents/workflows/qa-explore.md +30 -29
- package/.agents/workflows/qa-run.md +2 -1
- package/docs/CHANGELOG.md +32 -0
- package/package.json +1 -1
- package/.agents/rules/changelog-style.md +0 -180
- package/.agents/rules/shell-conventions.md +0 -61
- package/.agents/scripts/lib/qa/coverage-verdict.js +0 -214
- package/.agents/skills/core/api-and-interface-design/SKILL.md +0 -55
- package/.agents/skills/core/api-and-interface-design/reference.md +0 -76
- package/.agents/skills/core/debugging-and-error-recovery/SKILL.md +0 -45
- package/.agents/skills/core/debugging-and-error-recovery/reference.md +0 -56
- package/.agents/skills/core/git-workflow-and-versioning/SKILL.md +0 -54
- package/.agents/skills/core/idea-refinement/refinement-criteria.md +0 -155
- package/.agents/skills/core/idea-refinement/scripts/idea-refine.sh +0 -15
- package/.agents/skills/core/qa-coverage-mapping/SKILL.md +0 -105
- package/.agents/skills/stack/qa/qa-explore-driving/SKILL.md +0 -152
- package/.agents/skills/stack/qa/vitest/SKILL.md +0 -22
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
name: gates-and-baselines
|
|
3
3
|
description:
|
|
4
4
|
Governs quality gates and the unified-baseline snapshots. Use when authoring
|
|
5
|
-
a baseline refresh commit (CRAP, maintainability,
|
|
6
|
-
when setting up or modifying CI quality gates, or when
|
|
7
|
-
that asserts on pre-existing state without turning the
|
|
5
|
+
a baseline refresh commit (coverage, CRAP, maintainability, duplication,
|
|
6
|
+
dead-exports), when setting up or modifying CI quality gates, or when
|
|
7
|
+
introducing a new gate that asserts on pre-existing state without turning the
|
|
8
|
+
base branch red.
|
|
8
9
|
allowed_tools:
|
|
9
10
|
- Read
|
|
10
11
|
- Write
|
|
@@ -15,141 +16,13 @@ allowed_tools:
|
|
|
15
16
|
|
|
16
17
|
## Policy Capsule
|
|
17
18
|
|
|
18
|
-
- **No gate may be skipped.** Failing lint means fix lint
|
|
19
|
+
- **No gate may be skipped.** Failing lint means fix lint; a failing test means fix the code, not `.skip` or delete the test. Feed CI failure output back verbatim and reproduce locally before re-pushing.
|
|
19
20
|
- **Introducing a gate that asserts on pre-existing state** (doc-drift, lint-vocabulary, dependency-cycle, missing-coverage) MUST land green at merge: either advisory-first (report-only until the backlog is burned down) or with the populated baseline committed in the same change that turns the gate on. Never wire a gate into `requiredChecks` that lands red on latent findings nobody authored.
|
|
20
21
|
- **Refresh a baseline only when the change is deliberate** — a rename/move, an operator-approved complexity bump, a signed-off perf delta, an intentional API-surface change. Never refresh to paper over an unintentional regression; fix the regression instead.
|
|
21
|
-
- **Pick the refresh that matches why you are refreshing** — the
|
|
22
|
+
- **Pick the refresh that matches why you are refreshing** — the wrong scope silently no-ops. `npm run <kind>:update` is **diff-scoped**: it re-scores only files changed in `origin/main..HEAD` and preserves every other row verbatim; that is what you want after changing code. `npm run <kind>:reanchor` is the same script with `--full-scope` and re-scores every file in every target dir; that is what you want when the baseline is **stale** (a scorer-version bump, a coverage-shape change, accumulated drift), because a diff-scoped run would leave the stale rows exactly as they were.
|
|
23
|
+
- Kinds carrying both scopes: `coverage`, `crap`, `maintainability`, `duplication`. Dead-exports has no scope axis — knip scores the whole graph, so `npm run dead-exports:update` (both passes) is the only sanctioned way to write `baselines/dead-exports.json` / `baselines/dead-exports-production.json`; never hand-edit them. Run any refresh on the **Story branch**, never on `main`.
|
|
22
24
|
- Verify the refresh diff is scoped to the relevant `baselines/<kind>.json` (plus cosmetic `package-lock.json` churn only). If unrelated files appear, STOP — the refresh is contaminated. Stage baseline files **explicitly** (`git add baselines/<kind>.json`); never `git add -A` in a refresh commit.
|
|
23
|
-
- Commit-subject contract:
|
|
24
|
-
- Add the machine-readable trailer `baseline-refresh: true` (git-trailer `Key: value` style) and `Story: #<storyId>` to
|
|
25
|
+
- Commit-subject contract: the **Conventional-Commits** subject `chore(baselines): refresh <kind> snapshot for <reason>` — never an ad-hoc leading token like `baseline-refresh:` (commitlint and the planner validator reject it). The body is **mandatory** and non-empty: what changed, why the new floor is correct, and the Story that triggered it.
|
|
26
|
+
- Add the machine-readable trailer `baseline-refresh: true` (git-trailer `Key: value` style) and `Story: #<storyId>` to that body. Never pass `--no-verify`; the `commit-msg` hook (commitlint) MUST run and pass.
|
|
25
27
|
- After the refresh lands, re-run `node .agents/scripts/check-baselines.js` to confirm the gate passes against the new snapshot; if it still fails, a sibling kind drifted — refresh that kind too.
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
## The Quality Gate Pipeline
|
|
29
|
-
|
|
30
|
-
Automate quality gates so no change reaches production without passing tests,
|
|
31
|
-
lint, type checking, and build. **Shift left** — a bug caught in linting costs
|
|
32
|
-
minutes; the same bug caught in production costs hours — and prefer many small,
|
|
33
|
-
frequent releases over big-bang merges (a deploy of 3 changes is debuggable, one
|
|
34
|
-
of 30 is not).
|
|
35
|
-
|
|
36
|
-
```text
|
|
37
|
-
lint → typecheck → unit tests → build → integration → E2E (optional)
|
|
38
|
-
→ security audit → bundle-size
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
**No gate can be skipped.** If lint fails, fix lint. If a test fails, fix the
|
|
42
|
-
code. When CI fails, feed the specific error back into the agent loop with the
|
|
43
|
-
directive to verify locally before re-pushing.
|
|
44
|
-
|
|
45
|
-
### Introducing a gate on pre-existing state
|
|
46
|
-
|
|
47
|
-
A new gate that asserts on latent state (doc-drift, lint-vocabulary,
|
|
48
|
-
dependency-cycle, missing-test-coverage) lands red because of findings nobody
|
|
49
|
-
authored, and every downstream PR is blocked until someone hotfixes the
|
|
50
|
-
integration branch. Before wiring such a gate into `requiredChecks`, land it in
|
|
51
|
-
a shape that is green at merge — **advisory-first** (report-only until the
|
|
52
|
-
backlog is burned down) or by **committing the populated baseline in the same
|
|
53
|
-
change** that turns the gate on.
|
|
54
|
-
|
|
55
|
-
## Baseline Refresh
|
|
56
|
-
|
|
57
|
-
The close-validation chain enforces unified baseline snapshots
|
|
58
|
-
(`baselines/crap.json`, `baselines/maintainability.json`,
|
|
59
|
-
`baselines/dead-exports.json`, `baselines/lighthouse.json`). A refresh is **not**
|
|
60
|
-
a regression entry — it tells the ratchet that the new baseline key is
|
|
61
|
-
intentional, so the gate compares future runs against the refreshed snapshot
|
|
62
|
-
rather than the prior one.
|
|
63
|
-
|
|
64
|
-
**When to refresh:** a file rename/move detached an MI/CRAP key; a method rename
|
|
65
|
-
inside a file produced a phantom new + phantom deleted key (escomplex keys CRAP
|
|
66
|
-
rows on `<file>::<methodName>`); an operator-approved complexity bump or perf
|
|
67
|
-
delta needs to be enshrined as the new floor; a dead-export gate flagged a
|
|
68
|
-
signed-off API-surface change. If the underlying change is an **unintentional**
|
|
69
|
-
regression, do not refresh — remediate first.
|
|
70
|
-
|
|
71
|
-
### Commit-subject contract (authoritative)
|
|
72
|
-
|
|
73
|
-
```text
|
|
74
|
-
chore(baselines): refresh <kind> snapshot for <reason>
|
|
75
|
-
|
|
76
|
-
<non-empty body explaining the refresh — what changed, why the new
|
|
77
|
-
baseline is the correct floor, and any operator sign-off reference>
|
|
78
|
-
|
|
79
|
-
baseline-refresh: true
|
|
80
|
-
Story: #<storyId>
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The `commit-msg` hook (`commitlint`) rejects any subject whose leading token is
|
|
84
|
-
not one of `feat|fix|chore|refactor|perf|docs|style|test|build|ci|revert`, and
|
|
85
|
-
`--no-verify` is forbidden by
|
|
86
|
-
[`.agents/rules/git-conventions.md`](../../../rules/git-conventions.md), so the
|
|
87
|
-
subject MUST conform. `release-please` consumes the subject on `main`;
|
|
88
|
-
`chore(baselines):` keeps the refresh out of the user-facing changelog (correct —
|
|
89
|
-
it is internal hygiene) while staying machine-parseable. The
|
|
90
|
-
`baseline-refresh: true` **body trailer** is the canonical machine-readable
|
|
91
|
-
marker — subject-level leading tokens are not, and must not be, used for this
|
|
92
|
-
purpose. (Its only reader, `baseline-refresh-rate.js`, went with the
|
|
93
|
-
execution-analysis surface in Story #4545; the trailer convention stands on its
|
|
94
|
-
own as the parseable marker for any future reader.)
|
|
95
|
-
|
|
96
|
-
### Procedure
|
|
97
|
-
|
|
98
|
-
| Kind | After a code change (diff-scoped) | Stale baseline (full re-anchor) |
|
|
99
|
-
| --------------- | ---------------------------------- | ------------------------------------ |
|
|
100
|
-
| CRAP | `npm run crap:update` | `npm run crap:reanchor` |
|
|
101
|
-
| Maintainability | `npm run maintainability:update` | `npm run maintainability:reanchor` |
|
|
102
|
-
| Coverage | `npm run coverage:update` | `npm run coverage:reanchor` |
|
|
103
|
-
| Duplication | `npm run duplication:update` | `npm run duplication:reanchor` |
|
|
104
|
-
| Dead-exports | `npm run dead-exports:update` (regenerates both passes; never hand-edit the JSON) | same — no scope flag applies |
|
|
105
|
-
| Lighthouse | edit `baselines/lighthouse.json` | same — no scope flag applies |
|
|
106
|
-
|
|
107
|
-
1. **Run the matching command for your reason** — left column after a code
|
|
108
|
-
change, right column for a stale baseline — on the Story branch (HEAD must
|
|
109
|
-
already be the Story branch, not `main`).
|
|
110
|
-
2. **Verify the diff is scoped** to the relevant `baselines/<kind>.json` (and
|
|
111
|
-
possibly cosmetic `package-lock.json` churn). Unrelated files → STOP, the
|
|
112
|
-
refresh is contaminated. Judge contamination by **which files** changed, not
|
|
113
|
-
how many rows moved inside the baseline: a `:reanchor` legitimately rewrites
|
|
114
|
-
most of its own file, so say in the commit body that the breadth is a
|
|
115
|
-
re-anchor and not a mass regression.
|
|
116
|
-
3. **Author the commit.** Stage the baseline file(s) explicitly, then commit with
|
|
117
|
-
the Conventional-Commits subject + body trailer above:
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
git add baselines/<kind>.json
|
|
121
|
-
git commit -m "$(cat <<'EOF'
|
|
122
|
-
chore(baselines): refresh <kind> snapshot for <reason>
|
|
123
|
-
|
|
124
|
-
<body: what changed, why the new floor is correct, linking the Story.>
|
|
125
|
-
|
|
126
|
-
baseline-refresh: true
|
|
127
|
-
Story: #<storyId>
|
|
128
|
-
EOF
|
|
129
|
-
)"
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Do NOT pass `--no-verify`.
|
|
133
|
-
4. **Re-run the gate** — `node .agents/scripts/check-baselines.js`. If it still
|
|
134
|
-
fails, a sibling kind drifted; repeat from step 1 for that kind.
|
|
135
|
-
|
|
136
|
-
## Red Flags
|
|
137
|
-
|
|
138
|
-
- CI failures ignored or silenced; tests disabled in CI to make the pipeline pass.
|
|
139
|
-
- A new required gate merged red on pre-existing findings, blocking every
|
|
140
|
-
downstream PR.
|
|
141
|
-
- A legacy ad-hoc leading token (`baseline-refresh:`) as the commit subject type.
|
|
142
|
-
- An empty-body refresh — unreviewable, hides the operator decision.
|
|
143
|
-
- A refresh commit whose diff touches unrelated files (contaminated refresh).
|
|
144
|
-
- Refreshing to paper over an unintentional regression.
|
|
145
|
-
- Secrets stored in code or CI config instead of a secrets manager.
|
|
146
|
-
|
|
147
|
-
## Verification
|
|
148
|
-
|
|
149
|
-
- [ ] Every quality gate is present (lint, types, tests, build, audit) and
|
|
150
|
-
failures block merge (branch protection configured).
|
|
151
|
-
- [ ] Any newly introduced gate is green at merge (advisory-first or
|
|
152
|
-
baseline-in-same-change).
|
|
153
|
-
- [ ] A baseline refresh uses the Conventional-Commits subject + non-empty body
|
|
154
|
-
+ `baseline-refresh: true` trailer, staged explicitly, no `--no-verify`.
|
|
155
|
-
- [ ] `check-baselines.js` passes against the refreshed snapshot.
|
|
28
|
+
- Open a [`reference.md`](reference.md) section only when the task engages it: the baseline roster, the per-kind refresh table, and the step-by-step procedure live there.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Gates and Baselines — Reference (on-demand)
|
|
2
|
+
|
|
3
|
+
**Read this when** a refresh is actually in front of you and the Policy Capsule
|
|
4
|
+
in [`SKILL.md`](SKILL.md) does not settle it. The capsule is the contract; this
|
|
5
|
+
file is the roster, the per-kind command table, and the procedure.
|
|
6
|
+
|
|
7
|
+
## The baseline roster
|
|
8
|
+
|
|
9
|
+
`baselines/` holds one snapshot per gate kind. What is present here is what
|
|
10
|
+
`check-baselines.js` and its siblings enforce:
|
|
11
|
+
|
|
12
|
+
| Baseline | Enforced by |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| `coverage.json` | `npm run coverage:check` |
|
|
15
|
+
| `crap.json` | `npm run crap:check` |
|
|
16
|
+
| `maintainability.json` | `npm run maintainability:check` |
|
|
17
|
+
| `duplication.json` | `npm run duplication:check` |
|
|
18
|
+
| `dead-exports.json`, `dead-exports-production.json` | `check-dead-exports.js` |
|
|
19
|
+
| `arch-cycles.json` | `npm run check:arch` |
|
|
20
|
+
| `cyclomatic.json` | `npm run check:cyclomatic` |
|
|
21
|
+
| `context-budget.json` | `npm run check:context-budget` |
|
|
22
|
+
| `workflow-citations.json` | `npm run check:workflow-citations` |
|
|
23
|
+
| `agents-loc.csv` | `npm run baseline:agents-loc` |
|
|
24
|
+
|
|
25
|
+
A refresh is **not** a regression entry — it tells the ratchet that the new
|
|
26
|
+
baseline key is intentional, so the gate compares future runs against the
|
|
27
|
+
refreshed snapshot rather than the prior one.
|
|
28
|
+
|
|
29
|
+
**When to refresh:** a file rename/move detached an MI/CRAP key; a method
|
|
30
|
+
rename inside a file produced a phantom new + phantom deleted key (escomplex
|
|
31
|
+
keys CRAP rows on `<file>::<methodName>`); an operator-approved complexity bump
|
|
32
|
+
or perf delta needs to be enshrined as the new floor; a dead-export gate
|
|
33
|
+
flagged a signed-off API-surface change. If the underlying change is an
|
|
34
|
+
**unintentional** regression, do not refresh — remediate first.
|
|
35
|
+
|
|
36
|
+
## Per-kind refresh commands
|
|
37
|
+
|
|
38
|
+
| Kind | After a code change (diff-scoped) | Stale baseline (full re-anchor) |
|
|
39
|
+
| --------------- | ---------------------------------- | ------------------------------------ |
|
|
40
|
+
| CRAP | `npm run crap:update` | `npm run crap:reanchor` |
|
|
41
|
+
| Maintainability | `npm run maintainability:update` | `npm run maintainability:reanchor` |
|
|
42
|
+
| Coverage | `npm run coverage:update` | `npm run coverage:reanchor` |
|
|
43
|
+
| Duplication | `npm run duplication:update` | `npm run duplication:reanchor` |
|
|
44
|
+
| Dead-exports | `npm run dead-exports:update` (regenerates both passes; never hand-edit the JSON) | same — no scope flag applies |
|
|
45
|
+
| Cyclomatic | `npm run cyclomatic:update` | same — no scope flag applies |
|
|
46
|
+
| Context budget | `node .agents/scripts/check-context-budget.js --update` | same — no scope flag applies |
|
|
47
|
+
|
|
48
|
+
## Procedure
|
|
49
|
+
|
|
50
|
+
1. **Run the matching command for your reason** — left column after a code
|
|
51
|
+
change, right column for a stale baseline — on the Story branch (HEAD must
|
|
52
|
+
already be the Story branch, not `main`).
|
|
53
|
+
2. **Verify the diff is scoped** to the relevant `baselines/<kind>.json` (and
|
|
54
|
+
possibly cosmetic `package-lock.json` churn). Unrelated files → STOP, the
|
|
55
|
+
refresh is contaminated. Judge contamination by **which files** changed, not
|
|
56
|
+
how many rows moved inside the baseline: a `:reanchor` legitimately rewrites
|
|
57
|
+
most of its own file, so say in the commit body that the breadth is a
|
|
58
|
+
re-anchor and not a mass regression.
|
|
59
|
+
3. **Author the commit.** Stage the baseline file(s) explicitly, then commit
|
|
60
|
+
with the Conventional-Commits subject the capsule pins, plus the body and
|
|
61
|
+
trailers:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git add baselines/<kind>.json
|
|
65
|
+
git commit -m "$(cat <<'EOF'
|
|
66
|
+
<the refresh subject the Policy Capsule pins>
|
|
67
|
+
|
|
68
|
+
<body: what changed, why the new floor is correct, linking the Story.>
|
|
69
|
+
|
|
70
|
+
baseline-refresh: true
|
|
71
|
+
Story: #<storyId>
|
|
72
|
+
EOF
|
|
73
|
+
)"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Do NOT pass `--no-verify`.
|
|
77
|
+
4. **Re-run the gate** — `node .agents/scripts/check-baselines.js`. If it still
|
|
78
|
+
fails, a sibling kind drifted; repeat from step 1 for that kind.
|
|
79
|
+
|
|
80
|
+
The `baseline-refresh: true` body trailer — not a subject-level token — is the
|
|
81
|
+
canonical machine-readable marker for a refresh commit; the decision and its
|
|
82
|
+
history are recorded in
|
|
83
|
+
[`docs/decisions.md` ADR 20260906-5160b](../../../../docs/decisions.md).
|
|
84
|
+
|
|
85
|
+
## Red Flags
|
|
86
|
+
|
|
87
|
+
- CI failures ignored or silenced; tests disabled in CI to make the pipeline
|
|
88
|
+
pass.
|
|
89
|
+
- A new required gate merged red on pre-existing findings, blocking every
|
|
90
|
+
downstream PR.
|
|
91
|
+
- A legacy ad-hoc leading token (`baseline-refresh:`) as the commit subject
|
|
92
|
+
type.
|
|
93
|
+
- An empty-body refresh — unreviewable, hides the operator decision.
|
|
94
|
+
- A refresh commit whose diff touches unrelated files (contaminated refresh).
|
|
95
|
+
- Refreshing to paper over an unintentional regression.
|
|
96
|
+
|
|
97
|
+
## Verification
|
|
98
|
+
|
|
99
|
+
- [ ] Any newly introduced gate is green at merge (advisory-first or
|
|
100
|
+
baseline-in-same-change).
|
|
101
|
+
- [ ] A baseline refresh uses the pinned subject + non-empty body +
|
|
102
|
+
`baseline-refresh: true` trailer, staged explicitly, no `--no-verify`.
|
|
103
|
+
- [ ] `check-baselines.js` passes against the refreshed snapshot.
|
|
@@ -34,15 +34,6 @@ separate Epic Clarity Gate path in v2 — N=1 Story authoring with a folded
|
|
|
34
34
|
You are an ideation partner. Your job is to help refine raw ideas into sharp,
|
|
35
35
|
actionable concepts worth building.
|
|
36
36
|
|
|
37
|
-
### Philosophy
|
|
38
|
-
|
|
39
|
-
- Simplicity is the ultimate sophistication. Push toward the simplest version
|
|
40
|
-
that still solves the real problem.
|
|
41
|
-
- Start with the user experience, work backwards to technology.
|
|
42
|
-
- Say no to 1,000 things. Focus beats breadth.
|
|
43
|
-
- Challenge every assumption. "How it's usually done" is not a reason.
|
|
44
|
-
- Show people the future — don't just give them better horses.
|
|
45
|
-
|
|
46
37
|
### Process
|
|
47
38
|
|
|
48
39
|
When the user invokes this skill with an idea (`$ARGUMENTS`), guide them through
|
|
@@ -93,9 +84,8 @@ before anything lands in the Phase 3 one-pager.
|
|
|
93
84
|
vitamin), feasibility branches (cost, hardest part, build vs. buy,
|
|
94
85
|
sequencing), differentiation branches (why switch), and hidden assumptions
|
|
95
86
|
(what you're betting is true, what could kill this, what you're ignoring and
|
|
96
|
-
why that's okay for now).
|
|
97
|
-
|
|
98
|
-
enumeration, take the off-ramp.
|
|
87
|
+
why that's okay for now). If the list is empty after enumeration, take the
|
|
88
|
+
off-ramp.
|
|
99
89
|
|
|
100
90
|
3. **Interrogate sequentially.** For each branch, in priority order
|
|
101
91
|
(highest-leverage / most blocking first):
|
|
@@ -177,9 +167,3 @@ saying no to good ideas. Make the trade-offs explicit.
|
|
|
177
167
|
|
|
178
168
|
Ask the user if they'd like to save this to `docs/ideas/[idea-name].md` (or a
|
|
179
169
|
location of their choosing). Only save if they confirm.
|
|
180
|
-
|
|
181
|
-
### Tone
|
|
182
|
-
|
|
183
|
-
Direct, thoughtful, slightly provocative. You're a sharp thinking partner, not a
|
|
184
|
-
facilitator reading from a script. Channel the energy of "that's interesting,
|
|
185
|
-
but what if…" — always pushing one step further without being exhausting.
|
|
@@ -4,8 +4,8 @@ description:
|
|
|
4
4
|
Hardens code against vulnerabilities. Use when handling user input,
|
|
5
5
|
authentication, data storage, or external integrations. The non-negotiable
|
|
6
6
|
security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows
|
|
7
|
-
how to apply them with
|
|
8
|
-
|
|
7
|
+
how to apply them, with the project's surfacing and validation-response
|
|
8
|
+
process.
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Security and Hardening
|
|
@@ -35,5 +35,3 @@ task engages it.
|
|
|
35
35
|
|
|
36
36
|
- [Security Surfacing, Not Runtime Pause](reference.md#security-surfacing-not-runtime-pause)
|
|
37
37
|
- [Validation-Error Responses](reference.md#validation-error-responses)
|
|
38
|
-
- [Triaging npm audit Results](reference.md#triaging-npm-audit-results)
|
|
39
|
-
- [Security Review Checklist](reference.md#security-review-checklist)
|
|
@@ -45,73 +45,3 @@ and [§ Response Envelope](../../../rules/api-conventions.md#response-envelope).
|
|
|
45
45
|
Do not hand-roll a divergent status (e.g. 422) or envelope shape in
|
|
46
46
|
security-relevant handlers — cite the rule and reuse its shape, keeping the
|
|
47
47
|
security skill and the api skill in agreement.
|
|
48
|
-
|
|
49
|
-
## Triaging npm audit Results
|
|
50
|
-
|
|
51
|
-
The MUST is in [security-baseline § Dependency Hygiene](../../../rules/security-baseline.md#dependency-hygiene).
|
|
52
|
-
This decision tree shows how to prioritize:
|
|
53
|
-
|
|
54
|
-
```text
|
|
55
|
-
npm audit reports a vulnerability
|
|
56
|
-
├── Severity: critical or high
|
|
57
|
-
│ ├── Is the vulnerable code reachable in your app?
|
|
58
|
-
│ │ ├── YES --> Fix immediately (update, patch, or replace the dependency)
|
|
59
|
-
│ │ └── NO (dev-only dep, unused code path) --> Fix soon, but not a blocker
|
|
60
|
-
│ └── Is a fix available?
|
|
61
|
-
│ ├── YES --> Update to the patched version
|
|
62
|
-
│ └── NO --> Check for workarounds, consider replacing the dependency, or add to allowlist with a review date
|
|
63
|
-
├── Severity: moderate
|
|
64
|
-
│ ├── Reachable in production? --> Fix in the next release cycle
|
|
65
|
-
│ └── Dev-only? --> Fix when convenient, track in backlog
|
|
66
|
-
└── Severity: low
|
|
67
|
-
└── Track and fix during regular dependency updates
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Key questions:**
|
|
71
|
-
|
|
72
|
-
- Is the vulnerable function actually called in your code path?
|
|
73
|
-
- Is the dependency a runtime dependency or dev-only?
|
|
74
|
-
- Is the vulnerability exploitable given your deployment context (e.g., a
|
|
75
|
-
server-side vulnerability in a client-only app)?
|
|
76
|
-
|
|
77
|
-
When you defer a fix, document the reason and set a review date.
|
|
78
|
-
|
|
79
|
-
## Security Review Checklist
|
|
80
|
-
|
|
81
|
-
Use this when reviewing your own change before requesting human review. Each
|
|
82
|
-
item maps to a section in
|
|
83
|
-
[`security-baseline.md`](../../../rules/security-baseline.md).
|
|
84
|
-
|
|
85
|
-
```markdown
|
|
86
|
-
### Authentication
|
|
87
|
-
|
|
88
|
-
- [ ] Passwords hashed with bcrypt/scrypt/argon2 (salt rounds ≥ 12)
|
|
89
|
-
- [ ] Session tokens are httpOnly, secure, sameSite
|
|
90
|
-
- [ ] Login has rate limiting
|
|
91
|
-
- [ ] Password reset tokens expire
|
|
92
|
-
|
|
93
|
-
### Authorization
|
|
94
|
-
|
|
95
|
-
- [ ] Every endpoint checks user permissions
|
|
96
|
-
- [ ] Users can only access their own resources
|
|
97
|
-
- [ ] Admin actions require admin role verification
|
|
98
|
-
|
|
99
|
-
### Input
|
|
100
|
-
|
|
101
|
-
- [ ] All user input validated at the boundary
|
|
102
|
-
- [ ] SQL queries are parameterized
|
|
103
|
-
- [ ] HTML output is encoded/escaped
|
|
104
|
-
|
|
105
|
-
### Data
|
|
106
|
-
|
|
107
|
-
- [ ] No secrets in code or version control
|
|
108
|
-
- [ ] Sensitive fields excluded from API responses
|
|
109
|
-
- [ ] PII encrypted at rest (if applicable)
|
|
110
|
-
|
|
111
|
-
### Infrastructure
|
|
112
|
-
|
|
113
|
-
- [ ] Security headers configured (CSP, HSTS, etc.)
|
|
114
|
-
- [ ] CORS restricted to known origins
|
|
115
|
-
- [ ] Dependencies audited for vulnerabilities
|
|
116
|
-
- [ ] Error messages don't expose internals
|
|
117
|
-
```
|
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-
|
|
2
|
+
"generatedAt": "2026-09-06T12:59:23.069Z",
|
|
3
3
|
"generator": "generate-skills-index.js@1",
|
|
4
4
|
"skills": [
|
|
5
|
-
{
|
|
6
|
-
"name": "api-and-interface-design",
|
|
7
|
-
"tier": "core",
|
|
8
|
-
"category": "core",
|
|
9
|
-
"path": ".agents/skills/core/api-and-interface-design/SKILL.md",
|
|
10
|
-
"description": "Designs stable, well-documented APIs and module interfaces. Use when creating REST/GraphQL endpoints, defining contracts between modules, or changing public interfaces. The wire-format SSOT — response envelope, HTTP status codes, validation taxonomy, payload naming — lives in `.agents/rules/api-conventions.md`; this skill shows authors how to apply it.",
|
|
11
|
-
"policyCapsuleBullets": 9,
|
|
12
|
-
"allowedTools": null,
|
|
13
|
-
"vendor": null
|
|
14
|
-
},
|
|
15
5
|
{
|
|
16
6
|
"name": "browser-testing-with-devtools",
|
|
17
7
|
"tier": "core",
|
|
18
8
|
"category": "core",
|
|
19
9
|
"path": ".agents/skills/core/browser-testing-with-devtools/SKILL.md",
|
|
20
10
|
"description": "Tests in real browsers. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data via Chrome DevTools MCP.",
|
|
21
|
-
"policyCapsuleBullets":
|
|
11
|
+
"policyCapsuleBullets": 8,
|
|
22
12
|
"allowedTools": null,
|
|
23
13
|
"vendor": null
|
|
24
14
|
},
|
|
@@ -28,17 +18,7 @@
|
|
|
28
18
|
"category": "core",
|
|
29
19
|
"path": ".agents/skills/core/code-review-and-quality/SKILL.md",
|
|
30
20
|
"description": "Conducts multi-axis code review and runs the disciplined post-green refactor pass. Use before merging any change, when reviewing code written by yourself, another agent, or a human, or when the opt-in `delivery.refactorStage` checkpoint asks for a behaviour-preserving CRAP/duplication pass after the suite is green.",
|
|
31
|
-
"policyCapsuleBullets":
|
|
32
|
-
"allowedTools": null,
|
|
33
|
-
"vendor": null
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "debugging-and-error-recovery",
|
|
37
|
-
"tier": "core",
|
|
38
|
-
"category": "core",
|
|
39
|
-
"path": ".agents/skills/core/debugging-and-error-recovery/SKILL.md",
|
|
40
|
-
"description": "Guides systematic root-cause debugging. Use when tests fail, builds break, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need a systematic approach to finding and fixing the root cause rather than guessing.",
|
|
41
|
-
"policyCapsuleBullets": 9,
|
|
21
|
+
"policyCapsuleBullets": 7,
|
|
42
22
|
"allowedTools": null,
|
|
43
23
|
"vendor": null
|
|
44
24
|
},
|
|
@@ -48,7 +28,7 @@
|
|
|
48
28
|
"category": "core",
|
|
49
29
|
"path": ".agents/skills/core/documentation-and-adrs/SKILL.md",
|
|
50
30
|
"description": "Records decisions and documentation. Use when making architectural decisions, changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.",
|
|
51
|
-
"policyCapsuleBullets":
|
|
31
|
+
"policyCapsuleBullets": 6,
|
|
52
32
|
"allowedTools": null,
|
|
53
33
|
"vendor": null
|
|
54
34
|
},
|
|
@@ -57,21 +37,11 @@
|
|
|
57
37
|
"tier": "core",
|
|
58
38
|
"category": "core",
|
|
59
39
|
"path": ".agents/skills/core/gates-and-baselines/SKILL.md",
|
|
60
|
-
"description": "Governs quality gates and the unified-baseline snapshots. Use when authoring a baseline refresh commit (CRAP, maintainability, dead-exports
|
|
61
|
-
"policyCapsuleBullets":
|
|
40
|
+
"description": "Governs quality gates and the unified-baseline snapshots. Use when authoring a baseline refresh commit (coverage, CRAP, maintainability, duplication, dead-exports), when setting up or modifying CI quality gates, or when introducing a new gate that asserts on pre-existing state without turning the base branch red.",
|
|
41
|
+
"policyCapsuleBullets": 10,
|
|
62
42
|
"allowedTools": ["Read", "Write", "Bash"],
|
|
63
43
|
"vendor": null
|
|
64
44
|
},
|
|
65
|
-
{
|
|
66
|
-
"name": "git-workflow-and-versioning",
|
|
67
|
-
"tier": "core",
|
|
68
|
-
"category": "core",
|
|
69
|
-
"path": ".agents/skills/core/git-workflow-and-versioning/SKILL.md",
|
|
70
|
-
"description": "Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, or when you need to organize work across multiple parallel streams.",
|
|
71
|
-
"policyCapsuleBullets": 6,
|
|
72
|
-
"allowedTools": null,
|
|
73
|
-
"vendor": null
|
|
74
|
-
},
|
|
75
45
|
{
|
|
76
46
|
"name": "idea-refinement",
|
|
77
47
|
"tier": "core",
|
|
@@ -82,16 +52,6 @@
|
|
|
82
52
|
"allowedTools": null,
|
|
83
53
|
"vendor": null
|
|
84
54
|
},
|
|
85
|
-
{
|
|
86
|
-
"name": "qa-coverage-mapping",
|
|
87
|
-
"tier": "core",
|
|
88
|
-
"category": "core",
|
|
89
|
-
"path": ".agents/skills/core/qa-coverage-mapping/SKILL.md",
|
|
90
|
-
"description": "Map a quality finding to a per-tier coverage verdict (unit / contract / acceptance) aligned to `.agents/rules/testing-standards.md`. Use when a finding points at a symbol or surface and you need to know which test tiers already cover it and which are missing, so remediation lands the right tier. Delegates the verdict to the deterministic `lib/qa/coverage-verdict.js#coverageVerdict` helper.",
|
|
91
|
-
"policyCapsuleBullets": 7,
|
|
92
|
-
"allowedTools": ["Read", "Bash"],
|
|
93
|
-
"vendor": null
|
|
94
|
-
},
|
|
95
55
|
{
|
|
96
56
|
"name": "scope-triage",
|
|
97
57
|
"tier": "core",
|
|
@@ -107,7 +67,7 @@
|
|
|
107
67
|
"tier": "core",
|
|
108
68
|
"category": "core",
|
|
109
69
|
"path": ".agents/skills/core/security-and-hardening/SKILL.md",
|
|
110
|
-
"description": "Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. The non-negotiable security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows how to apply them with
|
|
70
|
+
"description": "Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. The non-negotiable security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows how to apply them, with the project's surfacing and validation-response process.",
|
|
111
71
|
"policyCapsuleBullets": 6,
|
|
112
72
|
"allowedTools": null,
|
|
113
73
|
"vendor": null
|
|
@@ -128,7 +88,7 @@
|
|
|
128
88
|
"category": "qa",
|
|
129
89
|
"path": ".agents/skills/stack/qa/playwright-bdd/SKILL.md",
|
|
130
90
|
"description": "Wires Gherkin `.feature` files to Playwright via the `playwright-bdd` library. Use when running BDD scenarios on a Playwright runtime — pairs with the `gherkin-authoring` skill (scenario prose) and the `playwright` skill (browser conventions). Drives execution by tag expression with trace-first debugging and Playwright-native sharding.",
|
|
131
|
-
"policyCapsuleBullets":
|
|
91
|
+
"policyCapsuleBullets": 9,
|
|
132
92
|
"allowedTools": null,
|
|
133
93
|
"vendor": "playwright"
|
|
134
94
|
},
|
|
@@ -142,35 +102,15 @@
|
|
|
142
102
|
"allowedTools": null,
|
|
143
103
|
"vendor": "playwright"
|
|
144
104
|
},
|
|
145
|
-
{
|
|
146
|
-
"name": "qa-explore-driving",
|
|
147
|
-
"tier": "stack",
|
|
148
|
-
"category": "qa",
|
|
149
|
-
"path": ".agents/skills/stack/qa/qa-explore-driving/SKILL.md",
|
|
150
|
-
"description": "Conventions for agent-driven exploratory QA driving — how the agent itself drives a surface during `/qa-explore` (agent-led), as opposed to the human-led `/qa-assist`. Use when the agent explores a running app via the browser MCP (navigation-first, the default) — including authenticated deployed surfaces reached through the resolved environment's sign-in seam — or walks a static surface (the documented interim where no seam resolves), under a strictly read-only capture invariant. The exploration procedure lives in `.agents/workflows/qa-explore.md`; this skill is the driving-conventions reference it leans on.",
|
|
151
|
-
"policyCapsuleBullets": 9,
|
|
152
|
-
"allowedTools": null,
|
|
153
|
-
"vendor": null
|
|
154
|
-
},
|
|
155
105
|
{
|
|
156
106
|
"name": "qa-harness",
|
|
157
107
|
"tier": "stack",
|
|
158
108
|
"category": "qa",
|
|
159
109
|
"path": ".agents/skills/stack/qa/qa-harness/SKILL.md",
|
|
160
|
-
"description": "Conventions for
|
|
161
|
-
"policyCapsuleBullets":
|
|
110
|
+
"description": "Conventions for agent-driven QA driving — the one driving-conventions reference behind both `/qa-run` (the known-scenario sweep through a real browser) and `/qa-explore` (agent-led exploratory driving). Use when instrumenting a live surface — covers navigation-first execution, per-surface console and network capture, design-token visual checks, the `F#` finding shape, per-environment resolution, and static driving as the documented interim. The run procedures live in `.agents/workflows/qa-run.md` and `.agents/workflows/qa-explore.md`; this skill is the conventions reference they lean on.",
|
|
111
|
+
"policyCapsuleBullets": 11,
|
|
162
112
|
"allowedTools": null,
|
|
163
113
|
"vendor": null
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"name": "vitest",
|
|
167
|
-
"tier": "stack",
|
|
168
|
-
"category": "qa",
|
|
169
|
-
"path": ".agents/skills/stack/qa/vitest/SKILL.md",
|
|
170
|
-
"description": "Writes fast, isolated unit and integration tests with Vitest. Use when each test must run on file-save without shared state — `vi.mock()` for external deps, `vi.spyOn()` for call monitoring, AAA structure, and edge-case coverage for null/undefined/boundary inputs.",
|
|
171
|
-
"policyCapsuleBullets": 8,
|
|
172
|
-
"allowedTools": null,
|
|
173
|
-
"vendor": "vitest"
|
|
174
114
|
}
|
|
175
115
|
]
|
|
176
116
|
}
|
|
@@ -17,7 +17,7 @@ description:
|
|
|
17
17
|
- Never assert on HTTP status codes, SQL state, DOM selectors, URLs, or JSON payloads inside `.feature` prose — push those to contract tests.
|
|
18
18
|
- Tag every Scenario or Outline with exactly one canonical `@domain-*` tag and the appropriate risk/platform tags from the gherkin-standards taxonomy.
|
|
19
19
|
- Use `Background` only when every scenario in the file genuinely shares the precondition with no per-scenario variation.
|
|
20
|
-
-
|
|
20
|
+
- Complete the step-reuse sequence in [`gherkin-standards.md` § Step Reuse](../../../../rules/gherkin-standards.md#step-reuse--grep-before-you-write) before authoring any scenario text; that rule is the only home for it.
|
|
21
21
|
- Author one scenario per PRD acceptance criterion; for bounded matrices, use a Scenario Outline with ≤12 Examples rows.
|
|
22
22
|
- Use third-person present-tense, role-qualified actors (`the billing-admin`), never first person.
|
|
23
23
|
|
|
@@ -29,16 +29,10 @@ the rule for the **what**.
|
|
|
29
29
|
|
|
30
30
|
## Long-form reference — read on demand
|
|
31
31
|
|
|
32
|
-
The
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
reuse/deprecation workflow, and the pre-PR authoring checklist — lives in the
|
|
36
|
-
on-demand sibling [`reference.md`](reference.md). Open a section only when the
|
|
37
|
-
task engages it.
|
|
32
|
+
The step-definition library layout and the pre-PR authoring checklist live in
|
|
33
|
+
the on-demand sibling [`reference.md`](reference.md). Open a section only when
|
|
34
|
+
the task engages it.
|
|
38
35
|
|
|
39
|
-
- [Canonical Given / When / Then Phrasing](reference.md#canonical-given--when--then-phrasing)
|
|
40
|
-
- [Translating PRD Acceptance Criteria to Scenarios](reference.md#translating-prd-acceptance-criteria-to-scenarios)
|
|
41
|
-
- [Background vs. Given, Outline vs. Multi-Scenario](reference.md#background-vs-given-outline-vs-multi-scenario)
|
|
42
36
|
- [Step-Definition Library Structure](reference.md#step-definition-library-structure)
|
|
43
37
|
- [Authoring Checklist](reference.md#authoring-checklist)
|
|
44
38
|
|