@cassiomc1/forgeloop 0.1.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 (63) hide show
  1. package/.cursor/rules/project-loop.mdc +18 -0
  2. package/.forgeloop/.gitignore +2 -0
  3. package/.github/copilot-instructions.md +16 -0
  4. package/AGENTS.md +16 -0
  5. package/AGENT_COMPATIBILITY.md +147 -0
  6. package/CLAUDE.md +14 -0
  7. package/CONTRACT_COVERAGE.md +27 -0
  8. package/DELEGATION_PROTOCOL.md +91 -0
  9. package/ENG/accessibility-eng.md +155 -0
  10. package/ENG/clean-code-eng.md +223 -0
  11. package/ENG/design-code-eng.md +511 -0
  12. package/ENG/games-code-design-web-eng.md +751 -0
  13. package/ENG/perf-code-eng.md +441 -0
  14. package/ENG/premium-sites-studio-eng.md +320 -0
  15. package/ENG/sec-code-eng.md +706 -0
  16. package/ENG/test-code-eng.md +257 -0
  17. package/EXECUTION_STATE.md +107 -0
  18. package/GUIDE_ROUTER.md +274 -0
  19. package/LICENSE +21 -0
  20. package/LICENSE-DOCS.md +13 -0
  21. package/LOOP_ENGINEERING.md +551 -0
  22. package/LOOP_SYSTEM_DESIGN.md +394 -0
  23. package/ORCHESTRATOR_INTEGRATION.md +106 -0
  24. package/PROJECT_PROFILE.md +124 -0
  25. package/QUALITY_SCORECARD.md +54 -0
  26. package/README.md +492 -0
  27. package/TERMINOLOGY.md +21 -0
  28. package/THIRD_PARTY_NOTICES.md +129 -0
  29. package/THREAT_MODEL.md +35 -0
  30. package/package.json +51 -0
  31. package/schemas/delegated-result.schema.json +33 -0
  32. package/schemas/evidence.schema.json +15 -0
  33. package/schemas/execution-receipt.schema.json +46 -0
  34. package/schemas/routing-input.schema.json +17 -0
  35. package/schemas/routing-result.schema.json +17 -0
  36. package/schemas/task-brief.schema.json +24 -0
  37. package/schemas/work-state.schema.json +46 -0
  38. package/src/cli.js +341 -0
  39. package/src/commands/clear-state.js +11 -0
  40. package/src/commands/doctor.js +165 -0
  41. package/src/commands/init.js +42 -0
  42. package/src/commands/inspect.js +17 -0
  43. package/src/commands/route.js +32 -0
  44. package/src/commands/status.js +29 -0
  45. package/src/commands/update.js +109 -0
  46. package/src/commands/validate-protocol.js +133 -0
  47. package/src/commands/validate-receipt.js +19 -0
  48. package/src/commands/validate-state.js +30 -0
  49. package/src/core/agent-support.js +89 -0
  50. package/src/core/conformance.js +133 -0
  51. package/src/core/delegation.js +283 -0
  52. package/src/core/evidence.js +56 -0
  53. package/src/core/filesystem.js +122 -0
  54. package/src/core/inspect.js +115 -0
  55. package/src/core/json-safety.js +54 -0
  56. package/src/core/manifest.js +75 -0
  57. package/src/core/protocol.js +81 -0
  58. package/src/core/receipt.js +129 -0
  59. package/src/core/repository.js +19 -0
  60. package/src/core/router.js +296 -0
  61. package/src/core/schema-validation.js +179 -0
  62. package/src/core/templates.js +56 -0
  63. package/src/core/work-state.js +471 -0
