geloforge 0.0.0-stage → 0.6.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/LICENSE +21 -0
- package/README.md +140 -2
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/VERSION +1 -0
- package/core/adopt-project.mjs +458 -0
- package/core/checkpoint.mjs +438 -0
- package/core/codebase-map.mjs +886 -0
- package/core/compatibility.json +16 -0
- package/core/compatibility.mjs +123 -0
- package/core/context-compiler.mjs +1315 -0
- package/core/evidence-capture.mjs +326 -0
- package/core/git-utils.mjs +167 -0
- package/core/handoff.mjs +815 -0
- package/core/json-schema-lite.mjs +119 -0
- package/core/mcp-init.mjs +248 -0
- package/core/mcp-server.mjs +915 -0
- package/core/path-safety.mjs +508 -0
- package/core/project-locator.mjs +231 -0
- package/core/project-lock.mjs +438 -0
- package/core/project-status.mjs +609 -0
- package/core/project-validator.mjs +544 -0
- package/core/skills-history.mjs +572 -0
- package/core/skills-lifecycle.mjs +2225 -0
- package/core/skills-lint.mjs +365 -0
- package/core/skills.mjs +1449 -0
- package/core/task-manager.mjs +1042 -0
- package/core/template-utils.mjs +190 -0
- package/core/text-utils.mjs +48 -0
- package/core/verify-task.mjs +48 -0
- package/core/yaml-subset.mjs +572 -0
- package/package.json +47 -4
- package/policies/approval-boundaries.md +42 -0
- package/policies/memory-policy.md +53 -0
- package/policies/token-efficiency.md +30 -0
- package/schemas/README.md +43 -0
- package/schemas/adr.schema.json +64 -0
- package/schemas/agent-handoff.schema.json +139 -0
- package/schemas/approval-record.schema.json +101 -0
- package/schemas/conflict-record.schema.json +60 -0
- package/schemas/context-pack-manifest.schema.json +194 -0
- package/schemas/evidence-manifest.schema.json +83 -0
- package/schemas/incident-record.schema.json +53 -0
- package/schemas/project-manifest.schema.json +90 -0
- package/schemas/project-state.schema.json +64 -0
- package/schemas/recovery-checkpoint.schema.json +49 -0
- package/schemas/research-record.schema.json +76 -0
- package/schemas/task-contract.schema.json +95 -0
- package/scripts/bootstrap-project.mjs +357 -0
- package/scripts/geloforge.mjs +2291 -0
- package/templates/profiles/README.md +19 -0
- package/templates/profiles/ai-system/brain/profile.md +21 -0
- package/templates/profiles/ai-system/gitignore.append +5 -0
- package/templates/profiles/ai-system/profile.json +6 -0
- package/templates/profiles/automation/brain/profile.md +19 -0
- package/templates/profiles/automation/gitignore.append +5 -0
- package/templates/profiles/automation/profile.json +6 -0
- package/templates/profiles/desktop/brain/profile.md +21 -0
- package/templates/profiles/desktop/gitignore.append +7 -0
- package/templates/profiles/desktop/profile.json +6 -0
- package/templates/profiles/mobile/brain/profile.md +20 -0
- package/templates/profiles/mobile/gitignore.append +8 -0
- package/templates/profiles/mobile/profile.json +6 -0
- package/templates/profiles/web/brain/profile.md +21 -0
- package/templates/profiles/web/gitignore.append +6 -0
- package/templates/profiles/web/profile.json +6 -0
- package/templates/project-starter/AGENTS.md +26 -0
- package/templates/project-starter/GEMINI.md +16 -0
- package/templates/project-starter/README.md +26 -0
- package/templates/project-starter/brain/INDEX.md +40 -0
- package/templates/project-starter/brain/architecture/overview.md +30 -0
- package/templates/project-starter/brain/decisions/.gitkeep +0 -0
- package/templates/project-starter/brain/manifest.yaml +36 -0
- package/templates/project-starter/brain/requirements/constraints.md +29 -0
- package/templates/project-starter/brain/requirements/prd.md +37 -0
- package/templates/project-starter/brain/state/current.yaml +19 -0
- package/templates/project-starter/gitignore.template +25 -0
- package/templates/project-starter/src/.gitkeep +0 -0
- package/templates/project-starter/tasks/.gitkeep +0 -0
- package/templates/project-starter/tests/.gitkeep +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"harness_version": "0.6.0",
|
|
3
|
+
"template_version": "1.0.0",
|
|
4
|
+
"default_schema_version": "1.1",
|
|
5
|
+
"supported_schema_versions": ["1.0", "1.1"],
|
|
6
|
+
"supported_template_major": 1,
|
|
7
|
+
"supported_profile_major": 1,
|
|
8
|
+
"node_minimum": "20.0.0",
|
|
9
|
+
"profiles": {
|
|
10
|
+
"web": "1.0.0",
|
|
11
|
+
"desktop": "1.0.0",
|
|
12
|
+
"mobile": "1.0.0",
|
|
13
|
+
"automation": "1.0.0",
|
|
14
|
+
"ai-system": "1.0.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight version and compatibility checking for harness, template, schema, and profile versions.
|
|
3
|
+
* Zero external dependencies.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import fs from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
const DEFAULT_COMPAT_PATH = path.join(__dirname, "compatibility.json");
|
|
13
|
+
|
|
14
|
+
export function loadCompatibilityConfig(compatPath = DEFAULT_COMPAT_PATH) {
|
|
15
|
+
return JSON.parse(fs.readFileSync(compatPath, "utf8"));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function parseSemver(version) {
|
|
19
|
+
if (typeof version !== "string") {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const match = version.trim().match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
23
|
+
if (!match) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
major: Number.parseInt(match[1], 10),
|
|
28
|
+
minor: Number.parseInt(match[2], 10),
|
|
29
|
+
patch: Number.parseInt(match[3], 10),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function checkRecordSchemaVersion(record, config = loadCompatibilityConfig()) {
|
|
34
|
+
const version = record?.schema_version;
|
|
35
|
+
if (typeof version !== "string" || !config.supported_schema_versions.includes(version)) {
|
|
36
|
+
return {
|
|
37
|
+
compatible: false,
|
|
38
|
+
error: `Unsupported schema_version "${String(version)}" (supported: ${config.supported_schema_versions.join(", ")})`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return { compatible: true, error: null };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function checkManifestCompatibility(manifest, config = loadCompatibilityConfig()) {
|
|
45
|
+
const errors = [];
|
|
46
|
+
const warnings = [];
|
|
47
|
+
|
|
48
|
+
if (!manifest || typeof manifest !== "object") {
|
|
49
|
+
return { compatible: false, status: "invalid", errors: ["Manifest must be an object."], warnings };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const schemaVer = manifest.schema_version;
|
|
53
|
+
if (typeof schemaVer !== "string" || !config.supported_schema_versions.includes(schemaVer)) {
|
|
54
|
+
errors.push(
|
|
55
|
+
`Unsupported manifest schema_version "${String(schemaVer)}". Supported: ${config.supported_schema_versions.join(", ")}.`
|
|
56
|
+
);
|
|
57
|
+
return { compatible: false, status: "incompatible", errors, warnings };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (schemaVer === "1.0") {
|
|
61
|
+
warnings.push(
|
|
62
|
+
`Project manifest uses legacy schema_version "1.0"; upgrade to "${config.default_schema_version}" when convenient (see docs/versioning-and-upgrades.md).`
|
|
63
|
+
);
|
|
64
|
+
return {
|
|
65
|
+
compatible: true,
|
|
66
|
+
status: "compatible_upgrade_available",
|
|
67
|
+
errors,
|
|
68
|
+
warnings,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Schema 1.1+ requires template_version and optional profile/profile_version consistency.
|
|
73
|
+
const tplParsed = parseSemver(manifest.template_version);
|
|
74
|
+
if (!tplParsed) {
|
|
75
|
+
errors.push(
|
|
76
|
+
`Manifest schema_version "${schemaVer}" requires semver template_version (got "${String(manifest.template_version)}").`
|
|
77
|
+
);
|
|
78
|
+
} else if (tplParsed.major !== config.supported_template_major) {
|
|
79
|
+
errors.push(
|
|
80
|
+
`Incompatible template_version major ${tplParsed.major} (harness supports major ${config.supported_template_major}).`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (manifest.profile !== undefined && manifest.profile !== null) {
|
|
85
|
+
if (!Object.hasOwn(config.profiles, manifest.profile)) {
|
|
86
|
+
errors.push(`Unknown project profile "${String(manifest.profile)}".`);
|
|
87
|
+
} else {
|
|
88
|
+
const profParsed = parseSemver(manifest.profile_version);
|
|
89
|
+
if (!profParsed) {
|
|
90
|
+
errors.push(
|
|
91
|
+
`Profile "${manifest.profile}" requires semver profile_version (got "${String(manifest.profile_version)}").`
|
|
92
|
+
);
|
|
93
|
+
} else if (profParsed.major !== config.supported_profile_major) {
|
|
94
|
+
errors.push(
|
|
95
|
+
`Incompatible profile_version major ${profParsed.major} for "${manifest.profile}" (harness supports major ${config.supported_profile_major}).`
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
} else if (manifest.profile_version !== undefined && manifest.profile_version !== null) {
|
|
100
|
+
errors.push("profile_version must be null when profile is null.");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return {
|
|
104
|
+
compatible: errors.length === 0,
|
|
105
|
+
status: errors.length === 0 ? "current" : "incompatible",
|
|
106
|
+
errors,
|
|
107
|
+
warnings,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function upgradeManifestFixture10To11(manifest10, config = loadCompatibilityConfig()) {
|
|
112
|
+
if (!manifest10 || manifest10.schema_version !== "1.0") {
|
|
113
|
+
throw new Error('Upgrade helper expects a schema_version "1.0" manifest.');
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
...manifest10,
|
|
117
|
+
schema_version: config.default_schema_version,
|
|
118
|
+
harness_version: config.harness_version,
|
|
119
|
+
template_version: config.template_version,
|
|
120
|
+
profile: null,
|
|
121
|
+
profile_version: null,
|
|
122
|
+
};
|
|
123
|
+
}
|