@cassiomc1/forgeloop 0.1.3 → 0.1.4

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.
@@ -27,3 +27,14 @@ load-bearing, irreversible, externally consequential, unsafe, or real
27
27
  user/business decisions.
28
28
 
29
29
  The loop and router are canonical sources; do not duplicate domain rules.
30
+
31
+ ## Pre-question decisions
32
+
33
+ Before asking any product-detail question, classify it as `BLOCKING` or
34
+ `NON_BLOCKING` using `LOOP_ENGINEERING.md`. For
35
+ `NON_BLOCKING`, choose a safe reversible local default, record it in
36
+ `current-contract.assumptions[]`, and continue. For `BLOCKING`, persist
37
+ `current-contract.json` with `unresolvedDecisions[]` and a blocking reason
38
+ before asking. Do not ask the user to choose among reversible local
39
+ product-positioning alternatives; the canonical checklist and boundary remain
40
+ in `LOOP_ENGINEERING.md`.
@@ -25,3 +25,14 @@ load-bearing, irreversible, externally consequential, unsafe, or real
25
25
  user/business decisions.
26
26
 
27
27
  The loop and router are canonical; do not replicate domain rules here.
28
+
29
+ ## Pre-question decisions
30
+
31
+ Before asking any product-detail question, classify it as `BLOCKING` or
32
+ `NON_BLOCKING` using `LOOP_ENGINEERING.md`. For
33
+ `NON_BLOCKING`, choose a safe reversible local default, record it in
34
+ `current-contract.assumptions[]`, and continue. For `BLOCKING`, persist
35
+ `current-contract.json` with `unresolvedDecisions[]` and a blocking reason
36
+ before asking. Do not ask the user to choose among reversible local
37
+ product-positioning alternatives; the canonical checklist and boundary remain
38
+ in `LOOP_ENGINEERING.md`.
package/AGENTS.md CHANGED
@@ -26,3 +26,14 @@ load-bearing, irreversible, externally consequential, unsafe, or real
26
26
  user/business decisions.
27
27
 
28
28
  The guides provide technical defaults; explicit requirements and project evidence prevail.
29
+
30
+ ## Pre-question decisions
31
+
32
+ Before asking any product-detail question, classify it as `BLOCKING` or
33
+ `NON_BLOCKING` using `LOOP_ENGINEERING.md`. For
34
+ `NON_BLOCKING`, choose a safe reversible local default, record it in
35
+ `current-contract.assumptions[]`, and continue. For `BLOCKING`, persist
36
+ `current-contract.json` with `unresolvedDecisions[]` and a blocking reason
37
+ before asking. Do not ask the user to choose among reversible local
38
+ product-positioning alternatives; the canonical checklist and boundary remain
39
+ in `LOOP_ENGINEERING.md`.
package/CLAUDE.md CHANGED
@@ -22,3 +22,14 @@ load-bearing, irreversible, externally consequential, unsafe, or real
22
22
  user/business decisions.
23
23
 
24
24
  Do not duplicate guide rules here; treat the loop and router as canonical sources.
25
+
26
+ ## Pre-question decisions
27
+
28
+ Before asking any product-detail question, classify it as `BLOCKING` or
29
+ `NON_BLOCKING` using `LOOP_ENGINEERING.md`. For
30
+ `NON_BLOCKING`, choose a safe reversible local default, record it in
31
+ `current-contract.assumptions[]`, and continue. For `BLOCKING`, persist
32
+ `current-contract.json` with `unresolvedDecisions[]` and a blocking reason
33
+ before asking. Do not ask the user to choose among reversible local
34
+ product-positioning alternatives; the canonical checklist and boundary remain
35
+ in `LOOP_ENGINEERING.md`.
@@ -7,31 +7,162 @@
7
7
  ## Blocking vs Non-Blocking Decisions
8
8
 
9
9
  Classify every unresolved decision before deciding whether to ask the user.
10
+ The question is a consequence of a `BLOCKING` classification, never a default
11
+ response to ordinary uncertainty.
10
12
 
11
- `NON_BLOCKING` applies when a safe local default exists, the choice is
12
- reversible, it does not change external state, it is not sensitive or
13
- authoritative, and it does not assert a real user or business fact. Examples
14
- include fictional company name, demo phone number, placeholder copy, temporary logo text,
15
- palette, typography, local-only fictional identity, fictional identity, demo
16
- contacts, visual defaults, section ordering, and local-only form behavior.
13
+ ### Pre-question decision classification
17
14
 
