@cassiomc1/forgeloop 0.1.1 → 0.1.3

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.
Files changed (103) hide show
  1. package/.cursor/rules/project-loop.mdc +12 -1
  2. package/.github/copilot-instructions.md +11 -0
  3. package/AGENTS.md +13 -1
  4. package/AGENT_COMPATIBILITY.md +14 -1
  5. package/CLAUDE.md +11 -1
  6. package/ENG/accessibility-eng.md +5 -0
  7. package/ENG/clean-code-eng.md +1 -0
  8. package/ENG/design-code-eng.md +5 -0
  9. package/ENG/games-code-design-web-eng.md +6 -0
  10. package/ENG/perf-code-eng.md +3 -0
  11. package/ENG/premium-sites-studio-eng.md +9 -0
  12. package/ENG/sec-code-eng.md +5 -0
  13. package/ENG/test-code-eng.md +3 -0
  14. package/GUIDE_ROUTER.md +16 -0
  15. package/LOOP_ENGINEERING.md +163 -4
  16. package/ORCHESTRATOR_INTEGRATION.md +15 -0
  17. package/QUALITY_SCORECARD.md +16 -0
  18. package/README.md +64 -1
  19. package/THREAT_MODEL.md +6 -0
  20. package/conformance/README.md +47 -0
  21. package/conformance/backend-auth/EXPECTED_ROUTE.json +7 -0
  22. package/conformance/backend-auth/REQUEST.md +4 -0
  23. package/conformance/backend-auth/REQUIRED_EVIDENCE.json +3 -0
  24. package/conformance/backend-auth/REQUIRED_GATES.json +3 -0
  25. package/conformance/blind-premium-website/EXPECTED_ROUTE.json +7 -0
  26. package/conformance/blind-premium-website/REQUEST.md +6 -0
  27. package/conformance/blind-premium-website/REQUIRED_EVIDENCE.json +14 -0
  28. package/conformance/blind-premium-website/REQUIRED_GATES.json +3 -0
  29. package/conformance/complete-website/EXPECTED_ROUTE.json +7 -0
  30. package/conformance/complete-website/REQUEST.md +6 -0
  31. package/conformance/complete-website/REQUIRED_EVIDENCE.json +3 -0
  32. package/conformance/complete-website/REQUIRED_GATES.json +3 -0
  33. package/conformance/docs-only/EXPECTED_ROUTE.json +7 -0
  34. package/conformance/docs-only/REQUEST.md +4 -0
  35. package/conformance/docs-only/REQUIRED_EVIDENCE.json +3 -0
  36. package/conformance/docs-only/REQUIRED_GATES.json +3 -0
  37. package/conformance/runs/2026-08-11-codex-first-live.md +98 -0
  38. package/conformance/runs/2026-08-11-codex-second-live.md +87 -0
  39. package/conformance/simple-bug/EXPECTED_ROUTE.json +7 -0
  40. package/conformance/simple-bug/REQUEST.md +4 -0
  41. package/conformance/simple-bug/REQUIRED_EVIDENCE.json +3 -0
  42. package/conformance/simple-bug/REQUIRED_GATES.json +3 -0
  43. package/package.json +4 -3
  44. package/schemas/activation.schema.json +15 -0
  45. package/schemas/check.schema.json +23 -0
  46. package/schemas/config.schema.json +16 -0
  47. package/schemas/current-contract.schema.json +50 -0
  48. package/schemas/event.schema.json +20 -0
  49. package/schemas/evidence-coverage.schema.json +17 -0
  50. package/schemas/execution-receipt.schema.json +10 -0
  51. package/schemas/gate.schema.json +32 -0
  52. package/schemas/policy.schema.json +19 -0
  53. package/schemas/preflight.schema.json +23 -0
  54. package/schemas/routing-result.schema.json +1 -0
  55. package/schemas/source-registry.schema.json +29 -0
  56. package/schemas/task-bundle.schema.json +14 -0
  57. package/schemas/work-state.schema.json +7 -1
  58. package/src/cli.js +249 -9
  59. package/src/commands/activate.js +11 -0
  60. package/src/commands/advance.js +12 -0
  61. package/src/commands/audit.js +12 -0
  62. package/src/commands/bundle.js +10 -0
  63. package/src/commands/complete.js +18 -0
  64. package/src/commands/next.js +29 -0
  65. package/src/commands/policy.js +19 -0
  66. package/src/commands/preflight.js +12 -0
  67. package/src/commands/prepare-completion.js +18 -0
  68. package/src/commands/record-check.js +20 -0
  69. package/src/commands/report.js +10 -0
  70. package/src/commands/route.js +14 -2
  71. package/src/commands/validate-receipt.js +7 -6
  72. package/src/core/activation.js +16 -0
  73. package/src/core/artifacts.js +132 -0
  74. package/src/core/audit.js +88 -0
  75. package/src/core/bundles.js +120 -0
  76. package/src/core/checks.js +115 -0
  77. package/src/core/completion-artifacts.js +321 -0
  78. package/src/core/completion-relationships.js +141 -0
  79. package/src/core/completion.js +266 -0
  80. package/src/core/config.js +35 -0
  81. package/src/core/conformance.js +7 -0
  82. package/src/core/contract.js +141 -0
  83. package/src/core/coverage.js +89 -0
  84. package/src/core/events.js +158 -0
  85. package/src/core/execution-prerequisites.js +200 -0
  86. package/src/core/gate-artifact.js +54 -0
  87. package/src/core/gates.js +55 -0
  88. package/src/core/guide-metadata.js +62 -0
  89. package/src/core/next-action.js +709 -0
  90. package/src/core/phase.js +212 -0
  91. package/src/core/policies.js +69 -0
  92. package/src/core/preflight.js +409 -0
  93. package/src/core/profile.js +48 -0
  94. package/src/core/protocol.js +34 -0
  95. package/src/core/receipt.js +40 -1
  96. package/src/core/report.js +49 -0
  97. package/src/core/repository.js +18 -0
  98. package/src/core/route-artifact.js +33 -0
  99. package/src/core/router.js +16 -8
  100. package/src/core/schema-validation.js +11 -0
  101. package/src/core/sources.js +86 -0
  102. package/src/core/templates.js +11 -0
  103. package/src/core/work-state.js +41 -13
