mandrel 2.9.0 → 2.11.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/agents/.markdownlint.json +4 -0
- package/.agents/agents/acceptance-critic.md +30 -5
- package/.agents/agents/auditor.md +36 -19
- package/.agents/agents/plan-critic.md +31 -5
- package/.agents/agents/story-worker.md +91 -100
- package/.agents/docs/configuration.md +39 -25
- package/.agents/docs/execution-reference.md +13 -0
- package/.agents/docs/workflows.md +1 -1
- package/.agents/instructions.md +131 -265
- package/.agents/rules/git-conventions.md +47 -83
- package/.agents/rules/orchestration-error-handling.md +28 -0
- package/.agents/schemas/agentrc.schema.json +36 -9
- package/.agents/schemas/validation-evidence.schema.json +3 -1
- package/.agents/scripts/acceptance-eval.js +10 -6
- package/.agents/scripts/apply-quality-bootstrap.js +1 -1
- package/.agents/scripts/check-test-temp-hygiene.js +438 -0
- package/.agents/scripts/deliver-recover.js +23 -6
- package/.agents/scripts/lib/audit-suite/index.js +5 -0
- package/.agents/scripts/lib/audit-suite/lens-diff-floor.js +179 -0
- package/.agents/scripts/lib/audit-suite/selector.js +1 -1
- package/.agents/scripts/lib/baselines/env-overrides.js +33 -0
- package/.agents/scripts/lib/baselines/git-base.js +0 -0
- package/.agents/scripts/lib/baselines/preview-gates.js +5 -0
- package/.agents/scripts/lib/config/gates/maintainability.schema.js +10 -1
- package/.agents/scripts/lib/config/quality.js +13 -0
- package/.agents/scripts/lib/config/temp-paths.js +121 -1
- package/.agents/scripts/lib/config-settings-schema-delivery.js +30 -0
- package/.agents/scripts/lib/config-settings-schema.js +12 -16
- package/.agents/scripts/lib/observability/metrics-ledger.js +217 -0
- package/.agents/scripts/lib/observability/runtime-friction.js +7 -0
- package/.agents/scripts/lib/orchestration/ceremony-routing.js +45 -0
- package/.agents/scripts/lib/orchestration/check-baselines/phases/evaluate.js +97 -4
- package/.agents/scripts/lib/orchestration/check-baselines/phases/parse-args.js +7 -0
- package/.agents/scripts/lib/orchestration/complexity-gate.js +533 -93
- package/.agents/scripts/lib/orchestration/deliver-recover.js +137 -10
- package/.agents/scripts/lib/orchestration/merge-block-class.js +36 -15
- package/.agents/scripts/lib/orchestration/merge-poll.js +213 -0
- package/.agents/scripts/lib/orchestration/plan-context.js +119 -3
- package/.agents/scripts/lib/orchestration/plan-critic-conditions.js +182 -9
- package/.agents/scripts/lib/orchestration/plan-critics-evaluate.js +29 -2
- package/.agents/scripts/lib/orchestration/plan-metrics.js +31 -82
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +153 -2
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +221 -14
- package/.agents/scripts/lib/orchestration/resolve-stories.js +12 -1
- package/.agents/scripts/lib/orchestration/review-depth.js +9 -4
- package/.agents/scripts/lib/orchestration/review-providers/native.js +34 -16
- package/.agents/scripts/lib/orchestration/single-story-close/phases/code-review.js +8 -3
- package/.agents/scripts/lib/orchestration/single-story-close/phases/confirm-merge.js +230 -79
- package/.agents/scripts/lib/orchestration/spec-budget.js +78 -0
- package/.agents/scripts/lib/orchestration/story-body-gate.js +72 -0
- package/.agents/scripts/lib/orchestration/story-close/phases/local-lens-review.js +89 -1
- package/.agents/scripts/lib/orchestration/story-close/phases/review-core.js +73 -0
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +6 -0
- package/.agents/scripts/lib/orchestration/ticket-validator.js +18 -62
- package/.agents/scripts/lib/templates/decomposer-prompts.js +13 -6
- package/.agents/scripts/lib/test-env.js +65 -0
- package/.agents/scripts/plan-context.js +84 -9
- package/.agents/scripts/plan-critics.js +115 -3
- package/.agents/scripts/plan-persist.js +11 -1
- package/.agents/scripts/plan-run-epilogue.js +1 -1
- package/.agents/scripts/resolve-stories.js +2 -0
- package/.agents/scripts/single-story-confirm-merge.js +65 -5
- package/.agents/scripts/stories-wave-tick.js +1 -1
- package/.agents/workflows/deliver.md +88 -230
- package/.agents/workflows/helpers/acceptance-self-eval.md +16 -5
- package/.agents/workflows/helpers/deliver-reference.md +171 -0
- package/.agents/workflows/helpers/deliver-story-reference.md +223 -0
- package/.agents/workflows/helpers/deliver-story.md +115 -432
- package/.agents/workflows/helpers/plan-reference.md +246 -0
- package/.agents/workflows/plan.md +108 -304
- package/docs/CHANGELOG.md +46 -0
- package/lib/cli/registry.js +31 -14
- package/lib/migrations/index.js +2 -0
- package/lib/migrations/steps/2.11.0-retire-max-seed-words.js +92 -0
- package/package.json +1 -1
package/lib/migrations/index.js
CHANGED
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
import { retireMiDropKnobs } from './steps/2.1.0-retire-mi-drop-knobs.js';
|
|
56
56
|
import { retireVerifyConcurrencyCap } from './steps/2.1.0-retire-verify-concurrency-cap.js';
|
|
57
57
|
import { retireEpicAcTags } from './steps/2.2.0-retire-epic-ac-tags.js';
|
|
58
|
+
import { retireMaxSeedWords } from './steps/2.11.0-retire-max-seed-words.js';
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* Ordered registry of migration steps. MUST stay sorted ascending by
|
|
@@ -71,6 +72,7 @@ export const migrations = [
|
|
|
71
72
|
retireMiDropKnobs,
|
|
72
73
|
retireVerifyConcurrencyCap,
|
|
73
74
|
retireEpicAcTags,
|
|
75
|
+
retireMaxSeedWords,
|
|
74
76
|
];
|
|
75
77
|
|
|
76
78
|
/**
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// lib/migrations/steps/2.11.0-retire-max-seed-words.js
|
|
2
|
+
/**
|
|
3
|
+
* Story #4722 follow-up — strip the retired
|
|
4
|
+
* `planning.complexityGate.maxSeedWords` knob from a consumer's
|
|
5
|
+
* `.agentrc.json`.
|
|
6
|
+
*
|
|
7
|
+
* #4722 (PR #4725) hard-cutover-removed word-count complexity routing:
|
|
8
|
+
* the route derives from the authored Story's shape, never from seed word
|
|
9
|
+
* count, and `maxSeedWords` was dropped from the runtime AJV schema and
|
|
10
|
+
* the published mirror. The `complexityGate` block carries
|
|
11
|
+
* `additionalProperties: false`, so a consumer whose config still sets
|
|
12
|
+
* `maxSeedWords` hits a hard validation failure on upgrade, not a
|
|
13
|
+
* warning. This step strips the key before that check runs — the same
|
|
14
|
+
* contract-cutover pattern as `2.1.0-retire-mi-drop-knobs.js`.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import nodeFs from 'node:fs';
|
|
18
|
+
import path from 'node:path';
|
|
19
|
+
|
|
20
|
+
const AGENTRC_FILENAME = '.agentrc.json';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {unknown} ctx
|
|
24
|
+
* @returns {string}
|
|
25
|
+
*/
|
|
26
|
+
function resolveAgentrcPath(ctx) {
|
|
27
|
+
const projectRoot = ctx?.projectRoot ?? process.cwd();
|
|
28
|
+
return path.join(projectRoot, AGENTRC_FILENAME);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @param {unknown} ctx
|
|
33
|
+
* @param {typeof nodeFs} fsImpl
|
|
34
|
+
* @returns {object | null}
|
|
35
|
+
*/
|
|
36
|
+
function readAgentrcConfig(ctx, fsImpl) {
|
|
37
|
+
try {
|
|
38
|
+
const raw = fsImpl.readFileSync(resolveAgentrcPath(ctx), 'utf8');
|
|
39
|
+
return JSON.parse(raw);
|
|
40
|
+
} catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {object | null} config
|
|
47
|
+
* @returns {boolean}
|
|
48
|
+
*/
|
|
49
|
+
function hasRetiredKey(config) {
|
|
50
|
+
const gate = config?.planning?.complexityGate;
|
|
51
|
+
return Boolean(gate) && Object.hasOwn(gate, 'maxSeedWords');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const retireMaxSeedWords = {
|
|
55
|
+
version: '2.11.0',
|
|
56
|
+
description:
|
|
57
|
+
'strip retired planning.complexityGate.maxSeedWords from .agentrc.json ' +
|
|
58
|
+
'(complexity routes on Story shape, never seed word count — Story #4722)',
|
|
59
|
+
/**
|
|
60
|
+
* @param {{ projectRoot?: string, fs?: typeof nodeFs }} [ctx]
|
|
61
|
+
* @returns {boolean}
|
|
62
|
+
*/
|
|
63
|
+
detect(ctx) {
|
|
64
|
+
const fsImpl = ctx?.fs ?? nodeFs;
|
|
65
|
+
return hasRetiredKey(readAgentrcConfig(ctx, fsImpl));
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* @param {{ projectRoot?: string, fs?: typeof nodeFs }} [ctx]
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
apply(ctx) {
|
|
72
|
+
const fsImpl = ctx?.fs ?? nodeFs;
|
|
73
|
+
const config = readAgentrcConfig(ctx, fsImpl);
|
|
74
|
+
if (!config) return;
|
|
75
|
+
|
|
76
|
+
const gate = config.planning?.complexityGate;
|
|
77
|
+
if (gate && Object.hasOwn(gate, 'maxSeedWords')) {
|
|
78
|
+
delete gate.maxSeedWords;
|
|
79
|
+
if (Object.keys(gate).length === 0) {
|
|
80
|
+
delete config.planning.complexityGate;
|
|
81
|
+
if (Object.keys(config.planning).length === 0) {
|
|
82
|
+
delete config.planning;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
fsImpl.writeFileSync(
|
|
88
|
+
resolveAgentrcPath(ctx),
|
|
89
|
+
`${JSON.stringify(config, null, 2)}\n`,
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
};
|
package/package.json
CHANGED