mandrel 2.83.0 → 2.85.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 +65 -20
- package/.agents/docs/configuration.md +36 -0
- package/.agents/docs/runbooks/mods.md +98 -54
- package/.agents/docs/workflows.md +14 -0
- package/.agents/instructions.md +4 -1
- package/.agents/mods/mandrel-status/hooks/register.tsx +579 -204
- package/.agents/mods/mandrel-status/types/index.d.ts +58 -13
- package/.agents/schemas/story-deliver-terminal.schema.json +2 -2
- package/.agents/scripts/boot-sweep.js +42 -13
- package/.agents/scripts/coverage-capture.js +1 -0
- package/.agents/scripts/evidence-gate.js +1 -0
- package/.agents/scripts/generate-workflows-doc.js +14 -0
- package/.agents/scripts/lib/bootstrap/agents-md-fold.js +99 -16
- package/.agents/scripts/lib/bootstrap/manifest.js +4 -4
- package/.agents/scripts/lib/bootstrap/project-bootstrap.js +16 -1
- package/.agents/scripts/lib/close-lock-events.js +29 -9
- package/.agents/scripts/lib/codex/agents-projection.js +284 -0
- package/.agents/scripts/lib/codex/skills-projection.js +291 -0
- package/.agents/scripts/lib/config/agentrc-overlay.js +91 -0
- package/.agents/scripts/lib/config/sync-agentrc.js +39 -19
- package/.agents/scripts/lib/config-resolver.js +5 -42
- package/.agents/scripts/lib/config-settings-schema-quality.js +1 -1
- package/.agents/scripts/lib/full-suite-lock.js +2 -0
- package/.agents/scripts/lib/full-suite-queue.js +66 -26
- package/.agents/scripts/lib/observability/source-classifier.js +2 -0
- package/.agents/scripts/lib/orchestration/review-providers/claude-verdict.js +242 -0
- package/.agents/scripts/lib/orchestration/review-providers/code-review.js +151 -111
- package/.agents/scripts/lib/orchestration/review-providers/codex-cli.js +152 -0
- package/.agents/scripts/lib/orchestration/review-providers/codex.js +33 -105
- package/.agents/scripts/lib/orchestration/review-providers/provider-severity.js +30 -0
- package/.agents/scripts/lib/orchestration/review-providers/security-review.js +3 -17
- package/.agents/scripts/lib/orchestration/single-story-close/phases/reconcile-done.js +12 -5
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +30 -4
- package/.agents/scripts/lib/orchestration/story-handoff.js +84 -10
- package/.agents/scripts/lib/single-story-sweep/reconcile-closing.js +89 -0
- package/.agents/scripts/single-story-init.js +20 -5
- package/.agents/scripts/sync-agentrc.js +5 -3
- package/.agents/scripts/sync-claude-agents.js +20 -0
- package/.agents/scripts/sync-claude-commands.js +64 -27
- package/.agents/scripts/sync-codex-agents.js +36 -0
- package/.agents/scripts/sync-codex-skills.js +36 -0
- package/.agents/workflows/helpers/deliver-story-reference.md +6 -0
- package/.agents/workflows/helpers/mandrel-sync-config.md +16 -9
- package/.agents/workflows/mandrel-update.md +2 -1
- package/docs/CHANGELOG.md +23 -0
- package/lib/cli/guarded-sync.js +3 -2
- package/lib/cli/registry.js +248 -0
- package/lib/cli/sync-agents.js +5 -2
- package/lib/cli/sync-commands.js +5 -2
- package/lib/cli/sync.js +45 -14
- package/lib/cli/uninstall.js +8 -1
- package/lib/migrations/index.js +2 -0
- package/lib/migrations/steps/2.84.0-hoist-system-prompt-block.js +64 -0
- package/package.json +3 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// lib/migrations/steps/2.84.0-hoist-system-prompt-block.js
|
|
2
|
+
/**
|
|
3
|
+
* Move an already-appended Mandrel system-prompt block to the top of
|
|
4
|
+
* AGENTS.md (after a leading H1) and upgrade it to carry the prose read
|
|
5
|
+
* directive. Codex stops reading AGENTS.md at `project_doc_max_bytes` and
|
|
6
|
+
* expands no `@` imports, so a block appended to a long file never loads
|
|
7
|
+
* there. Shares the bootstrap placement contract.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import nodeFs from 'node:fs';
|
|
11
|
+
import path from 'node:path';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
hoistSystemPromptBlock,
|
|
15
|
+
needsSystemPromptHoist,
|
|
16
|
+
} from '../../../.agents/scripts/lib/bootstrap/agents-md-fold.js';
|
|
17
|
+
|
|
18
|
+
const ENTRY_DOC = 'AGENTS.md';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {{ projectRoot?: string }} [ctx]
|
|
22
|
+
* @param {typeof nodeFs} fsImpl
|
|
23
|
+
* @returns {string | null} AGENTS.md text, or null when absent.
|
|
24
|
+
*/
|
|
25
|
+
function readEntryDoc(ctx, fsImpl) {
|
|
26
|
+
const target = path.join(ctx?.projectRoot ?? process.cwd(), ENTRY_DOC);
|
|
27
|
+
try {
|
|
28
|
+
return fsImpl.readFileSync(target, 'utf8');
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const hoistSystemPromptBlockStep = {
|
|
35
|
+
version: '2.84.0',
|
|
36
|
+
description:
|
|
37
|
+
'move the AGENTS.md system-prompt block to the top and add the read ' +
|
|
38
|
+
'directive for hosts without @-imports (Story #5655)',
|
|
39
|
+
/**
|
|
40
|
+
* @param {{ projectRoot?: string, fs?: typeof nodeFs }} [ctx]
|
|
41
|
+
* @param {typeof nodeFs} [fsImpl]
|
|
42
|
+
* @returns {boolean}
|
|
43
|
+
*/
|
|
44
|
+
detect(ctx, fsImpl = ctx?.fs ?? nodeFs) {
|
|
45
|
+
const text = readEntryDoc(ctx, fsImpl);
|
|
46
|
+
return text !== null && needsSystemPromptHoist(text);
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* @param {{ projectRoot?: string, fs?: typeof nodeFs }} [ctx]
|
|
50
|
+
* @param {typeof nodeFs} [fsImpl]
|
|
51
|
+
* @returns {void}
|
|
52
|
+
*/
|
|
53
|
+
apply(ctx, fsImpl = ctx?.fs ?? nodeFs) {
|
|
54
|
+
const text = readEntryDoc(ctx, fsImpl);
|
|
55
|
+
if (text === null) return;
|
|
56
|
+
const next = hoistSystemPromptBlock(text);
|
|
57
|
+
if (next === text) return;
|
|
58
|
+
fsImpl.writeFileSync(
|
|
59
|
+
path.join(ctx?.projectRoot ?? process.cwd(), ENTRY_DOC),
|
|
60
|
+
next,
|
|
61
|
+
'utf8',
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mandrel",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.85.0",
|
|
4
4
|
"description": "Claude Code-first opinionated workflow framework: instructions, skills, rules, and SDLC workflows that govern AI coding assistants.",
|
|
5
5
|
"files": [
|
|
6
6
|
".agents/",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"docs/CHANGELOG.md",
|
|
9
9
|
"lib/",
|
|
10
10
|
"!lib/**/__tests__",
|
|
11
|
-
"!.agents/**/__tests__"
|
|
11
|
+
"!.agents/**/__tests__",
|
|
12
|
+
"!.agents/skills/workflows"
|
|
12
13
|
],
|
|
13
14
|
"publishConfig": {
|
|
14
15
|
"access": "public",
|