@cassiomc1/forgeloop 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.cursor/rules/project-loop.mdc +6 -3
  2. package/.github/copilot-instructions.md +5 -0
  3. package/AGENTS.md +6 -0
  4. package/CLAUDE.md +6 -0
  5. package/DOCS_INDEX.md +5 -0
  6. package/ENG/accessibility-eng.md +12 -2
  7. package/ENG/design-code-eng.md +22 -1
  8. package/LOOP_ENGINEERING.md +28 -0
  9. package/PROTOCOL_INTEGRATION.md +26 -0
  10. package/QUALITY_SCORECARD.md +2 -0
  11. package/README.md +11 -0
  12. package/THREAT_MODEL.md +24 -0
  13. package/completions/_forgeloop +4 -1
  14. package/completions/forgeloop.bash +7 -1
  15. package/completions/forgeloop.fish +19 -1
  16. package/docs/AGENT_PROTOCOL_SUMMARY.md +6 -1
  17. package/docs/ARTIFACT_REFERENCE.md +128 -0
  18. package/docs/CLI_REFERENCE.md +84 -1
  19. package/docs/KNOWLEDGE_SOURCES.md +161 -0
  20. package/docs/MCP.md +1 -1
  21. package/docs/RECIPES.md +31 -0
  22. package/docs/STRUCTURAL_QUALITY.md +350 -0
  23. package/docs/TROUBLESHOOTING.md +107 -0
  24. package/package.json +3 -1
  25. package/schemas/config.schema.json +46 -0
  26. package/schemas/preflight.schema.json +2 -1
  27. package/schemas/structural-quality.schema.json +175 -0
  28. package/src/cli.js +18 -0
  29. package/src/commands/quality-baseline.js +28 -0
  30. package/src/commands/quality-status.js +34 -0
  31. package/src/commands/quality-verify.js +30 -0
  32. package/src/core/artifact-registry.js +12 -0
  33. package/src/core/audit.js +38 -0
  34. package/src/core/bundles.js +134 -1
  35. package/src/core/cli-command-definitions.js +45 -0
  36. package/src/core/command-executors.js +16 -0
  37. package/src/core/command-input.js +12 -0
  38. package/src/core/completion-artifacts.js +2 -0
  39. package/src/core/completion.js +42 -0
  40. package/src/core/config.js +3 -0
  41. package/src/core/error-codes.js +73 -0
  42. package/src/core/filesystem.js +18 -3
  43. package/src/core/inspect.js +64 -0
  44. package/src/core/integration-invocation-policy.js +15 -0
  45. package/src/core/integration-resources.js +17 -0
  46. package/src/core/next-action-model.js +11 -1
  47. package/src/core/next-action-phases.js +84 -5
  48. package/src/core/phase.js +9 -1
  49. package/src/core/preflight.js +33 -0
  50. package/src/core/protocol-info.js +15 -0
  51. package/src/core/runtime-context.js +27 -0
  52. package/src/core/schema-validation.js +1 -0
  53. package/src/core/structural-quality/artifacts.js +329 -0
  54. package/src/core/structural-quality/constants.js +67 -0
  55. package/src/core/structural-quality/policy.js +227 -0
  56. package/src/core/structural-quality/provider.js +287 -0
  57. package/src/core/structural-quality/sentrux-mcp.js +477 -0
  58. package/src/core/structural-quality/service.js +1138 -0
  59. package/src/core/structural-quality/source-fingerprint.js +112 -0
  60. package/src/core/structural-quality/status.js +3 -0
  61. package/src/core/task-paths.js +24 -0
  62. package/src/core/templates.js +1 -0
  63. package/src/integration.d.ts +25 -0
  64. package/src/integration.js +14 -0
@@ -35,6 +35,7 @@ All artifact schemas are defined in `schemas/*.schema.json`. Persisted artifact
35
35
  | `task-state/<task-key>/approvals/approval-<id>.json` | `approval` | Protocol Managed | Append Decision Once | Action Approval Attestation |
36
36
  | `policy/capabilities.json` | `capability-policy` | Operator Or Agent | Mutable Configuration | Capability Policy Specification |