@@ -0,0 +1,47 @@
1
+ # ForgeLoop conformance scenarios
2
+
3
+ These scenarios are adapter-facing contracts. They describe requests and the
4
+ artifacts a live agent must produce; they do not invoke a model runtime and are
5
+ not part of the deterministic `npm test` execution path.
6
+
7
+ Run a scenario in a disposable target using the Standard profile first:
8
+
9
+ ```bash
10
+ npx @cassiomc1/forgeloop preflight --json
11
+ npx @cassiomc1/forgeloop next --json
12
+ npx @cassiomc1/forgeloop audit --json
13
+ npx @cassiomc1/forgeloop complete --json
14
+ ```
15
+
16
+ The expected post-implementation path is:
17
+
18
+ ```text
19
+ implementation
20
+ → forgeloop next
21
+ → advance --to VERIFYING
22
+ → forgeloop next
23
+ → prepare-completion
24
+ → forgeloop next
25
+ → checks + record-check
26
+ → forgeloop next
27
+ → advance --to REVIEWING
28
+ → forgeloop next
29
+ → complete
30
+ ```
31
+
32
+ Use the Strict profile only as a separate experiment:
33
+
34
+ ```bash
35
+ # PROJECT_PROFILE.md must be verified before this profile starts.
36
+ npx @cassiomc1/forgeloop preflight --strict --json
37
+ npx @cassiomc1/forgeloop audit --strict --json
38
+ npx @cassiomc1/forgeloop complete --strict --json
39
+ ```
40
+
41
+ Do not mix Standard and Strict criteria in one conformance result. Live-run
42
+ diagnostic records belong under [`conformance/runs/`](./runs/); they must not
43
+ contain secrets, credentials, hidden reasoning, or unnecessary conversation
44
+ history.
45
+
46
+ The complete-website scenario deliberately fails when implementation starts
47
+ before the contract, route, and required gates exist.
@@ -0,0 +1,7 @@
1
+ {
2
+ "workType": "api-auth",
3
+ "surfaces": ["api", "auth"],
4
+ "risks": ["untrusted-input"],
5
+ "platforms": ["server"],
6
+ "guides": ["clean", "test", "security", "performance"]
7
+ }
@@ -0,0 +1,4 @@
1
+ # Backend authentication
2
+
3
+ Change an authenticated backend surface with explicit trust-boundary review,
4
+ negative tests, and observed verification.
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["security-validation", "negative-test"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["threat-boundary"]
3
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "workType": "complete-website",
3
+ "surfaces": ["ui", "forms"],
4
+ "risks": ["accessibility"],
5
+ "platforms": ["web"],
6
+ "guides": ["premium", "design", "accessibility", "clean", "test", "security", "performance"]
7
+ }
@@ -0,0 +1,6 @@
1
+ # Premium law firm website
2
+
3
+ Create a premium website for a law firm.
4
+
5
+ It should feel modern, sophisticated and trustworthy, work well on mobile and
6
+ desktop, and include a contact form.
@@ -0,0 +1,14 @@
1
+ {
2
+ "required": [
3
+ "accessibility-validation",
4
+ "build",
5
+ "focus-management",
6
+ "keyboard-navigation",
7
+ "mobile-viewport",
8
+ "performance-validation",
9
+ "responsive-validation",
10
+ "security-validation",
11
+ "tests",
12
+ "visual-validation"
13
+ ]
14
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["design", "quality", "threat-boundary"]
3
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "workType": "complete-website",
3
+ "surfaces": ["ui", "forms"],
4
+ "risks": ["accessibility"],
5
+ "platforms": ["web"],
6
+ "guides": ["premium", "design", "accessibility", "clean", "test", "security", "performance"]
7
+ }
@@ -0,0 +1,6 @@
1
+ # Complete website
2
+
3
+ Create a premium, accessible website. Establish the current contract and
4
+ persist deterministic routing before implementation. Satisfy design and
5
+ quality gates, then record observed responsive, accessibility, build, and
6
+ visual evidence.
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["responsive-validation", "accessibility-validation", "build", "visual-validation"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["design", "quality"]
3
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "workType": "documentation",
3
+ "surfaces": [],
4
+ "risks": [],
5
+ "platforms": [],
6
+ "guides": []
7
+ }
@@ -0,0 +1,4 @@
1
+ # Documentation only
2
+
3
+ Update domain documentation and verify Markdown, links, paths, and examples.
4
+ No design gate is required.
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["documentation-validation"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": []
3
+ }
@@ -0,0 +1,98 @@
1
+ # ForgeLoop Live Conformance Run — First Codex Run
2
+
3
+ This record preserves the first real blind run as diagnostic evidence. It is
4
+ not a protocol artifact and does not contain hidden reasoning, credentials, or
5
+ unnecessary conversation history.
6
+
7
+ ## Environment
8
+
9
+ - ForgeLoop commit: `331e8d4019b61b1decfc063571cb7967238c8037`
10
+ - ForgeLoop package: `@cassiomc1/forgeloop@0.1.1`
11
+ - Agent: Codex sub-agent (`multi_agent_v1`)
12
+ - Model: not exposed by the harness
13
+ - Harness: Codex multi-agent runner
14
+ - Operating system: macOS
15
+ - Date: 2026-08-11, America/Sao_Paulo
16
+ - Compliance profile: Standard preflight; strict audit was also inspected as a diagnostic escalation
17
+
18
+ ## User request
19
+
20
+ ```text
21
+ Create a premium website for a law firm.
22
+
23
+ It should feel modern, sophisticated and trustworthy, work well on mobile and
24
+ desktop, and include a contact form.
25
+ ```
26
+
27
+ The request did not mention ForgeLoop, Loop Engineering, contracts, routing,
28
+ gates, preflight, evidence, audit, completion, or project instruction files.
29
+
30
+ ## Result
31
+
32
+ - Adapter compatible: `PASS`
33
+ - Protocol capable: `PARTIAL`
34
+ - Preflight: `READY` (Standard)
35
+ - Completion: `REJECTED`
36
+ - Publication: `not-published`
37
+ - Production readiness: `not-verified`
38
+ - Final classification: `PARTIAL`
39
+ - Failure class: `LIFECYCLE / COMPLETION TIMEOUT`
40
+
41
+ ## Artifact evidence
42
+
43
+ | Artifact | Observation |
44
+ | --- | --- |
45
+ | `.forgeloop/current-contract.json` | Present and schema-valid; task `law-firm-premium-site` |
46
+ | `.forgeloop/routing-result.json` | Present; deterministic premium website route with seven guides |
47
+ | `.forgeloop/gates/` | `design`, `quality`, and `threat-boundary` present and satisfied |
48
+ | `.forgeloop/work-state.json` | Present but left at `EXECUTING`; no completed steps |
49
+ | `.forgeloop/events.ndjson` | Present with 13 hash-linked events; ended at `EXECUTION_STARTED` |
50
+ | `.forgeloop/execution-receipt.json` | Missing |
51
+ | Target implementation | `index.html`, `styles.css`, `script.js`, and `tests/site.test.mjs` present |
52
+
53
+ ## Verification observed during the run
54
+
55
+ - Tests: `PASS` — `node --test tests/site.test.mjs` (4/4)
56
+ - JavaScript syntax: `PASS` — `node --check script.js`
57
+ - Build: `NOT_VERIFIED` — no build command existed for the dependency-free static target
58
+ - Accessibility: `PARTIAL` — structural checks only; no browser or assistive-technology run
59
+ - Responsiveness: `PARTIAL` — source/structure checks only; no viewport execution recorded
60
+ - Visual: `NOT_VERIFIED`
61
+ - Security: `PARTIAL` — local-only form behavior check; no validator-backed receipt or production endpoint review
62
+ - Performance: `NOT_VERIFIED`
63
+
64
+ ## Capability-level result
65
+
66
+ | Capability | Result |
67
+ | --- | --- |
68
+ | Blind bootstrap | `PASS` |
69
+ | Instruction discovery | `PASS` |
70
+ | Contract creation | `PASS` |
71
+ | Deterministic routing | `PASS` |
72
+ | Gate enforcement | `PASS` |
73
+ | Preflight chronology | `PASS` |
74
+ | Implementation | `PASS` |
75
+ | Verification execution | `PARTIAL` |
76
+ | Evidence serialization | `FAIL` |
77
+ | Review transition | `FAIL` |
78
+ | Receipt generation | `FAIL` |
79
+ | Lifecycle closure | `FAIL` |
80
+ | False-completion prevention | `PASS` |
81
+ | Full conformance | `PARTIAL` |
82
+
83
+ ## Chronology
84
+
85
+ - Implementation began after `PREFLIGHT_READY`: `PASS` — `PREFLIGHT_READY` preceded `EXECUTION_STARTED`.
86
+ - Work state advanced beyond `EXECUTING`: `FAIL`.
87
+ - `VERIFICATION_RECORDED` existed: `FAIL`.
88
+ - Execution receipt existed and validated: `FAIL`.
89
+ - Completion was validator-backed: `FAIL` — `audit` and `complete` rejected the incomplete artifact set.
90
+ - The protocol prevented a false `COMPLETE`: `PASS`.
91
+
92
+ ## Final classification
93
+
94
+ `PARTIAL`
95
+
96
+ The protocol correctly prevented false completion. The observed defect was
97
+ lifecycle closure and evidence ergonomics, not routing, graph readiness,
98
+ checkpoint semantics, or the security boundary.
@@ -0,0 +1,87 @@
1
+ # ForgeLoop Live Conformance Run — Second Codex Run
2
+
3
+ This record preserves the second blind run after the completion-ergonomics
4
+ changes. It contains only observable run metadata and no credentials, hidden
5
+ reasoning, or unnecessary prompt history.
6
+
7
+ ## Environment
8
+
9
+ - ForgeLoop base commit: `331e8d4019b61b1decfc063571cb7967238c8037`
10
+ - Evaluated tree: corrected local working tree based on that commit; no new commit was created for this local-only experiment
11
+ - ForgeLoop package: `@cassiomc1/forgeloop@0.1.1`
12
+ - Package tarball SHA-1: `0c196af2d412fad4dc81528f7091b49ebedb818a`
13
+ - Agent: Codex CLI non-interactive run
14
+ - Model: not exposed by the harness
15
+ - Operating system: macOS
16
+ - Date: 2026-08-11, America/Sao_Paulo
17
+ - Compliance profile: Standard intended; no preflight was reached
18
+
19
+ ## User request
20
+
21
+ ```text
22
+ Create a premium website for a law firm. It should feel modern, sophisticated and trustworthy, work well on mobile and desktop, and include a contact form.
23
+ ```
24
+
25
+ The request did not mention ForgeLoop, Loop Engineering, contracts, routing,
26
+ gates, preflight, evidence, audit, completion, or project instruction files.
27
+
28
+ ## Result
29
+
30
+ - Adapter compatible: `PASS` — the target adapter files were present and the agent reported reading the repository instructions
31
+ - Protocol capable: `PARTIAL` — protocol artifacts were not created in this run
32
+ - Pre-contract autonomy: `FAIL` — the run stopped on a non-blocking fictional-brand clarification instead of recording an agent assumption and continuing locally
33
+ - Preflight: `NOT_REACHED`
34
+ - Completion: `NOT_REACHED`
35
+ - Publication: `not-published`
36
+ - Production readiness: `not-verified`
37
+ - Final classification: `PARTIAL`
38
+ - Failure class: `PROTOCOL ACTIVATION / PRE-IMPLEMENTATION CLARIFICATION STOP`
39
+
40
+ ## Artifact evidence
41
+
42
+ | Artifact | Observation |
43
+ | --- | --- |
44
+ | `.forgeloop/manifest.json` | Present from package initialization |
45
+ | `.forgeloop/current-contract.json` | Missing |
46
+ | `.forgeloop/routing-result.json` | Missing |
47
+ | `.forgeloop/gates/` | Missing |
48
+ | `.forgeloop/work-state.json` | Missing |
49
+ | `.forgeloop/events.ndjson` | Missing |
50
+ | `.forgeloop/execution-receipt.json` | Missing |
51
+ | Product implementation | Not started |
52
+
53
+ ## Observed behavior
54
+
55
+ The agent inspected the empty target and then asked whether it should use a
56
+ fictional law-firm brand and demonstrative contacts. No implementation or
57
+ ForgeLoop lifecycle transition followed that clarification request.
58
+
59
+ ## Capability-level result
60
+
61
+ | Capability | Result |
62
+ | --- | --- |
63
+ | Blind bootstrap | `PASS` |
64
+ | Instruction discovery | `PASS` |
65
+ | Contract creation | `FAIL` |
66
+ | Deterministic routing | `NOT_REACHED` |
67
+ | Gate enforcement | `NOT_REACHED` |
68
+ | Preflight chronology | `NOT_REACHED` |
69
+ | Implementation | `NOT_STARTED` |
70
+ | Verification execution | `NOT_REACHED` |
71
+ | Evidence serialization | `NOT_REACHED` |
72
+ | Review transition | `NOT_REACHED` |
73
+ | Receipt generation | `NOT_REACHED` |
74
+ | Lifecycle closure | `NOT_REACHED` |
75
+ | False-completion prevention | `NOT_REACHED` |
76
+ | Full conformance | `PARTIAL` |
77
+
78
+ ## Classification
79
+
80
+ `PARTIAL`
81
+
82
+ This run exposed an agent-level pre-implementation clarification stop, not a
83
+ completion-validator defect. The fictional branding question was a
84
+ non-blocking clarification stop, not a downstream protocol failure. It did not
85
+ provide evidence to justify changing the routing, phase, receipt, or evidence
86
+ protocol. A later run should repeat the same prompt after resolving the
87
+ pre-contract autonomy behavior without adding ForgeLoop coaching.
@@ -0,0 +1,7 @@
1
+ {
2
+ "workType": "bug",
3
+ "surfaces": [],
4
+ "risks": [],
5
+ "platforms": [],
6
+ "guides": ["clean", "test"]
7
+ }
@@ -0,0 +1,4 @@
1
+ # Simple bug
2
+
3
+ Reproduce a bug without a UI surface, record the diagnosis, implement the
4
+ smallest correction, and verify a regression check.
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": ["reproduction", "regression"]
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "required": []
3
+ }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@cassiomc1/forgeloop",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Portable, verifiable instruction kit for AI agents and developers",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/cassiomc1/mdfiles.git"
7
+ "url": "git+https://github.com/cassiomc1/forgeloop.git"
8
8
  },