package/README.md ADDED
@@ -0,0 +1,492 @@
1
+ # ForgeLoop — Instruction Guides for AI Agents
2
+
3
+ [![Docs quality](https://github.com/cassiomc1/mdfiles/actions/workflows/docs-quality.yml/badge.svg?branch=main)](https://github.com/cassiomc1/mdfiles/actions/workflows/docs-quality.yml)
4
+
5
+ An English-only collection of operational guides for AI agents and developers.
6
+ It covers product strategy, code, testing, security, performance,
7
+ accessibility, design, and web games across web, mobile, and desktop projects.
8
+
9
+ The files are Markdown and can be used as references, as a foundation for
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.
14
+
15
+ ForgeLoop is the portable, evidence-first loop that connects deterministic
16
+ routing, checkpointed state, observable evidence, conformance, and delegation
17
+ for compatible agent harnesses.
18
+
19
+ ## Catalog
20
+
21
+ | Topic | When to use it | Guide |
22
+ | --- | --- | --- |
23
+ | Premium websites | End-to-end process from strategy to launch | [`premium-sites-studio-eng.md`](./ENG/premium-sites-studio-eng.md) |
24
+ | Clean code | Readable, observable, secure, and operable code | [`clean-code-eng.md`](./ENG/clean-code-eng.md) |
25
+ | Testing | Risk-based testing strategy | [`test-code-eng.md`](./ENG/test-code-eng.md) |
26
+ | Security | Web, mobile, desktop, APIs, and supply chain | [`sec-code-eng.md`](./ENG/sec-code-eng.md) |
27
+ | Design | Visual direction, UX, motion, and perceived performance | [`design-code-eng.md`](./ENG/design-code-eng.md) |
28
+ | Performance | Measurement, diagnosis, budgets, and optimization | [`perf-code-eng.md`](./ENG/perf-code-eng.md) |
29
+ | Accessibility | WCAG 2.2-oriented protocol for interfaces | [`accessibility-eng.md`](./ENG/accessibility-eng.md) |
30
+ | Web games | Architecture, design, and operation of 2D, 3D, and procedural games | [`games-code-design-web-eng.md`](./ENG/games-code-design-web-eng.md) |
31
+
32
+ Each guide declares its name, `language: en`, description, version, and review
33
+ date in frontmatter. The repository validator checks that the guide metadata
34
+ and catalog remain synchronized.
35
+
36
+ ## Universal project loop
37
+
38
+ The kit turns each request into a verifiable cycle: discover the project,
39
+ define an execution contract, select applicable guides, execute, verify,
40
+ diagnose, and correct until success or a genuine external blocker.
41
+ [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is the operational source;
42
+ [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) prevents irrelevant context from being
43
+ loaded; and [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) preserves only durable,
44
+ proven project facts.
45
+
46
+ The canonical system map, including the routing/state/evidence architecture, is
47
+ in [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
48
+
49
+ ```mermaid
50
+ flowchart TB
51
+ root["FORGELOOP"]
52
+
53
+ subgraph surfaces["CONTROL SURFACES"]
54
+ direction LR
55
+ routing["ROUTING"] --> routingFacts["deterministic<br/>decisions"]
56
+ state["STATE"] --> checkpoint["checkpoint<br/>facts"]
57
+ evidence["EVIDENCE"] --> claims["observable<br/>claims"]
58
+
59
+ checkpoint --> repository["repository"]
60
+ checkpoint --> contract["contract"]
61
+ repository --> freshness["freshness"]
62
+ contract --> freshness
63
+ end
64
+
65
+ root --> routing
66
+ root --> state
67
+ root --> evidence
68
+
69
+ routingFacts --> conformance["CONFORMANCE"]
70
+ routingFacts --> delegation["DELEGATION"]
71
+ freshness --> conformance
72
+ freshness --> delegation
73
+ claims --> conformance
74
+ claims --> delegation
75
+
76
+ conformance --> verdict["VALID / STALE / INVALID"]
77
+ delegation --> verdict
78
+ verdict --> harness["compatible harness"]
79
+
80
+ classDef root fill:#08090C,stroke:#6E6AF5,stroke-width:3px,color:#EDEEF0;
81
+ classDef routing fill:#4F46E5,stroke:#A5B4FC,stroke-width:2px,color:#FFFFFF;
82
+ classDef state fill:#373A46,stroke:#A1A1AA,stroke-width:2px,color:#FFFFFF;
83
+ classDef evidence fill:#3EDBB8,stroke:#99F6E4,stroke-width:2px,color:#08090C;
84
+ classDef fact fill:#181B24,stroke:#6E6AF5,stroke-width:1px,color:#EDEEF0;
85
+ classDef support fill:#181B24,stroke:#8A8F98,stroke-width:1px,color:#EDEEF0;
86
+ classDef gate fill:#3730A3,stroke:#A5B4FC,stroke-width:2px,color:#FFFFFF;
87
+ classDef result fill:#C9A876,stroke:#F5D9A6,stroke-width:2px,color:#08090C;
88
+ classDef harness fill:#101218,stroke:#3EDBB8,stroke-width:2px,color:#EDEEF0;
89
+
90
+ class root root;
91
+ class routing,routingFacts routing;
92
+ class state,checkpoint state;
93
+ class evidence,claims evidence;
94
+ class repository,contract,freshness fact;
95
+ class conformance,delegation gate;
96
+ class verdict result;
97
+ class harness harness;
98
+ style surfaces fill:#101218,stroke:#2D3340,stroke-width:1px,color:#EDEEF0;
99
+ linkStyle default stroke:#8A8F98,stroke-width:1.5px;
100
+ ```
101
+
102
+ Equivalent reading for text-only environments: ForgeLoop turns routing into
103
+ deterministic decisions, state into checkpoint facts, and evidence into
104
+ observable claims. Repository and contract facts establish freshness; all
105
+ three control surfaces feed conformance and delegation, which produce a
106
+ `VALID`, `STALE`, or `INVALID` result for the compatible harness.
107
+
108
+ The operational request loop remains:
109
+
110
+ ```text
111
+ Request → discovery → profile → routing → plan → execution
112
+ → verification → correction when needed → final evidence
113
+ ```
114
+
115
+ Thin native adapters support Codex, Claude Code, Cursor, and GitHub Copilot.
116
+ Antigravity, OpenCode, Hermes, Pi, Command Code, and Freebuff use the shared
117
+ `AGENTS.md` entry point. All ten agents delegate to the same canonical
118
+ documents; see [`AGENT_COMPATIBILITY.md`](./AGENT_COMPATIBILITY.md) for the
119
+ official sources and precedence notes.
120
+
121
+ ### Use with npm
122
+
123
+ The npm CLI targets Node.js 20 or newer and installs the kit into an existing
124
+ project without overwriting local instructions. When the package is available
125
+ in the npm registry, use the commands below; otherwise use the repository
126
+ checkout fallback.
127
+
128
+ ```bash
129
+ npx @cassiomc1/forgeloop init
130
+ npx @cassiomc1/forgeloop doctor
131
+ npx @cassiomc1/forgeloop update
132
+ ```
133
+
134
+ Protocol-support commands are local and do not invoke an agent or model:
135
+
136
+ ```bash
137
+ npx @cassiomc1/forgeloop route --work complete-website --surface ui --risk untrusted-input
138
+ npx @cassiomc1/forgeloop inspect --json
139
+ npx @cassiomc1/forgeloop status --json
140
+ npx @cassiomc1/forgeloop status --contract-file .forgeloop/current-contract.json --json
141
+ npx @cassiomc1/forgeloop validate-state --json
142
+ npx @cassiomc1/forgeloop validate-receipt --file ./execution-receipt.json --json
143
+ npx @cassiomc1/forgeloop validate-protocol --route-file ./routing-result.json --state-file .forgeloop/work-state.json --receipt-file ./execution-receipt.json --contract-file .forgeloop/current-contract.json --json
144
+ ```
145
+
146
+ `route` expands declared signals into deterministic guide IDs and reason codes.
147
+ `inspect`, `status`, and `validate-state` explain installation and resumable
148
+ state; they do not execute commands from the target profile.
149
+ `inspect` and `status` parse the target-local schemas and report `valid`,
150
+ `missing`, `invalid`, or `unsupported-version` health. A status without a
151
+ current contract file reports contract comparison as `NOT_VERIFIED` and does
152
+ not claim full freshness. `validate-protocol` is read-only and checks
153
+ cross-artifact relationships plus the same derived freshness classification
154
+ used by `inspect` and `status`. Supply `--contract-file` to compare the saved
155
+ contract fingerprint with the current contract; omitting it leaves contract
156
+ freshness as `NOT_VERIFIED` and a complete artifact set requires revalidation.
157
+ It returns `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID` with
158
+ exact invariant codes and derived stale reasons. The persisted
159
+ `.forgeloop/work-state.json` schema is unchanged: `status`, `stale`, and `fresh`
160
+ are never stored in that file. Status precedence is `INVALID` > `INCONSISTENT`
161
+ > `STALE` > `INCOMPLETE` > `VALID`.
162
+ All protocol-support commands are local and offline-capable by default; the
163
+ package sends no telemetry and has no central trace service.
164
+ Capability gaps and inline/non-Git degraded mode are defined in
165
+ [`AGENT_COMPATIBILITY.md`](./AGENT_COMPATIBILITY.md); they are reported as
166
+ limitations rather than treated as silent successes.
167
+
168
+ ### Protocol compatibility
169
+
170
+ The npm package version is independent of protocol version. The current
171
+ serializable artifact contract is `schemaVersion: 1` and `protocolVersion: 1`.
172
+
173
+ - Patch releases preserve the v1 schemas, enums, transitions, and existing
174
+ command contracts while correcting implementation defects.
175
+ - Minor releases preserve existing v1 artifacts and commands; they may add
176
+ documentation, new commands, new guide IDs, or a new explicitly named
177
+ schema. Existing consumers must still reject unknown fields rather than
178
+ silently treating an unrecognized artifact as valid.
179
+ - Major releases may change required fields, enums, transitions, or safety
180
+ semantics and must document migration requirements together with a protocol
181
+ version change.
182
+
183
+ The compatibility fixture in
184
+ [`tests/fixtures/compatibility/protocol-v1.json`](./tests/fixtures/compatibility/protocol-v1.json)
185
+ is a small conformance marker, not a runtime configuration file.
186
+
187
+ ### CLI security and trust boundaries
188
+
189
+ The CLI is a local validator and installer. It does not execute instructions,
190
+ profile commands, receipt data, state data, or hidden prompts supplied by a
191
+ target project. Its main threat boundaries are:
192
+
193
+ | Threat | Mitigation or accepted limit |
194
+ | --- | --- |
195
+ | Path traversal and symlink escape | Target and managed paths use safe-path and realpath containment checks; a symlinked target or escaped child is rejected. |
196
+ | Manifest tampering | Managed-file hashes and manifest shape are checked by `doctor`; discrepancies become findings rather than silent overwrites. |
197
+ | Untrusted state or profile data | JSON schemas, semantic checks, secret-like field checks, and non-execution rules apply before state or profile data is used. |
198
+ | Command injection | Git inspection uses fixed arguments without a shell; the CLI never treats project text as a command. |
199
+ | Data exposure | Receipts and checkpoints reject secret-like keys and values; examples use placeholders, and the repository secret scanner runs in CI. |
200
+ | Unsafe update overwrite | `update` preserves locally modified files and `PROJECT_PROFILE.md`; adoption and writes remain bounded to the selected target. |
201
+ | Dependency supply chain | Runtime code uses Node built-ins only; the package does not install agents, providers, plugins, or remote services. |
202
+ | Stale replay | Work state records contract and repository fingerprints; drift requires revalidation and never reruns destructive or publication actions automatically. |
203
+ | Unverified publication | Receipts carry explicit publication booleans; local success never implies a push, pull request, merge, release, or deployment. |
204
+
205
+ The full boundary inventory, residual limitations, and executable evidence are
206
+ in [`THREAT_MODEL.md`](./THREAT_MODEL.md).
207
+
208
+ The CLI cannot protect a target from a separately privileged or hostile process
209
+ that changes the filesystem after validation. Consumers must still review
210
+ permissions, package provenance, and external actions before granting authority.
211
+
212
+ From a repository checkout before npm publication, run the same commands with
213
+ Node directly:
214
+
215
+ ```bash
216
+ node src/cli.js init
217
+ node src/cli.js doctor
218
+ node src/cli.js update
219
+ ```
220
+
221
+ The release workflow uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
222
+ through GitHub Actions OIDC. Before the first release, register this repository
223
+ and workflow as the package's trusted publisher in npm; each `vX.Y.Z` tag must
224
+ match `package.json`. After publishing, verify the package version and its npm
225
+ provenance record.
226
+
227
+ The commands above use the current directory. To install into another existing
228
+ project directory, pass a relative or absolute `--path`:
229
+
230
+ ```bash
231
+ # Existing project relative to the current directory
232
+ npx @cassiomc1/forgeloop init --path ./my-project
233
+ npx @cassiomc1/forgeloop doctor --path ./my-project
234
+ npx @cassiomc1/forgeloop update --path ./my-project
235
+
236
+ # Existing project at an absolute path
237
+ npx @cassiomc1/forgeloop init --path /path/to/my-project
238
+ npx @cassiomc1/forgeloop doctor --path /path/to/my-project
239
+ npx @cassiomc1/forgeloop update --path /path/to/my-project
240
+ ```
241
+
242
+ The target must already exist and be a directory; the CLI will not create or
243
+ replace an arbitrary path. Use `--dry-run` to preview writes before `init` or
244
+ `update`. `--json`, `--strict`, and `--adopt <path>` are supported by `doctor`;
245
+ adoption is limited to a supported adapter that has been reviewed locally. The
246
+ CLI records managed files and their hashes in `.forgeloop/manifest.json`; `update`
247
+ leaves locally modified files and `PROJECT_PROFILE.md` untouched. If a target
248
+ already has a manifest, rerun `update` instead of `init`. Symlinked targets or
249
+ template parents are rejected, and unadopted pre-existing adapters are reported
250
+ for manual merge with the loop reference.
251
+
252
+ ### Migrate an existing mdfiles installation
253
+
254
+ The ForgeLoop rename changes the target metadata namespace. From the existing
255
+ project root, move the directory manually and refresh its manifest:
256
+
257
+ ```bash
258
+ mv .mdfiles .forgeloop
259
+ npx @cassiomc1/forgeloop update
260
+ ```
261
+
262
+ ForgeLoop does not automatically migrate, dual-write, or delete a legacy
263
+ `.mdfiles` directory. The serialized contract remains `schemaVersion: 1` and
264
+ `protocolVersion: 1`; only the package, CLI, and target namespace change.
265
+
266
+ ### Install in a target project
267
+
268
+ If npm is unavailable, download this public repository as a ZIP or clone it
269
+ into a temporary directory. Copy this structure to the target project's root
270
+ while preserving relative paths:
271
+
272
+ ```text
273
+ AGENTS.md
274
+ CLAUDE.md
275
+ AGENT_COMPATIBILITY.md
276
+ LOOP_ENGINEERING.md
277
+ GUIDE_ROUTER.md
278
+ PROJECT_PROFILE.md
279
+ LOOP_SYSTEM_DESIGN.md
280
+ QUALITY_SCORECARD.md
281
+ TERMINOLOGY.md
282
+ EXECUTION_STATE.md
283
+ DELEGATION_PROTOCOL.md
284
+ ORCHESTRATOR_INTEGRATION.md
285
+ THREAT_MODEL.md
286
+ CONTRACT_COVERAGE.md
287
+ THIRD_PARTY_NOTICES.md
288
+ LICENSE
289
+ LICENSE-DOCS.md
290
+ .forgeloop/.gitignore
291
+ .github/copilot-instructions.md
292
+ .cursor/rules/project-loop.mdc
293
+ ENG/
294
+ schemas/
295
+ ```
296
+
297
+ If the target already has `AGENTS.md`, `CLAUDE.md`, Copilot instructions, or
298
+ Cursor rules, merge only the adapter block that points to the loop. Never
299
+ overwrite specific local instructions. The `scripts/`, `.github/workflows/`,
300
+ and quality configuration files are optional for kit consumers but required to
301
+ maintain and validate this source repository.
302
+
303
+ ### First run
304
+
305
+ On the first task in a target project with code or manifests, change
306
+ `profile-mode` from `template` to `project`, discover the stack, and record only
307
+ confirmed facts in `PROJECT_PROFILE.md`. Keep `language: en`.
308
+
309
+ The profile must not store tokens, passwords, keys, credentials, or task logs.
310
+ Unknown commands remain unverified until a real source identifies them.
311
+
312
+ To confirm activation before the first implementation, ask the agent:
313
+
314
+ ```text
315
+ Before implementing, report the confirmed project profile, the guide IDs
316
+ selected through GUIDE_ROUTER.md, and the checks you will use. Do not change
317
+ files yet.
318
+ ```
319
+
320
+ A useful response cites profile evidence, selected guide IDs, and real project
321
+ commands. A generic response that does not mention the loop, router, or sources
322
+ indicates that the adapter was not loaded.
323
+
324
+ After installation, start the preferred agent from the target project
325
+ directory. Use `AGENT_COMPATIBILITY.md` to confirm which file it should load and
326
+ which native entry point is expected. A live agent session is not required for
327
+ package installation or its automated tests.
328
+
329
+ ### Update the kit
330
+
331
+ When adopting a newer version, preserve target-specific facts from
332
+ `PROJECT_PROFILE.md`. Compare adapters before replacing them, update the loop,
333
+ router, notices, and guides as one coherent set, and never erase local
334
+ instructions. If validators were copied, run:
335
+
336
+ ```bash
337
+ python3 scripts/validate_loop_system.py --self-test
338
+ python3 scripts/validate_loop_system.py
339
+ python3 scripts/scan_secrets.py
340
+ ```
341
+
342
+ When maintaining a checkout of this source repository, run the npm package
343
+ checks as well:
344
+
345
+ ```bash
346
+ npm test
347
+ npm run pack:check
348
+ ```
349
+
350
+ Architecture and boundaries are documented in
351
+ [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
352
+
353
+ ## Tool approval policy
354
+
355
+ Identify the stack, current stage, and applicable checks. Prefer an equivalent
356
+ tool already available when it produces compatible evidence. The task-scoped
357
+ Qwen-MM-Plugins installation described below is the narrow capability exception
358
+ when a required capability is missing; system tools, credentials, and unrelated
359
+ environment changes remain subject to their normal host controls. If a required
360
+ check cannot run and no safe alternative exists, record the blocker and do not
361
+ claim that the check passed. Unrelated optional references must never be
362
+ installed automatically.
363
+
364
+ ## Optional multimodal capabilities
365
+
366
+ [Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins) can extend a
367
+ supported agent harness with skills and optional MCP servers. Before using a
368
+ multimodal or media operation, the agent checks the model and harness for a
369
+ callable native capability. If the task requires a missing keyless capability,
370
+ the agent installs only the smallest matching `qwen-mm-plugins-<cap>` capability
371
+ and verifies that it is callable before continuing; it does not install every
372
+ capability at startup.
373
+
374
+ No API key is used by default for native image, video, or document reading.
375
+ Optional provider-backed operations follow this boundary:
376
+
377
+ | Capability or operation | Configuration required |
378
+ | --- | --- |
379
+ | Native image, video, and document reading | No API key; video/audio workflows may need `ffmpeg` and other documented system tools |
380
+ | Vision chat, OCR, grounding, audio transcription, Omni audio-video understanding, generation, and video-memory construction | `DASHSCOPE_API_KEY` |
381
+ | Web search, web extraction, and image search | `SERPER_API_KEY` |
382
+ | Segmentation through a SAM3 service | `SAM3_SERVER_URL` |
383
+ | Blender, FreeCAD, Office, browser-backed visualization, and `edu-agent` workflows | The selected application's system dependencies and upstream configuration; `edu-agent` TTS requires `DASHSCOPE_API_KEY` |
384
+
385
+ Provide optional credentials through the process environment or the official
386
+ Qwen configuration file at `~/.qwen-mm-plugins/config` (or its documented
387
+ override). Never put keys in Git, `PROJECT_PROFILE.md`, or copied instruction
388
+ files. The agent must leave an API-backed capability disabled when its key or
389
+ service endpoint is absent, and report missing system dependencies instead of
390
+ claiming that the feature is available.
391
+
392
+ Use the upstream [installation guide](https://github.com/QwenLM/Qwen-MM-Plugins/blob/main/docs/en/installation.md)
393
+ for the active harness's current install and verification commands, supported
394
+ capabilities, system dependencies, and Windows/WSL2 constraints. This project
395
+ does not vendor Qwen code, add it to the npm package, or install it through
396
+ `forgeloop init`, `update`, or `doctor`.
397
+
398
+ ## HyperFrames for video and motion
399
+
400
+ [HyperFrames](https://hyperframes.heygen.com) is an option for deterministic
401
+ HTML, CSS, and JavaScript-based trailers, demos, presentations, and motion
402
+ graphics. It complements the design, accessibility, performance, and testing
403
+ guides; it does not replace those checks. Review the
404
+ [quickstart](https://hyperframes.heygen.com/quickstart) and
405
+ [CLI documentation](https://hyperframes.heygen.com/packages/cli) before
406
+ adoption. Local rendering requires Node.js 22+ and FFmpeg.
407
+
408
+ ## Structure
409
+
410
+ ```text
411
+ .
412
+ ├── AGENTS.md # shared Codex-compatible entry point
413
+ ├── CLAUDE.md # Claude Code entry point
414
+ ├── AGENT_COMPATIBILITY.md # supported agents and official sources
415
+ ├── LOOP_ENGINEERING.md # canonical operating cycle
416
+ ├── GUIDE_ROUTER.md # contextual guide selection
417
+ ├── PROJECT_PROFILE.md # verified project facts
418
+ ├── LOOP_SYSTEM_DESIGN.md # architecture and boundaries
419
+ ├── THIRD_PARTY_NOTICES.md # provenance and rights
420
+ ├── LICENSE # CLI and validator code license
421
+ ├── LICENSE-DOCS.md # original documentation license boundary
422
+ ├── ENG/ # eight English guides
423
+ ├── .cursor/rules/ # always-active Cursor rule
424
+ ├── .github/copilot-instructions.md # GitHub Copilot entry point
425
+ ├── .github/workflows/ # quality automation
426
+ ├── scripts/ # structural, language, and secret checks
427
+ ├── tests/ # validator regression tests
428
+ ├── src/ # npm CLI implementation
429
+ ├── .gitignore # ignored local files
430
+ ├── .lychee.toml # link-check configuration
431
+ ├── .markdownlint-cli2.jsonc # Markdown rules
432
+ └── README.md
433
+ ```
434
+
435
+ ## Maintenance
436
+
437
+ - Preserve guide requirements, exceptions, numbers, examples, and references when editing.
438
+ - Update `version` and `last-reviewed` when a guide's normative content changes.
439
+ - Verify that relative links remain inside the repository.
440
+ - Keep root instructions, comments, examples, fixtures, and guide content in English.
441
+ - Keep `THIRD_PARTY_NOTICES.md` with every distributed copy of the kit.
442
+
443
+ ### Workflow quality gates
444
+
445
+ For non-trivial behavior changes, use the proportional design, plan, test, and
446
+ review gates in [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md). Keep adapters
447
+ and entry-point instructions thin so the canonical workflow stays in one place.
448
+
449
+ ### Local checks
450
+
451
+ First check whether the Markdown linter is already installed:
452
+
453
+ ```bash
454
+ command -v markdownlint-cli2
455
+ ```
456
+
457
+ When it is available, run it directly without downloading anything:
458
+
459
+ ```bash
460
+ markdownlint-cli2
461
+ ```
462
+
463
+ If it is missing, request approval before running this pinned one-off download:
464
+
465
+ ```bash
466
+ npx --yes markdownlint-cli2@0.23.2
467
+ ```
468
+
469
+ In a checkout of this source repository, run the repository validators with
470
+ Python's standard library:
471
+
472
+ ```bash
473
+ python3 scripts/validate_loop_system.py --self-test
474
+ python3 scripts/validate_loop_system.py
475
+ python3 scripts/validate_markdown.py --self-test
476
+ python3 scripts/validate_markdown.py
477
+ python3 -m unittest discover -s tests -v
478
+ python3 scripts/scan_secrets.py
479
+ ```
480
+
481
+ The [Docs quality workflow](./.github/workflows/docs-quality.yml) also checks
482
+ Markdown, links, frontmatter, unique names, code fences, relative links,
483
+ adapters, the guide catalog, routing scenarios, and secret-shaped values on
484
+ pushes and pull requests.
485
+
486
+ ## Rights and provenance
487
+
488
+ The CLI and validator code use the MIT text in [`LICENSE`](./LICENSE). Original
489
+ documentation uses CC BY 4.0 as described in [`LICENSE-DOCS.md`](./LICENSE-DOCS.md),
490
+ and adapted or externally sourced material remains subject to the conditions in
491
+ [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md). The npm `license` field
492
+ points to the code license; it does not relicense the bundled documentation.
package/TERMINOLOGY.md ADDED
@@ -0,0 +1,21 @@
1
+ # ForgeLoop terminology
2
+
3
+ | Term | Meaning |
4
+ | --- | --- |
5
+ | Adapter | A thin native instruction entry file that points an agent to the canonical protocol. |
6
+ | Guide | A focused technical Markdown document selected for a task surface or risk. |
7
+ | Route | The deterministic guide set produced after an agent declares routing signals. |
8
+ | Contract | The observable objective, deliverables, constraints, risks, verification, authority, and stop condition for a task. |
9
+ | Checkpoint | A validated local snapshot of compatible work state stored under `.forgeloop`. |
10
+ | Receipt | A structured, secret-free summary of changes, checks, review, limitations, and publication state. |
11
+ | Review | A specification and implementation quality check performed after verification. |
12
+ | Independent review | A review performed by an identity different from the implementer and explicitly marked independent. |
13
+ | Blocker | A genuine condition that prevents safe progress and has a category and evidence. |
14
+ | Capability | A model, harness, tool, or system feature required by a scoped operation. |
15
+ | Authority | The explicit permission and target boundary for a destructive or external action. |
16
+ | Publication | Push, pull request, merge, release, or deployment; none is implied by local success. |
17
+ | Portable protocol | A serializable, framework-neutral contract that compatible agents can execute in their own harness. |
18
+ | Runtime | A process that owns execution, scheduling, model calls, or persistence; `ForgeLoop` intentionally does not provide one. |
19
+ | Evidence kind | One of `OBSERVED`, `INFERRED`, `NOT_VERIFIED`, or `BLOCKED`; evidence never upgrades an unverified claim by itself. |
20
+ | Required artifact | A checkpoint-recorded relative path and SHA-256 hash that must still match before resume. |
21
+ | Conformance | Relationship validation across route, state, receipt, task brief, and delegated-result artifacts. |
@@ -0,0 +1,129 @@
1
+ # Third-Party Notices
2
+
3
+ This file records provenance and reuse boundaries for the external URLs cited
4
+ by the README and guides. A citation is a reference, not a declaration that a
5
+ resource is a dependency, bundled material, or available for reuse.
6
+
7
+ ## Collection license
8
+
9
+ The CLI and validator code are licensed under the MIT License in `LICENSE`.
10
+ Original documentation is offered under CC BY 4.0 as described in
11
+ `LICENSE-DOCS.md`. Those notices do not apply to adapted or external material;
12
+ review the applicable source terms before redistributing such material.
13
+
14
+ ## Adapted and editorial sources
15
+
16
+ ### A11Y.md
17
+
18
+ - Project: [fecarrico/A11Y.md](https://github.com/fecarrico/A11Y.md).
19
+ - Identified author: Felipe A. Carriço.
20
+ - License identified by the upstream project: MIT.
21
+ - Use in this collection: adapted accessibility guidance with attribution
22
+ preserved. Consult the upstream repository for its current license text and
23
+ conditions.
24
+
25
+ ### Clean Code for AI Agents
26
+
27
+ - Source: [Fabio Akita's article](https://akitaonrails.com/en/2026/04/20/clean-code-for-ai-agents/).
28
+ - Use in this collection: editorial influence for an original operational
29
+ synthesis about clean code for AI agents.
30
+ - Boundary: consult the source before reusing its text or other material.
31
+
32
+ ## External standards and public documentation
33
+
34
+ The guides cite standards and public technical documentation, including
35
+ [W3C](https://www.w3.org/TR/), Apple, Android, Microsoft, MDN, WHATWG, IETF,
36
+ OWASP, and Google documentation. They are technical references for
37
+ accessibility, platform behavior, security, performance, testing, and web
38
+ standards; their specifications, examples, names, and marks remain governed by
39
+ the applicable source.
40
+
41
+ ## Software, package, and tool references
42
+
43
+ The guides also cite external software, package, framework, registry, and tool
44
+ documentation, including [HyperFrames](https://hyperframes.heygen.com/) and
45
+ the projects referenced by the design, game, performance, security, and testing
46
+ guides. These URLs support evaluation or implementation decisions only. Their
47
+ inclusion does not install, bundle, or declare any project as a dependency of
48
+ this collection. Check the specific project's current license, terms,
49
+ dependencies, version, and distribution conditions before adoption.
50
+
51
+ ### Superpowers
52
+
53
+ - Project: [Superpowers](https://github.com/obra/superpowers).
54
+ - License declared by the upstream project: [MIT](https://github.com/obra/superpowers/blob/main/LICENSE).
55
+ - Use in this collection: an editorial and process reference for approved
56
+ workflow boundaries and public discoverability only.
57
+ - Boundary: this repository links to Superpowers as a reference; it is not a dependency of `ForgeLoop`, and `ForgeLoop` does not copy, bundle, install, or vendor any Superpowers source, skill, hook, plugin, runtime, dependency, credential, or provider.
58
+
59
+ ### Runtime and validator boundary
60
+
61
+ The distributed CLI and repository validators use Node.js and Python standard
62
+ libraries plus the JSON Schema documents shipped in this repository. No
63
+ third-party runtime package, agent, provider, plugin, remote trace service, or
64
+ model is bundled or installed by `ForgeLoop`. A future host that adds one of
65
+ those capabilities must review its own license, dependency tree, credentials,
66
+ network behavior, and distribution terms separately.
67
+
68
+ ## Visual, gradient, and gallery references
69
+
70
+ ### Canvas UI and Liquid Glass Design
71
+
72
+ - References: [Canvas UI](https://canvasui.dev/) and
73
+ [Liquid Glass Design](https://liquidglassdesign.com/).
74
+ - Use in this collection: visual-direction references.
75
+ - Boundary: check the provenance, author, license, attribution, and other
76
+ conditions of a specific asset, image, prompt, text, code sample, or indexed
77
+ work before reuse.
78
+
79
+ ### Gradient Studio
80
+
81
+ - Source: [Gradient Studio](https://gradientsaas.blogspot.com/), identified in
82
+ the guide as a project by Amit Gajare.
83
+ - Use in this collection: a reference for procedural CSS, Tailwind, and SCSS
84
+ gradient exploration.
85
+ - Boundary: confirm the current source terms and the provenance of any output
86
+ or asset before reuse.
87
+
88
+ ## Design reference sites
89
+
90
+ The following nine sites are references in the design guide. None is a
91
+ dependency of this collection or a blanket permission to reuse code, assets,
92
+ fonts, templates, or other material.
93
+
94
+ - [21st.dev](https://21st.dev/): component and template registry; check the
95
+ terms for the specific author, community contribution, or paid material.
96
+ - [React Bits](https://reactbits.dev/): component and motion reference; keep
97
+ public/free material, React Bits Pro, and dependency terms separate.
98
+ - [Fancy Components](https://www.fancycomponents.dev/): component reference;
99
+ verify the linked source license and each dependency before reuse.
100
+ - [Motion Primitives](https://motion-primitives.com/): motion reference; keep
101
+ documented open-source material, the Pro offering, and dependency terms
102
+ separate.
103
+ - [Component Gallery](https://component.gallery/): comparison catalog; the
104
+ design systems and examples it indexes retain their own terms.
105
+ - [NumberFlow](https://number-flow.barvian.me/): external software reference;
106
+ verify the upstream license and dependency terms before adoption.
107
+ - [Cursify](https://cursify.ui-layouts.com/): pointer-enhancement reference;
108
+ verify the component, source, and dependency terms before adoption.
109
+ - [UNCUT](https://uncut.wtf/): typography-discovery catalog; a listing is not a
110
+ font license, so check the exact author, files, weights, hosting, and
111
+ redistribution rights.
112
+ - [cables.gl](https://cables.gl/): creative-coding and WebGL reference; check
113
+ the tool, exported patches or operators, code, and third-party assets
114
+ separately before distribution.
115
+
116
+ ### Qwen-MM-Plugins
117
+
118
+ - Project: [QwenLM/Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins).
119
+ - License declared by the upstream project: [Apache-2.0](https://github.com/QwenLM/Qwen-MM-Plugins/blob/main/LICENSE).
120
+ - Use in this collection: an optional reference for task-scoped multimodal capabilities that an active agent may install through its supported harness when a task requires them.
121
+ - Boundary: this repository links to the project but does not copy, vendor, or relicense its source, skills, MCP servers, models, or dependencies. Verify current upstream terms, dependencies, service costs, and harness instructions before installing or redistributing anything.
122
+
123
+ ## Fonts, assets, and premium content
124
+
125
+ Fonts named in the design guide are examples only and are not bundled by this
126
+ collection. Do not host, redistribute, or infer rights for a font, image,
127
+ template, prompt, audio asset, or other premium material from a citation or
128
+ catalog listing. Verify the exact resource's author, license, attribution,
129
+ hosting, and current terms before use.