@aperant/framework 0.6.4 → 0.6.6
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/CHANGELOG.md +38 -0
- package/README.md +54 -234
- package/agents/apt-improver.md +99 -0
- package/agents/apt-planner.md +115 -10
- package/dist/__test-helpers/run-cmd.d.mts +4 -2
- package/dist/__test-helpers/run-cmd.d.mts.map +1 -1
- package/dist/__test-helpers/run-cmd.mjs +56 -15
- package/dist/__test-helpers/run-cmd.mjs.map +1 -1
- package/dist/cli/ci-watch/lock.d.mts +53 -0
- package/dist/cli/ci-watch/lock.d.mts.map +1 -0
- package/dist/cli/ci-watch/lock.mjs +172 -0
- package/dist/cli/ci-watch/lock.mjs.map +1 -0
- package/dist/cli/ci-watch/state.d.mts +36 -0
- package/dist/cli/ci-watch/state.d.mts.map +1 -0
- package/dist/cli/ci-watch/state.mjs +103 -0
- package/dist/cli/ci-watch/state.mjs.map +1 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts +58 -0
- package/dist/cli/ci-watch/stop-matrix.d.mts.map +1 -0
- package/dist/cli/ci-watch/stop-matrix.mjs +164 -0
- package/dist/cli/ci-watch/stop-matrix.mjs.map +1 -0
- package/dist/cli/cli-wrappers/ci-watch.d.mts +2 -0
- package/dist/cli/cli-wrappers/ci-watch.d.mts.map +1 -0
- package/dist/cli/cli-wrappers/ci-watch.mjs +9 -0
- package/dist/cli/cli-wrappers/ci-watch.mjs.map +1 -0
- package/dist/cli/commands/adr.d.mts +5 -0
- package/dist/cli/commands/adr.d.mts.map +1 -0
- package/dist/cli/commands/adr.mjs +228 -0
- package/dist/cli/commands/adr.mjs.map +1 -0
- package/dist/cli/commands/ci-watch.d.mts +7 -0
- package/dist/cli/commands/ci-watch.d.mts.map +1 -0
- package/dist/cli/commands/ci-watch.mjs +465 -0
- package/dist/cli/commands/ci-watch.mjs.map +1 -0
- package/dist/cli/commands/commit.d.mts.map +1 -1
- package/dist/cli/commands/commit.mjs +25 -8
- package/dist/cli/commands/commit.mjs.map +1 -1
- package/dist/cli/commands/context.d.mts +7 -0
- package/dist/cli/commands/context.d.mts.map +1 -0
- package/dist/cli/commands/context.mjs +224 -0
- package/dist/cli/commands/context.mjs.map +1 -0
- package/dist/cli/commands/event.d.mts.map +1 -1
- package/dist/cli/commands/event.mjs +125 -24
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/host-detect.d.mts +1 -1
- package/dist/cli/commands/host-detect.d.mts.map +1 -1
- package/dist/cli/commands/host-detect.mjs +30 -3
- package/dist/cli/commands/host-detect.mjs.map +1 -1
- package/dist/cli/commands/modes.d.mts +13 -0
- package/dist/cli/commands/modes.d.mts.map +1 -0
- package/dist/cli/commands/modes.mjs +221 -0
- package/dist/cli/commands/modes.mjs.map +1 -0
- package/dist/cli/commands/route.mjs +1 -1
- package/dist/cli/commands/route.mjs.map +1 -1
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +393 -145
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/commands/tokens.d.mts.map +1 -1
- package/dist/cli/commands/tokens.mjs +150 -6
- package/dist/cli/commands/tokens.mjs.map +1 -1
- package/dist/cli/commands/triage.d.mts +8 -0
- package/dist/cli/commands/triage.d.mts.map +1 -0
- package/dist/cli/commands/triage.mjs +263 -0
- package/dist/cli/commands/triage.mjs.map +1 -0
- package/dist/cli/config/post-merge-sweep.d.mts +18 -0
- package/dist/cli/config/post-merge-sweep.d.mts.map +1 -1
- package/dist/cli/config/post-merge-sweep.mjs +48 -3
- package/dist/cli/config/post-merge-sweep.mjs.map +1 -1
- package/dist/cli/consistency/registry.d.mts +11 -0
- package/dist/cli/consistency/registry.d.mts.map +1 -1
- package/dist/cli/consistency/registry.mjs +13 -0
- package/dist/cli/consistency/registry.mjs.map +1 -1
- package/dist/cli/coordination/agent-identity.d.mts +9 -0
- package/dist/cli/coordination/agent-identity.d.mts.map +1 -1
- package/dist/cli/coordination/agent-identity.mjs +11 -0
- package/dist/cli/coordination/agent-identity.mjs.map +1 -1
- package/dist/cli/coordination/auto-emit-artifact-ready.d.mts +16 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.d.mts.map +1 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs +88 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs.map +1 -0
- package/dist/cli/coordination/event-log.d.mts +27 -0
- package/dist/cli/coordination/event-log.d.mts.map +1 -1
- package/dist/cli/coordination/event-log.mjs +72 -2
- package/dist/cli/coordination/event-log.mjs.map +1 -1
- package/dist/cli/coordination/event-schema.d.mts +16 -0
- package/dist/cli/coordination/event-schema.d.mts.map +1 -0
- package/dist/cli/coordination/event-schema.mjs +161 -0
- package/dist/cli/coordination/event-schema.mjs.map +1 -0
- package/dist/cli/coordination/store.d.mts +6 -0
- package/dist/cli/coordination/store.d.mts.map +1 -1
- package/dist/cli/coordination/store.mjs +14 -0
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +14 -1
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/registry.d.mts +11 -0
- package/dist/cli/gate/registry.d.mts.map +1 -1
- package/dist/cli/gate/registry.mjs +13 -0
- package/dist/cli/gate/registry.mjs.map +1 -1
- package/dist/cli/help.d.mts.map +1 -1
- package/dist/cli/help.mjs +3 -2
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/host/detect.d.mts +1 -0
- package/dist/cli/host/detect.d.mts.map +1 -1
- package/dist/cli/host/detect.mjs +5 -0
- package/dist/cli/host/detect.mjs.map +1 -1
- package/dist/cli/roadmap/conductor-view.d.mts +13 -0
- package/dist/cli/roadmap/conductor-view.d.mts.map +1 -0
- package/dist/cli/roadmap/conductor-view.mjs +31 -0
- package/dist/cli/roadmap/conductor-view.mjs.map +1 -0
- package/dist/cli/route/envelope.d.mts +68 -4
- package/dist/cli/route/envelope.d.mts.map +1 -1
- package/dist/cli/route/envelope.mjs +140 -103
- package/dist/cli/route/envelope.mjs.map +1 -1
- package/dist/cli/route/skill-discover.d.mts +9 -0
- package/dist/cli/route/skill-discover.d.mts.map +1 -1
- package/dist/cli/route/skill-discover.mjs +13 -1
- package/dist/cli/route/skill-discover.mjs.map +1 -1
- package/dist/cli/skill-author/contract.d.mts +1 -0
- package/dist/cli/skill-author/contract.d.mts.map +1 -1
- package/dist/cli/skill-author/contract.mjs +7 -0
- package/dist/cli/skill-author/contract.mjs.map +1 -1
- package/dist/cli/task/ids.d.mts +7 -4
- package/dist/cli/task/ids.d.mts.map +1 -1
- package/dist/cli/task/ids.mjs +11 -10
- package/dist/cli/task/ids.mjs.map +1 -1
- package/dist/cli/task/worktree-cleanup.d.mts +9 -1
- package/dist/cli/task/worktree-cleanup.d.mts.map +1 -1
- package/dist/cli/task/worktree-cleanup.mjs +190 -9
- package/dist/cli/task/worktree-cleanup.mjs.map +1 -1
- package/dist/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/plugin/agents/apt-planner.md +1 -1
- package/dist/plugin/skills/apt/SKILL.md +111 -5
- package/dist/plugin/skills/apt-author-skill/SKILL.md +11 -0
- package/dist/plugin/skills/apt-bootstrap/SKILL.md +1 -0
- package/dist/plugin/skills/apt-classify/SKILL.md +1 -0
- package/dist/plugin/skills/apt-close-task/SKILL.md +1 -0
- package/dist/plugin/skills/apt-create-docs/SKILL.md +1 -0
- package/dist/plugin/skills/apt-debug/SKILL.md +2 -0
- package/dist/plugin/skills/apt-design/SKILL.md +2 -0
- package/dist/plugin/skills/apt-discuss/SKILL.md +2 -0
- package/dist/plugin/skills/apt-docs/SKILL.md +2 -0
- package/dist/plugin/skills/apt-execute/SKILL.md +1 -0
- package/dist/plugin/skills/apt-mockup/SKILL.md +2 -0
- package/dist/plugin/skills/apt-pause/SKILL.md +1 -0
- package/dist/plugin/skills/apt-personas/SKILL.md +1 -0
- package/dist/plugin/skills/apt-plan/SKILL.md +2 -0
- package/dist/plugin/skills/apt-pr-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-quick/SKILL.md +2 -0
- package/dist/plugin/skills/apt-resume/SKILL.md +1 -0
- package/dist/plugin/skills/apt-review/SKILL.md +1 -0
- package/dist/plugin/skills/apt-roadmap/SKILL.md +1 -0
- package/dist/plugin/skills/apt-roundtable/SKILL.md +2 -0
- package/dist/plugin/skills/apt-run/SKILL.md +1 -0
- package/dist/plugin/skills/apt-scan/SKILL.md +1 -0
- package/dist/plugin/skills/apt-setup/SKILL.md +1 -0
- package/dist/plugin/skills/apt-ship/SKILL.md +6 -5
- package/dist/plugin/skills/apt-stress-test/SKILL.md +1 -0
- package/dist/plugin/skills/apt-terminal/SKILL.md +1 -0
- package/dist/plugin/skills/apt-update/SKILL.md +5 -0
- package/dist/plugin/skills/apt-verify/SKILL.md +1 -0
- package/dist/plugin/skills/apt-verify-proof/SKILL.md +1 -0
- package/dist/types/config.d.ts +85 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +9 -1
- package/prompts/coder.md +2 -0
- package/prompts/conductor-status-check.md +23 -0
- package/prompts/conductor-sub-agent.md +57 -0
- package/prompts/conductor-system.md +172 -0
- package/prompts/planner.md +12 -0
- package/prompts/spec_writer.md +9 -0
- package/skills/apt/SKILL.md +1 -0
- package/skills/apt-close-task/SKILL.md +32 -1
- package/skills/apt-debug/SKILL.md +39 -6
- package/skills/apt-debug/appendices/diagnose-discipline.md +119 -0
- package/skills/apt-diagram/SKILL.md +342 -0
- package/skills/apt-diagram/appendices/design-discipline.md +97 -0
- package/skills/apt-discuss/SKILL.md +25 -0
- package/skills/apt-discuss/appendices/grill-discipline.md +104 -0
- package/skills/apt-discuss/appendices/zoom-out-helper.md +79 -0
- package/skills/apt-execute/SKILL.md +48 -5
- package/skills/apt-execute/appendices/tdd-mode.md +107 -0
- package/skills/apt-improve/DEEPENING.md +84 -0
- package/skills/apt-improve/INTERFACE-DESIGN.md +97 -0
- package/skills/apt-improve/LANGUAGE.md +104 -0
- package/skills/apt-improve/SKILL.md +141 -0
- package/skills/apt-plan/SKILL.md +159 -4
- package/skills/apt-plan/adapters/conductor.md +98 -0
- package/skills/apt-planner.md +42 -1
- package/skills/apt-pr-review/SKILL.md +46 -16
- package/skills/apt-prototype/LOGIC.md +109 -0
- package/skills/apt-prototype/SKILL.md +143 -0
- package/skills/apt-prototype/UI.md +90 -0
- package/skills/apt-quick/SKILL.md +30 -0
- package/skills/apt-review/SKILL.md +2 -0
- package/skills/apt-run/SKILL.md +32 -4
- package/skills/apt-setup/SKILL.md +130 -2
- package/skills/apt-ship/SKILL.md +63 -1
- package/skills/apt-spar/SKILL.md +290 -0
- package/skills/apt-triage/AGENT-BRIEF.md +84 -0
- package/skills/apt-triage/OUT-OF-SCOPE.md +75 -0
- package/skills/apt-triage/SKILL.md +169 -0
- package/skills/apt-verify/SKILL.md +3 -0
- package/skills/apt-verify-proof/SKILL.md +3 -0
- package/skills/apt-watch-ci/SKILL.md +163 -0
- package/skills/apt-zoom-out/SKILL.md +130 -0
- package/src/cli/ci-watch/lock.mjs +178 -0
- package/src/cli/ci-watch/state.mjs +103 -0
- package/src/cli/ci-watch/stop-matrix.mjs +181 -0
- package/src/cli/cli-wrappers/ci-watch.mjs +9 -0
- package/src/cli/commands/adr.mjs +243 -0
- package/src/cli/commands/ci-watch.mjs +503 -0
- package/src/cli/commands/commit.mjs +27 -8
- package/src/cli/commands/context.mjs +244 -0
- package/src/cli/commands/event.mjs +131 -24
- package/src/cli/commands/host-detect.mjs +33 -7
- package/src/cli/commands/modes.mjs +216 -0
- package/src/cli/commands/route.mjs +1 -1
- package/src/cli/commands/task.mjs +430 -170
- package/src/cli/commands/tokens.mjs +157 -6
- package/src/cli/commands/triage.mjs +286 -0
- package/src/cli/config/post-merge-sweep.mjs +49 -3
- package/src/cli/consistency/registry.mjs +14 -0
- package/src/cli/coordination/agent-identity.mjs +12 -0
- package/src/cli/coordination/auto-emit-artifact-ready.mjs +96 -0
- package/src/cli/coordination/event-log.mjs +73 -2
- package/src/cli/coordination/event-schema.d.ts +13 -0
- package/src/cli/coordination/event-schema.mjs +174 -0
- package/src/cli/coordination/store.mjs +14 -0
- package/src/cli/dispatch.mjs +15 -1
- package/src/cli/gate/registry.mjs +14 -0
- package/src/cli/help.mjs +3 -2
- package/src/cli/host/detect.mjs +5 -0
- package/src/cli/roadmap/conductor-view.d.ts +10 -0
- package/src/cli/roadmap/conductor-view.mjs +31 -0
- package/src/cli/route/envelope.mjs +140 -106
- package/src/cli/route/skill-discover.mjs +14 -1
- package/src/cli/skill-author/contract.mjs +7 -0
- package/src/cli/task/ids.mjs +15 -13
- package/src/cli/task/worktree-cleanup.mjs +191 -9
- package/templates/adr-format.md +56 -0
- package/templates/config.json +4 -0
- package/templates/context-format.md +34 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ci-watch/stop-matrix.mjs — pure stop-matrix classifier (D-06).
|
|
3
|
+
*
|
|
4
|
+
* `classify({checks, state, prMetadata})` returns
|
|
5
|
+
* { action, counts_toward_budget, reason }
|
|
6
|
+
*
|
|
7
|
+
* No I/O, no fs, no gh CLI shell-outs — caller pre-fetches `checks` (the
|
|
8
|
+
* payload from `gh pr checks --json name,bucket,state,conclusion,detailsUrl`)
|
|
9
|
+
* and `prMetadata` (`gh pr view --json state,reviewDecision`) and passes them
|
|
10
|
+
* in. The orchestrator in commands/ci-watch.mjs handles the side effects
|
|
11
|
+
* implied by the action.
|
|
12
|
+
*
|
|
13
|
+
* Predicate order matters — short-circuits go first (merged/closed/green/cap
|
|
14
|
+
* fire before any per-check inspection). See spec.md §9 table for the full
|
|
15
|
+
* ordering.
|
|
16
|
+
*
|
|
17
|
+
* The 11 actions:
|
|
18
|
+
* merged, closed, green, attempts-cap, wall-cap, reviewer-pause,
|
|
19
|
+
* identical-log, flake-skip, infra-backoff, diverged-rebased,
|
|
20
|
+
* diverged-bailed, fix
|
|
21
|
+
*
|
|
22
|
+
* `counts_toward_budget` is `true` for fix attempts (including rebase
|
|
23
|
+
* attempts and rebase-bail); `false` for flake-skip / infra-backoff; `false`
|
|
24
|
+
* (with a sentinel meaning "n/a") for terminal actions.
|
|
25
|
+
*/
|
|
26
|
+
const ATTEMPTS_CAP = 5;
|
|
27
|
+
const INFRA_FAILURE_CLASSES = new Set(['runner-oom', 'runner-cancelled', 'gh-5xx', 'timeout']);
|
|
28
|
+
/**
|
|
29
|
+
* @typedef {Object} CheckRow
|
|
30
|
+
* @property {string} [name]
|
|
31
|
+
* @property {string} [conclusion] e.g. 'success' | 'failure' | 'cancelled' | 'timed_out' | 'neutral'
|
|
32
|
+
* @property {string} [state]
|
|
33
|
+
* @property {string} [bucket]
|
|
34
|
+
* @property {string} [failure_class] — optional pre-classified hint (test-only seam)
|
|
35
|
+
* @property {string} [log_fingerprint] — optional digest for identical-log detection
|
|
36
|
+
*
|
|
37
|
+
* @typedef {Object} ClassifyInput
|
|
38
|
+
* @property {CheckRow[]} checks
|
|
39
|
+
* @property {Object} state — per-PR state (see state.mjs §8)
|
|
40
|
+
* @property {Object} prMetadata — { state: 'OPEN'|'CLOSED'|'MERGED', reviewDecision?: string }
|
|
41
|
+
*
|
|
42
|
+
* @typedef {Object} ClassifyOutput
|
|
43
|
+
* @property {string} action
|
|
44
|
+
* @property {boolean} counts_toward_budget
|
|
45
|
+
* @property {string} reason
|
|
46
|
+
*
|
|
47
|
+
* @param {ClassifyInput} input
|
|
48
|
+
* @returns {ClassifyOutput}
|
|
49
|
+
*/
|
|
50
|
+
export function classify({ checks, state, prMetadata }) {
|
|
51
|
+
const pr = prMetadata || {};
|
|
52
|
+
const st = state || {};
|
|
53
|
+
const rows = Array.isArray(checks) ? checks : [];
|
|
54
|
+
// 1. MERGED.
|
|
55
|
+
if (pr.state === 'MERGED') {
|
|
56
|
+
return { action: 'merged', counts_toward_budget: false, reason: 'pr is merged' };
|
|
57
|
+
}
|
|
58
|
+
// 2. CLOSED (not merged).
|
|
59
|
+
if (pr.state === 'CLOSED') {
|
|
60
|
+
return { action: 'closed', counts_toward_budget: false, reason: 'pr is closed unmerged' };
|
|
61
|
+
}
|
|
62
|
+
const failed = rows.filter((c) => isFailing(c));
|
|
63
|
+
const allGreen = rows.length > 0 && rows.every((c) => c.conclusion === 'success');
|
|
64
|
+
// 3. All checks green.
|
|
65
|
+
if (allGreen) {
|
|
66
|
+
return { action: 'green', counts_toward_budget: false, reason: 'all checks succeeded' };
|
|
67
|
+
}
|
|
68
|
+
// 3b. No checks registered yet — CI hasn't enqueued jobs. Wait without
|
|
69
|
+
// burning a fix attempt.
|
|
70
|
+
if (rows.length === 0) {
|
|
71
|
+
return { action: 'wait', counts_toward_budget: false, reason: 'no checks registered yet' };
|
|
72
|
+
}
|
|
73
|
+
// 4. Attempts cap (only when red present — otherwise green/merged/closed would have fired).
|
|
74
|
+
const attempts = st.attempts || 0;
|
|
75
|
+
if (attempts >= ATTEMPTS_CAP && failed.length > 0) {
|
|
76
|
+
return {
|
|
77
|
+
action: 'attempts-cap',
|
|
78
|
+
counts_toward_budget: false,
|
|
79
|
+
reason: `${attempts} fix attempts used; cap is ${ATTEMPTS_CAP}`,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// 5. Wall-clock cap.
|
|
83
|
+
if (st.deadline && Date.now() > new Date(st.deadline).getTime() && failed.length > 0) {
|
|
84
|
+
return {
|
|
85
|
+
action: 'wall-cap',
|
|
86
|
+
counts_toward_budget: false,
|
|
87
|
+
reason: 'past 4h deadline',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
// 6. Reviewer asked for changes.
|
|
91
|
+
if (pr.reviewDecision === 'CHANGES_REQUESTED') {
|
|
92
|
+
return {
|
|
93
|
+
action: 'reviewer-pause',
|
|
94
|
+
counts_toward_budget: false,
|
|
95
|
+
reason: 'reviewer requested changes — pausing',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
// 7. Identical-log → non-converging fixer.
|
|
99
|
+
// Compare aggregate fingerprints (same format as the write side in ci-watch.mjs).
|
|
100
|
+
if (attempts > 0 && st.last_status && failed.length > 0) {
|
|
101
|
+
const currentFingerprint = failed
|
|
102
|
+
.map((f) => `${f.name}:${f.log_fingerprint ?? ''}`)
|
|
103
|
+
.sort()
|
|
104
|
+
.join('|');
|
|
105
|
+
if (currentFingerprint === st.last_status) {
|
|
106
|
+
return {
|
|
107
|
+
action: 'identical-log',
|
|
108
|
+
counts_toward_budget: false,
|
|
109
|
+
reason: 'failed-check fingerprint identical to last attempt',
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// 8. Flake-skip — same check failed then passed on rerun, no commit between.
|
|
114
|
+
// The classifier sees this as an explicit hint from the caller: failed rows
|
|
115
|
+
// classified as `bucket === 'flake'` or `failure_class === 'flake'` are the
|
|
116
|
+
// flaky-test variety and must not burn a fix attempt. Fires when EVERY
|
|
117
|
+
// remaining failure is a flake — if any non-flake failure is present, we
|
|
118
|
+
// fall through and the real failure governs.
|
|
119
|
+
if (failed.length > 0 &&
|
|
120
|
+
failed.every((c) => c.bucket === 'flake' || c.failure_class === 'flake')) {
|
|
121
|
+
return {
|
|
122
|
+
action: 'flake-skip',
|
|
123
|
+
counts_toward_budget: false,
|
|
124
|
+
reason: 'check transient — passed on rerun',
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
// 9. Infra failure class.
|
|
128
|
+
if (failed.some((c) => INFRA_FAILURE_CLASSES.has(c.failure_class))) {
|
|
129
|
+
return {
|
|
130
|
+
action: 'infra-backoff',
|
|
131
|
+
counts_toward_budget: false,
|
|
132
|
+
reason: 'infra-class failure — backoff and retry',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
// 10. Diverged branch — caller has already done the fetch + dry-rebase and
|
|
136
|
+
// passes the outcome in `prMetadata.diverged`:
|
|
137
|
+
// { rebased: true } → action 'diverged-rebased' (counts)
|
|
138
|
+
// { rebased: false } → action 'diverged-bailed' (counts)
|
|
139
|
+
if (pr.diverged && typeof pr.diverged === 'object') {
|
|
140
|
+
if (pr.diverged.rebased === true) {
|
|
141
|
+
return {
|
|
142
|
+
action: 'diverged-rebased',
|
|
143
|
+
counts_toward_budget: true,
|
|
144
|
+
reason: 'origin ahead; rebased successfully',
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
action: 'diverged-bailed',
|
|
149
|
+
counts_toward_budget: true,
|
|
150
|
+
reason: 'origin ahead; rebase conflict',
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
// 11. Default red — go fix.
|
|
154
|
+
return {
|
|
155
|
+
action: 'fix',
|
|
156
|
+
counts_toward_budget: true,
|
|
157
|
+
reason: 'red checks present — attempting fix',
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
export function isFailing(check) {
|
|
161
|
+
const c = check.conclusion;
|
|
162
|
+
return c === 'failure' || c === 'cancelled' || c === 'timed_out' || c === 'action_required';
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=stop-matrix.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stop-matrix.mjs","sourceRoot":"","sources":["../../../src/cli/ci-watch/stop-matrix.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,YAAY,GAAG,CAAC,CAAA;AAEtB,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAA;AAE9F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE;IACrD,MAAM,EAAE,GAAG,UAAU,IAAI,EAAE,CAAA;IAC3B,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE,CAAA;IACtB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAA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K,WAAW,IAAI,CAAC,KAAK,WAAW,IAAI,CAAC,KAAK,iBAAiB,CAAA;AAC5F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-watch.d.mts","sourceRoot":"","sources":["../../../src/cli/cli-wrappers/ci-watch.mjs"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cli-wrappers/ci-watch.mjs — Layer 2 wrapper for the ci-watch cmd.
|
|
3
|
+
*
|
|
4
|
+
* Today this is a passthrough — DISPATCH calls wrap(cmdCiWatch) directly.
|
|
5
|
+
* Re-exporting under cliCiWatch keeps the file-per-cmd structural seam
|
|
6
|
+
* (mirrors task.mjs / pr-review.mjs).
|
|
7
|
+
*/
|
|
8
|
+
export { cmdCiWatch as cliCiWatch } from '../commands/ci-watch.mjs';
|
|
9
|
+
//# sourceMappingURL=ci-watch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-watch.mjs","sourceRoot":"","sources":["../../../src/cli/cli-wrappers/ci-watch.mjs"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adr.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/adr.mjs"],"names":[],"mappings":"AAmIA;;GAEG;AACH,qHA4GC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* commands/adr.mjs — `apt-tools adr write` (Pocock adoption ST-6, AC5).
|
|
3
|
+
*
|
|
4
|
+
* Writes an ADR under `docs/adr/NNNN-slug.md` ONLY when all three Nygard
|
|
5
|
+
* gates pass: hard-to-reverse AND surprising-without-context AND
|
|
6
|
+
* real-trade-off. When any gate fails, the writer returns a `filtered`
|
|
7
|
+
* envelope and writes nothing — the decision stays in
|
|
8
|
+
* `.aperant/context/notes/{task-id}.md` instead.
|
|
9
|
+
*
|
|
10
|
+
* CLI:
|
|
11
|
+
* apt-tools adr write <project-dir>
|
|
12
|
+
* --title <slug>
|
|
13
|
+
* --hard-to-reverse <true|false>
|
|
14
|
+
* --surprising-without-context <true|false>
|
|
15
|
+
* --real-trade-off <true|false>
|
|
16
|
+
* --decision <text>
|
|
17
|
+
* --consequences <text>
|
|
18
|
+
* [--context <text>]
|
|
19
|
+
* [--status Proposed|Accepted|Deprecated|Superseded]
|
|
20
|
+
*
|
|
21
|
+
* Output: JSON envelope.
|
|
22
|
+
* On filter: { status: 'filtered', failed_gates: string[], reason: 'three-gate-filter' }
|
|
23
|
+
* On write: { status: 'ok', command: 'adr-write', file: <abs path>, number: N, slug: '...' }
|
|
24
|
+
*/
|
|
25
|
+
import { existsSync, mkdirSync, readdirSync, writeFileSync } from 'node:fs';
|
|
26
|
+
import { join, resolve } from 'node:path';
|
|
27
|
+
import { parseFlags } from '../util/args.mjs';
|
|
28
|
+
import { err, exitWith, ok } from '../util/result.mjs';
|
|
29
|
+
/**
|
|
30
|
+
* Parse a flag value as a strict boolean. Returns null on unrecognized form
|
|
31
|
+
* so callers can distinguish "missing" from "false".
|
|
32
|
+
*
|
|
33
|
+
* @param {unknown} v
|
|
34
|
+
* @returns {boolean|null}
|
|
35
|
+
*/
|
|
36
|
+
function parseBool(v) {
|
|
37
|
+
if (v === true)
|
|
38
|
+
return true;
|
|
39
|
+
if (typeof v !== 'string')
|
|
40
|
+
return null;
|
|
41
|
+
const low = v.toLowerCase();
|
|
42
|
+
if (low === 'true' || low === 'yes' || low === '1')
|
|
43
|
+
return true;
|
|
44
|
+
if (low === 'false' || low === 'no' || low === '0')
|
|
45
|
+
return false;
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Slugify a title for the filename (NNNN-slug.md).
|
|
50
|
+
*
|
|
51
|
+
* @param {string} title
|
|
52
|
+
*/
|
|
53
|
+
function slugify(title) {
|
|
54
|
+
return title
|
|
55
|
+
.toLowerCase()
|
|
56
|
+
.trim()
|
|
57
|
+
.replace(/[^\w\s-]/g, '')
|
|
58
|
+
.replace(/\s+/g, '-')
|
|
59
|
+
.replace(/-+/g, '-')
|
|
60
|
+
.replace(/^-|-$/g, '');
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Find the next ADR sequence number by scanning `docs/adr/`.
|
|
64
|
+
*
|
|
65
|
+
* @param {string} adrDir
|
|
66
|
+
* @returns {number}
|
|
67
|
+
*/
|
|
68
|
+
function nextAdrNumber(adrDir) {
|
|
69
|
+
if (!existsSync(adrDir))
|
|
70
|
+
return 1;
|
|
71
|
+
const entries = readdirSync(adrDir);
|
|
72
|
+
let max = 0;
|
|
73
|
+
for (const name of entries) {
|
|
74
|
+
const m = name.match(/^(\d{4})-/);
|
|
75
|
+
if (!m)
|
|
76
|
+
continue;
|
|
77
|
+
const n = Number.parseInt(m[1], 10);
|
|
78
|
+
if (n > max)
|
|
79
|
+
max = n;
|
|
80
|
+
}
|
|
81
|
+
return max + 1;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Render the ADR markdown body.
|
|
85
|
+
*
|
|
86
|
+
* @param {{
|
|
87
|
+
* number: number,
|
|
88
|
+
* title: string,
|
|
89
|
+
* status: string,
|
|
90
|
+
* date: string,
|
|
91
|
+
* context: string,
|
|
92
|
+
* decision: string,
|
|
93
|
+
* consequences: string,
|
|
94
|
+
* hardToReverse: boolean,
|
|
95
|
+
* surprisingWithoutContext: boolean,
|
|
96
|
+
* realTradeOff: boolean,
|
|
97
|
+
* }} opts
|
|
98
|
+
*/
|
|
99
|
+
function renderAdr(opts) {
|
|
100
|
+
const paddedNumber = String(opts.number).padStart(4, '0');
|
|
101
|
+
return [
|
|
102
|
+
`# ADR-${paddedNumber}: ${opts.title}`,
|
|
103
|
+
'',
|
|
104
|
+
`**Status:** ${opts.status}`,
|
|
105
|
+
`**Date:** ${opts.date}`,
|
|
106
|
+
'',
|
|
107
|
+
'## Context',
|
|
108
|
+
'',
|
|
109
|
+
opts.context,
|
|
110
|
+
'',
|
|
111
|
+
'## Decision',
|
|
112
|
+
'',
|
|
113
|
+
opts.decision,
|
|
114
|
+
'',
|
|
115
|
+
'## Consequences',
|
|
116
|
+
'',
|
|
117
|
+
opts.consequences,
|
|
118
|
+
'',
|
|
119
|
+
'---',
|
|
120
|
+
'',
|
|
121
|
+
'## Nygard 3-gate filter (audit trail)',
|
|
122
|
+
'',
|
|
123
|
+
'This ADR was written via `apt-tools adr write` and passed all three of',
|
|
124
|
+
"Nygard's filter gates. Reversible / obvious / trade-off-free decisions",
|
|
125
|
+
'stay in `.aperant/context/notes/{task-id}.md` and do NOT become ADRs.',
|
|
126
|
+
'',
|
|
127
|
+
`- **Hard to reverse:** ${opts.hardToReverse}`,
|
|
128
|
+
`- **Surprising without context:** ${opts.surprisingWithoutContext}`,
|
|
129
|
+
`- **Real trade-off:** ${opts.realTradeOff}`,
|
|
130
|
+
'',
|
|
131
|
+
].join('\n');
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* CLI entry: `apt-tools adr <subcommand> <project-dir> [flags]`.
|
|
135
|
+
*/
|
|
136
|
+
export function cmdAdr(subcommand, projectDir, extraArgs) {
|
|
137
|
+
if (subcommand !== 'write') {
|
|
138
|
+
return err('Usage: apt-tools adr write <project-dir> --title <slug> --hard-to-reverse <bool> --surprising-without-context <bool> --real-trade-off <bool> --decision <text> --consequences <text> [--context <text>] [--status <status>]', 1, { command: 'adr' });
|
|
139
|
+
}
|
|
140
|
+
if (!projectDir) {
|
|
141
|
+
return err('project-dir is required', 1, { command: 'adr-write' });
|
|
142
|
+
}
|
|
143
|
+
const flags = parseFlags(extraArgs ?? []);
|
|
144
|
+
const title = flags.get('title');
|
|
145
|
+
if (typeof title !== 'string' || title.trim() === '') {
|
|
146
|
+
return err('--title <slug> is required', 1, { command: 'adr-write' });
|
|
147
|
+
}
|
|
148
|
+
// Three Nygard gates — every one must be parseable; missing means "not
|
|
149
|
+
// asked", which is the same as "no" for the filter.
|
|
150
|
+
const hardToReverse = parseBool(flags.get('hard-to-reverse'));
|
|
151
|
+
const surprisingWithoutContext = parseBool(flags.get('surprising-without-context'));
|
|
152
|
+
const realTradeOff = parseBool(flags.get('real-trade-off'));
|
|
153
|
+
for (const [name, value] of [
|
|
154
|
+
['--hard-to-reverse', hardToReverse],
|
|
155
|
+
['--surprising-without-context', surprisingWithoutContext],
|
|
156
|
+
['--real-trade-off', realTradeOff],
|
|
157
|
+
]) {
|
|
158
|
+
if (value === null) {
|
|
159
|
+
return err(`${name} <true|false> is required`, 1, { command: 'adr-write' });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const decision = flags.get('decision');
|
|
163
|
+
const consequences = flags.get('consequences');
|
|
164
|
+
if (typeof decision !== 'string' || decision.trim() === '') {
|
|
165
|
+
return err('--decision <text> is required', 1, { command: 'adr-write' });
|
|
166
|
+
}
|
|
167
|
+
if (typeof consequences !== 'string' || consequences.trim() === '') {
|
|
168
|
+
return err('--consequences <text> is required', 1, { command: 'adr-write' });
|
|
169
|
+
}
|
|
170
|
+
// Three-gate filter — every gate must be true to write.
|
|
171
|
+
const failed = [];
|
|
172
|
+
if (!hardToReverse)
|
|
173
|
+
failed.push('hard-to-reverse');
|
|
174
|
+
if (!surprisingWithoutContext)
|
|
175
|
+
failed.push('surprising-without-context');
|
|
176
|
+
if (!realTradeOff)
|
|
177
|
+
failed.push('real-trade-off');
|
|
178
|
+
if (failed.length > 0) {
|
|
179
|
+
return exitWith({
|
|
180
|
+
status: 'filtered',
|
|
181
|
+
command: 'adr-write',
|
|
182
|
+
reason: 'three-gate-filter',
|
|
183
|
+
failed_gates: failed,
|
|
184
|
+
note: 'Decision stays in .aperant/context/notes/{task-id}.md. ADRs are reserved for hard-to-reverse, surprising, real-trade-off decisions.',
|
|
185
|
+
}, 0);
|
|
186
|
+
}
|
|
187
|
+
// All three gates passed — write the ADR.
|
|
188
|
+
const absProjectDir = resolve(projectDir);
|
|
189
|
+
if (!existsSync(absProjectDir)) {
|
|
190
|
+
return err(`project directory not found: ${absProjectDir}`, 1, { command: 'adr-write' });
|
|
191
|
+
}
|
|
192
|
+
const adrDir = join(absProjectDir, 'docs', 'adr');
|
|
193
|
+
if (!existsSync(adrDir)) {
|
|
194
|
+
mkdirSync(adrDir, { recursive: true });
|
|
195
|
+
}
|
|
196
|
+
const number = nextAdrNumber(adrDir);
|
|
197
|
+
const slug = slugify(title);
|
|
198
|
+
const paddedNumber = String(number).padStart(4, '0');
|
|
199
|
+
const filename = `${paddedNumber}-${slug}.md`;
|
|
200
|
+
const filePath = join(adrDir, filename);
|
|
201
|
+
const status = (typeof flags.get('status') === 'string' && flags.get('status')) || 'Proposed';
|
|
202
|
+
const context = (typeof flags.get('context') === 'string' && flags.get('context')) ||
|
|
203
|
+
'{Context not supplied — provide via --context on a re-run.}';
|
|
204
|
+
const date = new Date().toISOString().slice(0, 10);
|
|
205
|
+
const body = renderAdr({
|
|
206
|
+
number,
|
|
207
|
+
title,
|
|
208
|
+
status: String(status),
|
|
209
|
+
date,
|
|
210
|
+
context: String(context),
|
|
211
|
+
decision,
|
|
212
|
+
consequences,
|
|
213
|
+
hardToReverse: true,
|
|
214
|
+
surprisingWithoutContext: true,
|
|
215
|
+
realTradeOff: true,
|
|
216
|
+
});
|
|
217
|
+
writeFileSync(filePath, body);
|
|
218
|
+
return ok({
|
|
219
|
+
status: 'ok',
|
|
220
|
+
command: 'adr-write',
|
|
221
|
+
file: filePath,
|
|
222
|
+
number,
|
|
223
|
+
slug,
|
|
224
|
+
title,
|
|
225
|
+
passed_gates: ['hard-to-reverse', 'surprising-without-context', 'real-trade-off'],
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
//# sourceMappingURL=adr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adr.mjs","sourceRoot":"","sources":["../../../src/cli/commands/adr.mjs"],"names":[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CAAC;QACxB,QAAQ;QACR,YAAY;QACZ,aAAa,EAAE,IAAI;QACnB,wBAAwB,EAAE,IAAI;QAC9B,YAAY,EAAE,IAAI;KAClB,CAAC,CAAA;IAEF,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;IAE7B,OAAO,EAAE,CAAC;QACT,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,WAAW;QACpB,IAAI,EAAE,QAAQ;QACd,MAAM;QACN,IAAI;QACJ,KAAK;QACL,YAAY,EAAE,CAAC,iBAAiB,EAAE,4BAA4B,EAAE,gBAAgB,CAAC;KACjF,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} subcommand
|
|
3
|
+
* @param {string} projectDir
|
|
4
|
+
* @param {string[]} extraArgs
|
|
5
|
+
*/
|
|
6
|
+
export function cmdCiWatch(subcommand: string, projectDir: string, extraArgs: string[]): import("../util/result.mjs").CommandResult;
|
|
7
|
+
//# sourceMappingURL=ci-watch.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ci-watch.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/ci-watch.mjs"],"names":[],"mappings":"AA8DA;;;;GAIG;AACH,uCAJW,MAAM,cACN,MAAM,aACN,MAAM,EAAE,8CAyBlB"}
|