@davidorex/pi-context 0.26.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/CHANGELOG.md +23 -0
- package/README.md +195 -0
- package/dist/block-api.d.ts +328 -0
- package/dist/block-api.d.ts.map +1 -0
- package/dist/block-api.js +1167 -0
- package/dist/block-api.js.map +1 -0
- package/dist/block-validation.d.ts +33 -0
- package/dist/block-validation.d.ts.map +1 -0
- package/dist/block-validation.js +213 -0
- package/dist/block-validation.js.map +1 -0
- package/dist/context-dir.d.ts +93 -0
- package/dist/context-dir.d.ts.map +1 -0
- package/dist/context-dir.js +224 -0
- package/dist/context-dir.js.map +1 -0
- package/dist/context-sdk.d.ts +428 -0
- package/dist/context-sdk.d.ts.map +1 -0
- package/dist/context-sdk.js +1327 -0
- package/dist/context-sdk.js.map +1 -0
- package/dist/context.d.ts +497 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +1060 -0
- package/dist/context.js.map +1 -0
- package/dist/dispatch-context.d.ts +112 -0
- package/dist/dispatch-context.d.ts.map +1 -0
- package/dist/dispatch-context.js +119 -0
- package/dist/dispatch-context.js.map +1 -0
- package/dist/execution-context.d.ts +138 -0
- package/dist/execution-context.d.ts.map +1 -0
- package/dist/execution-context.js +151 -0
- package/dist/execution-context.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1655 -0
- package/dist/index.js.map +1 -0
- package/dist/lens-validator.d.ts +50 -0
- package/dist/lens-validator.d.ts.map +1 -0
- package/dist/lens-validator.js +46 -0
- package/dist/lens-validator.js.map +1 -0
- package/dist/lens-view.d.ts +75 -0
- package/dist/lens-view.d.ts.map +1 -0
- package/dist/lens-view.js +253 -0
- package/dist/lens-view.js.map +1 -0
- package/dist/rename-canonical-id.d.ts +64 -0
- package/dist/rename-canonical-id.d.ts.map +1 -0
- package/dist/rename-canonical-id.js +378 -0
- package/dist/rename-canonical-id.js.map +1 -0
- package/dist/roadmap-plan.d.ts +186 -0
- package/dist/roadmap-plan.d.ts.map +1 -0
- package/dist/roadmap-plan.js +534 -0
- package/dist/roadmap-plan.js.map +1 -0
- package/dist/samples-catalog.d.ts +48 -0
- package/dist/samples-catalog.d.ts.map +1 -0
- package/dist/samples-catalog.js +128 -0
- package/dist/samples-catalog.js.map +1 -0
- package/dist/schema-migrations.d.ts +82 -0
- package/dist/schema-migrations.d.ts.map +1 -0
- package/dist/schema-migrations.js +106 -0
- package/dist/schema-migrations.js.map +1 -0
- package/dist/schema-validator.d.ts +76 -0
- package/dist/schema-validator.d.ts.map +1 -0
- package/dist/schema-validator.js +219 -0
- package/dist/schema-validator.js.map +1 -0
- package/dist/schema-write.d.ts +122 -0
- package/dist/schema-write.d.ts.map +1 -0
- package/dist/schema-write.js +210 -0
- package/dist/schema-write.js.map +1 -0
- package/dist/status-vocab.d.ts +60 -0
- package/dist/status-vocab.d.ts.map +1 -0
- package/dist/status-vocab.js +109 -0
- package/dist/status-vocab.js.map +1 -0
- package/dist/test-helpers.d.ts +12 -0
- package/dist/test-helpers.d.ts.map +1 -0
- package/dist/test-helpers.js +28 -0
- package/dist/test-helpers.js.map +1 -0
- package/dist/topo.d.ts +19 -0
- package/dist/topo.d.ts.map +1 -0
- package/dist/topo.js +99 -0
- package/dist/topo.js.map +1 -0
- package/dist/update-check.d.ts +6 -0
- package/dist/update-check.d.ts.map +1 -0
- package/dist/update-check.js +82 -0
- package/dist/update-check.js.map +1 -0
- package/package.json +115 -0
- package/samples/blocks/context-contracts.json +3 -0
- package/samples/blocks/conventions.json +3 -0
- package/samples/blocks/decisions.json +3 -0
- package/samples/blocks/features.json +3 -0
- package/samples/blocks/framework-gaps.json +3 -0
- package/samples/blocks/issues.json +3 -0
- package/samples/blocks/layer-plans.json +3 -0
- package/samples/blocks/phase.json +3 -0
- package/samples/blocks/rationale.json +3 -0
- package/samples/blocks/requirements.json +3 -0
- package/samples/blocks/research.json +3 -0
- package/samples/blocks/spec-reviews.json +3 -0
- package/samples/blocks/story.json +3 -0
- package/samples/blocks/tasks.json +3 -0
- package/samples/blocks/verification.json +3 -0
- package/samples/conception.json +467 -0
- package/samples/schemas/context-contracts.schema.json +89 -0
- package/samples/schemas/conventions.schema.json +34 -0
- package/samples/schemas/decisions.schema.json +87 -0
- package/samples/schemas/features.schema.json +53 -0
- package/samples/schemas/framework-gaps.schema.json +64 -0
- package/samples/schemas/issues.schema.json +39 -0
- package/samples/schemas/layer-plans.schema.json +92 -0
- package/samples/schemas/phase.schema.json +118 -0
- package/samples/schemas/rationale.schema.json +24 -0
- package/samples/schemas/requirements.schema.json +34 -0
- package/samples/schemas/research.schema.json +134 -0
- package/samples/schemas/spec-reviews.schema.json +62 -0
- package/samples/schemas/story.schema.json +73 -0
- package/samples/schemas/tasks.schema.json +34 -0
- package/samples/schemas/verification.schema.json +37 -0
- package/schemas/bootstrap.schema.json +24 -0
- package/schemas/config.schema.json +193 -0
- package/schemas/layer.schema.json +9 -0
- package/schemas/priority.schema.json +9 -0
- package/schemas/relations.schema.json +31 -0
- package/schemas/severity.schema.json +9 -0
- package/schemas/source.schema.json +9 -0
- package/schemas/status.schema.json +9 -0
- package/schemas/verification-method.schema.json +9 -0
- package/skill-narrative.md +130 -0
- package/skills/pi-context/SKILL.md +684 -0
- package/skills/pi-context/references/bundled-resources.md +47 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/features",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Features",
|
|
6
|
+
"description": "L3 Work layer. Features with their own scope, acceptance criteria, and status lifecycle. A feature is atomically composable into prompt context as a self-contained unit of work.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["features"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"features": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["id", "title", "status", "layer", "description", "acceptance_criteria", "created_by", "created_at"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^FEAT-\\d{3}$" },
|
|
18
|
+
"title": { "type": "string" },
|
|
19
|
+
"status": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["proposed", "approved", "in-progress", "in-review", "complete", "blocked", "cancelled"]
|
|
22
|
+
},
|
|
23
|
+
"layer": { "type": "string", "enum": ["L1", "L2", "L3", "L4", "L5"] },
|
|
24
|
+
"description": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
25
|
+
"motivation": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
26
|
+
"acceptance_criteria": { "type": "array", "items": { "type": "string" } },
|
|
27
|
+
"created_by": { "type": "string" },
|
|
28
|
+
"created_at": { "type": "string" },
|
|
29
|
+
"modified_by": { "type": "string" },
|
|
30
|
+
"modified_at": { "type": "string" },
|
|
31
|
+
"approved_by": { "type": "string" },
|
|
32
|
+
"approved_at": { "type": "string" }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"x-lifecycle": {
|
|
38
|
+
"feature": {
|
|
39
|
+
"field": "status",
|
|
40
|
+
"states": ["proposed", "approved", "in-progress", "in-review", "complete", "blocked", "cancelled"],
|
|
41
|
+
"transitions": [
|
|
42
|
+
{ "from": "proposed", "to": "approved", "required_authority": "user", "precondition": "all gates in terminal state" },
|
|
43
|
+
{ "from": "approved", "to": "in-progress", "required_authority": "any" },
|
|
44
|
+
{ "from": "in-progress", "to": "in-review", "required_authority": "any" },
|
|
45
|
+
{ "from": "in-review", "to": "complete", "required_authority": "any" },
|
|
46
|
+
{ "from": "in-progress", "to": "blocked", "required_authority": "any" },
|
|
47
|
+
{ "from": "blocked", "to": "in-progress", "required_authority": "any" },
|
|
48
|
+
{ "from": "proposed", "to": "cancelled", "required_authority": "user" }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"note": "AJV draft-07 cannot enforce transition validity; this block is metadata for future framework-level state-machine validation (FGAP-005)."
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/framework-gaps",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Framework Gaps",
|
|
6
|
+
"description": "Capability gaps in the framework — pieces that must exist natively for the target model to be expressible as configuration rather than hand-enactment.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["gaps"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"gaps": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["id", "title", "status", "package", "description", "evidence", "impact", "proposed_resolution", "created_by", "created_at"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^FGAP-\\d{3}$" },
|
|
18
|
+
"title": { "type": "string" },
|
|
19
|
+
"status": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["identified", "accepted", "in-progress", "closed", "wontfix"]
|
|
22
|
+
},
|
|
23
|
+
"priority": { "type": "string", "enum": ["P0", "P1", "P2", "P3"] },
|
|
24
|
+
"package": { "type": "string" },
|
|
25
|
+
"layer": { "type": "string", "enum": ["L1", "L2", "L3", "L4", "L5"] },
|
|
26
|
+
"description": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
27
|
+
"evidence": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["file", "reference"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"file": { "type": "string" },
|
|
35
|
+
"lines": { "type": "string" },
|
|
36
|
+
"reference": { "type": "string", "description": "What specifically at this location demonstrates the gap", "x-prompt-budget": { "tokens": 1000, "words": 800 } }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"impact": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
41
|
+
"canonical_vocabulary": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "The established engineering term for the capability that is missing"
|
|
44
|
+
},
|
|
45
|
+
"proposed_resolution": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
46
|
+
"created_by": { "type": "string" },
|
|
47
|
+
"created_at": { "type": "string" },
|
|
48
|
+
"closed_by": { "type": "string" },
|
|
49
|
+
"closed_at": { "type": "string" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"x-lifecycle": {
|
|
55
|
+
"field": "status",
|
|
56
|
+
"states": ["identified", "accepted", "in-progress", "closed", "wontfix"],
|
|
57
|
+
"transitions": [
|
|
58
|
+
{ "from": "identified", "to": "accepted", "required_authority": "user" },
|
|
59
|
+
{ "from": "identified", "to": "wontfix", "required_authority": "user" },
|
|
60
|
+
{ "from": "accepted", "to": "in-progress", "required_authority": "any" },
|
|
61
|
+
{ "from": "in-progress", "to": "closed", "required_authority": "any" }
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/issues",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Issues",
|
|
6
|
+
"description": "Known bugs, missing capabilities, design debt, and open work items. Tracked with title/body (GitHub issue pattern), code location, package scope, priority, and resolution lifecycle.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["issues"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"issues": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["id", "title", "body", "location", "status", "category", "priority", "package"],
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^issue-\\d{3}$" },
|
|
18
|
+
"title": { "type": "string", "description": "Scannable one-liner (GitHub issue title pattern)" },
|
|
19
|
+
"body": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Full detail and context for downstream composition",
|
|
22
|
+
"x-prompt-budget": { "tokens": 1000, "words": 800 }
|
|
23
|
+
},
|
|
24
|
+
"location": { "type": "string", "description": "File path + line number, e.g. packages/pi-workflows/src/dag.ts:219" },
|
|
25
|
+
"status": { "type": "string", "enum": ["open", "resolved", "deferred"] },
|
|
26
|
+
"category": { "type": "string", "enum": ["primitive", "issue", "cleanup", "capability", "composition"] },
|
|
27
|
+
"priority": { "type": "string", "enum": ["low", "medium", "high", "critical"] },
|
|
28
|
+
"package": { "type": "string", "description": "Which monorepo package this issue touches (e.g. pi-workflows, pi-project, pi-behavior-monitors)" },
|
|
29
|
+
"source": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": ["human", "agent", "monitor", "workflow"],
|
|
32
|
+
"description": "How this issue was created"
|
|
33
|
+
},
|
|
34
|
+
"resolved_by": { "type": "string", "description": "Commit message or reference if resolved" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/layer-plans",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Layer Restructure Plans",
|
|
6
|
+
"description": "Plans for restructuring the .project/ directory from flat-block storage into a layered artifact-ownership model. Each plan names its conceptual source (e.g. Muni five-layer), describes each layer's purpose and its current-vs-target block mapping, and sequences the enactment into phases with exit criteria. Layer plans are themselves L2 specification-layer artifacts — they are spec-level decisions about how the framework organizes project state.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["plans"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"plans": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["id", "title", "status", "model", "layers", "migration_phases", "created_by", "created_at"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^PLAN-\\d{3}$" },
|
|
18
|
+
"title": { "type": "string" },
|
|
19
|
+
"status": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["draft", "proposed", "decided", "in-progress", "complete", "abandoned"]
|
|
22
|
+
},
|
|
23
|
+
"model": { "type": "string", "description": "Conceptual source — e.g. 'Muni five-layer'" },
|
|
24
|
+
"description": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
25
|
+
"layers": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["id", "name", "purpose", "current_blocks", "target_blocks"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"id": { "type": "string" },
|
|
33
|
+
"name": { "type": "string" },
|
|
34
|
+
"purpose": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
35
|
+
"canonical_vocabulary": { "type": "string" },
|
|
36
|
+
"lifetime": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Cadence at which this layer changes — project-lifetime, per-design-cycle, per-iteration, per-session, ever-accumulating"
|
|
39
|
+
},
|
|
40
|
+
"ownership_principle": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
41
|
+
"current_blocks": { "type": "array", "items": { "type": "string" } },
|
|
42
|
+
"target_blocks": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["name", "shape"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": { "type": "string" },
|
|
50
|
+
"shape": { "type": "string", "description": "flat | nested | materialized-view" },
|
|
51
|
+
"notes": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"migration_phases": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["id", "name", "description", "depends_on", "exit_criteria"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"id": { "type": "string" },
|
|
66
|
+
"name": { "type": "string" },
|
|
67
|
+
"description": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
68
|
+
"depends_on": { "type": "array", "items": { "type": "string" } },
|
|
69
|
+
"exit_criteria": { "type": "array", "items": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } } },
|
|
70
|
+
"produces": { "type": "array", "items": { "type": "string" } },
|
|
71
|
+
"status": { "type": "string", "enum": ["pending", "in-progress", "complete", "blocked"] }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"created_by": { "type": "string" },
|
|
76
|
+
"created_at": { "type": "string" }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"x-lifecycle": {
|
|
82
|
+
"field": "status",
|
|
83
|
+
"states": ["draft", "proposed", "decided", "in-progress", "complete", "abandoned"],
|
|
84
|
+
"transitions": [
|
|
85
|
+
{ "from": "draft", "to": "proposed", "required_authority": "any" },
|
|
86
|
+
{ "from": "proposed", "to": "decided", "required_authority": "user" },
|
|
87
|
+
{ "from": "decided", "to": "in-progress", "required_authority": "any" },
|
|
88
|
+
{ "from": "in-progress", "to": "complete", "required_authority": "any" },
|
|
89
|
+
{ "from": "draft", "to": "abandoned", "required_authority": "user" }
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/phase",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"title": "Phases",
|
|
6
|
+
"description": "Array-block of planned implementation phases (DEC-0028). Each phase carries a PHASE-NNN string id, intent, optional goal, success criteria, decomposed specs, and status lifecycle (planned, in-progress, completed). Inter-phase dependencies live in relations.json edges, not inline.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"phases"
|
|
10
|
+
],
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"phases": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": [
|
|
18
|
+
"id",
|
|
19
|
+
"name",
|
|
20
|
+
"intent",
|
|
21
|
+
"status"
|
|
22
|
+
],
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"properties": {
|
|
25
|
+
"id": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^PHASE-[A-Z0-9-]+$",
|
|
28
|
+
"description": "Canonical phase id (e.g. PHASE-001). Replaces the integer `number` discriminator of the file-per-phase form."
|
|
29
|
+
},
|
|
30
|
+
"name": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"intent": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"goal": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "What is true after this phase that was not true before"
|
|
39
|
+
},
|
|
40
|
+
"status": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": [
|
|
43
|
+
"planned",
|
|
44
|
+
"in-progress",
|
|
45
|
+
"completed"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"success_criteria": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": [
|
|
53
|
+
"criterion",
|
|
54
|
+
"verify_method"
|
|
55
|
+
],
|
|
56
|
+
"properties": {
|
|
57
|
+
"criterion": {
|
|
58
|
+
"type": "string"
|
|
59
|
+
},
|
|
60
|
+
"verify_method": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"command",
|
|
64
|
+
"inspect",
|
|
65
|
+
"human"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"specs": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"required": [
|
|
76
|
+
"number",
|
|
77
|
+
"name",
|
|
78
|
+
"intent",
|
|
79
|
+
"status"
|
|
80
|
+
],
|
|
81
|
+
"properties": {
|
|
82
|
+
"number": {
|
|
83
|
+
"type": "integer"
|
|
84
|
+
},
|
|
85
|
+
"name": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"intent": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"status": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"planned",
|
|
95
|
+
"in-progress",
|
|
96
|
+
"completed"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"acceptance_criteria": {
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": {
|
|
102
|
+
"type": "string"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"artifacts_produced": {
|
|
109
|
+
"type": "array",
|
|
110
|
+
"items": {
|
|
111
|
+
"type": "string"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/rationale",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Design Rationale",
|
|
6
|
+
"description": "The deeper reasoning behind decisions — why this approach over others, what constraints drove the choice, what tradeoffs were accepted.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["rationales"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"rationales": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["id", "title", "narrative"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": { "type": "string", "pattern": "^RAT-\\d{3}$" },
|
|
17
|
+
"title": { "type": "string" },
|
|
18
|
+
"narrative": { "type": "string" },
|
|
19
|
+
"phase": { "type": "integer" }
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/requirements",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Requirements",
|
|
6
|
+
"description": "What the project must deliver. Functional and non-functional requirements with MoSCoW priority and lifecycle states (proposed, accepted, implemented, verified). The contract between intent and implementation.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["requirements"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"requirements": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"required": ["id", "description", "type", "status", "priority"],
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": { "type": "string", "pattern": "^REQ-\\d{3,}$" },
|
|
17
|
+
"description": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } },
|
|
18
|
+
"type": { "type": "string", "enum": ["functional", "non-functional", "constraint", "integration"] },
|
|
19
|
+
"status": { "type": "string", "enum": ["proposed", "accepted", "deferred", "implemented", "verified"] },
|
|
20
|
+
"priority": { "type": "string", "enum": ["must", "should", "could", "wont"] },
|
|
21
|
+
"acceptance_criteria": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": { "type": "string", "x-prompt-budget": { "tokens": 1000, "words": 800 } }
|
|
24
|
+
},
|
|
25
|
+
"source": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": ["human", "agent", "analysis"],
|
|
28
|
+
"description": "How this requirement was created"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/research",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Research",
|
|
6
|
+
"description": "Factual and analytical substrate under decisions — each entry captures what was investigated, how, what was found, what grounds the findings, and what stale conditions invalidate them.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["research"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"research": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["id", "title", "status", "layer", "type", "question", "method", "findings_summary", "created_by", "created_at"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^R-\\d{4}$" },
|
|
18
|
+
"title": { "type": "string" },
|
|
19
|
+
"status": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"enum": ["planned", "in-progress", "complete", "stale", "superseded", "revised"],
|
|
22
|
+
"description": "planned = question framed, method chosen, no work started. in-progress = investigation underway. complete = findings_summary and citations finalized. stale = a stale_condition fired; findings may still be correct but grounding is no longer authoritative. superseded = a newer research entry replaces this one. revised = transient state during re-investigation against updated grounding."
|
|
23
|
+
},
|
|
24
|
+
"layer": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": ["L1", "L2", "L3", "L4", "L5"],
|
|
27
|
+
"description": "Which Muni layer the research informs. L1 identity/domain; L2 specification; L3 work; L4 execution; L5 memory."
|
|
28
|
+
},
|
|
29
|
+
"type": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": ["investigative", "comparative", "empirical", "historical", "audit", "landscape", "feasibility", "curation"],
|
|
32
|
+
"description": "Kind of research, per the research:* skill taxonomy. Affects reliability characteristics and staleness behavior."
|
|
33
|
+
},
|
|
34
|
+
"question": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The question being investigated.",
|
|
37
|
+
"x-prompt-budget": { "tokens": 1000, "words": 800 }
|
|
38
|
+
},
|
|
39
|
+
"method": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "How the investigation was conducted — e.g. 'code-inspection', 'empirical-test', 'web-fetch', 'curation of external document', or a combination.",
|
|
42
|
+
"x-prompt-budget": { "tokens": 1000, "words": 800 }
|
|
43
|
+
},
|
|
44
|
+
"scope": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": { "type": "string" },
|
|
47
|
+
"description": "What was in scope — versions, branches, revisions, URLs, documents examined."
|
|
48
|
+
},
|
|
49
|
+
"findings_summary": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Self-contained, prompt-injectable summary of what was found. Target ~300-800 words. Must stand alone without the full findings_document.",
|
|
52
|
+
"x-prompt-budget": { "tokens": 1000, "words": 800 }
|
|
53
|
+
},
|
|
54
|
+
"findings_document": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "Path to the full rich document (typically in analysis/) for deep reads. May be null for research entries whose summary is sufficient or whose investigation has not yet produced a document."
|
|
57
|
+
},
|
|
58
|
+
"grounding": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"properties": {
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": { "type": "string" },
|
|
65
|
+
"description": "Version-pinned dependency strings (e.g. '@mariozechner/pi-ai@0.63.1') whose behavior is load-bearing for the findings."
|
|
66
|
+
},
|
|
67
|
+
"revisions": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string" },
|
|
70
|
+
"description": "Git SHAs, branch snapshots, or repo-at-date references."
|
|
71
|
+
},
|
|
72
|
+
"external_refs": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": { "type": "string" },
|
|
75
|
+
"description": "Dated external references — URLs with retrieval timestamps, academic papers, external spec documents."
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"grounded_at": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"description": "Timestamp at which the grounding was current."
|
|
82
|
+
},
|
|
83
|
+
"stale_conditions": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "type": "string" },
|
|
86
|
+
"description": "Explicit list of conditions under which the research is no longer authoritative. The future staleness engine (FGAP-007) will read this to transition status from complete to stale automatically."
|
|
87
|
+
},
|
|
88
|
+
"citations": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"description": "Labeled source pointers grounding specific claims in the findings. Every factual claim in findings_summary should trace to a citation.",
|
|
91
|
+
"items": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["label"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"label": { "type": "string" },
|
|
97
|
+
"path": { "type": "string" },
|
|
98
|
+
"lines": { "type": "string" },
|
|
99
|
+
"url": { "type": "string" },
|
|
100
|
+
"retrieved_at": { "type": "string" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"conducted_by": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "Alias for created_by; retained for research-specific provenance where 'conducted' reads more naturally than 'created'."
|
|
107
|
+
},
|
|
108
|
+
"conducted_at": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Alias for created_at."
|
|
111
|
+
},
|
|
112
|
+
"created_by": { "type": "string" },
|
|
113
|
+
"created_at": { "type": "string" },
|
|
114
|
+
"modified_by": { "type": "string" },
|
|
115
|
+
"modified_at": { "type": "string" }
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"x-lifecycle": {
|
|
121
|
+
"field": "status",
|
|
122
|
+
"states": ["planned", "in-progress", "complete", "stale", "superseded", "revised"],
|
|
123
|
+
"transitions": [
|
|
124
|
+
{ "from": "planned", "to": "in-progress", "required_authority": "any" },
|
|
125
|
+
{ "from": "in-progress", "to": "complete", "required_authority": "any", "note": "Agent may mark own research complete when findings_summary and citations are finalized." },
|
|
126
|
+
{ "from": "complete", "to": "stale", "required_authority": "any", "note": "Any party marks stale when a stale_condition fires. Future staleness engine (FGAP-007) fires this automatically." },
|
|
127
|
+
{ "from": "stale", "to": "in-progress", "required_authority": "user", "note": "Reopening for revision; requires user authority if the research is currently cited by an enacted decision because revising may invalidate the decision's grounding." },
|
|
128
|
+
{ "from": "complete", "to": "superseded", "required_authority": "any", "precondition": "superseding entry exists and points to this one via a research_supersedes_research edge" },
|
|
129
|
+
{ "from": "in-progress", "to": "revised", "required_authority": "any" },
|
|
130
|
+
{ "from": "revised", "to": "complete", "required_authority": "any" }
|
|
131
|
+
],
|
|
132
|
+
"note": "AJV draft-07 cannot enforce transition validity or required_authority; this block is metadata for future framework-level state-machine validation (FGAP-005) and authorship attestation (FGAP-004). The staleness engine (FGAP-007) reads stale_conditions and fires the complete→stale transition automatically when conditions are met."
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "pi-context://schemas/spec-reviews",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"title": "Spec Reviews",
|
|
6
|
+
"description": "Design reviews of specification documents. Each review targets one spec, runs a pre-implementation review pass (ideally via independent fresh-context reviewer), and carries scope/method/status. A spec-review blocks implementation-spec drafting until 'clean'.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["reviews"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"reviews": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["id", "target", "status", "created_by", "created_at"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"id": { "type": "string", "pattern": "^REVIEW-\\d{3}$" },
|
|
18
|
+
"target": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Path to the spec doc being reviewed"
|
|
21
|
+
},
|
|
22
|
+
"target_revision": { "type": "string", "description": "Git SHA or version at which the review was conducted" },
|
|
23
|
+
"reviewer": { "type": "string", "description": "Agent name or role performing the review" },
|
|
24
|
+
"status": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": ["not-started", "in-progress", "complete", "abandoned"]
|
|
27
|
+
},
|
|
28
|
+
"scope": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "type": "string" },
|
|
31
|
+
"description": "Sections or concerns of the target in scope for this review"
|
|
32
|
+
},
|
|
33
|
+
"method": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "How the review is conducted — e.g. 'fresh-context independent reviewer', 'adversarial pre-mortem', 'self-review'",
|
|
36
|
+
"x-prompt-budget": { "tokens": 1000, "words": 800 }
|
|
37
|
+
},
|
|
38
|
+
"clean": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "True when every finding has a terminal state (resolved/wontfix/duplicate)"
|
|
41
|
+
},
|
|
42
|
+
"created_by": { "type": "string" },
|
|
43
|
+
"created_at": { "type": "string" },
|
|
44
|
+
"completed_at": { "type": "string" }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"x-lifecycle": {
|
|
50
|
+
"review": {
|
|
51
|
+
"field": "status",
|
|
52
|
+
"states": ["not-started", "in-progress", "complete", "abandoned"],
|
|
53
|
+
"transitions": [
|
|
54
|
+
{ "from": "not-started", "to": "in-progress", "required_authority": "any" },
|
|
55
|
+
{ "from": "in-progress", "to": "complete", "required_authority": "any" },
|
|
56
|
+
{ "from": "in-progress", "to": "abandoned", "required_authority": "user" },
|
|
57
|
+
{ "from": "complete", "to": "in-progress", "required_authority": "user", "note": "reopen for follow-up review" }
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"note": "AJV draft-07 cannot enforce transition validity; this block is metadata for future framework-level state-machine validation (FGAP-005)."
|
|
61
|
+
}
|
|
62
|
+
}
|