mandrel 2.87.0 → 2.89.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 +29 -0
- package/.agents/agents/auditor.md +4 -3
- package/.agents/docs/agentrc-reference.json +5 -2
- package/.agents/docs/configuration.md +14 -8
- package/.agents/docs/workflows.md +1 -1
- package/.agents/schemas/agentrc.schema.json +24 -5
- package/.agents/schemas/story-deliver-terminal.schema.json +1 -1
- package/.agents/schemas/story-progress.schema.json +5 -0
- package/.agents/scripts/audit-to-stories.js +3 -2
- package/.agents/scripts/boot-sweep.js +3 -2
- package/.agents/scripts/check-arch-cycles.js +19 -41
- package/.agents/scripts/check-context-budget.js +16 -44
- package/.agents/scripts/check-cyclomatic.js +13 -37
- package/.agents/scripts/check-dead-exports.js +16 -46
- package/.agents/scripts/clean-worktrees.js +1 -6
- package/.agents/scripts/coverage-capture.js +32 -49
- package/.agents/scripts/deliver-run.js +11 -0
- package/.agents/scripts/diagnose-friction.js +3 -3
- package/.agents/scripts/lib/audit-baselines/gate-surface.js +24 -11
- package/.agents/scripts/lib/audit-baselines/read.js +4 -2
- package/.agents/scripts/lib/audit-baselines/surface-entry.js +95 -11
- package/.agents/scripts/lib/baselines/coverage-updater-cli.js +6 -14
- package/.agents/scripts/lib/baselines/crap-preview-scan.js +3 -1
- package/.agents/scripts/lib/baselines/crap-updater-cli.js +38 -26
- package/.agents/scripts/lib/baselines/duplication-scanner.js +20 -1
- package/.agents/scripts/lib/baselines/env-overrides.js +39 -34
- package/.agents/scripts/lib/baselines/kernel.js +3 -2
- package/.agents/scripts/lib/baselines/kinds/crap.js +50 -53
- package/.agents/scripts/lib/baselines/preview-gates.js +5 -1
- package/.agents/scripts/lib/baselines/refresh-service.js +65 -22
- package/.agents/scripts/lib/baselines/writer.js +5 -1
- package/.agents/scripts/lib/bdd-runner-detect.js +7 -10
- package/.agents/scripts/lib/child-exec.js +14 -1
- package/.agents/scripts/lib/child-stream.js +122 -0
- package/.agents/scripts/lib/clean-temp.js +19 -13
- package/.agents/scripts/lib/cli-args.js +49 -0
- package/.agents/scripts/lib/close-validation/gates.js +40 -9
- package/.agents/scripts/lib/codex/skills-projection.js +1 -12
- package/.agents/scripts/lib/config/gates/crap.schema.js +15 -0
- package/.agents/scripts/lib/config/gates/mutation.schema.js +2 -2
- package/.agents/scripts/lib/config/gh-config-dir.js +63 -0
- package/.agents/scripts/lib/config/github.js +2 -0
- package/.agents/scripts/lib/config/paths.js +14 -3
- package/.agents/scripts/lib/config/quality.js +49 -1
- package/.agents/scripts/lib/config-resolver.js +78 -64
- package/.agents/scripts/lib/config-settings-schema-delivery.js +4 -3
- package/.agents/scripts/lib/config-settings-schema.js +7 -0
- package/.agents/scripts/lib/coverage-baseline.js +2 -2
- package/.agents/scripts/lib/coverage-capture-affected.js +2 -1
- package/.agents/scripts/lib/coverage-capture-fullscope.js +2 -2
- package/.agents/scripts/lib/coverage-capture-incremental.js +1 -1
- package/.agents/scripts/lib/coverage-capture-passes.js +143 -0
- package/.agents/scripts/lib/coverage-capture-usage.js +1 -1
- package/.agents/scripts/lib/coverage-capture.js +45 -15
- package/.agents/scripts/lib/crap-utils.js +65 -49
- package/.agents/scripts/lib/full-suite-lock.js +1 -10
- package/.agents/scripts/lib/gates/baseline-store.js +10 -0
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/gh-exec.js +45 -2
- package/.agents/scripts/lib/gh-transport.js +27 -0
- package/.agents/scripts/lib/git-utils.js +16 -9
- package/.agents/scripts/lib/maintainability-engine.js +27 -6
- package/.agents/scripts/lib/maintainability-utils.js +20 -2
- package/.agents/scripts/lib/orchestration/check-baselines/phases/evaluate.js +4 -1
- package/.agents/scripts/lib/orchestration/evidence-stream.js +186 -0
- package/.agents/scripts/lib/orchestration/file-assumptions.js +2 -19
- package/.agents/scripts/lib/orchestration/git-cleanup/phases/branches-reap.js +3 -7
- package/.agents/scripts/lib/orchestration/git-cleanup/phases/git-probes-ff.js +34 -40
- package/.agents/scripts/lib/orchestration/git-cleanup/phases/git-probes.js +4 -3
- package/.agents/scripts/lib/orchestration/plan-persist/persist-helpers.js +2 -19
- package/.agents/scripts/lib/orchestration/pr-watch.js +1 -5
- package/.agents/scripts/lib/orchestration/project-meta-cache.js +17 -4
- package/.agents/scripts/lib/orchestration/reassert-status-column.js +1 -8
- package/.agents/scripts/lib/orchestration/resolve-stories.js +1 -0
- package/.agents/scripts/lib/orchestration/review-providers/native.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phase-timer.js +43 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +37 -13
- package/.agents/scripts/lib/orchestration/single-story-close/phases/finish.js +264 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/open-pr.js +68 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/pre-push.js +106 -0
- package/.agents/scripts/lib/orchestration/single-story-close/phases/reconcile-done.js +43 -35
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-halt.js +52 -0
- package/.agents/scripts/lib/orchestration/single-story-close/result.js +273 -0
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +68 -776
- package/.agents/scripts/lib/orchestration/story-close/context-budget-writeback.js +20 -9
- package/.agents/scripts/lib/orchestration/story-close/duplication-close-rescore.js +2 -2
- package/.agents/scripts/lib/orchestration/story-close/ratchet-shrink-writeback.js +20 -12
- package/.agents/scripts/lib/orchestration/story-handoff.js +50 -21
- package/.agents/scripts/lib/orchestration/story-progress.js +32 -12
- package/.agents/scripts/lib/orchestration/ticket-validator.js +3 -13
- package/.agents/scripts/lib/orchestration/verify-credit.js +4 -1
- package/.agents/scripts/lib/qa/resolve-selection.js +1 -8
- package/.agents/scripts/lib/single-story/confirm-and-land.js +33 -0
- package/.agents/scripts/lib/single-story-sweep/reconcile-closing.js +43 -11
- package/.agents/scripts/lib/single-story-sweep/sweep-lock.js +130 -30
- package/.agents/scripts/lib/skills/parse-skill.js +1 -4
- package/.agents/scripts/lib/story-body/story-body.js +12 -1
- package/.agents/scripts/lib/suite-admission.js +3 -11
- package/.agents/scripts/lib/temp-retention.js +25 -11
- package/.agents/scripts/lib/test-run-credit.js +2 -5
- package/.agents/scripts/lib/transpile.js +193 -31
- package/.agents/scripts/lib/util/paths.js +31 -0
- package/.agents/scripts/lib/util/sleep.js +15 -0
- package/.agents/scripts/lib/validation-evidence.js +29 -3
- package/.agents/scripts/lib/wave-runner/live-probe.js +24 -0
- package/.agents/scripts/lib/workers/crap-worker.js +23 -12
- package/.agents/scripts/lib/workers/maintainability-report-worker.js +18 -12
- package/.agents/scripts/lib/workflow-closure.js +1 -8
- package/.agents/scripts/notify.js +83 -90
- package/.agents/scripts/plan-context.js +8 -4
- package/.agents/scripts/providers/github/auth.js +14 -30
- package/.agents/scripts/providers/github/blocked-by-add.js +11 -27
- package/.agents/scripts/providers/github/compose.js +1 -0
- package/.agents/scripts/providers/github/gh-token-diagnostics.js +130 -0
- package/.agents/scripts/providers/github/identity.js +158 -0
- package/.agents/scripts/providers/github/issues.js +2 -2
- package/.agents/scripts/providers/github/mappers.js +16 -19
- package/.agents/scripts/providers/github/projects-v2-graphql.js +4 -36
- package/.agents/scripts/providers/github/request-helpers.js +44 -0
- package/.agents/scripts/providers/github/sub-issue-add.js +11 -28
- package/.agents/scripts/providers/github.js +10 -2
- package/.agents/scripts/quality-preview.js +6 -19
- package/.agents/scripts/single-story-confirm-merge.js +8 -20
- package/.agents/scripts/single-story-init.js +0 -1
- package/.agents/scripts/stories-wave-tick.js +60 -46
- package/.agents/scripts/story-handoff.js +2 -23
- package/.agents/scripts/story-review-compute.js +3 -22
- package/.agents/scripts/sync-claude-agents.js +1 -12
- package/.agents/scripts/sync-claude-commands.js +1 -12
- package/.agents/scripts/update-crap-baseline.js +11 -20
- package/.agents/scripts/update-ticket-state.js +44 -45
- package/.agents/templates/docs/audit-sweep-runbook.md +1 -1
- package/.agents/workflows/audit-accessibility.md +1 -1
- package/.agents/workflows/audit-adrs.md +1 -1
- package/.agents/workflows/audit-architecture.md +1 -1
- package/.agents/workflows/audit-baselines.md +9 -4
- package/.agents/workflows/audit-clean-code.md +1 -1
- package/.agents/workflows/audit-data-model.md +1 -1
- package/.agents/workflows/audit-dependencies.md +1 -1
- package/.agents/workflows/audit-devops.md +1 -1
- package/.agents/workflows/audit-documentation.md +1 -1
- package/.agents/workflows/audit-exceptions.md +2 -2
- package/.agents/workflows/audit-mobile.md +1 -1
- package/.agents/workflows/audit-navigability.md +1 -1
- package/.agents/workflows/audit-performance.md +1 -1
- package/.agents/workflows/audit-privacy.md +1 -1
- package/.agents/workflows/audit-quality.md +1 -1
- package/.agents/workflows/audit-security.md +1 -1
- package/.agents/workflows/audit-seo.md +1 -1
- package/.agents/workflows/audit-sre.md +1 -1
- package/.agents/workflows/audit-to-stories.md +9 -7
- package/.agents/workflows/audit-ux-ui.md +1 -1
- package/.agents/workflows/helpers/audit-lens-core.md +8 -5
- package/.agents/workflows/helpers/deliver-digest.md +4 -5
- package/.agents/workflows/helpers/deliver-story-reference.md +4 -4
- package/.agents/workflows/mandrel-deliver.md +3 -1
- package/README.md +6 -3
- package/docs/CHANGELOG.md +42 -0
- package/lib/cli/doctor-checks/codex.js +240 -0
- package/lib/cli/doctor-checks/merge-driver.js +79 -0
- package/lib/cli/doctor-checks/payload.js +201 -0
- package/lib/cli/doctor-checks/read-json.js +16 -0
- package/lib/cli/doctor-checks/runtime-deps.js +146 -0
- package/lib/cli/doctor-checks/spawn.js +18 -0
- package/lib/cli/doctor-checks/sync-parity.js +205 -0
- package/lib/cli/doctor-checks/test-credit-path.js +270 -0
- package/lib/cli/doctor-checks/toolchain.js +137 -0
- package/lib/cli/doctor-checks/version-current.js +82 -0
- package/lib/cli/registry.js +40 -1330
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Must be the first import: fails fast before any third-party import loads.
|
|
2
2
|
import './lib/runtime-deps/ensure-installed.js';
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
buildCrapRefreshOptions,
|
|
5
5
|
parseCrapUpdaterArgs,
|
|
6
6
|
resolveCrapUpdaterOptions,
|
|
7
7
|
seatCrapBaseline,
|
|
@@ -15,10 +15,7 @@ import {
|
|
|
15
15
|
resolveConfig,
|
|
16
16
|
} from './lib/config-resolver.js';
|
|
17
17
|
import { loadCoverage } from './lib/coverage-utils.js';
|
|
18
|
-
import {
|
|
19
|
-
resolveEscomplexVersion,
|
|
20
|
-
resolveTsTranspilerVersion,
|
|
21
|
-
} from './lib/crap-utils.js';
|
|
18
|
+
import { resolveEscomplexVersion } from './lib/crap-utils.js';
|
|
22
19
|
|
|
23
20
|
import { Logger } from './lib/Logger.js';
|
|
24
21
|
|
|
@@ -42,7 +39,7 @@ const USAGE = {
|
|
|
42
39
|
],
|
|
43
40
|
[
|
|
44
41
|
'--coverage <path>',
|
|
45
|
-
|
|
42
|
+
"Read coverage from this path; wins over config (default `delivery.quality.gates.crap.coveragePath`, falling back to the coverage gate's `coveragePath`, `coverage/coverage-final.json`).",
|
|
46
43
|
],
|
|
47
44
|
[
|
|
48
45
|
'--full-scope',
|
|
@@ -58,7 +55,7 @@ const USAGE = {
|
|
|
58
55
|
],
|
|
59
56
|
],
|
|
60
57
|
notes: [
|
|
61
|
-
'Run `npm run test:coverage`
|
|
58
|
+
'Run the CRAP capture script first — `npm run <delivery.quality.gates.crap.captureScript>`, default `npm run test:coverage` — without a coverage artifact the refresh refuses (exit 1) and leaves the baseline untouched.',
|
|
62
59
|
],
|
|
63
60
|
};
|
|
64
61
|
|
|
@@ -75,21 +72,15 @@ async function main() {
|
|
|
75
72
|
`[CRAP] Coverage source: ${options.coveragePath}${options.requireCoverage ? ' (required)' : ' (optional)'}`,
|
|
76
73
|
);
|
|
77
74
|
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// No flag -> scopeFiles=null + fullScope=false -> the service derives the
|
|
85
|
-
// diff via `origin/main..HEAD` (its default baseRef/headRef).
|
|
86
|
-
if (options.fullScope) refreshOpts.fullScope = true;
|
|
87
|
-
else if (options.diffScopeRef) refreshOpts.baseRef = options.diffScopeRef;
|
|
88
|
-
|
|
89
|
-
const result = await refreshBaseline(refreshOpts);
|
|
75
|
+
const result = await refreshBaseline(
|
|
76
|
+
buildCrapRefreshOptions(options, {
|
|
77
|
+
loadCoverage,
|
|
78
|
+
epsilon: getBaselineEpsilon('crap'),
|
|
79
|
+
}),
|
|
80
|
+
);
|
|
90
81
|
|
|
91
82
|
Logger.info(
|
|
92
|
-
`[CRAP] ✅ Baseline updated (kernelVersion=${result.envelope.kernelVersion}, escomplexVersion=${resolveEscomplexVersion()}, tsTranspilerVersion=${
|
|
83
|
+
`[CRAP] ✅ Baseline updated (kernelVersion=${result.envelope.kernelVersion}, escomplexVersion=${resolveEscomplexVersion()}, tsTranspilerVersion=${result.envelope.tsTranspilerVersion}). Wrote to ${options.absBaselinePath}.`,
|
|
93
84
|
);
|
|
94
85
|
Logger.info(
|
|
95
86
|
`[CRAP] Wrote ${result.envelope.rows.length} row(s). scope=${result.scope.mode}, wrote=${result.wrote}.`,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { parseArgs } from 'node:util';
|
|
9
|
-
import {
|
|
9
|
+
import { runAsCli } from './lib/cli-utils.js';
|
|
10
10
|
import { resolveConfig } from './lib/config-resolver.js';
|
|
11
11
|
import { Logger } from './lib/Logger.js';
|
|
12
12
|
import { transitionTicketState } from './lib/orchestration/ticketing.js';
|
|
@@ -31,15 +31,10 @@ const USAGE = {
|
|
|
31
31
|
notes: ['Exactly one of --state or --remove-label is required.'],
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (
|
|
37
|
-
(process.argv[1]?.endsWith('update-ticket-state.js') ||
|
|
38
|
-
process.env.DEBUG_MAIN) &&
|
|
39
|
-
!respondToHelp(process.argv.slice(2), USAGE)
|
|
40
|
-
) {
|
|
34
|
+
/** @param {string[]} argv */
|
|
35
|
+
function parseTicketStateArgs(argv) {
|
|
41
36
|
const { values } = parseArgs({
|
|
42
|
-
args:
|
|
37
|
+
args: argv,
|
|
43
38
|
options: {
|
|
44
39
|
ticket: { type: 'string' },
|
|
45
40
|
state: { type: 'string' },
|
|
@@ -47,11 +42,9 @@ if (
|
|
|
47
42
|
},
|
|
48
43
|
strict: false,
|
|
49
44
|
});
|
|
50
|
-
|
|
51
45
|
const ticketId = Number.parseInt(values.ticket, 10);
|
|
52
46
|
const state = values.state;
|
|
53
47
|
const removeLabel = values['remove-label'];
|
|
54
|
-
|
|
55
48
|
if (Number.isNaN(ticketId) || (!state && !removeLabel)) {
|
|
56
49
|
throw new Error(
|
|
57
50
|
'Usage: node update-ticket-state.js ' +
|
|
@@ -59,44 +52,50 @@ if (
|
|
|
59
52
|
'[--state <state> | --remove-label <label>]',
|
|
60
53
|
);
|
|
61
54
|
}
|
|
55
|
+
return { ticketId, state, removeLabel };
|
|
56
|
+
}
|
|
62
57
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
await provider.updateTicket(ticketId, {
|
|
74
|
-
labels: { remove: [removeLabel] },
|
|
75
|
-
});
|
|
76
|
-
Logger.info('[State-Sync] ✅ Success');
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
58
|
+
/**
|
|
59
|
+
* @param {{ argv?: string[], provider?: object, transition?: typeof transitionTicketState }} [opts]
|
|
60
|
+
*/
|
|
61
|
+
export async function runUpdateTicketState({
|
|
62
|
+
argv = process.argv.slice(2),
|
|
63
|
+
provider,
|
|
64
|
+
transition = transitionTicketState,
|
|
65
|
+
} = {}) {
|
|
66
|
+
const { ticketId, state, removeLabel } = parseTicketStateArgs(argv);
|
|
67
|
+
const ticketing = provider ?? createProvider(resolveConfig());
|
|
79
68
|
|
|
69
|
+
// Label-only mutation path — no state transition. Callers that just
|
|
70
|
+
// need to drop a single label without flipping the agent::* state.
|
|
71
|
+
if (removeLabel && !state) {
|
|
80
72
|
Logger.info(
|
|
81
|
-
`[State-Sync]
|
|
73
|
+
`[State-Sync] Removing label \`${removeLabel}\` from ticket #${ticketId}...`,
|
|
82
74
|
);
|
|
83
|
-
|
|
84
|
-
|
|
75
|
+
await ticketing.updateTicket(ticketId, {
|
|
76
|
+
labels: { remove: [removeLabel] },
|
|
77
|
+
});
|
|
78
|
+
Logger.info('[State-Sync] ✅ Success');
|
|
79
|
+
return { ticketId, state: null, removedLabel: removeLabel };
|
|
80
|
+
}
|
|
85
81
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
await provider.updateTicket(ticketId, {
|
|
90
|
-
labels: { remove: [removeLabel] },
|
|
91
|
-
});
|
|
92
|
-
}
|
|
82
|
+
Logger.info(`[State-Sync] Transitioning ticket #${ticketId} to ${state}...`);
|
|
83
|
+
// No explicit cascade: `transitionTicketState` already runs it.
|
|
84
|
+
await transition(ticketing, ticketId, state);
|
|
93
85
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
86
|
+
// Optional secondary label removal alongside the state transition
|
|
87
|
+
// (e.g. clear `status::blocked` when transitioning back to ready).
|
|
88
|
+
if (removeLabel) {
|
|
89
|
+
await ticketing.updateTicket(ticketId, {
|
|
90
|
+
labels: { remove: [removeLabel] },
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
Logger.info('[State-Sync] ✅ Success');
|
|
95
|
+
return { ticketId, state, removedLabel: removeLabel ?? null };
|
|
102
96
|
}
|
|
97
|
+
|
|
98
|
+
runAsCli(import.meta.url, () => runUpdateTicketState(), {
|
|
99
|
+
source: 'update-ticket-state',
|
|
100
|
+
usage: USAGE,
|
|
101
|
+
});
|
|
@@ -32,7 +32,7 @@ has to be settled here instead.
|
|
|
32
32
|
Run each `audit-*` workflow with **no** `--paths` and no change-set filter, so
|
|
33
33
|
the whole target-set union is audited rather than whatever a recent branch
|
|
34
34
|
happened to touch. Each lens writes its report to
|
|
35
|
-
`temp/audits/audit-<lens>-results.md`.
|
|
35
|
+
`temp/audits/audit-results/audit-<lens>-results.md`.
|
|
36
36
|
|
|
37
37
|
A sweep scoped to a change set is not a sweep: it re-reports the same recent
|
|
38
38
|
files every cycle and never reaches the code nobody has touched in a year,
|
|
@@ -11,7 +11,7 @@ concrete element and the success criterion it violates. Default to **static**
|
|
|
11
11
|
detection over source; escalate to a **runtime** pass only when a live target is
|
|
12
12
|
configured. The shared lens machinery lives in
|
|
13
13
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
14
|
-
`{{
|
|
14
|
+
`{{auditResultsDir}}/audit-accessibility-results.md`. Extra finding fields:
|
|
15
15
|
**WCAG:** (the violated success criterion, e.g. `1.1.1 Non-text Content (A)`)
|
|
16
16
|
and **Evidence:** (`measured | static` + the observable; single-run runtime
|
|
17
17
|
numbers are tagged `provisional`). The report adds a **Runtime Verification**
|
|
@@ -18,7 +18,7 @@ That is this lens's central target; structural tidiness is the cheap part.
|
|
|
18
18
|
|
|
19
19
|
The shared lens machinery lives in
|
|
20
20
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
21
|
-
`{{
|
|
21
|
+
`{{auditResultsDir}}/audit-adrs-results.md`. Dimension values:
|
|
22
22
|
`Decision Drift | Supersede-Chain Integrity | Structure & Status Hygiene |
|
|
23
23
|
Missing Decision | Layout Conformance`; the report adds a **Decision Coverage**
|
|
24
24
|
table.
|
|
@@ -8,7 +8,7 @@ You are a Staff Software Engineer & Architecture Reviewer performing a read-only
|
|
|
8
8
|
review that prioritizes maintainability and readability without altering
|
|
9
9
|
external APIs or business logic. The shared lens machinery lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-architecture-results.md`. Each finding carries an
|
|
12
12
|
**Impact:** and a **Category:** (`Quick Win | Structural Change`); the report
|
|
13
13
|
adds a **Triage Summary** (Quick Wins / Structural Changes) and an
|
|
14
14
|
**Architecture Guardrail Coverage** section.
|
|
@@ -12,7 +12,7 @@ the loop that burns the measured debt **down** and tightens the floors behind
|
|
|
12
12
|
it, so a repo can hold a floor it cleared years ago and never notice. This lens
|
|
13
13
|
is that loop's read-only entry point. The shared lens machinery lives in
|
|
14
14
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
15
|
-
`{{
|
|
15
|
+
`{{auditResultsDir}}/audit-baselines-results.md`. Dimension values:
|
|
16
16
|
`Dead Instrument | Staleness | Hotspot Cluster | Trend Drift | Tightening Headroom`.
|
|
17
17
|
|
|
18
18
|
> **Value-free titles (mandatory).** A finding title MUST NOT embed a measured
|
|
@@ -107,8 +107,13 @@ Two envelope-level reads come **before** any finding:
|
|
|
107
107
|
- `baselineExists` is `false`, or `parseError` is non-null — the instrument
|
|
108
108
|
cannot be read at all.
|
|
109
109
|
- `deadIgnoreGlobs` is non-empty — a configured ignore pattern matches zero
|
|
110
|
-
files
|
|
111
|
-
|
|
110
|
+
files that **its own gate's scanner walk** would visit: that gate's
|
|
111
|
+
`targetDirs`, minus the directories its scanner skips. It protects nothing
|
|
112
|
+
today and silently exempts the next file that happens to match it. A glob
|
|
113
|
+
aimed at a generated or installed tree (`node_modules`, `dist`, `build`,
|
|
114
|
+
`out`, `coverage`, `.next`) that the scanner would visit is never reported
|
|
115
|
+
dead — it is load-bearing after an install or build, even when the tree is
|
|
116
|
+
absent now.
|
|
112
117
|
|
|
113
118
|
Grade a stub or unenforced gate **Medium**, a `parseError` on an enforced
|
|
114
119
|
gate **High** (delivery reads that file every run), a dead glob **Low**.
|
|
@@ -252,7 +257,7 @@ shared finding skeleton, fingerprints each finding for dedupe, and groups the
|
|
|
252
257
|
batch:
|
|
253
258
|
|
|
254
259
|
```bash
|
|
255
|
-
node .agents/scripts/audit-to-stories.js --scan --glob temp/audits/audit-baselines-results.md --out temp/audits/audit-to-stories-plan.json
|
|
260
|
+
node .agents/scripts/audit-to-stories.js --scan --glob temp/audits/audit-results/audit-baselines-results.md --out temp/audits/audit-to-stories-plan.json
|
|
256
261
|
```
|
|
257
262
|
|
|
258
263
|
Report the plan path and the group count; the converter owns everything
|
|
@@ -8,7 +8,7 @@ You are a Principal Software Engineer & Code Quality Lead auditing
|
|
|
8
8
|
maintainability — code smells, technical debt, and clean-code violations (SOLID,
|
|
9
9
|
DRY, KISS) that hinder long-term velocity. The shared lens machinery lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-clean-code-results.md`. The report adds a **Dead Code
|
|
12
12
|
Inventory** table (File / Symbol / Type / Estimated LOC) and a **Technical Debt
|
|
13
13
|
Backlog** section.
|
|
14
14
|
|
|
@@ -11,7 +11,7 @@ schema silently disagree, where an assumed invariant is not enforced by a
|
|
|
11
11
|
constraint, where a migration is unsafe against a live database, and where
|
|
12
12
|
schema exists that nothing uses. The shared lens machinery lives in
|
|
13
13
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
14
|
-
`{{
|
|
14
|
+
`{{auditResultsDir}}/audit-data-model-results.md`. Dimension values:
|
|
15
15
|
`Drift | Constraint Completeness | Migration Hygiene | Type Fidelity |
|
|
16
16
|
Access-Pattern Fit | Dead Schema`. Extra finding field: **Evidence:** (a
|
|
17
17
|
reference-count or introspection command plus a `measured`, `static`, or
|
|
@@ -8,7 +8,7 @@ You are a DevOps Engineer & Security Researcher managing the dependency
|
|
|
8
8
|
lifecycle — outdated, vulnerable, or bloated packages and a safe upgrade path.
|
|
9
9
|
The shared lens machinery lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-dependencies-results.md`. Dimension values:
|
|
12
12
|
`Security Fix | Removal | Engine Drift | Major Upgrade | Supply-chain`. The
|
|
13
13
|
report adds a **Health Summary**, an **Upgrade Batches** section, and a
|
|
14
14
|
**Recommended Removals/Replacements** list.
|
|
@@ -8,7 +8,7 @@ You are a Principal DevOps Engineer & Infrastructure Architect auditing this
|
|
|
8
8
|
repo's DevOps infrastructure, DX tooling, and CI/CD pipelines for
|
|
9
9
|
inefficiencies, security risks, and modernization opportunities. The shared lens machinery lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-devops-results.md`. The report adds a **Proposed
|
|
12
12
|
Implementation Roadmap** section (a logical, phased plan).
|
|
13
13
|
|
|
14
14
|
## Scope
|
|
@@ -12,7 +12,7 @@ mode) catch broken links and generator drift — they cannot tell whether the
|
|
|
12
12
|
prose still describes how the code actually behaves. That semantic
|
|
13
13
|
verification is this lens's job. The shared lens machinery lives in
|
|
14
14
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
15
|
-
`{{
|
|
15
|
+
`{{auditResultsDir}}/audit-documentation-results.md`. Each finding carries a
|
|
16
16
|
**Category:** (`Broken Instruction | Stale Description | Missing Coverage |
|
|
17
17
|
Generator Drift | Link Integrity | History Bloat | Contradiction | Authority
|
|
18
18
|
Drift`); the report adds a **Target Set Coverage** table.
|
|
@@ -11,7 +11,7 @@ advisory, a skipped test, a `KNOWN_*` list. Nothing else checks whether they
|
|
|
11
11
|
still earn their place, so they pile up unnoticed. This lens is that check,
|
|
12
12
|
and it is read-only. The shared lens machinery lives in
|
|
13
13
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
14
|
-
`{{
|
|
14
|
+
`{{auditResultsDir}}/audit-exceptions-results.md`. Dimension values:
|
|
15
15
|
`Dead | Expired | Orphaned | Unjustified | Fix Properly`.
|
|
16
16
|
|
|
17
17
|
> **Value-free titles (mandatory).** A finding title MUST NOT embed a count,
|
|
@@ -199,7 +199,7 @@ substituting the envelope's own values for the angle-bracketed slots:
|
|
|
199
199
|
## Step 5: Hand off to `/audit-to-stories`
|
|
200
200
|
|
|
201
201
|
```bash
|
|
202
|
-
node .agents/scripts/audit-to-stories.js --scan --glob temp/audits/audit-exceptions-results.md --out temp/audits/audit-to-stories-plan.json
|
|
202
|
+
node .agents/scripts/audit-to-stories.js --scan --glob temp/audits/audit-results/audit-exceptions-results.md --out temp/audits/audit-to-stories-plan.json
|
|
203
203
|
```
|
|
204
204
|
|
|
205
205
|
Report the plan path and the group count; the converter owns everything
|
|
@@ -10,7 +10,7 @@ a phone and a tablet — and does anything in the suite actually verify that it
|
|
|
10
10
|
does? Default to **static** detection over source; escalate to a **runtime**
|
|
11
11
|
viewport pass only when a live target is configured. The shared lens machinery lives in
|
|
12
12
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
13
|
-
`{{
|
|
13
|
+
`{{auditResultsDir}}/audit-mobile-results.md`. Dimension values:
|
|
14
14
|
`Layout & Viewport | Touch Ergonomics | Responsive Assets | Mobile Verification`.
|
|
15
15
|
Extra finding field: **Evidence:** (`measured | static` + the observable;
|
|
16
16
|
single-run runtime numbers are tagged `provisional`).
|
|
@@ -18,7 +18,7 @@ not exist). This is **mechanism, not content**: the lens reads the consumer's
|
|
|
18
18
|
configured route tree and nav-registry SSOT and is a **silent no-op when neither
|
|
19
19
|
is configured**. The shared lens machinery lives in
|
|
20
20
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
21
|
-
`{{
|
|
21
|
+
`{{auditResultsDir}}/audit-navigability-results.md`. Dimension values:
|
|
22
22
|
`Orphaned Route | Dead Nav Href`; extra finding fields **Route / Door:** and
|
|
23
23
|
**Persona(s):** (identifiers only — never full route bodies or persona PII).
|
|
24
24
|
|
|
@@ -13,7 +13,7 @@ only the dimensions that apply, declaring the rest inapplicable); and
|
|
|
13
13
|
**interleaving correctness is a performance concern** (races have been the most
|
|
14
14
|
expensive defects this repo shipped). The shared lens machinery lives in
|
|
15
15
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
16
|
-
`{{
|
|
16
|
+
`{{auditResultsDir}}/audit-performance-results.md`. Extra finding field:
|
|
17
17
|
**Evidence:** [a Step 0 repro command (or quoted code path) + a `measured` or
|
|
18
18
|
`estimated` tag]. The report adds a **Low-Hanging Fruit** section.
|
|
19
19
|
|
|
@@ -8,7 +8,7 @@ You are a Data Privacy Officer & Security Engineer finding accidental logging,
|
|
|
8
8
|
insecure storage, or unnecessary collection of PII, and checking GDPR/CCPA
|
|
9
9
|
compliance. The shared lens machinery lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-privacy-results.md`. This lens labels the severity
|
|
12
12
|
axis **Impact** and uses dimension values `Leaky Log | Insecure Storage | Data
|
|
13
13
|
Over-collection`; its report adds a **Privacy Scorecard** section (Data
|
|
14
14
|
Encryption / Logging Safety / Minimization: Pass/Fail/Partial).
|
|
@@ -9,7 +9,7 @@ infrastructure, coverage, flaky tests, mocking strategy, and test-pyramid
|
|
|
9
9
|
balance — and, in Story-scoped mode, evaluating the implemented tests against
|
|
10
10
|
the Story under audit. The shared lens machinery lives in
|
|
11
11
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
12
|
-
`{{
|
|
12
|
+
`{{auditResultsDir}}/audit-quality-results.md`. Each finding carries a
|
|
13
13
|
**Category:** (`Flakiness | Coverage | Performance | Mocking | Test Plans`); the
|
|
14
14
|
report adds a **Test Strategy Assessment** table (Unit / Integration / E2E /
|
|
15
15
|
Test Plans / Property-Based Testing: Healthy / Needs Work / Missing, or `N/A`
|
|
@@ -8,7 +8,7 @@ You are a Cybersecurity Architect conducting a comprehensive security review
|
|
|
8
8
|
(OWASP Top 10, insecure configs, attack vectors). The shared lens machinery
|
|
9
9
|
lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-security-results.md`. Extra finding fields: **CWE
|
|
12
12
|
ID:**, **Baseline MUST:** (the violated MUST, or `none — trust-boundary
|
|
13
13
|
class`) and **Boundary:** (Step 2's six-clause gate). The report adds a
|
|
14
14
|
**Defensive Recommendations** section (3–5 hardening headers/configs/
|
|
@@ -9,7 +9,7 @@ You are a Senior Technical SEO & Generative Engine Optimization (GEO) Specialist
|
|
|
9
9
|
and content-level improvements that increase discoverability in both traditional
|
|
10
10
|
search indexes and AI answer engines. The shared lens machinery lives in
|
|
11
11
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
12
|
-
`{{
|
|
12
|
+
`{{auditResultsDir}}/audit-seo-results.md`. Each finding carries a **Category:**
|
|
13
13
|
(`SEO | GEO | Core Web Vitals | Crawlability`); the report adds a **Detailed
|
|
14
14
|
Audit Table** (an at-a-glance index — not machine-parsed; every row MUST also
|
|
15
15
|
have a full Detailed Findings entry) and a **GEO-Specific Recommendations**
|
|
@@ -9,7 +9,7 @@ a production release candidate — rollback & recovery paths, observability &
|
|
|
9
9
|
instrumentation, resilience & failure handling, and runbooks & operational
|
|
10
10
|
docs. The shared lens machinery lives in
|
|
11
11
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
12
|
-
`{{
|
|
12
|
+
`{{auditResultsDir}}/audit-sre-results.md`. Each finding carries a **Category:**
|
|
13
13
|
(`Rollback & Recovery | Observability | Resilience | Runbooks`); the report adds
|
|
14
14
|
a **Release Readiness Checklist** table (per-category ✅ Clear / ⚠️ Issues
|
|
15
15
|
Found).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description:
|
|
3
3
|
Convert findings produced by the audit-* workflows into actionable
|
|
4
|
-
GitHub Stories. Reads temp/audits/audit-*-results.md, groups findings
|
|
4
|
+
GitHub Stories. Reads temp/audits/audit-results/audit-*-results.md, groups findings
|
|
5
5
|
cross-audit, deduplicates against existing Issues by fingerprint, and
|
|
6
6
|
either chains into /mandrel-plan --seed-file or opens standalone Stories.
|
|
7
7
|
---
|
|
@@ -15,7 +15,9 @@ Engineering Lead
|
|
|
15
15
|
## Context
|
|
16
16
|
|
|
17
17
|
The `audit-*` workflows each produce a structured `audit-<dimension>-results.md`
|
|
18
|
-
report under `temp/audits
|
|
18
|
+
report under `temp/audits/audit-results/` — a folder that holds lens reports
|
|
19
|
+
and nothing else; this workflow's own plan, seed and stories files stay one
|
|
20
|
+
level up in `temp/audits/`. Every `### Finding` block in those reports
|
|
19
21
|
already carries the fields a Story body needs (Severity / Impact,
|
|
20
22
|
Dimension / Category, Location, Current State, Recommendation, Acceptance
|
|
21
23
|
signal).
|
|
@@ -26,7 +28,7 @@ They remain read-only emitters of audit reports.
|
|
|
26
28
|
## Prerequisites
|
|
27
29
|
|
|
28
30
|
1. At least one `audit-*-results.md` file under
|
|
29
|
-
`temp/audits/` (or the path passed as the argument). Run a
|
|
31
|
+
`temp/audits/audit-results/` (or the path passed as the argument). Run a
|
|
30
32
|
`/audit-<dimension>` first if none are present.
|
|
31
33
|
2. `GITHUB_TOKEN` or `gh auth status` clean — the dedupe and create
|
|
32
34
|
steps both call GitHub.
|
|
@@ -38,7 +40,7 @@ They remain read-only emitters of audit reports.
|
|
|
38
40
|
|
|
39
41
|
`/audit-to-stories [audit-file-or-glob]`
|
|
40
42
|
|
|
41
|
-
- No argument → scans `temp/audits/audit-*-results.md`.
|
|
43
|
+
- No argument → scans `temp/audits/audit-results/audit-*-results.md`.
|
|
42
44
|
- Single file path or glob → restricts the scan to that input.
|
|
43
45
|
|
|
44
46
|
## Phase 1 — Discover & parse
|
|
@@ -330,7 +332,7 @@ result as a JSON array, and pass it:
|
|
|
330
332
|
|
|
331
333
|
```bash
|
|
332
334
|
node .agents/scripts/audit-to-stories.js --scan --no-provider \
|
|
333
|
-
--issues-file temp/audits/issues.json --glob "temp/audits/audit-*-results.md"
|
|
335
|
+
--issues-file temp/audits/issues.json --glob "temp/audits/audit-results/audit-*-results.md"
|
|
334
336
|
```
|
|
335
337
|
|
|
336
338
|
Real `skip-open` / `skip-reoccurring` classifications come back. The corpus is
|
|
@@ -403,12 +405,12 @@ that delivers the whole sweep (`/mandrel-deliver <epicId>`).
|
|
|
403
405
|
To run an unattended maintenance sweep, `/schedule` a nightly (or weekly)
|
|
404
406
|
job that (1) runs the relevant `audit-*` lens workflows full-scope — no
|
|
405
407
|
`--paths`, no change-set filter, so the whole target-set union is audited —
|
|
406
|
-
writing their `temp/audits/audit-*-results.md` reports, then (2) invokes the
|
|
408
|
+
writing their `temp/audits/audit-results/audit-*-results.md` reports, then (2) invokes the
|
|
407
409
|
CLI's **`--auto` mode** over those results:
|
|
408
410
|
|
|
409
411
|
```bash
|
|
410
412
|
node .agents/scripts/audit-to-stories.js --auto [--dry-run] \
|
|
411
|
-
[--glob "temp/audits/audit-*-results.md"] [--severity <floor>]
|
|
413
|
+
[--glob "temp/audits/audit-results/audit-*-results.md"] [--severity <floor>]
|
|
412
414
|
```
|
|
413
415
|
|
|
414
416
|
The routine shape is **lenses full-scope → dry-run → live**:
|
|
@@ -8,7 +8,7 @@ You are a Lead Product Designer & Frontend Architect evaluating the frontend for
|
|
|
8
8
|
UI consistency, UX best practices, and adherence to the project's design system,
|
|
9
9
|
ensuring the app feels premium and cohesive. The shared lens machinery lives in
|
|
10
10
|
[`helpers/audit-lens-core.md`](helpers/audit-lens-core.md). Write the report to
|
|
11
|
-
`{{
|
|
11
|
+
`{{auditResultsDir}}/audit-ux-ui-results.md`. Dimension values:
|
|
12
12
|
`Visual Consistency | UX Best Practices | Accessibility`; the report adds a
|
|
13
13
|
**Micro-animation Opportunities** section.
|
|
14
14
|
|
|
@@ -87,12 +87,15 @@ one — and name the detected set in the Executive Summary. Then:
|
|
|
87
87
|
## Report envelope & finding-block skeleton {#report-envelope}
|
|
88
88
|
|
|
89
89
|
Each lens writes exactly one structured Markdown report to
|
|
90
|
-
`{{
|
|
90
|
+
`{{auditResultsDir}}/audit-<lens>-results.md` (the lens preamble names its own
|
|
91
91
|
path). A dispatched run gets the anchor substituted; on a manual
|
|
92
|
-
`/audit-<lens>` invocation it renders the literal string `{{
|
|
93
|
-
Treat that literal as `<project.paths.tempRoot>/audits` —
|
|
94
|
-
default
|
|
95
|
-
manual-run rule above.
|
|
92
|
+
`/audit-<lens>` invocation it renders the literal string `{{auditResultsDir}}`.
|
|
93
|
+
Treat that literal as `<project.paths.tempRoot>/audits/audit-results` —
|
|
94
|
+
**`temp/audits/audit-results` by default**, created if absent — and write the
|
|
95
|
+
report there, mirroring the `{{changedFiles}}` manual-run rule above. That
|
|
96
|
+
folder holds lens reports only: any other artifact a lens writes (an
|
|
97
|
+
introspected schema, `perf-baseline.json`, profiler output) goes under
|
|
98
|
+
`{{auditOutputDir}}`, read on a manual run as `<project.paths.tempRoot>/audits`. The report MUST include every section its lens
|
|
96
99
|
template mandates — write `_No findings._` rather than omitting a section — and
|
|
97
100
|
always an
|
|
98
101
|
`## Executive Summary` and a `## Detailed Findings` section. The Executive
|
|
@@ -12,8 +12,7 @@ description: >-
|
|
|
12
12
|
> covers the happy path. Situational material (lease preflight, recovery
|
|
13
13
|
> routers, merge-wait budgets, CI remediation) stays on demand in
|
|
14
14
|
> [`deliver-story-reference.md`](deliver-story-reference.md) and
|
|
15
|
-
> [`deliver-reference.md`](deliver-reference.md); read those
|
|
16
|
-
> envelope or a failure routes you there.
|
|
15
|
+
> [`deliver-reference.md`](deliver-reference.md); read those only when routed.
|
|
17
16
|
|
|
18
17
|
## 1. Dispatch — where the engine runs
|
|
19
18
|
|
|
@@ -25,8 +24,8 @@ rule produces it:
|
|
|
25
24
|
sibling, and a one-Story run has none.
|
|
26
25
|
2. **Every other run is `subagent`**, however trivial each Story's shape.
|
|
27
26
|
|
|
28
|
-
`inline`
|
|
29
|
-
|
|
27
|
+
`inline` drops only the `story-worker` boot — not the verdict owner, which
|
|
28
|
+
the profile alone names (§ 3). **`subagent` and `inline` run the same engine**: same gates,
|
|
30
29
|
same PR to `main`, same terminal envelope.
|
|
31
30
|
|
|
32
31
|
## 2. Engine invariants
|
|
@@ -154,7 +153,7 @@ respawned.
|
|
|
154
153
|
| `status` | Exit | Meaning | You do |
|
|
155
154
|
| --- | --- | --- | --- |
|
|
156
155
|
| `landed` | 0 | PR merged, `agent::done`, tail ran (`tail.*: false` degrades the report, not the land) | Relay it. Done. |
|
|
157
|
-
| `pending` | 3 | **Resumable, not a failure** — the bounded wait expired healthy, or a human owns the merge. Nothing was mutated. | Run `nextCommand`. |
|
|
156
|
+
| `pending` | 3 | **Resumable, not a failure** — the bounded wait expired healthy, or a human owns the merge. Nothing was mutated. | Run `nextCommand`. Each beat: run every `confirm[]` verbatim, pre-epilogue. |
|
|
158
157
|
| `blocked` | 1 | Hard block; `blocked.blockClass` names it | `checks-failed` → fix + resume; else relay |
|
|
159
158
|
| `failed` | 1 | A phase crashed; `phase` names which | Diagnose, fix, re-run close. `base-sync` conflict (files in `failure.reason`): resolve in `workCwd`, commit, run `nextCommand`; block only if you cannot |
|
|
160
159
|
|
|
@@ -228,8 +228,8 @@ separate (`delivery.mergeWatch.*`):
|
|
|
228
228
|
that precede it. Expiry → `pending`. Pass `--max-wait-seconds <n>` to raise
|
|
229
229
|
it when your host has no such ceiling and you want to land in one block.
|
|
230
230
|
- **`maxBudgetSeconds`** (default 3600) bounds the **cumulative** wait across
|
|
231
|
-
resumes, anchored at the
|
|
232
|
-
clock. Exhausting _this_ is the genuine give-up → `blocked`.
|
|
231
|
+
resumes, anchored at the latest auto-merge arm (else `createdAt`): a resume
|
|
232
|
+
keeps the clock, a re-arming re-close starts fresh. Exhausting _this_ is the genuine give-up → `blocked`.
|
|
233
233
|
|
|
234
234
|
The wait probes the checks every poll: a red required check fails fast as
|
|
235
235
|
`checks-failed` instead of burning the budget, and a PR that falls behind its
|
|
@@ -623,8 +623,8 @@ tool-invocation ceiling:
|
|
|
623
623
|
|
|
624
624
|
- It is **resumable**: no label was mutated, no `merge.unlanded` was emitted,
|
|
625
625
|
and `nextCommand` names the one command that continues it. The cumulative
|
|
626
|
-
budget is anchored at the
|
|
627
|
-
clock.
|
|
626
|
+
budget is anchored at the latest auto-merge arm, which a resume does not
|
|
627
|
+
move, so resuming does not restart the clock.
|
|
628
628
|
- It is **not** a park. Returning `pending` because you would rather not wait
|
|
629
629
|
is the no-park failure mode wearing a schema. Return it only
|
|
630
630
|
when the bound genuinely expired, or a human owns the merge.
|
|
@@ -102,7 +102,9 @@ to an attended run.
|
|
|
102
102
|
`effort` is non-null, pass it as that Agent call's `effort`; when it is
|
|
103
103
|
`null`, omit the parameter so the worker inherits the session. Run each
|
|
104
104
|
`close[]` entry's command foreground and serialized as hand-offs arrive.
|
|
105
|
-
|
|
105
|
+
Run every `confirm[]` command verbatim on each beat, before the epilogue:
|
|
106
|
+
a closed Story still owing its `agent::done` flip and land tail. It never
|
|
107
|
+
gates `done`. An empty
|
|
106
108
|
`ready` with work in flight means "waiting", so beat again — **unless
|
|
107
109
|
`stalledDispatch[]` is non-empty**: those ids were dispatched but still
|
|
108
110
|
read `agent::ready`, which is a live init window the first beats or two
|
package/README.md
CHANGED
|
@@ -30,10 +30,13 @@ directory, where your assistant reads it.
|
|
|
30
30
|
| `scripts/` | Deterministic Node.js CLIs that do the mechanical work — GitHub state changes, worktrees, quality gates — so the model judges and the scripts execute. |
|
|
31
31
|
| `schemas/`, `templates/` | JSON Schema contracts and the prompt/planning templates the workflows fill in. |
|
|
32
32
|
| `docs/` | Consumer reference: [configuration](.agents/docs/configuration.md) (every `.agentrc.json` key), the [workflow index](.agents/docs/workflows.md), and operator runbooks. |
|
|
33
|
+
| `audit-checklists/` | Generated per-lens authoring checklists, threaded into a Story's write-time checklist when its change set matches an audit lens. |
|
|
34
|
+
| `mods/` | Beta, opt-in Claude Code mods — see the [mods runbook](.agents/docs/runbooks/mods.md). |
|
|
33
35
|
| `local/` | Yours. `mandrel sync` never touches it, so project-specific skills and workflow fragments survive upgrades. |
|
|
34
36
|
|
|
35
|
-
Project settings live in `.agentrc.json` at your repo root. The
|
|
36
|
-
|
|
37
|
+
Project settings live in `.agentrc.json` at your repo root. The table above is
|
|
38
|
+
a partial list (it omits single files such as `starter-agentrc.json`); the full
|
|
39
|
+
tour of the bundle is in [`.agents/README.md`](.agents/README.md).
|
|
37
40
|
|
|
38
41
|
## The core loop: plan, then deliver
|
|
39
42
|
|
|
@@ -82,7 +85,7 @@ The full process — labels, state, review, troubleshooting — is in
|
|
|
82
85
|
|
|
83
86
|
The `/audit-*` workflows are read-only lenses that examine the codebase along
|
|
84
87
|
one dimension and write a findings report (severity, location, recommendation,
|
|
85
|
-
acceptance signal) under `temp/audits/`. They never change code — fixing is a
|
|
88
|
+
acceptance signal) under `temp/audits/audit-results/`. They never change code — fixing is a
|
|
86
89
|
separate, planned pass.
|
|
87
90
|
|
|
88
91
|
| Area | Lenses |
|