@christang/keel 5.7.0 → 5.14.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/assets/bootstrap/AGENTS.md +1 -1
- package/assets/openspec/schemas/keel-spec-driven/templates/tasks.md +4 -2
- package/bin/keel.js +158 -58
- package/package.json +1 -1
- package/plugins/keel/.claude-plugin/plugin.json +1 -1
- package/plugins/keel/.codex-plugin/plugin.json +1 -1
- package/plugins/keel/agents/keel-single-task-goal-claude.md +3 -2
- package/plugins/keel/agents/keel-single-task-goal-codex.md +2 -2
- package/plugins/keel/scripts/pretooluse-guard.js +65 -2
- package/plugins/keel/scripts/session-start.js +87 -0
- package/plugins/keel/skills/keel-review-checklist/SKILL.md +25 -1
- package/plugins/keel/skills/keel-run-single-task-goal/SKILL.md +3 -3
- package/scripts/run_python.js +101 -5
- package/scripts/validate_plugin.py +7298 -3678
- package/src/core/config.js +58 -0
- package/src/core/context.js +41 -5
- package/src/core/gates.js +236 -35
- package/src/core/goal.js +13 -1
- package/src/core/helper.js +27 -1
- package/src/core/projection.js +55 -0
- package/src/core/task-contract.js +30 -0
|
@@ -6,6 +6,7 @@ const path = require("path");
|
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
8
|
CONFIG_RELATIVE_PATH,
|
|
9
|
+
readDelegationPolicy,
|
|
9
10
|
readStandingAuthorization,
|
|
10
11
|
} = require("./config");
|
|
11
12
|
|
|
@@ -866,6 +867,24 @@ function compileTaskContract(repo, change, task) {
|
|
|
866
867
|
if (!autonomy.some((item) => /^Pre-authorized fallback:/i.test(item))) {
|
|
867
868
|
autonomy.push("Pre-authorized fallback: none");
|
|
868
869
|
}
|
|
870
|
+
// Who runs this task, resolved exactly as the autonomy boundary above is: the
|
|
871
|
+
// task keeps whatever it authored, the repository declaration supplies only
|
|
872
|
+
// what the task left silent, and the entry names its source. A declaration
|
|
873
|
+
// that could overwrite an authored tier would make the capsule unreadable on
|
|
874
|
+
// its own — you could not tell what this task decided from what the file did.
|
|
875
|
+
const authoredTier = normalizeText(field(task, "Delegation")).toLowerCase();
|
|
876
|
+
let delegation = { tier: null, source: null };
|
|
877
|
+
if (authoredTier) {
|
|
878
|
+
delegation = { tier: authoredTier, source: "task" };
|
|
879
|
+
} else {
|
|
880
|
+
const { tier } = readDelegationPolicy(repo);
|
|
881
|
+
if (tier) {
|
|
882
|
+
delegation = {
|
|
883
|
+
tier,
|
|
884
|
+
source: CONFIG_RELATIVE_PATH.split(path.sep).join("/"),
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
}
|
|
869
888
|
// A question is unresolved authority when it is the subject of its Covers
|
|
870
889
|
// entry. Scanning the whole field also matched a resolved question named as
|
|
871
890
|
// supporting detail beside the fact that closed it, and the only fix
|
|
@@ -940,7 +959,18 @@ function compileTaskContract(repo, change, task) {
|
|
|
940
959
|
couplingMode === "required" ? candidateBoundary : [],
|
|
941
960
|
designContract: coupledContract,
|
|
942
961
|
},
|
|
962
|
+
// A helper and a delegate are different roles. A helper is never a second
|
|
963
|
+
// writer and this stays true whatever the repository declares; delegation
|
|
964
|
+
// is a separate entry beside it, never a helper with the guard removed.
|
|
943
965
|
helperAuthority: "read-only-evidence-only",
|
|
966
|
+
// Present only when a tier actually resolved. An unconditional field would
|
|
967
|
+
// change the compiled capsule for every task everywhere, moving every
|
|
968
|
+
// recorded anchor and drifting every live change in every consumer repo on
|
|
969
|
+
// upgrade — for repositories that declared nothing and asked for nothing.
|
|
970
|
+
// Omission keeps this release's invariant: no behavior change without a
|
|
971
|
+
// declaration. A repository that does declare gets a different capsule,
|
|
972
|
+
// which is honest, because its execution genuinely differs.
|
|
973
|
+
...(delegation.tier ? { delegation } : {}),
|
|
944
974
|
prohibitions: [
|
|
945
975
|
"must not change Acceptance",
|
|
946
976
|
// repo-action is the one mode whose authorized effect is the repository
|