@cassiomc1/forgeloop 0.1.11 → 0.1.13
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/.cursor/rules/project-loop.mdc +16 -18
- package/.github/copilot-instructions.md +16 -19
- package/AGENTS.md +18 -24
- package/AGENT_COMPATIBILITY.md +4 -211
- package/CLAUDE.md +16 -18
- package/LOOP_ENGINEERING.md +104 -0
- package/LOOP_SYSTEM_DESIGN.md +13 -11
- package/PROTOCOL_INTEGRATION.md +199 -0
- package/QUALITY_SCORECARD.md +1 -1
- package/README.md +125 -174
- package/TERMINOLOGY.md +2 -0
- package/THREAT_MODEL.md +5 -0
- package/package.json +5 -4
- package/src/commands/validate-protocol.js +11 -8
- package/src/core/conformance.js +47 -5
- package/src/core/discovery-surfaces.js +22 -0
- package/src/core/inspect.js +23 -12
- package/src/core/native-adapters.js +34 -2
- package/src/core/templates.js +1 -0
- package/src/core/verification-capability.js +47 -0
- package/conformance/README.md +0 -153
- package/conformance/backend-auth/EXPECTED_ROUTE.json +0 -7
- package/conformance/backend-auth/REQUEST.md +0 -4
- package/conformance/backend-auth/REQUIRED_EVIDENCE.json +0 -3
- package/conformance/backend-auth/REQUIRED_GATES.json +0 -3
- package/conformance/blind-premium-website/EXPECTED_ROUTE.json +0 -7
- package/conformance/blind-premium-website/REQUEST.md +0 -6
- package/conformance/blind-premium-website/REQUIRED_EVIDENCE.json +0 -14
- package/conformance/blind-premium-website/REQUIRED_GATES.json +0 -3
- package/conformance/complete-website/EXPECTED_ROUTE.json +0 -7
- package/conformance/complete-website/REQUEST.md +0 -6
- package/conformance/complete-website/REQUIRED_EVIDENCE.json +0 -3
- package/conformance/complete-website/REQUIRED_GATES.json +0 -3
- package/conformance/docs-only/EXPECTED_ROUTE.json +0 -7
- package/conformance/docs-only/REQUEST.md +0 -4
- package/conformance/docs-only/REQUIRED_EVIDENCE.json +0 -3
- package/conformance/docs-only/REQUIRED_GATES.json +0 -3
- package/conformance/runs/2026-08-11-codex-first-live.md +0 -98
- package/conformance/runs/2026-08-11-codex-second-live.md +0 -87
- package/conformance/runs/2026-08-13-codex-fifth-live.md +0 -386
- package/conformance/runs/2026-08-13-codex-fourth-live.md +0 -309
- package/conformance/runs/2026-08-13-codex-sixth-live.md +0 -412
- package/conformance/simple-bug/EXPECTED_ROUTE.json +0 -7
- package/conformance/simple-bug/REQUEST.md +0 -4
- package/conformance/simple-bug/REQUIRED_EVIDENCE.json +0 -3
- package/conformance/simple-bug/REQUIRED_GATES.json +0 -3
- package/src/core/agent-support.js +0 -89
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Protocol Integration
|
|
2
|
+
|
|
3
|
+
ForgeLoop is a portable, project-scoped engineering protocol. It is vendor-neutral
|
|
4
|
+
and is not tied to a specific model, provider, agent product, IDE, or orchestration runtime.
|
|
5
|
+
|
|
6
|
+
The protocol becomes applicable because a project activates ForgeLoop, not because
|
|
7
|
+
an execution environment appears in a compatibility list.
|
|
8
|
+
|
|
9
|
+
<!-- FORGELOOP_PROJECT_PROTOCOL=REQUIRED -->
|
|
10
|
+
|
|
11
|
+
## Universal applicability
|
|
12
|
+
|
|
13
|
+
If the active execution environment discovers a ForgeLoop project adapter,
|
|
14
|
+
the canonical ForgeLoop protocol applies to work performed in that project.
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
PROJECT HAS FORGELOOP ADAPTER
|
|
18
|
+
+
|
|
19
|
+
RUNTIME DISCOVERS IT
|
|
20
|
+
+
|
|
21
|
+
REQUIRED LOCAL CAPABILITIES ARE AVAILABLE
|
|
22
|
+
=
|
|
23
|
+
FORGELOOP APPLIES
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
An execution environment that has not been previously tested is
|
|
27
|
+
`CONFORMANCE_UNVERIFIED`, not unsupported and not exempt from the protocol.
|
|
28
|
+
|
|
29
|
+
Capabilities determine how much of ForgeLoop can be executed. Brand names do not.
|
|
30
|
+
|
|
31
|
+
### Interpretation rules
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
INVALID:
|
|
35
|
+
"I am not a named ForgeLoop integration, therefore ForgeLoop does not apply."
|
|
36
|
+
"I will follow ForgeLoop only in spirit because my harness is not documented."
|
|
37
|
+
|
|
38
|
+
VALID:
|
|
39
|
+
"I discovered the ForgeLoop project adapter. ForgeLoop applies.
|
|
40
|
+
My current runtime may have unverified or limited capabilities, which I will evaluate."
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Integration levels
|
|
44
|
+
|
|
45
|
+
Execution environments integrate with ForgeLoop by capability:
|
|
46
|
+
|
|
47
|
+
### Level 1 — `INSTRUCTION_DISCOVERED`
|
|
48
|
+
|
|
49
|
+
The environment has automatically or explicitly loaded a project-local ForgeLoop
|
|
50
|
+
adapter (such as `AGENTS.md`, `CLAUDE.md`, `.cursor/rules/project-loop.mdc`,
|
|
51
|
+
`.github/copilot-instructions.md`, or manual bootstrap).
|
|
52
|
+
|
|
53
|
+
### Level 2 — `PROTOCOL_CAPABLE`
|
|
54
|
+
|
|
55
|
+
The environment possesses the necessary local capabilities:
|
|
56
|
+
|
|
57
|
+
- Read project files.
|
|
58
|
+
- Write project-local files.
|
|
59
|
+
- Execute local commands.
|
|
60
|
+
- Invoke the project-local ForgeLoop CLI.
|
|
61
|
+
- Preserve project state across lifecycle transitions.
|
|
62
|
+
|
|
63
|
+
When these are available, the environment executes the complete ForgeLoop lifecycle.
|
|
64
|
+
|
|
65
|
+
### Level 3 — `PROTOCOL_LIMITED`
|
|
66
|
+
|
|
67
|
+
The environment discovered ForgeLoop but lacks one or more required local
|
|
68
|
+
capabilities (for example, no command execution or no write access).
|
|
69
|
+
|
|
70
|
+
ForgeLoop **still applies**, but the runtime must:
|
|
71
|
+
|
|
72
|
+
- Fail closed for the affected lifecycle dimension.
|
|
73
|
+
- Report the missing capability explicitly.
|
|
74
|
+
- Never simulate missing capabilities.
|
|
75
|
+
- Never manually fabricate protocol-owned state.
|
|
76
|
+
- Never claim validator-backed completion.
|
|
77
|
+
|
|
78
|
+
### Level 4 — `CONFORMANCE_VERIFIED`
|
|
79
|
+
|
|
80
|
+
A specific runtime, model, version, environment, and configuration has completed a
|
|
81
|
+
recorded blind conformance scenario under standard protocol verification.
|
|
82
|
+
|
|
83
|
+
Conformance verification is **evidence of tested interoperability**; it is
|
|
84
|
+
never an eligibility gate or allowlist for protocol adoption.
|
|
85
|
+
|
|
86
|
+
## Discovery surfaces
|
|
87
|
+
|
|
88
|
+
ForgeLoop provides project-local shims for common instruction-discovery mechanisms:
|
|
89
|
+
|
|
90
|
+
- `AGENTS.md`: Standard discovery surface recognized by multiple AI coding tools and developers.
|
|
91
|
+
- `CLAUDE.md`: Discovery surface for Claude Code.
|
|
92
|
+
- `.cursor/rules/project-loop.mdc`: MDC rule format for Cursor.
|
|
93
|
+
- `.github/copilot-instructions.md`: Repository instructions for GitHub Copilot.
|
|
94
|
+
|
|
95
|
+
These files are discovery aliases. They all point to the same canonical project
|
|
96
|
+
protocol in `.forgeloop/kit/LOOP_ENGINEERING.md` and `.forgeloop/kit/PROTOCOL_INTEGRATION.md`.
|
|
97
|
+
They do not define separate ForgeLoop implementations.
|
|
98
|
+
|
|
99
|
+
### Generic and manual bootstrap
|
|
100
|
+
|
|
101
|
+
For environments, internal enterprise agents, custom harnesses, or developer-operated
|
|
102
|
+
workflows that do not automatically discover one of the default files:
|
|
103
|
+
|
|
104
|
+
1. Read `.forgeloop/kit/LOOP_ENGINEERING.md`.
|
|
105
|
+
2. Read `.forgeloop/kit/PROTOCOL_INTEGRATION.md`.
|
|
106
|
+
3. Resolve the project-local ForgeLoop CLI.
|
|
107
|
+
4. Execute the contract, route, preflight, and lifecycle workflow.
|
|
108
|
+
|
|
109
|
+
A developer or custom automation can execute ForgeLoop identically to an AI agent.
|
|
110
|
+
|
|
111
|
+
## CLI resolution policy
|
|
112
|
+
|
|
113
|
+
Lifecycle-owned protocol state must be managed through the project-local ForgeLoop CLI:
|
|
114
|
+
|
|
115
|
+
1. Project-local `node_modules/.bin/forgeloop`
|
|
116
|
+
2. Package manager local execution (e.g. `npx --no-install forgeloop` or equivalent)
|
|
117
|
+
3. Direct package CLI entry point (`node src/cli.js`)
|
|
118
|
+
4. Verified global `forgeloop` matching the installed package version
|
|
119
|
+
|
|
120
|
+
Do not automatically download a different version during a reproducible run.
|
|
121
|
+
The resolved CLI must match the installed project's package identity.
|
|
122
|
+
|
|
123
|
+
## Protocol-owned state and no-simulation policy
|
|
124
|
+
|
|
125
|
+
The following protocol artifacts are strictly owned by ForgeLoop:
|
|
126
|
+
|
|
127
|
+
- `.forgeloop/preflight.json`
|
|
128
|
+
- `.forgeloop/work-state.json`
|
|
129
|
+
- `.forgeloop/events.ndjson`
|
|
130
|
+
- `.forgeloop/execution-receipt.json`
|
|
131
|
+
- Canonical check, evidence, and terminal-result state
|
|
132
|
+
|
|
133
|
+
If the required CLI or API capability cannot be resolved:
|
|
134
|
+
|
|
135
|
+
- **Do not** fabricate lifecycle state manually.
|
|
136
|
+
- **Do not** synthesize event history.
|
|
137
|
+
- **Do not** manually assign `COMPLETE`.
|
|
138
|
+
- **Do not** construct a fake execution receipt.
|
|
139
|
+
- **Do not** rewrite `events.ndjson` to simulate chronology.
|
|
140
|
+
|
|
141
|
+
Report the corresponding ForgeLoop dimension as `NOT_VERIFIED` / `E_FORGELOOP_CLI_UNAVAILABLE`.
|
|
142
|
+
|
|
143
|
+
## Missing tool capability
|
|
144
|
+
|
|
145
|
+
A missing tool is a capability gap, not installation authority.
|
|
146
|
+
|
|
147
|
+
If an expected verifier, browser tool, linter, analyzer, or test dependency is
|
|
148
|
+
not already available:
|
|
149
|
+
|
|
150
|
+
- use a suitable existing local equivalent when possible;
|
|
151
|
+
- otherwise request authority if installation is necessary and allowed;
|
|
152
|
+
- otherwise report the affected verification dimension as not verified with
|
|
153
|
+
`E_VERIFICATION_TOOL_UNAVAILABLE`.
|
|
154
|
+
|
|
155
|
+
Never convert `PROTOCOL_LIMITED` into environmental mutation by implicitly
|
|
156
|
+
installing a package.
|
|
157
|
+
|
|
158
|
+
## Optional capability extensions
|
|
159
|
+
|
|
160
|
+
The installed loop directs the active actor to inspect native model and harness
|
|
161
|
+
capabilities. When a task requires a missing capability (e.g. multimodal vision),
|
|
162
|
+
the actor may install the smallest task-scoped capability (such as `Qwen-MM-Plugins`)
|
|
163
|
+
through native mechanisms or upstream installers, then verify it before use.
|
|
164
|
+
|
|
165
|
+
API credentials, system packages, and unrelated environment changes remain
|
|
166
|
+
separately gated.
|
|
167
|
+
|
|
168
|
+
## Delegation scope
|
|
169
|
+
|
|
170
|
+
Delegation is optional.
|
|
171
|
+
|
|
172
|
+
A run that contains no delegation events, no delegated task references, and no
|
|
173
|
+
delegation artifacts is a valid single-actor run.
|
|
174
|
+
|
|
175
|
+
Missing delegation artifacts must not make such a run incomplete. For a purely
|
|
176
|
+
local single-actor lifecycle, the delegation dimension is `NOT_APPLICABLE`.
|
|
177
|
+
|
|
178
|
+
Once delegation is observed in canonical state, receipt, or event history, the
|
|
179
|
+
required delegation artifacts become mandatory.
|
|
180
|
+
|
|
181
|
+
## Instruction precedence
|
|
182
|
+
|
|
183
|
+
When multiple instruction layers exist, follow standard precedence:
|
|
184
|
+
|
|
185
|
+
1. Platform, sandbox, and system security rules.
|
|
186
|
+
2. Direct user instructions in the latest prompt.
|
|
187
|
+
3. Target project-specific rules and instructions.
|
|
188
|
+
4. ForgeLoop project protocol (`LOOP_ENGINEERING.md`, `PROTOCOL_INTEGRATION.md`).
|
|
189
|
+
5. Activated domain guides (`GUIDE_ROUTER.md` → `ENG/*.md`).
|
|
190
|
+
6. Technical defaults and safe assumptions.
|
|
191
|
+
|
|
192
|
+
The absence of an environment's name from documentation is never a precedence conflict.
|
|
193
|
+
|
|
194
|
+
## External workflow interaction
|
|
195
|
+
|
|
196
|
+
External planning, interview, or review workflows (such as `/grill-me`, `/plan`, or IDE
|
|
197
|
+
review gates) may assist in clarifying requirements, but they must not silently
|
|
198
|
+
redefine ForgeLoop `NON_BLOCKING` decisions as `BLOCKING` in autonomous mode.
|
|
199
|
+
Consult `LOOP_ENGINEERING.md#external-workflow-interaction` for the complete boundary.
|
package/QUALITY_SCORECARD.md
CHANGED
|
@@ -80,7 +80,7 @@ are both present:
|
|
|
80
80
|
| Hidden kit layout | `src/core/target-layout.js`, safe init/update migration, manifest layout version, native shims, and profile resolver | `tests/hidden-layout.test.js`, package and compatibility tests |
|
|
81
81
|
| Contextual frontend taste | `ENG/taste-frontend-eng.md`, router metadata, attribution, and design/accessibility precedence | `tests/taste-guide.test.js`, route fixtures |
|
|
82
82
|
| Pre-contract autonomy — structural | `LOOP_ENGINEERING.md`, `src/core/decision-classification.js`, `src/core/workflow-compatibility.js`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.cursor/rules/project-loop.mdc` | `tests/decision-classification.test.js`, `tests/workflow-compatibility.test.js`, `tests/autonomy-policy.test.js`, `tests/preflight.test.js` |
|
|
83
|
-
| External workflow compatibility — structural | `LOOP_ENGINEERING.md`, `
|
|
83
|
+
| External workflow compatibility — structural | `LOOP_ENGINEERING.md`, `PROTOCOL_INTEGRATION.md`, `src/core/workflow-compatibility.js`, and sixth-run harness metadata rule | `tests/workflow-compatibility.test.js`, `conformance/README.md` |
|
|
84
84
|
| Instruction-conflict handling — structural | Canonical source-attribution and `WORKFLOW_CONFLICT` policy in `LOOP_ENGINEERING.md` plus adapter references | `tests/autonomy-policy.test.js`, `tests/workflow-compatibility.test.js` |
|
|
85
85
|
| Autonomous-mode precedence — structural | Autonomous/interactive mode contract and harness exclusion metadata | `tests/workflow-compatibility.test.js`, `tests/conformance-scenarios.test.js` |
|
|
86
86
|
| Pre-contract autonomy — cross-agent live robustness | Prior third blind-run result, `conformance/runs/2026-08-13-codex-fourth-live.md`, preserved fifth-run report `conformance/runs/2026-08-13-codex-fifth-live.md`, and the exact blind request | `tests/conformance-scenarios.test.js`; sixth run is not started until mandatory approval is excluded |
|
package/README.md
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
# ForgeLoop —
|
|
1
|
+
# ForgeLoop — Verifiable Engineering Protocol
|
|
2
2
|
|
|
3
3
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/docs-quality.yml)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
It covers product strategy, code, testing, security, performance,
|
|
7
|
-
accessibility, design, and web games across web, mobile, and desktop projects.
|
|
5
|
+
ForgeLoop is a portable, verifiable engineering protocol for AI-assisted development and developer workflows.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
`AGENTS.md`, `CLAUDE.md`, `.cursor/rules`, and
|
|
11
|
-
`.github/copilot-instructions.md`. The supported-agent contract is documented
|
|
12
|
-
in [`AGENT_COMPATIBILITY.md`](./AGENT_COMPATIBILITY.md). Adopt only the guides
|
|
13
|
-
relevant to the target project.
|
|
7
|
+
It is project-scoped, capability-based, and vendor-neutral. It turns intent into contract-driven execution with deterministic routing, resumable state, evidence-backed verification, recovery, and validator-backed completion.
|
|
14
8
|
|
|
15
|
-
ForgeLoop
|
|
16
|
-
routing, checkpointed state, observable evidence, conformance, and delegation
|
|
17
|
-
for compatible agent harnesses.
|
|
9
|
+
ForgeLoop does not depend on a specific model, provider, agent product, IDE, or orchestration runtime.
|
|
18
10
|
|
|
19
|
-
The
|
|
20
|
-
|
|
21
|
-
discovery
|
|
22
|
-
|
|
11
|
+
The repository also provides an English-only collection of operational engineering guides covering product strategy, clean code, testing, security, performance, accessibility, visual design, and web games across web, mobile, and desktop projects.
|
|
12
|
+
|
|
13
|
+
Project-local discovery surfaces (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules/project-loop.mdc`, `.github/copilot-instructions.md`) and manual bootstrap paths delegate to the same canonical protocol in `.forgeloop/kit/`. The capability levels and integration contract are documented in [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md). Adopt only the guides relevant to the target project.
|
|
14
|
+
|
|
15
|
+
The npm package also ships the local `forgeloop` CLI. In a target project it installs canonical documents under `.forgeloop/kit/`, keeps only small native discovery shims at the root, and stores mutable protocol artifacts under `.forgeloop/`.
|
|
23
16
|
|
|
24
17
|
## Catalog
|
|
25
18
|
|
|
@@ -54,141 +47,13 @@ target).
|
|
|
54
47
|
The canonical system map, including the routing/state/evidence architecture, is
|
|
55
48
|
in [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
hidden["write hidden<br/>kit"]
|
|
65
|
-
verified["verify hidden<br/>bytes"]
|
|
66
|
-
authority["atomic manifest<br/>authority switch"]
|
|
67
|
-
cleanup["hash-checked<br/>legacy cleanup"]
|
|
68
|
-
recovered["healthy or<br/>recoverable"]
|
|
69
|
-
incomplete["doctor:<br/>E_MIGRATION_INCOMPLETE"]
|
|
70
|
-
retry["update + retry<br/>owned cleanup"]
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
subgraph CONTRACT_ROUTING["2. Discovery, Contract & Routing"]
|
|
74
|
-
discovery["discovery +<br/>project profile"]
|
|
75
|
-
contract["current<br/>contract"]
|
|
76
|
-
routing["deterministic<br/>route"]
|
|
77
|
-
gates["required<br/>gates"]
|
|
78
|
-
preflight["preflight"]
|
|
79
|
-
ready["PREFLIGHT_READY"]
|
|
80
|
-
blocker["repair /<br/>blocker"]
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
subgraph EXECUTION_LOOP["3. Execution & Verification Loop"]
|
|
84
|
-
state["work-state<br/>checkpoint"]
|
|
85
|
-
events["append-only<br/>event ledger"]
|
|
86
|
-
lifecycle["PLANNED → EXECUTING<br/>→ VERIFYING"]
|
|
87
|
-
prepare["prepare<br/>completion receipt"]
|
|
88
|
-
checks["checks + structured<br/>evidence"]
|
|
89
|
-
readiness{"canonical evidence<br/>readiness"}
|
|
90
|
-
review["REVIEWING<br/>cycle N"]
|
|
91
|
-
diagnose["DIAGNOSING →<br/>CORRECTING"]
|
|
92
|
-
terminal_result["record-terminal-result<br/>(publication / production)"]
|
|
93
|
-
complete["complete<br/>validator"]
|
|
94
|
-
terminal["COMPLETE"]
|
|
95
|
-
rejected["COMPLETION_REJECTED<br/>(cycle N + 1)"]
|
|
96
|
-
receipt["updated execution<br/>receipt"]
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
subgraph AUDIT_CONFORMANCE["4. Freshness, Audit & Conformance"]
|
|
100
|
-
freshness["freshness<br/>fingerprints"]
|
|
101
|
-
conformance["validate-protocol<br/>/ conformance"]
|
|
102
|
-
audit["audit +<br/>validate-protocol"]
|
|
103
|
-
verdict["VALID / INCOMPLETE /<br/>STALE / INCONSISTENT / INVALID"]
|
|
104
|
-
delegation["optional bundle /<br/>delegation"]
|
|
105
|
-
handoff["handoff to<br/>compatible harness"]
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
root --> entry
|
|
109
|
-
entry --> migration
|
|
110
|
-
migration -->|legacy v1| plan
|
|
111
|
-
plan --> hidden
|
|
112
|
-
hidden --> verified
|
|
113
|
-
verified --> authority
|
|
114
|
-
authority --> cleanup
|
|
115
|
-
cleanup --> recovered
|
|
116
|
-
hidden -. interruption .-> incomplete
|
|
117
|
-
verified -. interruption .-> incomplete
|
|
118
|
-
authority -. interruption .-> incomplete
|
|
119
|
-
cleanup -. interruption .-> incomplete
|
|
120
|
-
migration -->|layout v2| retry
|
|
121
|
-
incomplete --> retry
|
|
122
|
-
|
|
123
|
-
entry --> discovery
|
|
124
|
-
discovery --> contract
|
|
125
|
-
contract --> routing
|
|
126
|
-
contract --> preflight
|
|
127
|
-
routing --> preflight
|
|
128
|
-
gates --> preflight
|
|
129
|
-
preflight -->|READY| ready
|
|
130
|
-
preflight -->|BLOCKED| blocker
|
|
131
|
-
|
|
132
|
-
ready --> state
|
|
133
|
-
ready --> events
|
|
134
|
-
state --> lifecycle
|
|
135
|
-
lifecycle --> prepare
|
|
136
|
-
prepare --> checks
|
|
137
|
-
checks --> readiness
|
|
138
|
-
readiness -->|covered| review
|
|
139
|
-
readiness -->|failed / blocked| diagnose
|
|
140
|
-
diagnose --> checks
|
|
141
|
-
review --> complete
|
|
142
|
-
review --> terminal_result
|
|
143
|
-
terminal_result --> complete
|
|
144
|
-
complete -->|VALID| terminal
|
|
145
|
-
complete -->|evidence-only rejection| rejected
|
|
146
|
-
rejected --> prepare
|
|
147
|
-
checks --> receipt
|
|
148
|
-
terminal_result --> receipt
|
|
149
|
-
|
|
150
|
-
contract --> freshness
|
|
151
|
-
routing --> freshness
|
|
152
|
-
state --> freshness
|
|
153
|
-
checks --> freshness
|
|
154
|
-
routing --> conformance
|
|
155
|
-
state --> conformance
|
|
156
|
-
receipt --> conformance
|
|
157
|
-
freshness --> conformance
|
|
158
|
-
conformance --> verdict
|
|
159
|
-
complete --> audit
|
|
160
|
-
events --> audit
|
|
161
|
-
audit --> verdict
|
|
162
|
-
|
|
163
|
-
routing --> delegation
|
|
164
|
-
checks --> delegation
|
|
165
|
-
delegation --> handoff
|
|
166
|
-
verdict --> handoff
|
|
167
|
-
blocker --> handoff
|
|
168
|
-
|
|
169
|
-
classDef root fill:#08090C,stroke:#6E6AF5,stroke-width:3px,color:#EDEEF0;
|
|
170
|
-
classDef entry fill:#101218,stroke:#3EDBB8,stroke-width:2px,color:#EDEEF0;
|
|
171
|
-
classDef migration fill:#0F766E,stroke:#5EEAD4,stroke-width:2px,color:#FFFFFF;
|
|
172
|
-
classDef routing fill:#4F46E5,stroke:#A5B4FC,stroke-width:2px,color:#FFFFFF;
|
|
173
|
-
classDef state fill:#373A46,stroke:#A1A1AA,stroke-width:2px,color:#FFFFFF;
|
|
174
|
-
classDef evidence fill:#3EDBB8,stroke:#99F6E4,stroke-width:2px,color:#08090C;
|
|
175
|
-
classDef fact fill:#181B24,stroke:#6E6AF5,stroke-width:1px,color:#EDEEF0;
|
|
176
|
-
classDef gate fill:#3730A3,stroke:#A5B4FC,stroke-width:2px,color:#FFFFFF;
|
|
177
|
-
classDef result fill:#C9A876,stroke:#F5D9A6,stroke-width:2px,color:#08090C;
|
|
178
|
-
classDef harness fill:#101218,stroke:#3EDBB8,stroke-width:2px,color:#EDEEF0;
|
|
179
|
-
|
|
180
|
-
class root root;
|
|
181
|
-
class entry,discovery,delegation entry;
|
|
182
|
-
class migration,plan,hidden,verified,authority,cleanup,recovered,retry,incomplete migration;
|
|
183
|
-
class routing,preflight,ready routing;
|
|
184
|
-
class state,events,lifecycle,review state;
|
|
185
|
-
class checks,readiness,receipt,complete,audit,terminal_result evidence;
|
|
186
|
-
class diagnose,rejected,gates,blocker gate;
|
|
187
|
-
class terminal,verdict result;
|
|
188
|
-
class contract,freshness,conformance fact;
|
|
189
|
-
class handoff harness;
|
|
190
|
-
linkStyle default stroke:#8A8F98,stroke-width:1.5px;
|
|
191
|
-
```
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img
|
|
52
|
+
src="./docs/assets/forgeloop-flow.svg"
|
|
53
|
+
alt="ForgeLoop evidence-first engineering flow"
|
|
54
|
+
width="100%"
|
|
55
|
+
/>
|
|
56
|
+
</p>
|
|
192
57
|
|
|
193
58
|
Equivalent reading for text-only environments: adapters load the canonical kit;
|
|
194
59
|
an older target follows validate paths → write hidden files → verify their bytes
|
|
@@ -215,11 +80,13 @@ Request → discovery → profile → routing → plan → execution
|
|
|
215
80
|
└ evidence-only rejection / next cycle
|
|
216
81
|
```
|
|
217
82
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
83
|
+
ForgeLoop is project-scoped, capability-based, and vendor-neutral.
|
|
84
|
+
|
|
85
|
+
Project-local discovery surfaces delegate to the same canonical ForgeLoop protocol. Execution environments that automatically discover one of those instruction surfaces can use it directly, while custom runtimes, automation systems, and developer workflows can use the manual bootstrap path.
|
|
86
|
+
|
|
87
|
+
Capabilities determine execution. Runtime names do not determine protocol applicability.
|
|
88
|
+
|
|
89
|
+
See [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) for discovery, capability levels, degradation rules, and precedence.
|
|
223
90
|
|
|
224
91
|
### Migration recovery and release freeze
|
|
225
92
|
|
|
@@ -242,12 +109,92 @@ The regression suite injects failures at these boundaries and verifies that
|
|
|
242
109
|
owned cleanup. The frozen published installation under
|
|
243
110
|
[`tests/fixtures/legacy-0.1.6/`](./tests/fixtures/legacy-0.1.6/) is derived
|
|
244
111
|
from the real npm tarball, includes provenance and digests, and is copied into
|
|
245
|
-
The current published release is `@cassiomc1/forgeloop@0.1.
|
|
246
|
-
Earlier `0.1.8`, `0.1.9`, and `0.1.
|
|
247
|
-
their tags or `v0.1.10`. Version `0.1.
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
112
|
+
The current published release is `@cassiomc1/forgeloop@0.1.13`.
|
|
113
|
+
Earlier `0.1.8`, `0.1.9`, `0.1.10`, `0.1.11`, and `0.1.12` references are historical; never move
|
|
114
|
+
their tags or `v0.1.10`. Version `0.1.13` enforces the missing verification tool
|
|
115
|
+
policy, conditional single-actor delegation validation, and a universal
|
|
116
|
+
vendor-neutral engineering protocol positioning.
|
|
117
|
+
|
|
118
|
+
## How to prompt ForgeLoop
|
|
119
|
+
|
|
120
|
+
You do not need a perfect prompt to use ForgeLoop.
|
|
121
|
+
|
|
122
|
+
Describe the outcome you want. ForgeLoop is designed to structure the execution around that request: resolve safe ambiguities, create an execution contract, route the relevant guides, satisfy gates, run preflight checks, implement, verify, correct, and repeat until the work is complete.
|
|
123
|
+
|
|
124
|
+
> **Don't engineer the perfect prompt. Define the outcome and let ForgeLoop engineer the feedback loop.**
|
|
125
|
+
|
|
126
|
+
### Minimal
|
|
127
|
+
|
|
128
|
+
A short request should be enough for ordinary work:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
Create a premium website for a law firm.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Recommended
|
|
135
|
+
|
|
136
|
+
Add the important outcome and product constraints:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
Create a premium website for a law firm.
|
|
140
|
+
|
|
141
|
+
It should feel modern, sophisticated and trustworthy, work well on mobile and desktop, and include a contact form.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Structured
|
|
145
|
+
|
|
146
|
+
For larger or more constrained tasks, you can optionally use a lightweight task brief:
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
Build: Premium law firm website
|
|
150
|
+
|
|
151
|
+
Goal:
|
|
152
|
+
Create a modern, sophisticated and trustworthy experience.
|
|
153
|
+
|
|
154
|
+
Requirements:
|
|
155
|
+
- Responsive on mobile and desktop
|
|
156
|
+
- Accessible navigation
|
|
157
|
+
- Contact form
|
|
158
|
+
- Premium visual design
|
|
159
|
+
- Good performance
|
|
160
|
+
|
|
161
|
+
Done when:
|
|
162
|
+
- The implementation is complete
|
|
163
|
+
- Required verification passes
|
|
164
|
+
- Mobile and desktop layouts are verified
|
|
165
|
+
- The contact form works
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
The structured format is optional. It gives ForgeLoop more explicit constraints and success criteria, but it should not be necessary for ordinary tasks.
|
|
169
|
+
|
|
170
|
+
### What not to put in the prompt
|
|
171
|
+
|
|
172
|
+
Avoid recreating the ForgeLoop process inside the prompt:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
First analyze the task.
|
|
176
|
+
Then create a plan.
|
|
177
|
+
Then inspect the files.
|
|
178
|
+
Then choose the guides.
|
|
179
|
+
Then implement.
|
|
180
|
+
Then run tests.
|
|
181
|
+
If tests fail, fix them.
|
|
182
|
+
Then review everything.
|
|
183
|
+
Then produce a report.
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
That workflow belongs to ForgeLoop.
|
|
187
|
+
|
|
188
|
+
Your prompt should primarily describe:
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
what you want
|
|
192
|
+
important requirements
|
|
193
|
+
real constraints
|
|
194
|
+
observable success conditions
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
ForgeLoop should determine how to execute and verify the work.
|
|
251
198
|
|
|
252
199
|
### Use with npm
|
|
253
200
|
|
|
@@ -256,12 +203,12 @@ project without overwriting local instructions. When the package is available
|
|
|
256
203
|
in the npm registry, use the commands below; otherwise use the repository
|
|
257
204
|
checkout fallback.
|
|
258
205
|
|
|
259
|
-
The current published release is `@cassiomc1/forgeloop@0.1.
|
|
206
|
+
The current published release is `@cassiomc1/forgeloop@0.1.13`.
|
|
260
207
|
Pin this version when a reproducible blind run or release-identity check is
|
|
261
208
|
required:
|
|
262
209
|
|
|
263
210
|
```bash
|
|
264
|
-
npx @cassiomc1/forgeloop@0.1.
|
|
211
|
+
npx @cassiomc1/forgeloop@0.1.13 --version
|
|
265
212
|
npx @cassiomc1/forgeloop init
|
|
266
213
|
npx @cassiomc1/forgeloop doctor
|
|
267
214
|
npx @cassiomc1/forgeloop update
|
|
@@ -358,11 +305,13 @@ cross-artifact relationships plus the same derived freshness classification
|
|
|
358
305
|
used by `inspect` and `status`. Supply `--contract-file` to compare the saved
|
|
359
306
|
contract fingerprint with the current contract; omitting it leaves contract
|
|
360
307
|
freshness as `NOT_VERIFIED` and a complete artifact set requires revalidation.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
`
|
|
365
|
-
|
|
308
|
+
Delegation artifacts are required only when delegation is present in the
|
|
309
|
+
canonical execution history or explicitly supplied as part of a delegated run.
|
|
310
|
+
For a purely local single-actor lifecycle, the delegation dimension is
|
|
311
|
+
`NOT_APPLICABLE` and does not require task briefs or delegated results. When
|
|
312
|
+
delegation is in scope, also supply the matching repeated
|
|
313
|
+
`--task-brief <path>` and `--delegated-result <path>` inputs; omitting them in a
|
|
314
|
+
delegated run reports `INCOMPLETE`.
|
|
366
315
|
It returns `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID` with
|
|
367
316
|
exact invariant codes and derived stale reasons. The persisted
|
|
368
317
|
`.forgeloop/work-state.json` schema is unchanged: `status`, `stale`, and `fresh`
|
|
@@ -371,7 +320,7 @@ are never stored in that file. Status precedence is `INVALID` > `INCONSISTENT`
|
|
|
371
320
|
All protocol-support commands are local and offline-capable by default; the
|
|
372
321
|
package sends no telemetry and has no central trace service.
|
|
373
322
|
Capability gaps and inline/non-Git degraded mode are defined in
|
|
374
|
-
[`
|
|
323
|
+
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md); they are reported as
|
|
375
324
|
limitations rather than treated as silent successes.
|
|
376
325
|
|
|
377
326
|
### Live conformance modes
|
|
@@ -526,6 +475,7 @@ must remain thin. The resulting target layout is:
|
|
|
526
475
|
AGENTS.md
|
|
527
476
|
CLAUDE.md
|
|
528
477
|
.forgeloop/.gitignore
|
|
478
|
+
.forgeloop/kit/PROTOCOL_INTEGRATION.md
|
|
529
479
|
.forgeloop/kit/AGENT_COMPATIBILITY.md
|
|
530
480
|
.forgeloop/kit/LOOP_ENGINEERING.md
|
|
531
481
|
.forgeloop/kit/GUIDE_ROUTER.md
|
|
@@ -577,7 +527,7 @@ commands. A generic response that does not mention the loop, router, or sources
|
|
|
577
527
|
indicates that the adapter was not loaded.
|
|
578
528
|
|
|
579
529
|
After installation, start the preferred agent from the target project
|
|
580
|
-
directory. Use `
|
|
530
|
+
directory. Use `PROTOCOL_INTEGRATION.md` to confirm which file it should load and
|
|
581
531
|
which native entry point is expected. A live agent session is not required for
|
|
582
532
|
package installation or its automated tests.
|
|
583
533
|
|
|
@@ -618,8 +568,8 @@ installed automatically.
|
|
|
618
568
|
|
|
619
569
|
## Optional multimodal capabilities
|
|
620
570
|
|
|
621
|
-
[Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins) can extend
|
|
622
|
-
|
|
571
|
+
[Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins) can extend an
|
|
572
|
+
execution environment with skills and optional MCP servers. Before using a
|
|
623
573
|
multimodal or media operation, the agent checks the model and harness for a
|
|
624
574
|
callable native capability. If the task requires a missing keyless capability,
|
|
625
575
|
the agent installs only the smallest matching `qwen-mm-plugins-<cap>` capability
|
|
@@ -667,7 +617,8 @@ adoption. Local rendering requires Node.js 22+ and FFmpeg.
|
|
|
667
617
|
.
|
|
668
618
|
├── AGENTS.md # shared Codex-compatible entry point
|
|
669
619
|
├── CLAUDE.md # Claude Code entry point
|
|
670
|
-
├──
|
|
620
|
+
├── PROTOCOL_INTEGRATION.md # vendor-neutral capability integration
|
|
621
|
+
├── AGENT_COMPATIBILITY.md # compatibility alias
|
|
671
622
|
├── LOOP_ENGINEERING.md # canonical operating cycle
|
|
672
623
|
├── GUIDE_ROUTER.md # contextual guide selection
|
|
673
624
|
├── PROJECT_PROFILE.md # source profile (target copy is under .forgeloop/kit/)
|
package/TERMINOLOGY.md
CHANGED
|
@@ -19,3 +19,5 @@
|
|
|
19
19
|
| Evidence kind | One of `OBSERVED`, `INFERRED`, `NOT_VERIFIED`, or `BLOCKED`; evidence never upgrades an unverified claim by itself. |
|
|
20
20
|
| Required artifact | A checkpoint-recorded relative path and SHA-256 hash that must still match before resume. |
|
|
21
21
|
| Conformance | Relationship validation across route, state, receipt, task brief, and delegated-result artifacts. |
|
|
22
|
+
| Universal applicability | ForgeLoop applies whenever an execution environment discovers a project adapter, regardless of model, provider, agent, IDE, or tool name. |
|
|
23
|
+
| Integration level | The capability tier of an execution environment (`INSTRUCTION_DISCOVERED`, `PROTOCOL_CAPABLE`, `PROTOCOL_LIMITED`, `CONFORMANCE_VERIFIED`). |
|
package/THREAT_MODEL.md
CHANGED
|
@@ -30,6 +30,11 @@ remaining trust boundaries and their executable evidence.
|
|
|
30
30
|
| Protocol-version confusion | Old/future artifacts are silently reinterpreted | Cross-artifact protocol boundary | Explicit v1 checks and conformance errors for unsupported or mixed versions | A future protocol needs a deliberate migration implementation | `tests/conformance.test.js`, `tests/fixtures/protocol/invalid/` |
|
|
31
31
|
| Dependency-cycle denial of service | Coordination cannot make progress or spends unbounded work | Delegation dependency graph | Deterministic DFS cycle detection, unknown-reference rejection, and bounded JSON | A caller can still submit many valid tasks; host-level quotas remain external | `tests/delegation.test.js`, `tests/delegation-set.test.js` |
|
|
32
32
|
| Oversized JSON artifacts | Excess CPU or memory during validation | Any untrusted JSON artifact | Byte, depth, array, object-key, and string limits before semantic traversal | Limits are conservative defaults, not a complete resource scheduler | `tests/security-limits.test.js`, `src/core/json-safety.js` |
|
|
33
|
+
| Runtime self-exemption | An execution environment discovers ForgeLoop but decides that the protocol does not apply because the environment is not named in documentation | Project adapter discovery and runtime interpretation | Universal applicability marker, capability-based integration, explicit unknown-runtime rule, no finite eligibility allowlist | A non-compliant runtime can ignore project instructions entirely | `tests/discovery-surfaces.test.js`, `tests/test_workflow_policy.py` |
|
|
34
|
+
| Blind oracle exposure | The system under test reads expected route/gate/evidence answers from the installed package and contaminates a blind conformance run | Published npm package and agent-readable target workspace | Exclude conformance oracles from npm package, tarball leak scan in `pack:check`, external harness-owned oracle | A misconfigured external harness may still copy oracle material into target | `tests/package.test.js`, `conformance/README.md` |
|
|
35
|
+
| Lifecycle simulation after CLI resolution failure | A runtime manually writes protocol-owned JSON and falsely claims conformance when the CLI is unresolved | Lifecycle-owned protocol state and CLI availability | CLI-owned artifact policy, universal adapter prohibition, validator-backed completion, append-only ledger hash chain | A privileged local process can tamper with local files; ForgeLoop detects consistency, not remote attestation | `tests/discovery-surfaces.test.js`, `tests/lifecycle.test.js`, `LOOP_ENGINEERING.md` |
|
|
36
|
+
| Unauthorized verification dependency installation | The active actor mutates the environment by downloading or installing a missing checker merely to satisfy verification | Verification capability discovery and installation authority | Missing verification tool policy, non-installing resolution first, explicit installation authority, equivalent-check fallback, NOT_VERIFIED degradation | A privileged external process may still install tools outside ForgeLoop's control | `tests/verification-capability.test.js`, `tests/discovery-surfaces.test.js`, `LOOP_ENGINEERING.md` |
|
|
37
|
+
| False delegation requirement | A valid single-actor run is incorrectly reported as incomplete because a validator demands artifacts for delegation that never occurred | Validator delegation scope resolution | Canonical delegationIsInScope predicate, conditional delegation validation in validateTaskArtifactSet and validate-protocol | Malformed or externally injected artifacts may require INCONSISTENT classification | `tests/conformance.test.js`, `tests/validate-protocol-cli.test.js` |
|
|
33
38
|
|
|
34
39
|
## Boundary rules
|
|
35
40
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cassiomc1/forgeloop",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Portable, verifiable
|
|
3
|
+
"version": "0.1.13",
|
|
4
|
+
"description": "Portable, verifiable engineering protocol for AI coding environments and developer workflows",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/cassiomc1/forgeloop.git"
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"src",
|
|
23
23
|
"ENG",
|
|
24
24
|
"schemas",
|
|
25
|
-
"conformance",
|
|
26
25
|
".forgeloop/forgeloop.gitignore",
|
|
27
26
|
"AGENTS.md",
|
|
28
27
|
"CLAUDE.md",
|
|
29
28
|
"GUIDE_ROUTER.md",
|
|
30
29
|
"LOOP_ENGINEERING.md",
|
|
30
|
+
"PROTOCOL_INTEGRATION.md",
|
|
31
31
|
"LOOP_SYSTEM_DESIGN.md",
|
|
32
32
|
"QUALITY_SCORECARD.md",
|
|
33
33
|
"TERMINOLOGY.md",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"test": "node scripts/run-tests.js",
|
|
50
50
|
"pack:check": "node --test tests/package.test.js",
|
|
51
|
-
"release:identity": "node scripts/verify_release_identity.mjs"
|
|
51
|
+
"release:identity": "node scripts/verify_release_identity.mjs",
|
|
52
|
+
"docs:flow": "node scripts/generate-readme-flow.mjs"
|
|
52
53
|
}
|
|
53
54
|
}
|