agent-work-loop 0.0.0 → 0.6.23
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/README.md +272 -12
- package/dist/brief-Z3JKXEUP.js +181 -0
- package/dist/changelog-R7BNBF2C.js +62 -0
- package/dist/chunk-46HZN6UB.js +446 -0
- package/dist/chunk-4OCSYHYB.js +274 -0
- package/dist/chunk-6E7XEQOH.js +27 -0
- package/dist/chunk-7SYRDDTX.js +516 -0
- package/dist/chunk-BUWGQVHT.js +1243 -0
- package/dist/chunk-C7BR2DCS.js +96 -0
- package/dist/chunk-D5OINC3G.js +52 -0
- package/dist/chunk-DP4O5ME2.js +307 -0
- package/dist/chunk-F5LHXBH7.js +209 -0
- package/dist/chunk-G5LAJ5TV.js +453 -0
- package/dist/chunk-I77CXOEX.js +693 -0
- package/dist/chunk-IMB46O6S.js +286 -0
- package/dist/chunk-IXMAFR4Y.js +771 -0
- package/dist/chunk-QE2CLNBG.js +347 -0
- package/dist/chunk-UOPWVM2H.js +727 -0
- package/dist/chunk-YTAHVR4P.js +166 -0
- package/dist/chunk-ZE6HXOYG.js +904 -0
- package/dist/cli.js +374 -13
- package/dist/commit-APXIVOSD.js +411 -0
- package/dist/config-TFMW7O4T.js +34 -0
- package/dist/doctor-SSKNLPGH.js +29 -0
- package/dist/evolve-QPD7TWGO.js +38 -0
- package/dist/feedback-KAXNFMUY.js +125 -0
- package/dist/gotchas-MCA5Y76R.js +43 -0
- package/dist/hold-recheck-WN5EG7HD.js +133 -0
- package/dist/init-UDM5AXKI.js +79 -0
- package/dist/lane-DAZISODH.js +41 -0
- package/dist/loop-summary-XAI6KOGB.js +361 -0
- package/dist/metrics-WLRZZRTK.js +25 -0
- package/dist/record-UKDIUJ5T.js +68 -0
- package/dist/review-ZTHDJ47V.js +118 -0
- package/dist/rules-R2UZPIVW.js +33 -0
- package/dist/state-XM7NZ2HA.js +37 -0
- package/dist/status-L6U5KO6T.js +40 -0
- package/dist/uninstall-5DFEOFL5.js +545 -0
- package/dist/update-AYTBYAHI.js +61 -0
- package/dist/verify-L7ARTK42.js +37 -0
- package/dist/version-check-LKGU2DNF.js +14 -0
- package/dist/work-KEPTGZ6H.js +50 -0
- package/engine/skills/claude/awl-loop/SKILL.md +292 -0
- package/engine/skills/claude/awl-loop/reference.md +131 -0
- package/engine/skills/claude/awl-pipeline/SKILL.md +89 -0
- package/engine/skills/claude/awl-pipeline-exec/SKILL.md +200 -0
- package/engine/skills/claude/awl-pipeline-plan/SKILL.md +71 -0
- package/engine/skills/claude/awl-pipeline-review/SKILL.md +149 -0
- package/engine/skills/codex/AGENTS.awl.md +117 -0
- package/engine/templates/block-publish.mjs +9 -0
- package/engine/templates/pre-push.sample +7 -0
- package/engine/templates/related-cmd-examples.md +37 -0
- package/engine/version.json +2 -2
- package/package.json +10 -4
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runVerifyChecks
|
|
3
|
+
} from "./chunk-QE2CLNBG.js";
|
|
4
|
+
import "./chunk-6E7XEQOH.js";
|
|
5
|
+
import "./chunk-IXMAFR4Y.js";
|
|
6
|
+
import "./chunk-C7BR2DCS.js";
|
|
7
|
+
import "./chunk-YTAHVR4P.js";
|
|
8
|
+
import {
|
|
9
|
+
filterRules,
|
|
10
|
+
loadRules
|
|
11
|
+
} from "./chunk-IMB46O6S.js";
|
|
12
|
+
import "./chunk-G5LAJ5TV.js";
|
|
13
|
+
import "./chunk-F5LHXBH7.js";
|
|
14
|
+
import "./chunk-I77CXOEX.js";
|
|
15
|
+
import {
|
|
16
|
+
loadState
|
|
17
|
+
} from "./chunk-4OCSYHYB.js";
|
|
18
|
+
import {
|
|
19
|
+
requireConfig,
|
|
20
|
+
run
|
|
21
|
+
} from "./chunk-UOPWVM2H.js";
|
|
22
|
+
import "./chunk-BUWGQVHT.js";
|
|
23
|
+
import {
|
|
24
|
+
caps,
|
|
25
|
+
card,
|
|
26
|
+
makeColors
|
|
27
|
+
} from "./chunk-7SYRDDTX.js";
|
|
28
|
+
|
|
29
|
+
// src/commands/review.ts
|
|
30
|
+
import crypto from "crypto";
|
|
31
|
+
async function git(args, cwd) {
|
|
32
|
+
const r = await run({ cmd: "git", args, cwd, timeoutMs: 3e4 });
|
|
33
|
+
return r.exitCode === 0 ? r.stdout : "";
|
|
34
|
+
}
|
|
35
|
+
function newReviewId() {
|
|
36
|
+
return `rev_${crypto.randomBytes(9).toString("hex")}`;
|
|
37
|
+
}
|
|
38
|
+
function selectCriteria(state, range) {
|
|
39
|
+
const criteria = Array.isArray(state.criteria) ? state.criteria : [];
|
|
40
|
+
if (range.includes("..")) {
|
|
41
|
+
const [start, end] = range.split("..");
|
|
42
|
+
return criteria.filter((c) => {
|
|
43
|
+
const id = String(c.id);
|
|
44
|
+
return id >= (start ?? "") && id <= (end ?? "");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return criteria.filter((c) => c.id === range);
|
|
48
|
+
}
|
|
49
|
+
async function assembleReview(cwd, config, state, range, base) {
|
|
50
|
+
const criteria = selectCriteria(state, range);
|
|
51
|
+
const firstBaseline = criteria.map(
|
|
52
|
+
(c) => typeof c.firstBaseline === "string" ? c.firstBaseline : typeof c.baseline === "string" ? c.baseline : void 0
|
|
53
|
+
).find(Boolean);
|
|
54
|
+
const diffArgs = base ? ["diff", `${base}..HEAD`] : firstBaseline ? ["diff", `${firstBaseline}..HEAD`] : ["diff", "HEAD"];
|
|
55
|
+
const diff = await git(diffArgs, cwd);
|
|
56
|
+
const verify = await runVerifyChecks(config.verify, cwd, { bail: false });
|
|
57
|
+
const branch = (await git(["rev-parse", "--abbrev-ref", "HEAD"], cwd)).trim();
|
|
58
|
+
const commit = (await git(["rev-parse", "HEAD"], cwd)).trim();
|
|
59
|
+
const worktree = (await git(["rev-parse", "--show-toplevel"], cwd)).trim() || cwd;
|
|
60
|
+
const { rules } = loadRules();
|
|
61
|
+
const reviewRules = filterRules(rules, { scope: "review" }).map((r) => ({
|
|
62
|
+
id: r.id,
|
|
63
|
+
body: r.body
|
|
64
|
+
}));
|
|
65
|
+
return {
|
|
66
|
+
reviewId: newReviewId(),
|
|
67
|
+
criteria,
|
|
68
|
+
diff,
|
|
69
|
+
verify,
|
|
70
|
+
provenance: {
|
|
71
|
+
branch,
|
|
72
|
+
commit,
|
|
73
|
+
worktree,
|
|
74
|
+
note: "\uC774 diff\uC640 \uAC80\uC99D \uACB0\uACFC\uB294 \uC704 \uC6CC\uD06C\uD2B8\uB9AC/\uCEE4\uBC0B\uC5D0\uC11C \uB098\uC654\uC2B5\uB2C8\uB2E4"
|
|
75
|
+
},
|
|
76
|
+
rules: reviewRules
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function renderReview(bundle, range, c) {
|
|
80
|
+
const color = makeColors(c.color);
|
|
81
|
+
const out = [];
|
|
82
|
+
out.push(`reviewId ${bundle.reviewId}`);
|
|
83
|
+
out.push(`\uC644\uB8CC \uC870\uAC74 ${bundle.criteria.length}\uAC1C`);
|
|
84
|
+
out.push(`diff ${bundle.diff.split("\n").length}\uC904`);
|
|
85
|
+
out.push(`\uAC80\uC99D ${bundle.verify.passed ? color.green("\uD1B5\uACFC") : color.red("\uC2E4\uD328")}`);
|
|
86
|
+
out.push(`\uADDC\uCE59(review) ${bundle.rules.length}\uAC1C`);
|
|
87
|
+
out.push("");
|
|
88
|
+
out.push("provenance (\uB9AC\uBDF0\uC5B4\uAC00 \uAD50\uCC28\uAC80\uC99D\uD560 \uC704\uCE58)");
|
|
89
|
+
out.push(` \uBE0C\uB79C\uCE58 ${bundle.provenance.branch}`);
|
|
90
|
+
out.push(` \uCEE4\uBC0B ${bundle.provenance.commit.slice(0, 10)}`);
|
|
91
|
+
out.push(` \uC6CC\uD06C\uD2B8\uB9AC ${bundle.provenance.worktree}`);
|
|
92
|
+
out.push("");
|
|
93
|
+
out.push(color.dim(`\uB9AC\uBDF0\uC5B4(\uC11C\uBE0C\uC5D0\uC774\uC804\uD2B8)\uC5D0\uAC8C\uB294 awl review ${range} --json \uC744 \uB118\uAE30\uC138\uC694.`));
|
|
94
|
+
out.push(
|
|
95
|
+
color.dim(
|
|
96
|
+
`\uD310\uC815\uC744 \uBC1B\uC73C\uBA74 awl record review --json '{"reviewId":"${bundle.reviewId}",...}' \uB85C \uAE30\uB85D\uD558\uC138\uC694.`
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
return card(`\uB9AC\uBDF0 \uC790\uB8CC \xB7 ${range}`, out, c);
|
|
100
|
+
}
|
|
101
|
+
async function runReview(range, opts) {
|
|
102
|
+
const { projectRoot, config } = requireConfig();
|
|
103
|
+
const state = loadState(projectRoot);
|
|
104
|
+
const bundle = await assembleReview(projectRoot, config, state, range, opts.base);
|
|
105
|
+
if (opts.json) {
|
|
106
|
+
process.stdout.write(`${JSON.stringify(bundle, null, 2)}
|
|
107
|
+
`);
|
|
108
|
+
} else {
|
|
109
|
+
process.stdout.write(`${renderReview(bundle, range, caps())}
|
|
110
|
+
`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
assembleReview,
|
|
115
|
+
newReviewId,
|
|
116
|
+
runReview,
|
|
117
|
+
selectCriteria
|
|
118
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RULE_LOAD_LIMIT,
|
|
3
|
+
activeRulesDir,
|
|
4
|
+
buildRuleFile,
|
|
5
|
+
checkRuleLoadLimit,
|
|
6
|
+
filterRules,
|
|
7
|
+
loadRules,
|
|
8
|
+
parseRuleFile,
|
|
9
|
+
runRules,
|
|
10
|
+
runRulesPromote,
|
|
11
|
+
suggestLinter,
|
|
12
|
+
validatePromoteOpts
|
|
13
|
+
} from "./chunk-IMB46O6S.js";
|
|
14
|
+
import "./chunk-G5LAJ5TV.js";
|
|
15
|
+
import "./chunk-F5LHXBH7.js";
|
|
16
|
+
import "./chunk-I77CXOEX.js";
|
|
17
|
+
import "./chunk-4OCSYHYB.js";
|
|
18
|
+
import "./chunk-UOPWVM2H.js";
|
|
19
|
+
import "./chunk-BUWGQVHT.js";
|
|
20
|
+
import "./chunk-7SYRDDTX.js";
|
|
21
|
+
export {
|
|
22
|
+
RULE_LOAD_LIMIT,
|
|
23
|
+
activeRulesDir,
|
|
24
|
+
buildRuleFile,
|
|
25
|
+
checkRuleLoadLimit,
|
|
26
|
+
filterRules,
|
|
27
|
+
loadRules,
|
|
28
|
+
parseRuleFile,
|
|
29
|
+
runRules,
|
|
30
|
+
runRulesPromote,
|
|
31
|
+
suggestLinter,
|
|
32
|
+
validatePromoteOpts
|
|
33
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
acquireStateLock,
|
|
3
|
+
applyVerificationAttempts,
|
|
4
|
+
getCriterion,
|
|
5
|
+
loadState,
|
|
6
|
+
mergeState,
|
|
7
|
+
migrateState,
|
|
8
|
+
readStateLock,
|
|
9
|
+
releaseStateLock,
|
|
10
|
+
runStateGet,
|
|
11
|
+
runStateSet,
|
|
12
|
+
sessionToken,
|
|
13
|
+
setCriterion,
|
|
14
|
+
stateLockFile,
|
|
15
|
+
statePath,
|
|
16
|
+
writeState
|
|
17
|
+
} from "./chunk-4OCSYHYB.js";
|
|
18
|
+
import "./chunk-UOPWVM2H.js";
|
|
19
|
+
import "./chunk-BUWGQVHT.js";
|
|
20
|
+
import "./chunk-7SYRDDTX.js";
|
|
21
|
+
export {
|
|
22
|
+
acquireStateLock,
|
|
23
|
+
applyVerificationAttempts,
|
|
24
|
+
getCriterion,
|
|
25
|
+
loadState,
|
|
26
|
+
mergeState,
|
|
27
|
+
migrateState,
|
|
28
|
+
readStateLock,
|
|
29
|
+
releaseStateLock,
|
|
30
|
+
runStateGet,
|
|
31
|
+
runStateSet,
|
|
32
|
+
sessionToken,
|
|
33
|
+
setCriterion,
|
|
34
|
+
stateLockFile,
|
|
35
|
+
statePath,
|
|
36
|
+
writeState
|
|
37
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildStatus,
|
|
3
|
+
checkMissingAcCommits,
|
|
4
|
+
classifyAncestorExit,
|
|
5
|
+
collectPipelineLaneGroups,
|
|
6
|
+
markerBaseName,
|
|
7
|
+
pipelineLanes,
|
|
8
|
+
readDirNames,
|
|
9
|
+
renderPipelineGroups,
|
|
10
|
+
renderStatus,
|
|
11
|
+
runStatus
|
|
12
|
+
} from "./chunk-46HZN6UB.js";
|
|
13
|
+
import "./chunk-DP4O5ME2.js";
|
|
14
|
+
import "./chunk-ZE6HXOYG.js";
|
|
15
|
+
import "./chunk-D5OINC3G.js";
|
|
16
|
+
import "./chunk-QE2CLNBG.js";
|
|
17
|
+
import "./chunk-6E7XEQOH.js";
|
|
18
|
+
import "./chunk-IXMAFR4Y.js";
|
|
19
|
+
import "./chunk-C7BR2DCS.js";
|
|
20
|
+
import "./chunk-YTAHVR4P.js";
|
|
21
|
+
import "./chunk-IMB46O6S.js";
|
|
22
|
+
import "./chunk-G5LAJ5TV.js";
|
|
23
|
+
import "./chunk-F5LHXBH7.js";
|
|
24
|
+
import "./chunk-I77CXOEX.js";
|
|
25
|
+
import "./chunk-4OCSYHYB.js";
|
|
26
|
+
import "./chunk-UOPWVM2H.js";
|
|
27
|
+
import "./chunk-BUWGQVHT.js";
|
|
28
|
+
import "./chunk-7SYRDDTX.js";
|
|
29
|
+
export {
|
|
30
|
+
buildStatus,
|
|
31
|
+
checkMissingAcCommits,
|
|
32
|
+
classifyAncestorExit,
|
|
33
|
+
collectPipelineLaneGroups,
|
|
34
|
+
markerBaseName,
|
|
35
|
+
pipelineLanes,
|
|
36
|
+
readDirNames,
|
|
37
|
+
renderPipelineGroups,
|
|
38
|
+
renderStatus,
|
|
39
|
+
runStatus
|
|
40
|
+
};
|