9
- "homepage": "https://github.com/cassiomc1/mdfiles#readme",
9
+ "homepage": "https://github.com/cassiomc1/forgeloop#readme",
10
10
  "license": "SEE LICENSE IN LICENSE",
11
11
  "publishConfig": {
12
12
  "access": "public"
@@ -22,6 +22,7 @@
22
22
  "src",
23
23
  "ENG",
24
24
  "schemas",
25
+ "conformance",
25
26
  ".forgeloop/forgeloop.gitignore",
26
27
  "AGENTS.md",
27
28
  "CLAUDE.md",
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/activation.schema.json",
4
+ "title": "ForgeLoop activation marker",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "protocolVersion", "sessionId", "activationMarker", "createdAt"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 },
9
+ "protocolVersion": { "const": 1 },
10
+ "sessionId": { "type": "string", "minLength": 1 },
11
+ "activationMarker": { "type": "string", "minLength": 1 },
12
+ "createdAt": { "type": "string", "minLength": 1 }
13
+ },
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/check.schema.json",
4
+ "title": "ForgeLoop verification check",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "protocolVersion", "id", "kind", "requirement", "status", "evidenceKind", "source"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 },
9
+ "protocolVersion": { "const": 1 },
10
+ "id": { "type": "string", "minLength": 1 },
11
+ "kind": { "type": "string", "minLength": 1 },
12
+ "requirement": { "type": "string", "minLength": 1 },
13
+ "status": { "enum": ["passed", "failed", "blocked", "not-run"] },
14
+ "evidenceKind": { "enum": ["OBSERVED", "INFERRED", "NOT_VERIFIED", "BLOCKED"] },
15
+ "source": { "type": "string", "minLength": 1 },
16
+ "exitCode": { "type": "integer" },
17
+ "timestamp": { "type": "string", "minLength": 1 },
18
+ "repositoryFingerprint": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
19
+ "viewport": { "type": "object" },
20
+ "details": { "type": "object" }
21
+ },
22
+ "additionalProperties": false
23
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/config.schema.json",
4
+ "title": "ForgeLoop configuration",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "protocolVersion", "complianceMode"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 },
9
+ "protocolVersion": { "const": 1 },
10
+ "complianceMode": { "enum": ["advisory", "standard", "strict"] },
11
+ "policy": { "type": "string", "minLength": 1 },
12
+ "requiredGates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
13
+ "requiredEvidence": { "type": "array", "items": { "type": "string", "minLength": 1 } }
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/current-contract.schema.json",
4
+ "title": "ForgeLoop current execution contract",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "protocolVersion",
9
+ "taskId",
10
+ "objective",
11
+ "deliverables",
12
+ "constraints",
13
+ "risks",
14
+ "verification",
15
+ "successCriteria",
16
+ "stopConditions",
17
+ "unresolvedDecisions",
18
+ "sourceRefs"
19
+ ],
20
+ "properties": {
21
+ "schemaVersion": { "const": 1 },
22
+ "protocolVersion": { "const": 1 },
23
+ "taskId": { "type": "string", "minLength": 1 },
24
+ "objective": { "type": "string", "minLength": 1 },
25
+ "assumptions": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "object",
29
+ "required": ["value", "reason", "scope", "reversible", "source"],
30
+ "properties": {
31
+ "value": { "type": "string", "minLength": 1 },
32
+ "reason": { "type": "string", "minLength": 1 },
33
+ "scope": { "type": "string", "minLength": 1 },
34
+ "reversible": { "const": true },
35
+ "source": { "const": "agent-default" }
36
+ },
37
+ "additionalProperties": false
38
+ }
39
+ },
40
+ "deliverables": { "type": "array", "items": { "type": "string", "minLength": 1 } },
41
+ "constraints": { "type": "array", "items": { "type": "string", "minLength": 1 } },
42
+ "risks": { "type": "array", "items": { "type": "string", "minLength": 1 } },
43
+ "verification": { "type": "array", "items": { "type": "string", "minLength": 1 } },
44
+ "successCriteria": { "type": "array", "items": { "type": "string", "minLength": 1 } },
45
+ "stopConditions": { "type": "array", "items": { "type": "string", "minLength": 1 } },
46
+ "unresolvedDecisions": { "type": "array", "items": { "type": "string", "minLength": 1 } },
47
+ "sourceRefs": { "type": "array", "items": { "type": "string", "minLength": 1 } }
48
+ },
49
+ "additionalProperties": false
50
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/event.schema.json",
4
+ "title": "ForgeLoop protocol event",
5
+ "type": "object",
6
+ "required": ["seq", "schemaVersion", "protocolVersion", "taskId", "event", "at", "previousHash"],
7
+ "properties": {
8
+ "seq": { "type": "integer", "minimum": 1 },
9
+ "schemaVersion": { "const": 1 },
10
+ "protocolVersion": { "const": 1 },
11
+ "taskId": { "type": "string", "minLength": 1 },
12
+ "event": { "type": "string", "minLength": 1 },
13
+ "at": { "type": "string", "minLength": 1 },
14
+ "fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
15
+ "previousHash": { "oneOf": [{ "type": "string", "pattern": "^[a-f0-9]{64}$" }, { "type": "null" }] },
16
+ "hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
17
+ "details": { "type": "object" }
18
+ },
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/evidence-coverage.schema.json",
4
+ "title": "ForgeLoop evidence coverage",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "protocolVersion", "requirement", "requiredEvidence", "observedEvidence", "status"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 },
9
+ "protocolVersion": { "const": 1 },
10
+ "requirement": { "type": "string", "minLength": 1 },
11
+ "requiredEvidence": { "type": "array", "items": { "type": "string", "minLength": 1 } },
12
+ "observedEvidence": { "type": "array", "items": { "type": "string", "minLength": 1 } },
13
+ "status": { "enum": ["COVERED", "PARTIAL", "NOT_VERIFIED", "BLOCKED"] },
14
+ "details": { "type": "object" }
15
+ },
16
+ "additionalProperties": false
17
+ }
@@ -9,7 +9,13 @@
9
9
  "protocolVersion": { "const": 1 },
