mandrel 2.58.0 → 2.60.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 +17 -12
- package/.agents/agents/acceptance-critic.md +24 -43
- package/.agents/agents/story-worker.md +18 -19
- package/.agents/docs/SDLC.md +12 -13
- package/.agents/docs/agentrc-reference.json +1 -2
- package/.agents/docs/configuration.md +29 -46
- package/.agents/docs/quality-gates.md +9 -5
- package/.agents/docs/workflows.md +1 -1
- package/.agents/instructions.md +5 -7
- package/.agents/rules/ci-remediation.md +41 -8
- package/.agents/rules/known-tooling-behavior.md +65 -15
- package/.agents/runtime-deps.json +7 -2
- package/.agents/schemas/acceptance-eval-verdict.schema.json +1 -1
- package/.agents/schemas/agentrc.schema.json +6 -11
- package/.agents/schemas/crap-baseline.schema.json +1 -1
- package/.agents/schemas/crap-report.schema.json +1 -1
- package/.agents/schemas/story-deliver-terminal.schema.json +3 -3
- package/.agents/scripts/README.md +11 -1
- package/.agents/scripts/acceptance-eval.js +25 -27
- package/.agents/scripts/ceremony-derive.js +15 -10
- package/.agents/scripts/check-context-budget.js +148 -228
- package/.agents/scripts/check-schema-references.js +5 -3
- package/.agents/scripts/check-workflow-citations.js +33 -147
- package/.agents/scripts/coverage-capture.js +7 -4
- package/.agents/scripts/deliver-light.js +41 -100
- package/.agents/scripts/deliver-run.js +631 -0
- package/.agents/scripts/file-ci-gap.js +59 -11
- package/.agents/scripts/install-matrix-assert.js +48 -3
- package/.agents/scripts/lib/audit-to-stories/seed-from-findings.js +51 -33
- package/.agents/scripts/lib/baselines/crap-preview-incremental.js +6 -2
- package/.agents/scripts/lib/baselines/kinds/_crap-read.js +0 -8
- package/.agents/scripts/lib/baselines/kinds/crap.js +35 -18
- package/.agents/scripts/lib/changed-files.js +30 -0
- package/.agents/scripts/lib/config/delivery-routing.js +5 -4
- package/.agents/scripts/lib/config/explain.js +1 -3
- package/.agents/scripts/lib/config/gates/crap-incremental-coverage.schema.js +1 -1
- package/.agents/scripts/lib/config-resolver.js +1 -0
- package/.agents/scripts/lib/config-settings-schema-delivery.js +28 -21
- package/.agents/scripts/lib/coverage-capture-fullscope.js +10 -2
- package/.agents/scripts/lib/coverage-capture-incremental.js +3 -2
- package/.agents/scripts/lib/coverage-capture-usage.js +4 -1
- package/.agents/scripts/lib/crap-engine.js +2 -2
- package/.agents/scripts/lib/crap-utils.js +21 -5
- package/.agents/scripts/lib/doc-tiers.js +4 -2
- package/.agents/scripts/lib/escomplex-ast-compat.js +39 -17
- package/.agents/scripts/lib/escomplex-kernel.js +298 -0
- package/.agents/scripts/lib/feedback-loop/graduator-core.js +7 -6
- package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +7 -5
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/gh-exec.js +160 -0
- package/.agents/scripts/lib/maintainability-engine.js +3 -3
- package/.agents/scripts/lib/observability/source-classifier.js +1 -0
- package/.agents/scripts/lib/orchestration/ceremony-routing.js +74 -132
- package/.agents/scripts/lib/orchestration/ci-rerun-guard.js +123 -12
- package/.agents/scripts/lib/orchestration/complexity-gate.js +180 -352
- package/.agents/scripts/lib/orchestration/light-suitability.js +71 -136
- package/.agents/scripts/lib/orchestration/plan-context.js +44 -50
- package/.agents/scripts/lib/orchestration/plan-persist/changes-repair.js +8 -6
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +104 -119
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +41 -25
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +11 -11
- package/.agents/scripts/lib/orchestration/plan-persist/supersede-ops.js +63 -29
- package/.agents/scripts/lib/orchestration/plan-persist/wave-collision-gate.js +107 -0
- package/.agents/scripts/lib/orchestration/review-depth.js +14 -11
- package/.agents/scripts/lib/orchestration/run-epilogue.js +260 -182
- package/.agents/scripts/lib/orchestration/run-scoped-config.js +63 -99
- package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +3 -3
- package/.agents/scripts/lib/orchestration/single-story-close/phases/graphql-preflight.js +137 -0
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +105 -18
- package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +4 -3
- package/.agents/scripts/lib/orchestration/story-follow-ups.js +156 -39
- package/.agents/scripts/lib/orchestration/story-init-envelope.js +71 -0
- package/.agents/scripts/lib/orchestration/task-body-validator.js +8 -17
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +25 -209
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +8 -5
- package/.agents/scripts/lib/orchestration/ticket-validator.js +44 -183
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +14 -25
- package/.agents/scripts/lib/runtime-deps/dep-resolution.js +155 -0
- package/.agents/scripts/lib/runtime-deps/ensure-installed.js +44 -9
- package/.agents/scripts/lib/runtime-deps/parser-major.js +110 -0
- package/.agents/scripts/lib/runtime-deps/preflight.js +6 -25
- package/.agents/scripts/lib/runtime-deps/scan-imports.js +46 -1
- package/.agents/scripts/lib/skills/walk-skill-files.js +1 -1
- package/.agents/scripts/lib/story-body/body-format-lints.js +58 -12
- package/.agents/scripts/lib/story-body/story-body.js +83 -29
- package/.agents/scripts/lib/templates/decomposer-prompts.js +28 -33
- package/.agents/scripts/lib/wave-runner/live-probe.js +31 -5
- package/.agents/scripts/merge-baseline.js +4 -5
- package/.agents/scripts/plan-context.js +117 -28
- package/.agents/scripts/plan-persist.js +79 -39
- package/.agents/scripts/plan-run-epilogue.js +11 -8
- package/.agents/scripts/pr-watch-with-update.js +9 -2
- package/.agents/scripts/run-verify.js +13 -6
- package/.agents/scripts/single-story-init.js +7 -57
- package/.agents/scripts/stories-wave-tick.js +160 -26
- package/.agents/skills/core/gates-and-baselines/reference.md +0 -1
- package/.agents/skills/skills.index.json +2 -12
- package/.agents/skills/stack/qa/playwright/SKILL.md +26 -0
- package/.agents/workflows/audit-to-stories.md +14 -11
- package/.agents/workflows/helpers/acceptance-self-eval.md +84 -157
- package/.agents/workflows/helpers/code-review.md +4 -2
- package/.agents/workflows/helpers/deliver-digest.md +31 -24
- package/.agents/workflows/helpers/deliver-light.md +92 -101
- package/.agents/workflows/helpers/deliver-reference.md +116 -100
- package/.agents/workflows/helpers/deliver-story-reference.md +58 -124
- package/.agents/workflows/helpers/deliver-story.md +17 -18
- package/.agents/workflows/helpers/plan-reference.md +82 -60
- package/.agents/workflows/mandrel-deliver.md +47 -31
- package/.agents/workflows/mandrel-plan.md +32 -30
- package/.agents/workflows/mandrel-update.md +36 -21
- package/README.md +3 -3
- package/docs/CHANGELOG.md +43 -0
- package/lib/cli/registry.js +45 -25
- package/lib/cli/update.js +376 -17
- package/lib/migrations/index.js +2 -0
- package/lib/migrations/steps/2.60.0-retire-audit-results-autofile.js +40 -0
- package/package.json +8 -2
- package/.agents/schemas/model-attribution.schema.json +0 -53
- package/.agents/scripts/lib/orchestration/model-attribution.js +0 -418
- package/.agents/scripts/lib/orchestration/split-policy-validator.js +0 -188
- package/.agents/scripts/lib/orchestration/story-plan-state.js +0 -33
- package/.agents/scripts/lib/orchestration/structured-comment-parser.js +0 -67
- package/.agents/scripts/lib/templates/spec-author-prompts.js +0 -76
- package/.agents/skills/core/scope-triage/SKILL.md +0 -48
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* spec-author-prompts.js — Story-scoped Spec / Acceptance authoring prompts.
|
|
3
|
-
*
|
|
4
|
-
* v2 keeps a single executable document per Story. These prompts used to
|
|
5
|
-
* author a separate Epic Tech Spec + Acceptance Spec that were folded into
|
|
6
|
-
* the Epic body and then restated on Stories — a duplication source. They
|
|
7
|
-
* now author only Story `## Spec` approach prose and remind authors that
|
|
8
|
-
* acceptance lives once on the Story (`acceptance[]` / `## Acceptance`).
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @returns {string}
|
|
13
|
-
*/
|
|
14
|
-
export function renderTechSpecSystemPrompt() {
|
|
15
|
-
return TECH_SPEC_SYSTEM_PROMPT;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @returns {string}
|
|
20
|
-
*/
|
|
21
|
-
export function renderAcceptanceSpecSystemPrompt() {
|
|
22
|
-
return ACCEPTANCE_SPEC_SYSTEM_PROMPT;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const TECH_SPEC_SYSTEM_PROMPT = `You are an expert Engineering Architect.
|
|
26
|
-
Your job is to author the Story's \`## Spec\` approach section — the technical
|
|
27
|
-
how for one cohesive, executable Story. There is no separate Epic Tech Spec
|
|
28
|
-
document and no spill-to-docs path.
|
|
29
|
-
|
|
30
|
-
The Spec should outline only what an implementing agent needs beyond Goal /
|
|
31
|
-
Changes / Acceptance:
|
|
32
|
-
1. Architecture & Design (approach, seams, reuse)
|
|
33
|
-
2. Data Models (if any)
|
|
34
|
-
3. API Changes (if any)
|
|
35
|
-
4. Core Components
|
|
36
|
-
5. Security & Privacy Considerations
|
|
37
|
-
|
|
38
|
-
CRITICAL REQUIREMENTS:
|
|
39
|
-
- Respond ONLY with valid Markdown suitable to paste into a Story \`## Spec\`.
|
|
40
|
-
- Do not use top-level <h1> (# ) tags. Prefer \`##\` / \`###\` under Spec.
|
|
41
|
-
- Do NOT restate the Story's Goal, Acceptance, Verify, Changes, or Non-Goals —
|
|
42
|
-
those sections already live on the same Story body. Restatement is
|
|
43
|
-
duplication and a drift risk. If a brief orientation helps, keep a
|
|
44
|
-
\`## Technical Overview\` to 2–3 sentences naming the technical approach only.
|
|
45
|
-
- Do NOT author a Delivery Slicing / fan-out table. If the work needs multiple
|
|
46
|
-
independent Stories, say so in one short note and stop — oversized Specs
|
|
47
|
-
mean the Story should be split, not documented elsewhere.
|
|
48
|
-
- Format architectural decisions clearly with bullet points.
|
|
49
|
-
- Keep the Spec lean enough to stay inline on the Story (persist rejects
|
|
50
|
-
over-budget Specs; they are never written under docs/).`;
|
|
51
|
-
|
|
52
|
-
const ACCEPTANCE_SPEC_SYSTEM_PROMPT = `You are an expert Acceptance Engineer.
|
|
53
|
-
Your job is to help author the Story's binding acceptance contract — not a
|
|
54
|
-
separate Acceptance Spec document.
|
|
55
|
-
|
|
56
|
-
v2 rule: acceptance lives **once**, on the Story:
|
|
57
|
-
- Machine contract: top-level \`acceptance[]\` (and \`verify[]\`) on the ticket JSON
|
|
58
|
-
- Human document: the same items rendered under \`## Acceptance\` / \`## Verify\`
|
|
59
|
-
on the Story body (persist syncs top-level into the body)
|
|
60
|
-
|
|
61
|
-
Do **not** author an Epic Acceptance Table, PRD restatement, or a second
|
|
62
|
-
criteria list inside \`## Spec\`.
|
|
63
|
-
|
|
64
|
-
CRITICAL REQUIREMENTS:
|
|
65
|
-
- Respond ONLY with guidance or a draft \`acceptance[]\` / \`verify[]\` list for
|
|
66
|
-
one Story — never a parallel "Acceptance Spec" markdown artifact.
|
|
67
|
-
- Every acceptance item MUST be observable from outside the agent (command
|
|
68
|
-
exits 0, file exists, selector resolves, fixture count matches). Reject
|
|
69
|
-
vague "matches the spec" / "looks good" items.
|
|
70
|
-
- Every verify entry MUST name a tier in parentheses: unit | contract | e2e |
|
|
71
|
-
validate (or \`manual:<reason>\` when genuinely unverifiable in isolation).
|
|
72
|
-
- Do NOT re-elaborate Goal or Spec prose inside acceptance items — bind the
|
|
73
|
-
outcome, not the approach.
|
|
74
|
-
- Acceptance Outcomes MUST NOT prescribe a commit subject that begins with a
|
|
75
|
-
non-Conventional-Commits prefix (allowed leading types: feat|fix|chore|
|
|
76
|
-
refactor|perf|docs|style|test|build|ci|revert).`;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: scope-triage
|
|
3
|
-
description:
|
|
4
|
-
Optional split-advisory for `/mandrel-plan`. Under v2 there is no epic|story routing
|
|
5
|
-
verdict — `/mandrel-plan` always authors Stories. Use this skill only when judging
|
|
6
|
-
whether a draft should stay one Story or legitimately split (near-zero
|
|
7
|
-
overlap or an architectural seam).
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# scope-triage (split advisory)
|
|
11
|
-
|
|
12
|
-
## Policy Capsule
|
|
13
|
-
|
|
14
|
-
- There is **no** `epic | story | borderline` routing verdict in v2. `/mandrel-plan`
|
|
15
|
-
is a single path that emits **one Story by default**.
|
|
16
|
-
- This skill is an optional **split advisory**: should the author keep one
|
|
17
|
-
Story, or does the seed clear the default-single split policy?
|
|
18
|
-
- Anchor sizing judgment to `DELIVERABLE_GRANULARITY_GUIDANCE` in
|
|
19
|
-
[`ticket-validator-sizing.js`](../../../scripts/lib/orchestration/ticket-validator-sizing.js).
|
|
20
|
-
There is no numeric threshold to restate — Story #5312 deleted the
|
|
21
|
-
plan-time capacity ceilings.
|
|
22
|
-
- Lead with **cohesion**: one Story is one coherent change with one reason
|
|
23
|
-
to exist. Coupled work stays one Story and uses `## Slicing` for
|
|
24
|
-
intra-session checkpoints.
|
|
25
|
-
- Emit an **advisory only** — `keep-single` (the default) or `split` with its
|
|
26
|
-
seam/overlap rationale. **Never auto-route**: the operator decides, and
|
|
27
|
-
`--yes` defaults to `keep-single`.
|
|
28
|
-
|
|
29
|
-
## Split policy (when N>1 is allowed)
|
|
30
|
-
|
|
31
|
-
Split into sibling Stories **only** when:
|
|
32
|
-
|
|
33
|
-
1. **Near-zero overlap** — genuinely independent capabilities that happen to
|
|
34
|
-
share a seed idea, or
|
|
35
|
-
2. **Architectural seam** — different deployables, or a migration vs the
|
|
36
|
-
feature that consumes it.
|
|
37
|
-
|
|
38
|
-
Otherwise keep one Story. Persist refuses coupled splits via
|
|
39
|
-
`assertAcceptancePartition` (identical AC text across Stories).
|
|
40
|
-
|
|
41
|
-
## Advisory output
|
|
42
|
-
|
|
43
|
-
Emit one of:
|
|
44
|
-
|
|
45
|
-
- `keep-single` — default; fold complexity into `## Spec` / `## Slicing`
|
|
46
|
-
- `split` — list the proposed Stories and the seam/overlap rationale
|
|
47
|
-
|
|
48
|
-
Never auto-route. The operator (or `--yes` default = `keep-single`) decides.
|