37
37
  | `task-state/<task-key>/evaluations/eval-<id>.json` | `trajectory-evaluation` | Protocol Compiled | Immutable Once Written | Trajectory Evaluation |
38
+ | `task-state/<task-key>/structural-quality/baseline.json` | `structural-quality` | Protocol Compiled | Baseline Immutable After Execution | Structural Quality Evidence |
38
39
  | `task-state/<task-key>/usage.json` | `usage` | Actor Or Trusted Host | Overwritten On Usage Record | Informational Usage Telemetry |
39
40
  | `task-state/<task-key>/workspace-binding.json` | `workspace-binding` | Protocol Generated | Immutable After Bind | Workspace Identity Binding |
40
41
  | `task-state/<task-key>/handoffs/handoff-<id>.json` | `handoff-envelope` | Protocol Compiled | Immutable Once Written | Canonical Handoff Snapshot |
@@ -165,6 +166,7 @@ Readiness attestation evaluated prior to implementation.
165
166
  - `fingerprints` *(object, optional)*
166
167
  - `sources` *(object, optional)*
167
168
  - `policy` *(object, optional)*
169
+ - `structuralQuality` *(object, optional)*
168
170
 
169
171
  <!-- END FORGELOOP GENERATED: schema:preflight -->
170
172
 
@@ -250,6 +252,28 @@ Local ForgeLoop configuration settings and policy bindings.
250
252
  - `policy` *(string, optional, minLength: 1)*
251
253
  - `requiredGates` *(array<string>, optional)*
252
254
  - `requiredEvidence` *(array<string>, optional)*
255
+ - `structuralQuality` *(object, optional)*
256
+ - `mode` *(string, optional, enum: `off`, `observe`, `gate`)*
257
+ - `provider` *(string, optional, pattern: `^[a-z][a-z0-9-]{0,63}$`)*
258
+ - `maxRegressionPoints` *(integer, optional, minimum: 0, maximum: 10000)*
259
+ - `dimensionBudgets` *(dimensionMap, optional)*
260
+ - `modularity` *(integer or null, optional)*
261
+ - `acyclicity` *(integer or null, optional)*
262
+ - `depth` *(integer or null, optional)*
263
+ - `equality` *(integer or null, optional)*
264
+ - `redundancy` *(integer or null, optional)*
265
+ - `forbidNewCycles` *(boolean, optional)*
266
+ - `minQualitySignal` *(integer or null, optional)*
267
+ - `minimums` *(minimumMap, optional)*
268
+ - `modularity` *(integer, optional, minimum: 0, maximum: 10000)*
269
+ - `acyclicity` *(integer, optional, minimum: 0, maximum: 10000)*
270
+ - `depth` *(integer, optional, minimum: 0, maximum: 10000)*
271
+ - `equality` *(integer, optional, minimum: 0, maximum: 10000)*
272
+ - `redundancy` *(integer, optional, minimum: 0, maximum: 10000)*
273
+ - `optimization` *(object, optional)*
274
+ - `mode` *(string, optional, enum: `off`, `bounded`)*
275
+ - `maxExtraEvaluations` *(integer, optional, minimum: 0, maximum: 2)*
276
+ - `minGainPoints` *(integer, optional, minimum: 1, maximum: 10000)*
253
277
  - `verification` *(object, optional)*
254
278
  - `checkers` *(array<object>, required)*
255
279
  - `checkId` *(string, required, minLength: 1)*
@@ -1075,3 +1099,107 @@ back-reference itself from the execution receipt.
1075
1099
  Optional external signing-provider bundle. Its presence is not proof of a
1076
1100
  valid signature; verification must be performed by the configured signing
1077
1101
  provider with the requested identity and issuer policy.