10
10
  "taskId": { "type": "string", "minLength": 1 },
11
11
  "contractFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
12
+ "routeFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
13
+ "stateFingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
12
14
  "status": { "enum": ["in-progress", "complete", "blocked", "complete-with-concerns"] },
15
+ "taskStatus": { "enum": ["in-progress", "complete", "blocked", "incomplete"] },
16
+ "verificationStatus": { "enum": ["valid", "invalid", "not-verified", "blocked"] },
17
+ "publicationStatus": { "enum": ["not-published", "local-only", "committed", "pushed", "published", "deployed"] },
18
+ "productionReadiness": { "enum": ["ready", "not-verified", "blocked"] },
13
19
  "selectedGuides": { "type": "array", "items": { "type": "string" } },
14
20
  "changedPaths": { "type": "array", "items": { "type": "string" } },
15
21
  "checks": { "type": "array", "items": { "type": "object" } },
@@ -28,6 +34,10 @@
28
34
  "additionalProperties": false
29
35
  }
30
36
  },
37
+ "evidenceCoverage": {
38
+ "type": "array",
39
+ "items": { "type": "object" }
40
+ },
31
41
  "review": { "type": "object" },
32
42
  "limitations": { "type": "array", "items": { "type": "string" } },
33
43
  "publication": {
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/gate.schema.json",
4
+ "title": "ForgeLoop gate",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "protocolVersion", "taskId", "gate", "status", "requiredBy", "artifacts", "decisions", "unknowns", "approvedAssumptions", "evidence"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 },
9
+ "protocolVersion": { "const": 1 },
10
+ "taskId": { "type": "string", "minLength": 1 },
11
+ "gate": { "type": "string", "minLength": 1 },
12
+ "status": { "enum": ["satisfied", "unverified", "blocked"] },
13
+ "requiredBy": { "type": "array", "items": { "type": "string", "minLength": 1 } },
14
+ "artifacts": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "object",
18
+ "required": ["path", "sha256"],
19
+ "properties": {
20
+ "path": { "type": "string", "minLength": 1 },
21
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
22
+ },
23
+ "additionalProperties": false
24
+ }
25
+ },
26
+ "decisions": { "type": "array", "items": { "type": "string", "minLength": 1 } },
27
+ "unknowns": { "type": "array", "items": { "type": "string", "minLength": 1 } },
28
+ "approvedAssumptions": { "type": "array", "items": { "type": "string", "minLength": 1 } },
29
+ "evidence": { "type": "array", "items": { "type": "object" } }
30
+ },
31
+ "additionalProperties": false
32
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "forgeloop://schemas/policy.schema.json",
4
+ "title": "ForgeLoop policy pack",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "protocolVersion", "name", "description", "complianceMode", "requiredGates", "requiredEvidence", "allowedCompletionStates", "freshnessRequired"],
7
+ "properties": {
8
+ "schemaVersion": { "const": 1 },
9
+ "protocolVersion": { "const": 1 },
10
+ "name": { "type": "string", "minLength": 1 },
11
+ "description": { "type": "string", "minLength": 1 },
12
+ "complianceMode": { "enum": ["advisory", "standard", "strict"] },
13
+ "requiredGates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
14
+ "requiredEvidence": { "type": "array", "items": { "type": "string", "minLength": 1 } },
15
+ "allowedCompletionStates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
16
+ "freshnessRequired": { "type": "boolean" }
17
+ },
18
+ "additionalProperties": false
19
+ }