18
- `BLOCKING` applies when proceeding would require real legal business name,
19
- real contact details, credentials, payment data, production endpoint,
20
- deployment target, deployment or domain authority, destructive operation,
21
- irreversible architectural decision, irreversible data choice, regulated/legal claim,
22
- regulated claim, or another externally consequential/high-impact decision.
15
+ Before asking the user any product-detail question:
16
+
17
+ 1. Classify the unresolved detail as `BLOCKING` or `NON_BLOCKING`.
18
+ 2. If `NON_BLOCKING`, do not ask; choose the smallest reasonable reversible
19
+ local default, record it in `current-contract.assumptions[]`, and continue.
20
+ 3. If `BLOCKING`, record the detail in
21
+ `current-contract.unresolvedDecisions[]`, persist and validate the contract,
22
+ then ask the user with a blocking reason.
23
+
24
+ In short, `NON_BLOCKING` means do not ask and record it in `current-contract.assumptions[]`; `BLOCKING` means persist the contract and ask the user with a blocking reason.
25
+
26
+ There is no third `UNKNOWN → ask` path for ordinary reversible product
27
+ ambiguity. The invariant is:
28
+
29
+ ```text
30
+ QUESTION
31
+ must never happen
32
+ before CLASSIFICATION
33
+ ```
34
+
35
+ ### PRE-QUESTION CHECK
36
+
37
+ Before asking the user, answer every item:
38
+
39
+ ```text
40
+ [ ] Is this a real user/business fact?
41
+ [ ] Is this sensitive?
42
+ [ ] Is this authoritative?
43
+ [ ] Does it affect external state?
44
+ [ ] Is it destructive?
45
+ [ ] Is it irreversible?
46
+ [ ] Would a safe local reversible default materially misrepresent the user?
47
+ ```
48
+
49
+ If all answers are `NO`, classify the detail as `NON_BLOCKING`, record an
50
+ assumption, and continue. If any answer is `YES`, classify it as `BLOCKING`,
51
+ persist the contract before clarification, and attach a blocking reason.
23
52
 
24
53
  ### Safe assumption rule
25
54
 
26
- When a missing product detail is non-blocking, choose the smallest reasonable reversible default, explicitly classify it as an agent assumption, and record it in `current-contract.assumptions[]`. Each assumption must include `value`, `reason`, `scope`, `reversible=true`, and `source=agent-default`. Do not place resolved safe assumptions in unresolvedDecisions[]. Never present an assumption as a verified user or business fact.
55
+ `NON_BLOCKING` applies when the choice is `SAFE + REVERSIBLE + LOCAL +
56
+ NON-SENSITIVE + NON-AUTHORITATIVE + NON-DESTRUCTIVE` and does not assert a real
57
+ user or business fact. Each recorded `ASSUMPTION` must include `value`, `reason`,
58
+ `scope`, `reversible=true`, and `source=agent-default`. Do not place resolved
59
+ safe assumptions in `unresolvedDecisions[]`, and never present an assumption as
60
+ a verified user or business fact.
27
61
 
28
- The assumption boundary is:
62
+ Generally `NON_BLOCKING` when no real business fact is supplied:
29
63
 