1102
+
1103
+ ### 2.32 `task-state/<taskKey>/structural-quality/`
1104
+
1105
+ <!-- forgeloop-doc: schema=structural-quality artifact=.forgeloop/task-state/<task-key>/structural-quality/baseline.json -->
1106
+
1107
+ Task-owned provider-neutral structural-quality evidence. The directory contains
1108
+ one immutable `baseline.json` and zero or more typed evaluations under
1109
+ `evaluations/cycle-<cycle>-attempt-<attempt>.json`. There is deliberately no
1110
+ `latest.json`; readers derive the latest evaluation by numeric cycle and
1111
+ attempt ordering.
1112
+
1113
+ The baseline is captured before execution and cannot be replaced after
1114
+ `EXECUTING` begins. Evaluations bind the current verification cycle to the
1115
+ baseline, contract, route, policy, scope, provider identity, and persisted
1116
+ check projection. Portable bundles include the evidence needed for audit and
1117
+ validate it without starting the provider.
1118
+
1119
+ #### Canonical Fields
1120
+
1121
+ <!-- BEGIN FORGELOOP GENERATED: schema:structural-quality -->
1122
+
1123
+ - `schemaVersion` *(number, required, const: 1)*
1124
+ - `protocolVersion` *(number, required, const: 1)*
1125
+ - `role` *(string, required, enum: `BASELINE`, `EVALUATION`)*
1126
+ - `taskId` *(string, required, minLength: 1)*
1127
+ - `capturedAt` *(string, required, minLength: 1)*
1128
+ - `verificationCycle` *(integer or null, required)*
1129
+ - `attempt` *(integer, required, minimum: 1)*
1130
+ - `status` *(string, required, enum: `PASS`, `FAIL`, `BLOCKED`, `NOT_OBSERVED`)*
1131
+ - `reasonCodes` *(array<string>, required)*
1132
+ - `errorCode` *(string or null, optional)*
1133
+ - `baselineSignal` *(integer or null, optional)*
1134
+ - `currentSignal` *(integer or null, optional)*
1135
+ - `bindings` *(object, required)*
1136
+ - `contractFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1137
+ - `routeFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1138
+ - `policyFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1139
+ - `scopeFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1140
+ - `baselineFingerprint` *(string or null, optional)*
1141
+ - `sourceMaterialFingerprint` *(string or null, optional)*
1142
+ - `stateRevision` *(integer, optional, minimum: 0)*
1143
+ - `sourceObservation` *(object, optional)*
1144
+ - `beforeFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1145
+ - `afterFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1146
+ - `stable` *(boolean, required)*
1147
+ - `provider` *(object, required)*
1148
+ - `id` *(string, required, minLength: 1)*
1149
+ - `version` *(string or null, required)*
1150
+ - `transport` *(string, required, minLength: 1)*
1151
+ - `executionMode` *(string, required, minLength: 1)*
1152
+ - `measurementModel` *(string, optional, minLength: 1)*
1153
+ - `compatibilityKey` *(string or null, optional)*
1154
+ - `detection` *(object, optional)*
1155
+ - `available` *(boolean, required)*
1156
+ - `providerId` *(string, required, minLength: 1)*
1157
+ - `providerVersion` *(string or null, optional)*
1158
+ - `transport` *(string, required, minLength: 1)*
1159
+ - `measurementModel` *(string, optional, minLength: 1)*
1160
+ - `compatibilityKey` *(string or null, optional)*
1161
+ - `reasonCode` *(string or null, required)*
1162
+ - `scope` *(object, required)*
1163
+ - `kind` *(string, required, const: `PROJECT`)*
1164
+ - `projectRoot` *(string, required, const: `.`)*
1165
+ - `providerConfigFingerprint` *(string or null, optional)*
1166
+ - `architectureRulesFingerprint` *(string, optional, pattern: `^[a-f0-9]{64}$`)*
1167
+ - `snapshot` *(snapshot, optional)*
1168
+ - `qualitySignal` *(integer, required, minimum: 0, maximum: 10000)*
1169
+ - `bottleneck` *(string, required, enum: `modularity`, `acyclicity`, `depth`, `equality`, `redundancy`)*
1170
+ - `rootCauses` *(object, required)*
1171
+ - `modularity` *(rootCause, required)*
1172
+ - `score` *(integer, required, minimum: 0, maximum: 10000)*
1173
+ - `raw` *(number, required)*
1174
+ - `acyclicity` *(rootCause, required)*
1175
+ - `score` *(integer, required, minimum: 0, maximum: 10000)*
1176
+ - `raw` *(number, required)*
1177
+ - `depth` *(rootCause, required)*
1178
+ - `score` *(integer, required, minimum: 0, maximum: 10000)*
1179
+ - `raw` *(number, required)*
1180
+ - `equality` *(rootCause, required)*
1181
+ - `score` *(integer, required, minimum: 0, maximum: 10000)*
1182
+ - `raw` *(number, required)*
1183
+ - `redundancy` *(rootCause, required)*
1184
+ - `score` *(integer, required, minimum: 0, maximum: 10000)*
1185
+ - `raw` *(number, required)*
1186
+ - `statistics` *(object, required)*
1187
+ - `files` *(integer or null, required)*
1188
+ - `lines` *(integer or null, required)*
1189
+ - `importEdges` *(integer or null, required)*
1190
+ - `crossModuleEdges` *(integer or null, required)*
1191
+ - `diagnostics` *(object or null, required)*
1192
+ - `comparison` *(comparison, optional)*
1193
+ - `comparable` *(boolean, required)*
1194
+ - `qualityDelta` *(integer or null, required)*
1195
+ - `rootCauseDeltas` *(object, required)*
1196
+ - `failedConditions` *(array<string>, optional)*
1197
+ - `status` *(string, required, enum: `PASS`, `FAIL`, `BLOCKED`, `NOT_OBSERVED`)*
1198
+ - `reasonCodes` *(array<string>, required)*
1199
+
1200
+ <!-- END FORGELOOP GENERATED: schema:structural-quality -->
1201
+
1202
+ For `BASELINE` artifacts and `PASS`/`FAIL` evaluations, `sourceMaterialFingerprint`
1203
+ and stable `sourceObservation` are conditionally required; their before and after
1204
+ fingerprints must equal the bound source fingerprint. `BLOCKED` and
1205
+ `NOT_OBSERVED` artifacts may omit these observed-source fields.
@@ -61,8 +61,8 @@ error codes. Default output and default JSON remain unchanged.
61
61
  | **Inspection & Diagnostics** | [`protocol-info`](#protocol-info), [`doctor`](#doctor), [`metrics`](#metrics), [`usage-record`](#usage-record), [`efficiency`](#efficiency), [`eval`](#eval), [`history`](#history), [`trace`](#trace), [`reflect`](#reflect), [`progress`](#progress), [`profile-interview`](#profile-interview), [`inspect`](#inspect), [`status`](#status), [`validate-state`](#validate-state), [`validate-protocol`](#validate-protocol) |
62
62
  | **Setup & Maintenance** | [`init`](#init), [`update`](#update), [`task-migrate`](#task-migrate), [`migrate-protocol`](#migrate-protocol), [`task-unlock`](#task-unlock), [`task-recover`](#task-recover), [`task-repair-legacy-recovery`](#task-repair-legacy-recovery), [`task-resume`](#task-resume) |
63
63
  | **Lifecycle & State** | [`activate`](#activate), [`route`](#route), [`preflight`](#preflight), [`advance`](#advance), [`next`](#next), [`record-diagnosis`](#record-diagnosis), [`record-intervention`](#record-intervention), [`record-hypothesis-disposition`](#record-hypothesis-disposition), [`record-decision-criterion`](#record-decision-criterion), [`complete`](#complete), [`clear-state`](#clear-state), [`reconcile-closure`](#reconcile-closure), [`task-create`](#task-create), [`task-list`](#task-list), [`task-show`](#task-show), [`task-lock-status`](#task-lock-status), [`task-scope`](#task-scope) |
64
+ | **Verification & Completion** | [`quality-baseline`](#quality-baseline), [`quality-verify`](#quality-verify), [`quality-status`](#quality-status), [`prepare-completion`](#prepare-completion), [`run-check`](#run-check), [`record-check`](#record-check), [`record-terminal-result`](#record-terminal-result), [`audit`](#audit), [`report`](#report), [`validate-receipt`](#validate-receipt), [`verify-scope`](#verify-scope) |
64
65
  | **Cross-Harness Continuity** | [`continuity`](#continuity), [`record-continuity`](#record-continuity), [`reconcile-continuity`](#reconcile-continuity), [`clear-continuity`](#clear-continuity), [`handoff-create`](#handoff-create), [`handoff-list`](#handoff-list), [`handoff-show`](#handoff-show) |
65
- | **Verification & Completion** | [`prepare-completion`](#prepare-completion), [`run-check`](#run-check), [`record-check`](#record-check), [`record-terminal-result`](#record-terminal-result), [`audit`](#audit), [`report`](#report), [`validate-receipt`](#validate-receipt), [`verify-scope`](#verify-scope) |
66
66
  | **Durable Actions & Approvals** | [`run-action`](#run-action), [`action-propose`](#action-propose), [`action-record`](#action-record), [`action-show`](#action-show), [`action-reconcile`](#action-reconcile), [`action-verify`](#action-verify), [`action-authorize`](#action-authorize), [`approval-request`](#approval-request), [`approval-resolve`](#approval-resolve) |
67
67
  | **Policy & Auditing** | [`policy`](#policy), [`policy-discover`](#policy-discover), [`policy-status`](#policy-status), [`policy-diff`](#policy-diff), [`rule-verify`](#rule-verify), [`baseline`](#baseline), [`bundle`](#bundle) |
68
68
  | **workspace** | [`workspace-bind`](#workspace-bind), [`workspace-status`](#workspace-status) |
@@ -1235,6 +1235,89 @@ Evaluates task progress across verification cycles and detects stalls determinis
1235
1235
 
1236
1236
  ## 5. Completion & Reporting
1237
1237
 
1238
+ ### `quality-baseline`
1239
+
1240
+ Captures the provider observation that becomes the task's structural-quality
1241
+ baseline.
1242
+
1243
+ - **Purpose**: Persist an immutable, task-bound structural-quality baseline before execution.
1244
+ - **When to use**: After a valid preflight checkpoint in `PLANNED`, before entering `EXECUTING`.
1245
+ - **Mutation**: Executes the configured provider, writes `baseline.json`, and appends a quality-baseline ledger event.
1246
+ - **Options**:
1247
+
1248
+ <!-- BEGIN FORGELOOP GENERATED: cli:quality-baseline:options -->
1249
+
1250
+ - `--path <directory>`: target project directory (default: current directory)
1251
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
1252
+ - `--replace`: replace a different baseline before EXECUTING
1253
+ - `--timeout-ms <number>`: bounded analyzer timeout in milliseconds
1254
+ - `--json`: emit baseline result as JSON
1255
+
1256
+ <!-- END FORGELOOP GENERATED: cli:quality-baseline:options -->
1257
+
1258
+ - **Example**:
1259
+
1260
+ ```bash
1261
+ forgeloop quality-baseline --task task-001 --json
1262
+ ```
1263
+
1264
+ Use `--replace` only for an intentional pre-execution baseline replacement.
1265
+ The superseded fingerprint remains in the append-only ledger. The command
1266
+ does not accept an executable path, shell fragment, arbitrary arguments, score,
1267
+ or baseline value.
1268
+
1269
+ ### `quality-verify`
1270
+
1271
+ Scans the current project through the configured structural-quality provider and
1272
+ compares it with the task baseline.
1273
+
1274
+ - **Purpose**: Record a current-cycle structural-quality evaluation and project it into the canonical `structural-quality` check.
1275
+ - **When to use**: In `VERIFYING`, before `REVIEWING`.
1276
+ - **Mutation**: Executes the configured provider, writes a typed evaluation, and records the bound check/evidence projection.
1277
+ - **Options**:
1278
+
1279
+ <!-- BEGIN FORGELOOP GENERATED: cli:quality-verify:options -->
1280
+
1281
+ - `--path <directory>`: target project directory (default: current directory)
1282
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
1283
+ - `--timeout-ms <number>`: bounded analyzer timeout in milliseconds
1284
+ - `--json`: emit structural-quality verification as JSON
1285
+
1286
+ <!-- END FORGELOOP GENERATED: cli:quality-verify:options -->
1287
+
1288
+ - **Example**:
1289
+
1290
+ ```bash
1291
+ forgeloop quality-verify --task task-001 --json
1292
+ ```
1293
+
1294
+ `PASS`, `FAIL`, `BLOCKED`, and `NOT_OBSERVED` remain distinct. A failed,
1295
+ unavailable, malformed, timed-out, truncated, stale, or incomparable provider
1296
+ result cannot become a passing check.
1297
+
1298
+ ### `quality-status`
1299
+
1300
+ Projects the persisted structural-quality evidence without launching a provider.
1301
+
1302
+ - **Purpose**: Inspect baseline, current-cycle status, policy comparison, and next guidance.
1303
+ - **When to use**: At any point when a read-only quality projection is needed.
1304
+ - **Mutation**: Read-only; it creates no provider process and writes no quality artifact.
1305
+ - **Options**:
1306
+
1307
+ <!-- BEGIN FORGELOOP GENERATED: cli:quality-status:options -->
1308
+
1309
+ - `--path <directory>`: target project directory (default: current directory)
1310
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
1311
+ - `--json`: emit persisted structural-quality status as JSON
1312
+
1313
+ <!-- END FORGELOOP GENERATED: cli:quality-status:options -->
1314
+
1315
+ - **Example**:
1316
+
1317
+ ```bash
1318
+ forgeloop quality-status --task task-001 --json
1319
+ ```
1320
+
1238
1321
  ### `prepare-completion`
1239
1322
 
1240
1323
  Initializes or refreshes `.forgeloop/task-state/<taskKey>/execution-receipt.json`.
@@ -0,0 +1,161 @@
1
+ # Knowledge sources and provenance
2
+
3
+ Snapshot date: 2026-09-01
4
+ Task: `luna-knowledge-pr-correction-20260901-v2`
5
+ Target: ForgeLoop 1.8.0 at current `main` state at review start
6
+ (`a4360ac9b24b19c74171fdbac3163b892d896484`, tag `v1.8.0`)
7
+
8
+ This ledger records research inputs for the knowledge-integration review. It is
9
+ not an endorsement list, a source-content mirror, or an evidence registry.
10
+
11
+ ## User-provided revised plan
12
+
13
+ Source: user-provided `FORGELOOP_LUNA_KNOWLEDGE_INTEGRATION_PLAN_REVISED.md`
14
+ Availability: task-local specification; not redistributed
15
+ Snapshot date: 2026-08-31
16
+ Revision/commit: not applicable
17
+ License observed: not applicable; user-provided task specification
18
+ Role: specification and curation boundary
19
+
20
+ Accepted concepts:
21
+
22
+ - candidate → coverage → proven gap → canonical home → minimal change →
23
+ proportional verification;
24
+ - explicit context-cost, change-class, licensing, and fail-closed decisions;
25
+ - execution-profile, provenance, lifecycle, and publication distinctions.
26
+
27
+ Skipped concepts:
28
+
29
+ - none of the plan's instructions were treated as external source material;
30
+ they define this task's scope and acceptance criteria.
31
+
32
+ Canonical homes:
33
+
34
+ - `docs/KNOWLEDGE_INTEGRATION_GAP_ANALYSIS.md` for decisions;
35
+ - `docs/KNOWLEDGE_SOURCES.md` for provenance;
36
+ - existing `ENG/` and protocol documents for operational rules.
37
+
38
+ Reuse notes:
39
+
40
+ - The attachment was used as a specification, not copied into a guide.
41
+
42
+ ## Learn UI
43
+
44
+ URL: [https://learn-ui.com/](https://learn-ui.com/) and the Markdown index at
45
+ [https://learn-ui.com/llms.txt](https://learn-ui.com/llms.txt)
46
+ Snapshot date: 2026-08-31
47
+ Revision/commit: not exposed by the inspected site
48
+ License observed: no reuse license was identified in the inspected index and
49
+ pages; reuse was therefore not assumed
50
+ Role: discovery and research-only
51
+
52
+ Accepted concepts:
53
+
54
+ - prompts to check focus lifecycle, semantic representation, component states,
55
+ feedback, reduced motion, responsive behavior, and perceived performance;
56
+ - independent, generalized guide refinements recorded in the gap matrix and
57
+ canonical accessibility/design guides.
58
+
59
+ Skipped concepts:
60
+
61
+ - source wording, examples, code, illustrations, page-specific constants,
62
+ visual recipes, and any source-exclusive taxonomy;
63
+ - any claim that the site supplies a license or authorizes redistribution.
64
+
65
+ Canonical homes:
66
+
67
+ - `ENG/accessibility-eng.md` for objective keyboard, focus, semantic, and
68
+ status guidance;
69
+ - `ENG/design-code-eng.md` for contextual component-state guidance;
70
+ - existing performance and testing guides where equivalent coverage already
71
+ exists.
72
+
73
+ Reuse notes:
74
+
75
+ - No Learn UI text, code, example, image, or diagram was vendored.
76
+ - The accepted wording was written from the concrete ForgeLoop gap and
77
+ corroborated with primary W3C/WAI/APG material where it became objective.
78
+
79
+ ## System Design Academy
80
+
81
+ URL: [https://github.com/systemdesign42/system-design-academy](https://github.com/systemdesign42/system-design-academy)
82
+ Snapshot date: 2026-08-31
83
+ Revision/commit: `62cca085d6f5d7df1cfaf72c81f7304be9b9386e` (`main` at snapshot)
84
+ License observed: `CC BY-NC-ND 4.0`, as declared by the repository license
85
+ Role: discovery-only
86
+
87
+ Accepted concepts:
88
+
89
+ - broad topic discovery for context engineering, state/recovery, evaluation,
90
+ retries/idempotency, and distributed-system boundaries;
91
+ - a prompt to verify each topic against ForgeLoop's existing canonical home.
92
+
93
+ Skipped concepts:
94
+
95
+ - all source-specific articles, prose, examples, diagrams, taxonomies, and
96
+ adaptations;
97
+ - new protocol, router, profile, schema, evidence, or orchestration behavior;
98
+ - a parallel knowledge library or technology-specific guide.
99
+
100
+ Canonical homes:
101
+
102
+ - existing `LOOP_SYSTEM_DESIGN.md`, `EXECUTION_STATE.md`,
103
+ `PROTOCOL_INTEGRATION.md`, `GUIDE_ROUTER.md`, `QUALITY_SCORECARD.md`,
104
+ `docs/EXECUTION_PROFILE_BENCHMARKS.md`, and current `ENG/` guides.
105
+
106
+ Reuse notes:
107
+
108
+ - This repository was used only to discover generic candidate topics.
109
+ - Nothing from the repository was copied, translated, closely paraphrased,
110
+ diagrammed, or adapted.
111
+
112
+ ## W3C, WAI, and WAI-ARIA APG
113
+
114
+ URLs: [WCAG 2.2](https://www.w3.org/TR/WCAG22/), [APG](https://www.w3.org/WAI/ARIA/apg/),
115
+ [keyboard interface](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/),
116
+ [dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/),
117
+ [focus visible](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html),
118
+ [reflow](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html),
119
+ [animation from interactions](https://www.w3.org/WAI/WCAG22/Understanding/animation-from-interactions.html),
120
+ and [status technique](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA22.html)
121
+ Snapshot date: 2026-08-31
122
+ Revision/commit: current web pages; no repository revision used
123
+ License observed: primary standards/reference pages; no source text was
124
+ reproduced
125
+ Role: normative corroboration
126
+
127
+ Accepted concepts:
128
+
129
+ - keyboard operation and focus order;
130
+ - focus visibility, dialog focus management, reflow, reduced-motion, and
131
+ status-announcement boundaries;
132
+ - the distinction between automated checks and human assistive-technology
133
+ evaluation.
134
+
135
+ Skipped concepts:
136
+
137
+ - copying normative prose or presenting guide checks as certification;
138
+ - claims of legal compliance, conformance, or human testing without scoped
139
+ evidence.
140
+
141
+ Canonical homes:
142
+
143
+ - `ENG/accessibility-eng.md` for implementation guidance;
144
+ - `ENG/test-code-eng.md` for the automation-plus-human verification boundary.
145
+
146
+ Reuse notes:
147
+
148
+ - Links are retained for corroboration; no standards text, test result, or
149
+ certification claim is embedded.
150
+
151
+ ## Cross-source reuse boundary
152
+
153
+ - No source text, source code, source examples, diagrams, or images are stored
154
+ in this repository as a result of this review.
155
+ - External ideas remain research inputs until independently abstracted,
156
+ mapped to a current canonical home, and supported by a proven operational
157
+ gap.
158
+ - Subjective judgments such as “premium,” “polished,” or “sophisticated” stay
159
+ advisory and cannot become completion evidence.
160
+ - Licensing status is recorded only as observed at the snapshot; it is not
161
+ inferred, upgraded, or used as permission to redistribute material.
package/docs/MCP.md CHANGED
@@ -119,7 +119,7 @@ forgeloop-mcp-http --project /repo --mode safe # 127.0.0.1:3333
119
119
 
120
120
  | Component | Current contract |
121
121
  | --- | --- |
122
- | ForgeLoop core package | `>=1.5.0 <2` dependency range; current repository generation `1.8.x` |
122
+ | ForgeLoop core package | `>=1.5.0 <2` dependency range; current repository generation `1.9.x` |
123
123
  | ForgeLoop protocol | `1` |
124
124
  | Integration API | `1` |
125
125
  | MCP package | `0.1.x` initial package |
package/docs/RECIPES.md CHANGED
@@ -28,6 +28,7 @@ Concise, copy-paste friendly recipes for common ForgeLoop tasks.
28
28
  20. [Configure Trusted Narrow Verification](#recipe-20--configure-trusted-narrow-verification)
29
29
  21. [Generate and Verify Code Attestation](#recipe-21--generate-and-verify-code-attestation)
30
30
  22. [Verify a Revision Range](#recipe-22--verify-a-revision-range)
31
+ 23. [Run Structural Quality Feedback](#recipe-23--run-structural-quality-feedback)
31
32
 
32
33
  ---
33
34
 
@@ -551,6 +552,36 @@ coverage gap or conflicting task digest is invalid; provider or invocation
551
552
  failure is an error. This post-completion range result is distinct from the
552
553
  pre-completion verification scope used by one checker.
553
554
 
555
+ ---
556
+
557
+ ### Recipe 23 — Run Structural Quality Feedback
558
+
559
+ Enable `structuralQuality` in `.forgeloop/config.json` with `observe` for
560
+ non-blocking evidence or `gate` for a completion requirement. The configured
561
+ provider is selected by name; executable paths and shell fragments are not
562
+ accepted.
563
+
564
+ ```bash
565
+ # Capture after planning and before execution.
566
+ forgeloop quality-baseline --task task-001 --json
567
+
568
+ # Enter the normal lifecycle and evaluate the current verification cycle.
569
+ forgeloop advance --task task-001 --to EXECUTING --json
570
+ forgeloop advance --task task-001 --to VERIFYING --json
571
+ forgeloop quality-verify --task task-001 --json
572
+
573
+ # Inspect evidence without starting the provider.
574
+ forgeloop quality-status --task task-001 --json
575
+ ```
576
+
577
+ In `gate` mode, a failed comparison follows the existing
578
+ `VERIFYING -> DIAGNOSING -> CORRECTING -> VERIFYING` loop. Record a diagnosis
579
+ from the evaluation artifact before correcting code. In `observe` mode,
580
+ unavailable or incomparable evidence remains visible as `NOT_OBSERVED` and
581
+ does not block completion by itself. See
582
+ [`STRUCTURAL_QUALITY.md`](./STRUCTURAL_QUALITY.md) for policy, provider,
583
+ Sentrux, bundle, and error-code details.
584
+
554
585
  ## Run ForgeLoop through MCP (safe mode)
555
586
 
556
587
  Start the local MCP adapter and inspect what it exposes: