@xn-intenton-z2a/agentic-lib 7.4.52 → 7.4.54
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/agentic-lib.toml
CHANGED
|
@@ -93,7 +93,7 @@ review-issues-cap = 2 # max issues reviewed per batch (conserva
|
|
|
93
93
|
min-resolved-issues = 1 # mission-complete: minimum closed-as-RESOLVED issues
|
|
94
94
|
min-cumulative-transforms = 1 # mission-complete: minimum transform cycles
|
|
95
95
|
max-source-todos = 1 # mission-complete: max TODO comments in src
|
|
96
|
-
acceptance-criteria-threshold =
|
|
96
|
+
acceptance-criteria-threshold = 90 # mission-complete: % acceptance criteria required
|
|
97
97
|
|
|
98
98
|
[profiles.med]
|
|
99
99
|
reasoning-effort = "high" # low | medium | high | none
|
|
@@ -119,7 +119,7 @@ review-issues-cap = 3 # max issues reviewed per batch
|
|
|
119
119
|
min-resolved-issues = 1 # mission-complete: minimum closed-as-RESOLVED issues
|
|
120
120
|
min-cumulative-transforms = 1 # mission-complete: minimum transform cycles
|
|
121
121
|
max-source-todos = 1 # mission-complete: max TODO comments in src
|
|
122
|
-
acceptance-criteria-threshold =
|
|
122
|
+
acceptance-criteria-threshold = 90 # mission-complete: % acceptance criteria required
|
|
123
123
|
|
|
124
124
|
[profiles.max]
|
|
125
125
|
reasoning-effort = "high" # low | medium | high | none
|
|
@@ -145,7 +145,7 @@ review-issues-cap = 4 # max issues reviewed per batch (may need
|
|
|
145
145
|
min-resolved-issues = 1 # mission-complete: minimum closed-as-RESOLVED issues
|
|
146
146
|
min-cumulative-transforms = 1 # mission-complete: minimum transform cycles
|
|
147
147
|
max-source-todos = 0 # mission-complete: max TODO comments in src
|
|
148
|
-
acceptance-criteria-threshold =
|
|
148
|
+
acceptance-criteria-threshold = 90 # mission-complete: % acceptance criteria required
|
|
149
149
|
|
|
150
150
|
[goals]
|
|
151
151
|
# W12/W13: Code coverage thresholds — stated in all code-changing prompts
|
package/bin/agentic-lib.js
CHANGED
|
@@ -848,7 +848,7 @@ async function initPurge(seedsDir, missionName, initTimestamp) {
|
|
|
848
848
|
// Copy mission seed file as MISSION.md (with random/generate support)
|
|
849
849
|
const missionsDir = resolve(seedsDir, "missions");
|
|
850
850
|
let resolvedMission = missionName;
|
|
851
|
-
let missionType = missionName; // "random"
|
|
851
|
+
let missionType = missionName; // "random" or the specific seed name
|
|
852
852
|
|
|
853
853
|
if (missionName === "random") {
|
|
854
854
|
// W11: Pick a random mission from available seeds
|
|
@@ -861,63 +861,20 @@ async function initPurge(seedsDir, missionName, initTimestamp) {
|
|
|
861
861
|
}
|
|
862
862
|
resolvedMission = available[Math.floor(Math.random() * available.length)];
|
|
863
863
|
console.log(` RANDOM: selected mission "${resolvedMission}" from ${available.length} available`);
|
|
864
|
-
} else if (missionName === "generate") {
|
|
865
|
-
// W12: Generate a mission using LLM
|
|
866
|
-
console.log(" GENERATE: Creating LLM-generated mission...");
|
|
867
|
-
try {
|
|
868
|
-
const { runCopilotSession } = await import("../src/copilot/copilot-session.js");
|
|
869
|
-
const available = existsSync(missionsDir)
|
|
870
|
-
? readdirSync(missionsDir).filter((f) => f.endsWith(".md")).map((f) => f.replace(/\.md$/, ""))
|
|
871
|
-
: [];
|
|
872
|
-
const sampleMission = existsSync(resolve(missionsDir, "7-kyu-understand-fizz-buzz.md"))
|
|
873
|
-
? readFileSync(resolve(missionsDir, "7-kyu-understand-fizz-buzz.md"), "utf8")
|
|
874
|
-
: "";
|
|
875
|
-
const prompt = [
|
|
876
|
-
"Generate a novel JavaScript library mission for an autonomous coding pipeline.",
|
|
877
|
-
"The mission should follow this exact structure (use the example as a template):",
|
|
878
|
-
"",
|
|
879
|
-
sampleMission,
|
|
880
|
-
"",
|
|
881
|
-
"Requirements:",
|
|
882
|
-
"- Be distinct from all existing missions: " + available.join(", "),
|
|
883
|
-
"- Difficulty should be between 8-kyu (trivial) and 2-kyu (expert)",
|
|
884
|
-
"- Include 5-10 acceptance criteria as markdown checkboxes (- [ ] ...)",
|
|
885
|
-
"- The library must be implementable in a single src/lib/main.js file",
|
|
886
|
-
"- Include edge cases and error handling in the requirements",
|
|
887
|
-
"",
|
|
888
|
-
"Write the mission to MISSION.md using the write_file tool.",
|
|
889
|
-
].join("\n");
|
|
890
|
-
await runCopilotSession({
|
|
891
|
-
task: "generate-mission",
|
|
892
|
-
model,
|
|
893
|
-
target,
|
|
894
|
-
prompt,
|
|
895
|
-
timeoutMs: 120000,
|
|
896
|
-
dryRun,
|
|
897
|
-
});
|
|
898
|
-
resolvedMission = "generated";
|
|
899
|
-
console.log(" GENERATE: Mission written to MISSION.md");
|
|
900
|
-
} catch (err) {
|
|
901
|
-
console.error(` GENERATE: LLM generation failed (${err.message}), falling back to fizz-buzz`);
|
|
902
|
-
resolvedMission = "7-kyu-understand-fizz-buzz";
|
|
903
|
-
missionType = "generate-fallback";
|
|
904
|
-
}
|
|
905
864
|
}
|
|
906
865
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
console.error(`Available missions: ${available.join(", ")}`);
|
|
918
|
-
}
|
|
919
|
-
process.exit(1);
|
|
866
|
+
const selectedMissionFile = resolve(missionsDir, `${resolvedMission}.md`);
|
|
867
|
+
if (existsSync(selectedMissionFile)) {
|
|
868
|
+
initCopyFile(selectedMissionFile, resolve(target, "MISSION.md"), `MISSION: missions/${resolvedMission}.md → MISSION.md`);
|
|
869
|
+
} else {
|
|
870
|
+
const available = existsSync(missionsDir)
|
|
871
|
+
? readdirSync(missionsDir).filter((f) => f.endsWith(".md")).map((f) => f.replace(/\.md$/, ""))
|
|
872
|
+
: [];
|
|
873
|
+
console.error(`\nERROR: Unknown mission "${resolvedMission}".`);
|
|
874
|
+
if (available.length > 0) {
|
|
875
|
+
console.error(`Available missions: ${available.join(", ")}`);
|
|
920
876
|
}
|
|
877
|
+
process.exit(1);
|
|
921
878
|
}
|
|
922
879
|
|
|
923
880
|
// W17: Generate structured acceptance criteria in TOML
|
package/package.json
CHANGED
|
@@ -97,12 +97,16 @@ async function run() {
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
// C1: Read persistent state from agentic-lib-state.toml
|
|
100
|
-
|
|
100
|
+
readState("."); // warm up / validate
|
|
101
101
|
|
|
102
102
|
const startTime = Date.now();
|
|
103
103
|
const result = await handler(context);
|
|
104
104
|
const durationMs = Date.now() - startTime;
|
|
105
105
|
|
|
106
|
+
// W3 fix: Re-read state after task — handlers like direct.js may have
|
|
107
|
+
// written mission-complete or other status updates to disk during execution.
|
|
108
|
+
const state = readState(".");
|
|
109
|
+
|
|
106
110
|
// Set outputs
|
|
107
111
|
core.setOutput("result", result.outcome || "completed");
|
|
108
112
|
for (const [key, field] of [["pr-number", "prNumber"], ["tokens-used", "tokensUsed"], ["model", "model"], ["action", "action"], ["action-arg", "actionArg"], ["narrative", "narrative"], ["report-content", "reportContent"]]) {
|