30
64
  ```text
31
- SAFE + REVERSIBLE + LOCAL + NON-SENSITIVE + NON-AUTHORITATIVE + NON-DESTRUCTIVE
65
+ practice-area emphasis
66
+ fictional positioning
67
+ representative specialty mix
68
+ tone of the fictional firm
69
+ hero messaging
70
+ section ordering
71
+ fictional partner/attorney profiles
72
+ fictional office location
73
+ visual identity
74
+ palette
75
+ typography
76
+ local fictional brand name
77
+ local-only fictional identity
78
+ fictional company name
79
+ demo contact details
80
+ demo phone number
81
+ placeholder legal-service descriptions
82
+ placeholder copy
83
+ fictional testimonials
84
+ temporary logo text
85
+ local-only form behavior
86
+ ```
87
+
88
+ These examples remain non-blocking only when they stay safe, reversible,
89
+ local, non-sensitive, non-authoritative, and non-destructive. Do not hardcode
90
+ one law-firm positioning into the protocol or tests.
91
+
92
+ ### Blocking boundary
93
+
94
+ `BLOCKING` applies when proceeding requires any of the following:
95
+
96
+ ```text
97
+ real legal business name
98
+ real contact information
99
+ real contact details
100
+ real attorney identities
101
+ credentials
102
+ payment information
103
+ payment data
104
+ production endpoints
105
+ production endpoint
106
+ deployment target
107
+ deployment/domain authority
108
+ destructive operations
109
+ destructive operation
110
+ irreversible architecture
111
+ irreversible architectural decision
112
+ irreversible data decisions
113
+ regulated or legal claims
114
+ regulated/legal claim
115
+ real compliance representations
116
+ real business facts not safely inferable
117
+ ```
118
+
119
+ Blocking decisions must be written to
120
+ `current-contract.unresolvedDecisions[]`. They make `preflight` return
121
+ `BLOCKED`, but they do not prevent contract serialization.
122
+ Unresolved blocking decisions are recorded in `current-contract.unresolvedDecisions[]`.
123
+
124
+ ### Question justification invariant
125
+
126
+ Asking the user is allowed only when `blockingReason` is present and comes from
127
+ a blocking category such as:
128
+
129
+ A user question requires a `blockingReason`; a question without one is invalid.
130
+
131
+ ```text
132
+ REAL_BUSINESS_FACT_REQUIRED
133
+ SENSITIVE_VALUE_REQUIRED
134
+ EXTERNAL_AUTHORITY_REQUIRED
135
+ IRREVERSIBLE_DECISION_REQUIRED
136
+ REGULATED_CLAIM_REQUIRED
137
+ DESTRUCTIVE_ACTION_REQUIRED
138
+ ```
139
+
140
+ Multiple reasonable aesthetic or positioning choices do not justify a question.
141
+ The deterministic support helper in `src/core/decision-classification.js`
142
+ validates this boundary; it does not use an LLM or parse natural language.
143
+
144
+ ### Contract-before-clarification sequence
145
+
146
+ The operational order is:
147
+
148
+ ```text
149
+ DISCOVERY
150
+
151
+ classify unresolved details
152
+
153
+ create and persist current-contract.json
154
+
155
+ persist assumptions[] and unresolvedDecisions[]
156
+
157
+ validate contract
158
+
159
+ if unresolvedDecisions.length > 0
160
+
161
+ ask user with blockingReason
32
162
  ```
33
163
 
34
- Record the choice with an explicit `ASSUMPTION` marker. Unresolved blocking decisions must be recorded in `current-contract.unresolvedDecisions[]`; they prevent `preflight` from returning `READY` and block `EXECUTING` until resolved, but do not prevent contract serialization.
164
+ No clarification stop is allowed before a serialized contract exists. A
165
+ non-blocking ambiguity never becomes a contract blocker.
35
166
 
36
167
  ## Serialized protocol preparation
37
168
 
@@ -17,7 +17,8 @@ policy are all present.
17
17
  | Completion enforcement | Canonical contract, persisted route, guide-declared gates, preflight, phase ledger, structured checks, evidence coverage, `audit`, `report`, and `complete` validators. |
18
18
  | Agent lifecycle navigation | Read-only `forgeloop next` decisions, stable action/reason output, persisted-state safety, and adapter guidance at lifecycle boundaries. |
19
19
  | Execution → Verification handoff | Legal `EXECUTING` → `VERIFYING` transition, implementation-step reconciliation, and preservation of verification evidence. |
20
- | Pre-contract autonomy | Blocking vs Non-Blocking Decisions policy, explicit ASSUMPTION / source=agent-default recording, safe-boundary invariant, positive and negative tests, and a blind run showing non-blocking ambiguity continues while blocking ambiguity remains user-gated. |
20
+ | Pre-contract autonomy — structural | Blocking vs Non-Blocking Decisions policy, classify-before-ask invariant, PRE-QUESTION CHECK, explicit ASSUMPTION / source=agent-default recording, contract-before-clarification ordering, deterministic reason-code helper, and positive/negative tests. |
21
+ | Pre-contract autonomy — cross-agent live robustness | Independent live-agent behavior across fresh package installs, exact blind prompts, one-process/no-subagent topology, and separate evidence for non-blocking continuation versus blocking clarification. Structural coverage does not imply live cross-agent robustness. |
21
22
  | Resume/checkpoint | Atomic local state, contract/HEAD/artifact freshness, age warning, schema/secret validation, status, safe validation, and bounded clearing without persisting derived freshness fields. |
22
23
  | Multi-agent coordination | Self-contained briefs, write/write and write/read ownership checks, dependency-set validation, reviewer independence, normalized results, and inline fallback. |
