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,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/context-pack-manifest.schema.json",
|
|
4
|
+
"title": "Context Pack Manifest",
|
|
5
|
+
"description": "Manifest produced by the future deterministic Context Compiler for Layer 4 packets.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"id",
|
|
11
|
+
"task_id",
|
|
12
|
+
"project_id",
|
|
13
|
+
"status",
|
|
14
|
+
"memory_layer",
|
|
15
|
+
"authority_level",
|
|
16
|
+
"profile",
|
|
17
|
+
"token_budget_target",
|
|
18
|
+
"estimated_tokens",
|
|
19
|
+
"compiled_at",
|
|
20
|
+
"expires_at",
|
|
21
|
+
"compiler_version",
|
|
22
|
+
"included_documents",
|
|
23
|
+
"omitted_candidates",
|
|
24
|
+
"freshness_warnings",
|
|
25
|
+
"unresolved_conflicts",
|
|
26
|
+
"cache_key",
|
|
27
|
+
"invalidation_triggers"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
31
|
+
"id": { "type": "string", "pattern": "^CPACK-\\d{4}$" },
|
|
32
|
+
"task_id": { "type": ["string", "null"], "pattern": "^TASK-\\d{4}$" },
|
|
33
|
+
"query": { "type": ["string", "null"] },
|
|
34
|
+
"project_id": { "type": "string", "pattern": "^proj-[a-z0-9][a-z0-9-]{1,48}[a-z0-9]$" },
|
|
35
|
+
"status": { "type": "string", "enum": ["compiled", "cached", "stale", "invalidated"] },
|
|
36
|
+
"memory_layer": { "type": "string", "enum": ["L4_TEMPORARY_CONTEXT"] },
|
|
37
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
38
|
+
"profile": { "type": "string", "enum": ["quick", "working", "deep"] },
|
|
39
|
+
"effective_profile": { "type": "string", "enum": ["quick", "working", "deep"] },
|
|
40
|
+
"token_budget_target": { "type": "integer", "minimum": 1 },
|
|
41
|
+
"estimated_tokens": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"token_estimate_method": { "type": "string", "minLength": 1 },
|
|
43
|
+
"budget_overrun": { "type": "boolean" },
|
|
44
|
+
"budget_breakdown": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": [
|
|
48
|
+
"mandatory_tokens",
|
|
49
|
+
"policy_tokens",
|
|
50
|
+
"project_mandatory_tokens",
|
|
51
|
+
"optional_tokens",
|
|
52
|
+
"codebase_map_tokens",
|
|
53
|
+
"overhead_tokens"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"mandatory_tokens": { "type": "integer", "minimum": 0 },
|
|
57
|
+
"policy_tokens": { "type": "integer", "minimum": 0 },
|
|
58
|
+
"project_mandatory_tokens": { "type": "integer", "minimum": 0 },
|
|
59
|
+
"optional_tokens": { "type": "integer", "minimum": 0 },
|
|
60
|
+
"codebase_map_tokens": { "type": "integer", "minimum": 0 },
|
|
61
|
+
"skills_tokens": { "type": "integer", "minimum": 0 },
|
|
62
|
+
"overhead_tokens": { "type": "integer", "minimum": 0 }
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"codebase_map": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": [
|
|
69
|
+
"enabled",
|
|
70
|
+
"selected_files",
|
|
71
|
+
"total_discovered_files",
|
|
72
|
+
"estimated_tokens"
|
|
73
|
+
],
|
|
74
|
+
"properties": {
|
|
75
|
+
"enabled": { "type": "boolean" },
|
|
76
|
+
"selected_files": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "type": "string", "minLength": 1 }
|
|
79
|
+
},
|
|
80
|
+
"total_discovered_files": { "type": "integer", "minimum": 0 },
|
|
81
|
+
"estimated_tokens": { "type": "integer", "minimum": 0 },
|
|
82
|
+
"map_budget": { "type": "integer", "minimum": 0 },
|
|
83
|
+
"truncated_scan": { "type": "boolean" },
|
|
84
|
+
"scan_mode": { "type": "string", "minLength": 1 }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"skills": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"required": [
|
|
91
|
+
"enabled",
|
|
92
|
+
"ranking_method",
|
|
93
|
+
"discovered_count",
|
|
94
|
+
"indexed_count",
|
|
95
|
+
"selected_skills",
|
|
96
|
+
"estimated_tokens"
|
|
97
|
+
],
|
|
98
|
+
"properties": {
|
|
99
|
+
"enabled": { "type": "boolean" },
|
|
100
|
+
"ranking_method": { "type": "string", "minLength": 1 },
|
|
101
|
+
"discovered_count": { "type": "integer", "minimum": 0 },
|
|
102
|
+
"indexed_count": { "type": "integer", "minimum": 0 },
|
|
103
|
+
"pinned_skills": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": { "type": "string", "minLength": 1 }
|
|
106
|
+
},
|
|
107
|
+
"selected_skills": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"required": ["name", "source", "tier", "reason"],
|
|
113
|
+
"properties": {
|
|
114
|
+
"name": { "type": "string", "minLength": 1 },
|
|
115
|
+
"source": { "type": "string", "minLength": 1 },
|
|
116
|
+
"tier": { "type": "string", "enum": ["tier0", "tier1", "tier1+tier2"] },
|
|
117
|
+
"score": { "type": "integer", "minimum": 0 },
|
|
118
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
119
|
+
"supporting_resources": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": { "type": "string", "minLength": 1 }
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"omitted_skills": {
|
|
127
|
+
"type": "array",
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"required": ["name", "reason"],
|
|
132
|
+
"properties": {
|
|
133
|
+
"name": { "type": "string", "minLength": 1 },
|
|
134
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"quarantined_excluded": { "type": "integer", "minimum": 0 },
|
|
139
|
+
"security_flagged_excluded": { "type": "integer", "minimum": 0 },
|
|
140
|
+
"estimated_tokens": { "type": "integer", "minimum": 0 },
|
|
141
|
+
"skills_budget": { "type": "integer", "minimum": 0 }
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"compiled_at": { "type": "string", "minLength": 10 },
|
|
145
|
+
"expires_at": { "type": ["string", "null"] },
|
|
146
|
+
"compiler_version": { "type": "string", "minLength": 1 },
|
|
147
|
+
"included_documents": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "object",
|
|
151
|
+
"additionalProperties": false,
|
|
152
|
+
"required": ["path", "memory_layer", "authority_level", "revision", "reason", "mandatory"],
|
|
153
|
+
"properties": {
|
|
154
|
+
"path": { "type": "string", "minLength": 1 },
|
|
155
|
+
"memory_layer": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"enum": ["L1_AUTHORITATIVE", "L2_OPERATIONAL", "L3_RESEARCH_EVIDENCE", "L4_TEMPORARY_CONTEXT"]
|
|
158
|
+
},
|
|
159
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
160
|
+
"revision": { "type": "string", "minLength": 1 },
|
|
161
|
+
"reason": { "type": "string", "minLength": 1 },
|
|
162
|
+
"mandatory": { "type": "boolean" }
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"omitted_candidates": {
|
|
167
|
+
"type": "array",
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "object",
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": ["path", "reason"],
|
|
172
|
+
"properties": {
|
|
173
|
+
"path": { "type": "string", "minLength": 1 },
|
|
174
|
+
"reason": { "type": "string", "minLength": 1 }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"freshness_warnings": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": { "type": "string", "minLength": 1 }
|
|
181
|
+
},
|
|
182
|
+
"unresolved_conflicts": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": { "type": "string", "pattern": "^CONF-\\d{4}$" }
|
|
185
|
+
},
|
|
186
|
+
"cache_key": { "type": "string", "minLength": 1 },
|
|
187
|
+
"invalidation_triggers": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": { "type": "string", "minLength": 1 }
|
|
190
|
+
},
|
|
191
|
+
"is_example": { "type": "boolean" },
|
|
192
|
+
"example_notice": { "type": "string" }
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/evidence-manifest.schema.json",
|
|
4
|
+
"title": "Evidence Manifest",
|
|
5
|
+
"description": "Verification and test evidence manifest for a task.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"id",
|
|
11
|
+
"title",
|
|
12
|
+
"task_id",
|
|
13
|
+
"status",
|
|
14
|
+
"memory_layer",
|
|
15
|
+
"authority_level",
|
|
16
|
+
"produced_by_role",
|
|
17
|
+
"verified_by",
|
|
18
|
+
"created_at",
|
|
19
|
+
"source_revision",
|
|
20
|
+
"environment",
|
|
21
|
+
"checks",
|
|
22
|
+
"artifacts",
|
|
23
|
+
"limitations"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
27
|
+
"id": { "type": "string", "pattern": "^EVID-\\d{4}$" },
|
|
28
|
+
"title": { "type": "string", "minLength": 3 },
|
|
29
|
+
"task_id": { "type": "string", "pattern": "^TASK-\\d{4}$" },
|
|
30
|
+
"status": { "type": "string", "enum": ["draft", "proposed", "verified", "invalidated", "expired"] },
|
|
31
|
+
"memory_layer": { "type": "string", "enum": ["L3_RESEARCH_EVIDENCE"] },
|
|
32
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
33
|
+
"produced_by_role": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["orchestrator", "researcher", "software-architect", "developer", "qa-security-reviewer"]
|
|
36
|
+
},
|
|
37
|
+
"verified_by": { "type": ["string", "null"] },
|
|
38
|
+
"created_at": { "type": "string", "minLength": 10 },
|
|
39
|
+
"source_revision": { "type": "string", "minLength": 1 },
|
|
40
|
+
"environment": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["os", "runtime"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"os": { "type": "string", "minLength": 1 },
|
|
46
|
+
"runtime": { "type": "string", "minLength": 1 }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"checks": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["name", "command", "result", "summary"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"name": { "type": "string", "minLength": 1 },
|
|
57
|
+
"command": { "type": "string", "minLength": 1 },
|
|
58
|
+
"result": { "type": "string", "enum": ["passed", "failed", "skipped", "not_tested", "blocked"] },
|
|
59
|
+
"summary": { "type": "string", "minLength": 1 }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"artifacts": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"items": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"required": ["path", "description", "sha256"],
|
|
69
|
+
"properties": {
|
|
70
|
+
"path": { "type": "string", "minLength": 1 },
|
|
71
|
+
"description": { "type": "string", "minLength": 1 },
|
|
72
|
+
"sha256": { "type": ["string", "null"] }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"limitations": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": { "type": "string", "minLength": 1 }
|
|
79
|
+
},
|
|
80
|
+
"is_example": { "type": "boolean" },
|
|
81
|
+
"example_notice": { "type": "string" }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/incident-record.schema.json",
|
|
4
|
+
"title": "Incident Record",
|
|
5
|
+
"description": "Optional operational/postmortem record capturing regressions, failures, or safety incidents.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"id",
|
|
11
|
+
"title",
|
|
12
|
+
"status",
|
|
13
|
+
"severity",
|
|
14
|
+
"memory_layer",
|
|
15
|
+
"authority_level",
|
|
16
|
+
"detected_at",
|
|
17
|
+
"detected_by",
|
|
18
|
+
"summary",
|
|
19
|
+
"impact",
|
|
20
|
+
"root_cause",
|
|
21
|
+
"related_tasks",
|
|
22
|
+
"evidence_refs",
|
|
23
|
+
"follow_up_actions"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
27
|
+
"id": { "type": "string", "pattern": "^INC-\\d{4}$" },
|
|
28
|
+
"title": { "type": "string", "minLength": 3 },
|
|
29
|
+
"status": { "type": "string", "enum": ["open", "mitigated", "resolved", "postmortem_complete"] },
|
|
30
|
+
"severity": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
|
|
31
|
+
"memory_layer": { "type": "string", "enum": ["L2_OPERATIONAL", "L3_RESEARCH_EVIDENCE"] },
|
|
32
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
33
|
+
"detected_at": { "type": "string", "minLength": 10 },
|
|
34
|
+
"detected_by": { "type": "string", "minLength": 1 },
|
|
35
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
36
|
+
"impact": { "type": "string", "minLength": 1 },
|
|
37
|
+
"root_cause": { "type": ["string", "null"] },
|
|
38
|
+
"related_tasks": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "type": "string", "pattern": "^TASK-\\d{4}$" }
|
|
41
|
+
},
|
|
42
|
+
"evidence_refs": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": { "type": "string", "pattern": "^EVID-\\d{4}$" }
|
|
45
|
+
},
|
|
46
|
+
"follow_up_actions": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": { "type": "string", "minLength": 1 }
|
|
49
|
+
},
|
|
50
|
+
"is_example": { "type": "boolean" },
|
|
51
|
+
"example_notice": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/project-manifest.schema.json",
|
|
4
|
+
"title": "Project Manifest",
|
|
5
|
+
"description": "Canonical manifest describing an initialized project Second Brain.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"project_id",
|
|
11
|
+
"slug",
|
|
12
|
+
"name",
|
|
13
|
+
"description",
|
|
14
|
+
"status",
|
|
15
|
+
"owner",
|
|
16
|
+
"memory_layer",
|
|
17
|
+
"authority_level",
|
|
18
|
+
"harness_version",
|
|
19
|
+
"created_at",
|
|
20
|
+
"updated_at",
|
|
21
|
+
"repository",
|
|
22
|
+
"paths",
|
|
23
|
+
"policies"
|
|
24
|
+
],
|
|
25
|
+
"properties": {
|
|
26
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
27
|
+
"template_version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
28
|
+
"profile": {
|
|
29
|
+
"type": ["string", "null"],
|
|
30
|
+
"enum": ["web", "desktop", "mobile", "automation", "ai-system", null]
|
|
31
|
+
},
|
|
32
|
+
"profile_version": { "type": ["string", "null"], "pattern": "^\\d+\\.\\d+\\.\\d+$" },
|
|
33
|
+
"project_id": { "type": "string", "pattern": "^proj-[a-z0-9][a-z0-9-]{1,48}[a-z0-9]$" },
|
|
34
|
+
"slug": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{1,48}[a-z0-9]$" },
|
|
35
|
+
"name": { "type": "string", "minLength": 3, "maxLength": 80 },
|
|
36
|
+
"description": { "type": "string", "minLength": 1 },
|
|
37
|
+
"status": { "type": "string", "enum": ["template", "initialized", "active", "paused", "archived"] },
|
|
38
|
+
"owner": { "type": "string", "minLength": 1 },
|
|
39
|
+
"memory_layer": { "type": "string", "enum": ["L1_AUTHORITATIVE"] },
|
|
40
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
41
|
+
"harness_version": { "type": "string", "minLength": 1 },
|
|
42
|
+
"created_at": { "type": "string", "minLength": 10 },
|
|
43
|
+
"updated_at": { "type": "string", "minLength": 10 },
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["vcs", "initialized", "default_branch"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"vcs": { "type": "string", "enum": ["git"] },
|
|
50
|
+
"initialized": { "type": "boolean" },
|
|
51
|
+
"default_branch": { "type": "string", "minLength": 1 }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"paths": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": [
|
|
58
|
+
"brain_index",
|
|
59
|
+
"prd",
|
|
60
|
+
"constraints",
|
|
61
|
+
"architecture",
|
|
62
|
+
"state",
|
|
63
|
+
"decisions_dir",
|
|
64
|
+
"research_dir",
|
|
65
|
+
"tasks_dir",
|
|
66
|
+
"evidence_dir",
|
|
67
|
+
"proposals_dir"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"brain_index": { "type": "string", "minLength": 1 },
|
|
71
|
+
"prd": { "type": "string", "minLength": 1 },
|
|
72
|
+
"constraints": { "type": "string", "minLength": 1 },
|
|
73
|
+
"architecture": { "type": "string", "minLength": 1 },
|
|
74
|
+
"state": { "type": "string", "minLength": 1 },
|
|
75
|
+
"decisions_dir": { "type": "string", "minLength": 1 },
|
|
76
|
+
"research_dir": { "type": "string", "minLength": 1 },
|
|
77
|
+
"tasks_dir": { "type": "string", "minLength": 1 },
|
|
78
|
+
"evidence_dir": { "type": "string", "minLength": 1 },
|
|
79
|
+
"proposals_dir": { "type": "string", "minLength": 1 }
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"policies": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"minItems": 1,
|
|
85
|
+
"items": { "type": "string", "minLength": 1 }
|
|
86
|
+
},
|
|
87
|
+
"is_example": { "type": "boolean" },
|
|
88
|
+
"example_notice": { "type": "string" }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/project-state.schema.json",
|
|
4
|
+
"title": "Project State",
|
|
5
|
+
"description": "Operational snapshot of project state in brain/state/current.yaml.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"project_id",
|
|
11
|
+
"state_revision",
|
|
12
|
+
"status",
|
|
13
|
+
"memory_layer",
|
|
14
|
+
"authority_level",
|
|
15
|
+
"updated_at",
|
|
16
|
+
"updated_by",
|
|
17
|
+
"current_phase",
|
|
18
|
+
"active_tasks",
|
|
19
|
+
"blocked_tasks",
|
|
20
|
+
"pending_approvals",
|
|
21
|
+
"open_conflicts",
|
|
22
|
+
"last_verified_evidence",
|
|
23
|
+
"last_checkpoint",
|
|
24
|
+
"known_dependencies",
|
|
25
|
+
"summary"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
29
|
+
"project_id": { "type": "string", "pattern": "^proj-[a-z0-9][a-z0-9-]{1,48}[a-z0-9]$" },
|
|
30
|
+
"state_revision": { "type": "integer", "minimum": 0 },
|
|
31
|
+
"status": { "type": "string", "enum": ["initialized", "active", "blocked", "paused", "archived"] },
|
|
32
|
+
"memory_layer": { "type": "string", "enum": ["L2_OPERATIONAL"] },
|
|
33
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
34
|
+
"updated_at": { "type": "string", "minLength": 10 },
|
|
35
|
+
"updated_by": { "type": "string", "minLength": 1 },
|
|
36
|
+
"current_phase": { "type": "string", "minLength": 1 },
|
|
37
|
+
"active_tasks": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": { "type": "string", "pattern": "^TASK-\\d{4}$" }
|
|
40
|
+
},
|
|
41
|
+
"blocked_tasks": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": { "type": "string", "pattern": "^TASK-\\d{4}$" }
|
|
44
|
+
},
|
|
45
|
+
"pending_approvals": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"items": { "type": "string", "pattern": "^APPR-\\d{4}$" }
|
|
48
|
+
},
|
|
49
|
+
"open_conflicts": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": { "type": "string", "pattern": "^CONF-\\d{4}$" }
|
|
52
|
+
},
|
|
53
|
+
"last_verified_evidence": { "type": ["string", "null"], "pattern": "^EVID-\\d{4}$" },
|
|
54
|
+
"last_checkpoint": { "type": ["string", "null"], "pattern": "^CHKPT-\\d{4}$" },
|
|
55
|
+
"last_completed_task": { "type": ["string", "null"], "pattern": "^TASK-\\d{4}$" },
|
|
56
|
+
"known_dependencies": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": { "type": "string", "minLength": 1 }
|
|
59
|
+
},
|
|
60
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
61
|
+
"is_example": { "type": "boolean" },
|
|
62
|
+
"example_notice": { "type": "string" }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/recovery-checkpoint.schema.json",
|
|
4
|
+
"title": "Recovery Checkpoint",
|
|
5
|
+
"description": "Metadata manifest describing a future resumable operational checkpoint.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"id",
|
|
11
|
+
"project_id",
|
|
12
|
+
"status",
|
|
13
|
+
"memory_layer",
|
|
14
|
+
"authority_level",
|
|
15
|
+
"created_at",
|
|
16
|
+
"created_by",
|
|
17
|
+
"git_branch",
|
|
18
|
+
"git_commit",
|
|
19
|
+
"working_tree_clean",
|
|
20
|
+
"active_tasks",
|
|
21
|
+
"state_file_path",
|
|
22
|
+
"state_revision",
|
|
23
|
+
"resume_instructions",
|
|
24
|
+
"verification_evidence_ref"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
28
|
+
"id": { "type": "string", "pattern": "^CHKPT-\\d{4}$" },
|
|
29
|
+
"project_id": { "type": "string", "pattern": "^proj-[a-z0-9][a-z0-9-]{1,48}[a-z0-9]$" },
|
|
30
|
+
"status": { "type": "string", "enum": ["created", "verified", "restored", "expired", "invalidated"] },
|
|
31
|
+
"memory_layer": { "type": "string", "enum": ["L2_OPERATIONAL"] },
|
|
32
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
33
|
+
"created_at": { "type": "string", "minLength": 10 },
|
|
34
|
+
"created_by": { "type": "string", "minLength": 1 },
|
|
35
|
+
"git_branch": { "type": "string", "minLength": 1 },
|
|
36
|
+
"git_commit": { "type": "string", "minLength": 1 },
|
|
37
|
+
"working_tree_clean": { "type": "boolean" },
|
|
38
|
+
"active_tasks": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "type": "string", "pattern": "^TASK-\\d{4}$" }
|
|
41
|
+
},
|
|
42
|
+
"state_file_path": { "type": "string", "minLength": 1 },
|
|
43
|
+
"state_revision": { "type": "integer", "minimum": 0 },
|
|
44
|
+
"resume_instructions": { "type": "string", "minLength": 1 },
|
|
45
|
+
"verification_evidence_ref": { "type": ["string", "null"], "pattern": "^EVID-\\d{4}$" },
|
|
46
|
+
"is_example": { "type": "boolean" },
|
|
47
|
+
"example_notice": { "type": "string" }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://ai-workspace.local/schemas/research-record.schema.json",
|
|
4
|
+
"title": "Research Record",
|
|
5
|
+
"description": "YAML frontmatter schema for RES-NNNN-*.md records in brain/research/ or proposals/.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schema_version",
|
|
10
|
+
"id",
|
|
11
|
+
"title",
|
|
12
|
+
"status",
|
|
13
|
+
"memory_layer",
|
|
14
|
+
"authority_level",
|
|
15
|
+
"author_role",
|
|
16
|
+
"created_at",
|
|
17
|
+
"updated_at",
|
|
18
|
+
"valid_until",
|
|
19
|
+
"question",
|
|
20
|
+
"confidence",
|
|
21
|
+
"sources",
|
|
22
|
+
"related_tasks",
|
|
23
|
+
"related_adrs",
|
|
24
|
+
"contradicts",
|
|
25
|
+
"tags"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"schema_version": { "type": "string", "enum": ["1.0", "1.1"] },
|
|
29
|
+
"id": { "type": "string", "pattern": "^RES-\\d{4}$" },
|
|
30
|
+
"title": { "type": "string", "minLength": 3 },
|
|
31
|
+
"status": { "type": "string", "enum": ["draft", "proposed", "verified", "stale", "superseded", "rejected"] },
|
|
32
|
+
"memory_layer": { "type": "string", "enum": ["L3_RESEARCH_EVIDENCE"] },
|
|
33
|
+
"authority_level": { "type": "string", "enum": ["A0", "A1", "A2", "A3", "A4", "A5", "A6"] },
|
|
34
|
+
"author_role": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["orchestrator", "researcher", "software-architect", "developer", "qa-security-reviewer"]
|
|
37
|
+
},
|
|
38
|
+
"created_at": { "type": "string", "minLength": 10 },
|
|
39
|
+
"updated_at": { "type": "string", "minLength": 10 },
|
|
40
|
+
"valid_until": { "type": ["string", "null"] },
|
|
41
|
+
"question": { "type": "string", "minLength": 1 },
|
|
42
|
+
"confidence": { "type": "string", "enum": ["low", "medium", "high"] },
|
|
43
|
+
"sources": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["title", "reference", "type", "accessed_at"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"title": { "type": "string", "minLength": 1 },
|
|
51
|
+
"reference": { "type": "string", "minLength": 1 },
|
|
52
|
+
"type": { "type": "string", "enum": ["official_docs", "repo_file", "benchmark", "standard", "issue_or_pr", "other"] },
|
|
53
|
+
"accessed_at": { "type": "string", "minLength": 10 }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"related_tasks": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": { "type": "string", "pattern": "^TASK-\\d{4}$" }
|
|
60
|
+
},
|
|
61
|
+
"related_adrs": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": { "type": "string", "pattern": "^ADR-\\d{4}$" }
|
|
64
|
+
},
|
|
65
|
+
"contradicts": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": { "type": "string", "minLength": 1 }
|
|
68
|
+
},
|
|
69
|
+
"tags": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": { "type": "string", "minLength": 1 }
|
|
72
|
+
},
|
|
73
|
+
"is_example": { "type": "boolean" },
|
|
74
|
+
"example_notice": { "type": "string" }
|
|
75
|
+
}
|
|
76
|
+
}
|