compound-agent 1.6.0 → 1.6.1
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 +26 -0
- package/README.md +5 -5
- package/dist/cli.js +1050 -822
- package/dist/cli.js.map +1 -1
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/docs/research/spec_design/decision_theory_specifications_and_multi_criteria_tradeoffs.md +0 -0
- package/docs/research/spec_design/design_by_contract.md +251 -0
- package/docs/research/spec_design/domain_driven_design_strategic_modeling.md +183 -0
- package/docs/research/spec_design/formal_specification_methods.md +161 -0
- package/docs/research/spec_design/logic_and_proof_theory_under_the_curry_howard_correspondence.md +250 -0
- package/docs/research/spec_design/natural_language_formal_semantics_abuguity_in_specifications.md +259 -0
- package/docs/research/spec_design/requirements_engineering.md +234 -0
- package/docs/research/spec_design/systems_engineering_specifications_emergent_behavior_interface_contracts.md +149 -0
- package/docs/research/spec_design/what_is_this_about.md +305 -0
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import { resolveModelFile, getLlama, LlamaLogLevel } from 'node-llama-cpp';
|
|
|
9
9
|
import { spawn, execSync } from 'child_process';
|
|
10
10
|
import { fileURLToPath } from 'url';
|
|
11
11
|
import 'chalk';
|
|
12
|
-
import 'readline';
|
|
13
12
|
|
|
14
13
|
var __defProp = Object.defineProperty;
|
|
15
14
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -2008,7 +2007,10 @@ function acquireEmbedLock(repoRoot) {
|
|
|
2008
2007
|
if (err.code !== "EEXIST") throw err;
|
|
2009
2008
|
const existing = readLock(file);
|
|
2010
2009
|
if (existing && isProcessAlive(existing.pid)) {
|
|
2011
|
-
|
|
2010
|
+
const lockAge = Date.now() - new Date(existing.startedAt).getTime();
|
|
2011
|
+
if (lockAge < LOCK_MAX_AGE_MS) {
|
|
2012
|
+
return { acquired: false, holder: existing.pid };
|
|
2013
|
+
}
|
|
2012
2014
|
}
|
|
2013
2015
|
try {
|
|
2014
2016
|
unlinkSync(file);
|
|
@@ -2036,8 +2038,10 @@ function releaseLock(file) {
|
|
|
2036
2038
|
} catch {
|
|
2037
2039
|
}
|
|
2038
2040
|
}
|
|
2041
|
+
var LOCK_MAX_AGE_MS;
|
|
2039
2042
|
var init_embed_lock = __esm({
|
|
2040
2043
|
"src/memory/knowledge/embed-lock.ts"() {
|
|
2044
|
+
LOCK_MAX_AGE_MS = 60 * 60 * 1e3;
|
|
2041
2045
|
}
|
|
2042
2046
|
});
|
|
2043
2047
|
function statusPath(repoRoot) {
|
|
@@ -2490,7 +2494,7 @@ init_storage();
|
|
|
2490
2494
|
var STATE_DIR = ".claude";
|
|
2491
2495
|
var STATE_FILE = ".ca-phase-state.json";
|
|
2492
2496
|
var PHASE_STATE_MAX_AGE_MS = 72 * 60 * 60 * 1e3;
|
|
2493
|
-
var PHASES = ["
|
|
2497
|
+
var PHASES = ["spec-dev", "plan", "work", "review", "compound"];
|
|
2494
2498
|
var GATES = ["post-plan", "gate-3", "gate-4", "final"];
|
|
2495
2499
|
function getStatePath(repoRoot) {
|
|
2496
2500
|
return join(repoRoot, STATE_DIR, STATE_FILE);
|
|
@@ -2508,10 +2512,17 @@ function isIsoDate(value) {
|
|
|
2508
2512
|
function isStringArray(value) {
|
|
2509
2513
|
return Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
2510
2514
|
}
|
|
2515
|
+
function migrateLegacyFields(raw) {
|
|
2516
|
+
if (raw.cookit_active === void 0 && typeof raw.lfg_active === "boolean") {
|
|
2517
|
+
raw.cookit_active = raw.lfg_active;
|
|
2518
|
+
delete raw.lfg_active;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2511
2521
|
function validatePhaseState(raw) {
|
|
2512
2522
|
if (typeof raw !== "object" || raw === null) return false;
|
|
2513
2523
|
const state = raw;
|
|
2514
|
-
|
|
2524
|
+
migrateLegacyFields(state);
|
|
2525
|
+
return typeof state.cookit_active === "boolean" && typeof state.epic_id === "string" && isPhaseName(state.current_phase) && typeof state.phase_index === "number" && state.phase_index >= 1 && state.phase_index <= 5 && isStringArray(state.skills_read) && Array.isArray(state.gates_passed) && state.gates_passed.every((gate) => isGateName(gate)) && isIsoDate(state.started_at);
|
|
2515
2526
|
}
|
|
2516
2527
|
function getPhaseState(repoRoot) {
|
|
2517
2528
|
try {
|
|
@@ -2634,15 +2645,15 @@ function formatLessonForPrime(lesson) {
|
|
|
2634
2645
|
return `- **${lesson.insight}**${tags}
|
|
2635
2646
|
Learned: ${date} via ${source}`;
|
|
2636
2647
|
}
|
|
2637
|
-
function
|
|
2648
|
+
function formatActiveCookitSection(repoRoot) {
|
|
2638
2649
|
const state = getPhaseState(repoRoot);
|
|
2639
|
-
if (state === null || !state.
|
|
2650
|
+
if (state === null || !state.cookit_active) return null;
|
|
2640
2651
|
const skillsRead = state.skills_read.length === 0 ? "(none)" : state.skills_read.join(", ");
|
|
2641
2652
|
const gatesPassed = state.gates_passed.length === 0 ? "(none)" : state.gates_passed.join(", ");
|
|
2642
2653
|
return `
|
|
2643
2654
|
---
|
|
2644
2655
|
|
|
2645
|
-
# ACTIVE
|
|
2656
|
+
# ACTIVE COOK-IT SESSION
|
|
2646
2657
|
|
|
2647
2658
|
Epic: ${state.epic_id}
|
|
2648
2659
|
Phase: ${state.current_phase} (${state.phase_index}/5)
|
|
@@ -2674,9 +2685,9 @@ Critical lessons from past corrections:
|
|
|
2674
2685
|
${formattedLessons}
|
|
2675
2686
|
`;
|
|
2676
2687
|
}
|
|
2677
|
-
const
|
|
2678
|
-
if (
|
|
2679
|
-
output +=
|
|
2688
|
+
const cookitSection = formatActiveCookitSection(root);
|
|
2689
|
+
if (cookitSection !== null) {
|
|
2690
|
+
output += cookitSection;
|
|
2680
2691
|
}
|
|
2681
2692
|
return output;
|
|
2682
2693
|
}
|