23
24
  | Security boundaries | Realpath containment, bounded untrusted JSON, threat model, nested secret scanning, publication evidence, and explicit authority rules. |
@@ -37,14 +38,16 @@ policy are all present.
37
38
  - Literal graph runtime and runtime multi-agent orchestration are `N/A by
38
39
  design`; compatible harnesses own those capabilities.
39
40
 
40
- ## Third-run conformance position
41
+ ## Blind-run conformance position
41
42
 
42
43
  | Dimension | Classification |
43
44
  | --- | --- |
44
- | Execution Verification | REPRODUCED FAILURE before this fix |
45
- | Verification serialization | NOT_REACHED |
46
- | Review transition | NOT_REACHED |
47
- | Receipt generation | NOT_REACHED |
45
+ | Pre-contract autonomy structural | IMPLEMENTED / LOCAL TESTS PASS — 369 Node tests and 42 Python tests, with focused autonomy/conformance checks green |
46
+ | Pre-contract autonomy — cross-agent live robustness | NOT_PROVEN — the prior third blind run was reported as PASS, the fourth blind run failed on a non-blocking question, and the fifth blind run is pending a newly published package |
47
+ | Execution Verification | REPRODUCED FAILURE in fourth blind run before implementation |
48
+ | Verification serialization | NOT_REACHED in fourth blind run |
49
+ | Review transition | NOT_REACHED in fourth blind run |
50
+ | Receipt generation | NOT_REACHED in fourth blind run |
48
51
  | Full conformance | PARTIAL |
49
52
 
50
53
  ## Evidence matrix
@@ -63,7 +66,8 @@ are both present:
63
66
  | Security boundary | realpath containment, bounded JSON, `THREAT_MODEL.md`, secret-free artifacts, authority and no-runtime rules | `tests/security-limits.test.js`, Markdown/loop validators, and `scripts/scan_secrets.py` |
64
67
  | Cross-artifact conformance | `src/core/conformance.js`, `classifyLoadedWorkState`, and `forgeloop validate-protocol --contract-file` | `tests/conformance.test.js`, `tests/validate-protocol-cli.test.js`, and protocol fixtures covering precedence and stale evidence |
65
68
  | Protocol preparation and completion | `src/core/preflight.js`, `src/core/completion.js`, `src/core/events.js`, policy packs, and portable bundles | `tests/preflight.test.js`, `tests/completion.test.js`, `tests/lifecycle.test.js`, `tests/policy.test.js`, and `tests/bundle.test.js` |
66
- | Pre-contract autonomy | `LOOP_ENGINEERING.md`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.cursor/rules/project-loop.mdc`, and the blind conformance artifacts | `tests/autonomy-policy.test.js`, `tests/conformance-scenarios.test.js` |
69
+ | Pre-contract autonomy — structural | `LOOP_ENGINEERING.md`, `src/core/decision-classification.js`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.cursor/rules/project-loop.mdc` | `tests/decision-classification.test.js`, `tests/autonomy-policy.test.js`, `tests/preflight.test.js` |
70
+ | Pre-contract autonomy — cross-agent live robustness | Prior third blind-run result reported in the hardening brief, `conformance/runs/2026-08-13-codex-fourth-live.md`, and the exact blind request | `tests/conformance-scenarios.test.js`; fifth run remains pending publication and execution |
67
71
 
68
72
  The implementation references above are local observations. OS runners,
69
73
  remote links, provider sessions, publication, and deployment remain `Not
@@ -0,0 +1,309 @@
1
+ # ForgeLoop Fourth Blind Live Conformance Run
2
+
3
+ This record documents the fourth blind live conformance experiment. The target
4
+ was disposable and was not populated from the ForgeLoop working tree. The
5
+ experiment used the published npm package and stopped when the blind agent
6
+ asked a non-blocking product clarification question.
7
+
8
+ ## Environment
9
+
10
+ - ForgeLoop release source commit: `99b56d7119098ce3637506f692c9d821e03eb8b1`
11
+ - Approved merged `main` commit: `8d4296814ccc2d9a3d1aef3f6e7ad7219dfe0446`
12
+ - Published-scope tree comparison: same between the release source commit and
13
+ approved merged `main`
14
+ - ForgeLoop package version: `@cassiomc1/forgeloop@0.1.3`
15
+ - npm tarball URL: `https://registry.npmjs.org/@cassiomc1/forgeloop/-/forgeloop-0.1.3.tgz`
16
+ - Tarball SHA-1: `fb509e0da3f6f302c5342559f36c0e2c101fa6ce`
17
+ - npm integrity SHA-512:
18
+ `sha512-iTrZ2UC5w5sSOQlSD61ACmVEsIdjzGUDZUaCohdmnIQ2NsfN60+tKHNxetAl6Gl7Dlq+QTHiPy8oocaSsOQ90Q==`
19
+ - Agent: Codex CLI non-interactive agent
20
+ - Model: not exposed by the harness
21
+ - Harness: `codex-cli 0.146.0`, `codex exec`
22
+ - Execution topology: `single-agent`
23
+ - Agent process count: `1` primary process
24
+ - Subagents enabled: `NO`
25
+ - Delegation used: `NO`
26
+ - Parallel agents: `NO`
27
+ - Operating system: macOS `26.6.1` (`25G76`), `arm64`
28
+ - Date/time: `2026-08-13T08:16:19-03:00` registration; agent started at
29
+ `2026-08-13T08:16:55-03:00`
30
+ - Target path: `/Users/cassio/Documents/github/forgeloop-fourth-blind-live.DI06PF`
31
+ - Conformance mode: Standard
32
+
33
+ Installation procedure:
34
+
35
+ 1. Created the target as a new empty directory and confirmed zero entries.
36
+ 2. Fetched `@cassiomc1/forgeloop@0.1.3` from npm with `npm pack` outside the
37
+ target and verified the SHA-1 and SHA-512 values above.
38
+ 3. Installed the exact published package in a temporary external runtime with
39
+ `npm install --prefix <runtime> --no-save --ignore-scripts
40
+ @cassiomc1/forgeloop@0.1.3`.
41
+ 4. Confirmed the installed package and CLI both reported version `0.1.3`.
42
+ 5. Ran the installed CLI's normal initialization command:
43
+ `node <runtime>/node_modules/@cassiomc1/forgeloop/src/cli.js init --path <target>`.
44
+
45
+ The initial `npx` binary form was rejected by npm 11 in this environment with
46
+ `forgeloop: command not found`; this was diagnosed before the agent started.
47
+ The external-runtime npm installation preserved the published package boundary
48
+ and did not copy any ForgeLoop source checkout into the target.
49
+
50
+ The agent received only this product request:
51
+
52
+ ```text
53
+ Create a premium website for a law firm.
54
+
55
+ It should feel modern, sophisticated and trustworthy, work well on mobile and desktop, and include a contact form.
56
+ ```
57
+
58
+ No ForgeLoop, Loop Engineering, contract, routing, gate, preflight, lifecycle,
59
+ verification, evidence, receipt, audit, completion, `forgeloop next`, or
60
+ continuation instruction was added to the prompt.
61
+
62
+ ## Blind bootstrap and instruction discovery
63
+
64
+ The initialized target contained the published adapter and canonical files,
65
+ including `AGENTS.md`, `CLAUDE.md`, `.cursor/rules/project-loop.mdc`, and the
66
+ shared loop documents. The blind agent's first observable message stated that
67
+ it was using the project's required workflow and would inspect the local rules.
68
+ Its first command read `LOOP_ENGINEERING.md`, `PROJECT_PROFILE.md`,
69
+ `GUIDE_ROUTER.md`, and the available agent skill instructions. This is evidence
70
+ of automatic instruction discovery without ForgeLoop coaching in the prompt.
71
+
72
+ - Blind bootstrap: `PASS`
73
+ - Instruction discovery: `PASS`
74
+ - Protocol initialization before implementation: `NOT_REACHED`; no product
75
+ implementation began.
76
+
77
+ ## Pre-contract autonomy
78
+
79
+ The agent asked:
80
+
81
+ > What kind of law firm should the site represent?
82
+ >
83
+ > 1. Corporate and commercial law
84
+ > 2. Litigation and dispute resolution
85
+ > 3. Full-service private client firm
86
+
87
+ It recommended corporate and commercial. The request did not require a real
88
+ firm identity or legal-business fact, so this was a reversible, non-blocking
89
+ choice. The agent did not select a local fictional identity autonomously and
90
+ did not serialize an assumption in `current-contract.assumptions[]`.
91
+
92
+ - Absence of real brand treated as non-blocking: `FAIL`
93
+ - Fictional/local identity chosen without interruption: `FAIL`
94
+ - Required assumption fields observed: `FAIL` — contract was never created
95
+ - Reversible assumptions not presented as facts: `NOT_REACHED`
96
+ - `unresolvedDecisions[]` empty for reversible choices: `NOT_REACHED`
97
+ - Pre-contract autonomy: `FAIL`
98
+
99
+ ## Contract, routing and gates
100
+
101
+ The target had no `.forgeloop/current-contract.json`,
102
+ `.forgeloop/routing-result.json`, or `.forgeloop/gates/` after the agent
103
+ stopped.
104
+
105
+ - Contract creation: `FAIL`
106
+ - Deterministic routing: `NOT_REACHED`
107
+ - Gate enforcement: `NOT_REACHED`
108
+
109
+ ## Preflight chronology
110
+
111
+ No `.forgeloop/preflight.json` or `.forgeloop/events.ndjson` was created. There
112
+ was no `PREFLIGHT_READY`, `EXECUTION_STARTED`, task identity, or route identity
113
+ to compare.
114
+
115
+ - Preflight `READY`: `NOT_REACHED`
116
+ - Blockers absent: `NOT_REACHED`
117
+ - `PREFLIGHT_READY` before `EXECUTION_STARTED`: `NOT_REACHED`
118
+ - Preflight chronology: `NOT_REACHED`
119
+
120
+ ## Implementation
121
+
122
+ No product files were created. The target contains only the package-installed
123
+ instruction, guide, schema, license, and manifest files. Therefore the
124
+ premium, modern, sophisticated, trustworthy, responsive, and contact-form
125
+ requirements were not exercised.
126
+
127
+ - Implementation: `NOT_REACHED`
128
+ - Product task outcome: `FAIL`
129
+
130
+ ## Lifecycle navigation
131
+
132
+ The agent did not reach implementation and did not execute `forgeloop next`.
133
+ The independent post-run `next` inspection reported:
134
+
135
+ ```json
136
+ {
137
+ "currentPhase": "RECEIVED",
138
+ "nextAction": "DISCOVER",
139
+ "terminal": false,
140
+ "reasonCodes": ["WORK_STATE_ABSENT"]
141
+ }
142
+ ```
143
+
144
+ - Agent lifecycle navigation: `NOT_REACHED`
145
+ - Execution → Verification handoff: `NOT_REACHED`
146
+ - Expected `EXECUTING → forgeloop next → VERIFYING` sequence: `NOT_REACHED`
147
+ - Implementation step reconciliation: `NOT_REACHED`
148
+
149
+ ## Receipt preparation
150
+
151
+ The agent never reached `VERIFYING`, did not query `forgeloop next` in that
152
+ phase, and did not run `prepare-completion`. No in-progress receipt or
153
+ fingerprint set exists.
154
+
155
+ - Receipt preparation: `NOT_REACHED`
156
+ - Receipt generation: `NOT_REACHED`
157
+ - Receipt treated as non-completion: `NOT_REACHED`
158
+ - Receipt fingerprint consistency: `NOT_REACHED`
159
+
160
+ ## Real verification execution
161
+
162
+ The agent executed no project tests, syntax checks, build, accessibility,
163
+ security, performance, or visual checks. No check appears in a contract,
164
+ receipt, or evidence ledger because none of those artifacts exists.
165
+
166
+ - Verification execution: `NOT_REACHED`
167
+
168
+ ## Evidence chronology
169
+
170
+ There was no `record-check`, no structured check, and no `VERIFICATION_RECORDED`
171
+ event. Consequently, no result can be misclassified as observed evidence in
172
+ this run, but the future-result behavior was not exercised.
173
+
174
+ - Future-result fabrication prevention: `NOT_REACHED`
175
+ - Evidence chronology: `NOT_REACHED`
176
+
177
+ ## Evidence serialization
178
+
179
+ The target has no `work-state.json`, `verificationEvidence`,
180
+ `evidenceCoverage`, execution receipt, structured checks, or
181
+ `VERIFICATION_RECORDED` events. Required coverage was not produced.
182
+
183
+ - Evidence serialization: `NOT_REACHED`
184
+ - Evidence integrity: `NOT_REACHED`
185
+
186
+ ## Failure loop
187
+
188
+ No project check ran and no verification failure entered the ForgeLoop failure
189
+ loop. The observed failure was a pre-contract clarification stop.
190
+
191
+ - Failure loop: `NOT_EXERCISED`
192
+
193
+ ## Review transition
194
+
195
+ The agent did not reach verification or review, and no valid coverage existed
196
+ that could authorize `ENTER_REVIEWING`.
197
+
198
+ - Review transition: `NOT_REACHED`
199
+
200
+ ## Completion
201
+
202
+ The agent did not reach `REVIEWING`, did not run `forgeloop next` for
203
+ `RUN_COMPLETE`, and did not produce a validator-backed completion. The
204
+ independent `complete --path <target> --json` command returned `REJECTED` with
205
+ missing contract, route, receipt, and work-state artifacts.
206
+
207
+ - Receipt generation: `NOT_REACHED`
208
+ - Completion validation by the agent: `NOT_REACHED`
209
+ - Lifecycle closure: `NOT_REACHED`
210
+
211
+ ## False-completion prevention
212
+
213
+ The validator rejected completion rather than accepting an incomplete target.
214
+ Observed rejection codes included `E_CONTRACT_MISSING`, `E_RECEIPT_MISSING`,
215
+ `E_ROUTE_MISSING`, and `E_STATE_MISSING`. `validate-protocol` also returned
216
+ `INVALID` with missing route, state, and receipt artifacts.
217
+
218
+ - False-completion prevention: `PASS`
219
+
220
+ ## Chronology
221
+
222
+ The persisted event ledger was absent, so the required protocol event sequence
223
+ was never recorded.
224
+
225
+ | Sequence | Event | Timestamp | Task ID |
226
+ | ---: | --- | --- | --- |
227
+ | — | No `events.ndjson` persisted | — | — |
228
+
229
+ The following required events were absent: `TASK_RECEIVED`,
230
+ `CONTRACT_VALIDATED`, `ROUTE_VALIDATED`, `GATE_SATISFIED`, `PREFLIGHT_READY`,
231
+ `EXECUTION_STARTED`, `VERIFICATION_STARTED`, `VERIFICATION_RECORDED`, and
232
+ `COMPLETION_VALIDATED`. Hash-chain validity: `NOT_VERIFIED` because no ledger
233
+ was created.
234
+
235
+ ## Artifact evidence
236
+
237
+ | Artifact | Observation |
238
+ | --- | --- |
239
+ | `.forgeloop/current-contract.json` | Missing |
240
+ | `.forgeloop/routing-result.json` | Missing |
241
+ | `.forgeloop/gates/` | Missing |
242
+ | `.forgeloop/preflight.json` | Missing |
243
+ | `.forgeloop/work-state.json` | Missing |
244
+ | `.forgeloop/events.ndjson` | Missing |
245
+ | Structured checks/evidence | Missing |
246
+ | `.forgeloop/execution-receipt.json` | Missing |
247
+ | `.forgeloop/manifest.json` | Present; package version `0.1.3` |
248
+ | Product implementation | No product files |
249
+
250
+ Independent validator commands, all run against the disposable target using
251
+ the installed `0.1.3` CLI:
252
+
253
+ - `forgeloop next --path <target> --json`: exit `0`, `RECEIVED`,
254
+ `WORK_STATE_ABSENT`, next action `DISCOVER`.
255
+ - `forgeloop audit --path <target> --json`: exit `1`, `INVALID`.
256
+ - `forgeloop validate-protocol --path <target> --route-file
257
+ .forgeloop/routing-result.json --state-file .forgeloop/work-state.json
258
+ --receipt-file .forgeloop/execution-receipt.json --contract-file
259
+ .forgeloop/current-contract.json --json`: exit `1`, `INVALID`.
260
+ - `forgeloop complete --path <target> --json`: exit `1`, `REJECTED`.
261
+
262
+ No artifacts were edited manually to make the test pass.
263
+
264
+ ## Capability results
265
+
266
+ | Capability | Result |
267
+ | --- | --- |
268
+ | Blind bootstrap | `PASS` |
269
+ | Instruction discovery | `PASS` |
270
+ | Pre-contract autonomy | `FAIL` |
271
+ | Contract creation | `FAIL` |
272
+ | Deterministic routing | `NOT_REACHED` |
273
+ | Gate enforcement | `NOT_REACHED` |
274
+ | Preflight chronology | `NOT_REACHED` |
275
+ | Implementation | `NOT_REACHED` |
276
+ | Agent lifecycle navigation | `NOT_REACHED` |
277
+ | Execution → Verification handoff | `NOT_REACHED` |
278
+ | Receipt preparation | `NOT_REACHED` |
279
+ | Verification execution | `NOT_REACHED` |
280
+ | Future-result fabrication prevention | `NOT_REACHED` |
281
+ | Evidence chronology | `NOT_REACHED` |
282
+ | Evidence serialization | `NOT_REACHED` |
283
+ | Evidence integrity | `NOT_REACHED` |
284
+ | Failure loop | `NOT_EXERCISED` |
285
+ | Review transition | `NOT_REACHED` |
286
+ | Receipt generation | `NOT_REACHED` |
287
+ | Completion validation | `NOT_REACHED` |
288
+ | Lifecycle closure | `NOT_REACHED` |
289
+ | False-completion prevention | `PASS` |
290
+ | Full conformance | `PARTIAL` |
291
+
292
+ ## Independent outcome dimensions
293
+
294
+ - Task success: `FAIL`
295
+ - Protocol conformance: `PARTIAL`
296
+ - Verification validity: `INVALID`
297
+ - Publication: `NOT_PUBLISHED` for the target deliverable; the ForgeLoop
298
+ package itself was already `PUBLISHED` as `0.1.3`.
299
+ - Production readiness: `NOT_VERIFIED`
300
+
301
+ ## Final classification
302
+
303
+ `PARTIAL`
304
+
305
+ The run verified blind adapter bootstrap and instruction discovery and showed
306
+ that the validators reject false completion. It did not reach protocol
307
+ execution because the agent treated a reversible law-firm positioning choice as
308
+ a blocking clarification instead of recording an agent-default assumption and
309
+ continuing autonomously.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cassiomc1/forgeloop",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Portable, verifiable instruction kit for AI agents and developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,55 @@
1
+ export const BLOCKING_REASON_CODES = Object.freeze([
2
+ "REAL_BUSINESS_FACT_REQUIRED",
3
+ "SENSITIVE_VALUE_REQUIRED",
4
+ "EXTERNAL_AUTHORITY_REQUIRED",
5
+ "IRREVERSIBLE_DECISION_REQUIRED",
6
+ "REGULATED_CLAIM_REQUIRED",
7
+ "DESTRUCTIVE_ACTION_REQUIRED",
8
+ ]);
9
+
10
+ const BLOCKING_RULES = Object.freeze([
11
+ ["realBusinessFact", "REAL_BUSINESS_FACT_REQUIRED"],
12
+ ["sensitive", "SENSITIVE_VALUE_REQUIRED"],
13
+ ["authoritative", "EXTERNAL_AUTHORITY_REQUIRED"],
14
+ ["external", "EXTERNAL_AUTHORITY_REQUIRED"],
15
+ ["irreversible", "IRREVERSIBLE_DECISION_REQUIRED"],
16
+ ["regulatedClaim", "REGULATED_CLAIM_REQUIRED"],
17
+ ["destructive", "DESTRUCTIVE_ACTION_REQUIRED"],
18
+ ]);
19
+
20
+ function blockingDecision(reasonCode) {
21
+ return {
22
+ classification: "BLOCKING",
23
+ reasonCode,
24
+ blockingReason: reasonCode,
25
+ };
26
+ }
27
+
28
+ export function classifyDecision(flags = {}) {
29
+ if (!flags || typeof flags !== "object" || Array.isArray(flags)) {
30
+ return { classification: "NON_BLOCKING", reasonCode: "SAFE_REVERSIBLE_LOCAL_DEFAULT", blockingReason: null };
31
+ }
32
+
33
+ for (const [flag, reasonCode] of BLOCKING_RULES) {
34
+ if (flags[flag] === true) return blockingDecision(reasonCode);
35
+ }
36
+ if (flags.reversible === false || flags.local === false) {
37
+ return blockingDecision(
38
+ flags.reversible === false
39
+ ? "IRREVERSIBLE_DECISION_REQUIRED"
40
+ : "REAL_BUSINESS_FACT_REQUIRED",
41
+ );
42
+ }
43
+
44
+ return {
45
+ classification: "NON_BLOCKING",
46
+ reasonCode: "SAFE_REVERSIBLE_LOCAL_DEFAULT",
47
+ blockingReason: null,
48
+ };
49
+ }
50
+
51
+ export function canAskUser(decision) {
52
+ return decision?.classification === "BLOCKING"
53
+ && BLOCKING_REASON_CODES.includes(decision.reasonCode)
54
+ && decision.blockingReason === decision.reasonCode;
55
+ }