@cassiomc1/forgeloop 1.0.0 → 1.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 (95) hide show
  1. package/.cursor/rules/project-loop.mdc +3 -2
  2. package/.github/copilot-instructions.md +1 -0
  3. package/AGENTS.md +2 -1
  4. package/CLAUDE.md +1 -0
  5. package/DOCS_INDEX.md +36 -0
  6. package/ENG/design-code-eng.md +31 -0
  7. package/ENG/documentation-quality-eng.md +400 -0
  8. package/EXECUTION_STATE.md +23 -13
  9. package/GUIDE_ROUTER.md +23 -8
  10. package/LOOP_ENGINEERING.md +77 -12
  11. package/PROTOCOL_INTEGRATION.md +9 -6
  12. package/README.md +82 -39
  13. package/docs/ARTIFACT_REFERENCE.md +442 -0
  14. package/docs/CLI_REFERENCE.md +892 -0
  15. package/docs/CROSS_HARNESS_CONTINUITY.md +198 -0
  16. package/docs/DOCUMENTATION_GUIDE.md +161 -0
  17. package/docs/GETTING_STARTED.md +348 -0
  18. package/docs/RECIPES.md +250 -0
  19. package/docs/TROUBLESHOOTING.md +345 -0
  20. package/docs/assets/forgeloop-flow.svg +1 -1
  21. package/docs/forgeloop-flow.mmd +1 -1
  22. package/package.json +13 -2
  23. package/schemas/task-descriptor.schema.json +56 -0
  24. package/schemas/work-state.schema.json +18 -1
  25. package/scripts/CI_VALIDATORS.md +7 -0
  26. package/src/cli.js +280 -388
  27. package/src/commands/advance.js +5 -2
  28. package/src/commands/audit.js +11 -1
  29. package/src/commands/clear-continuity.js +5 -2
  30. package/src/commands/clear-state.js +5 -2
  31. package/src/commands/complete.js +9 -1
  32. package/src/commands/continuity.js +5 -2
  33. package/src/commands/inspect.js +10 -2
  34. package/src/commands/next.js +5 -2
  35. package/src/commands/preflight.js +9 -1
  36. package/src/commands/prepare-completion.js +5 -2
  37. package/src/commands/reconcile-continuity.js +5 -2
  38. package/src/commands/record-check.js +7 -1
  39. package/src/commands/record-continuity.js +21 -14
  40. package/src/commands/record-terminal-result.js +7 -1
  41. package/src/commands/route.js +22 -18
  42. package/src/commands/run-check.js +52 -44
  43. package/src/commands/status.js +18 -12
  44. package/src/commands/task-create.js +94 -0
  45. package/src/commands/task-list.js +48 -0
  46. package/src/commands/task-migrate.js +34 -0
  47. package/src/commands/task-scope.js +75 -0
  48. package/src/commands/task-show.js +81 -0
  49. package/src/commands/task-unlock.js +35 -0
  50. package/src/commands/validate-protocol.js +37 -20
  51. package/src/commands/validate-state.js +24 -18
  52. package/src/config/guides.json +42 -0
  53. package/src/core/activation.js +8 -4
  54. package/src/core/artifact-registry.js +166 -0
  55. package/src/core/audit.js +65 -12
  56. package/src/core/bundles.js +76 -50
  57. package/src/core/cli-command-definitions.js +611 -0
  58. package/src/core/cli-metadata.js +23 -0
  59. package/src/core/completion-artifacts.js +161 -74
  60. package/src/core/completion.js +134 -76
  61. package/src/core/continuity.js +20 -13
  62. package/src/core/contract.js +6 -3
  63. package/src/core/error-codes.js +197 -0
  64. package/src/core/events.js +19 -14
  65. package/src/core/execution.js +38 -6
  66. package/src/core/gate-artifact.js +12 -9
  67. package/src/core/gates.js +4 -2
  68. package/src/core/guide-metadata.js +7 -11
  69. package/src/core/guide-registry.js +29 -0
  70. package/src/core/inspect.js +7 -4
  71. package/src/core/native-adapters.js +6 -0
  72. package/src/core/phase.js +85 -33
  73. package/src/core/preflight-consistency.js +24 -14
  74. package/src/core/preflight-loaders.js +16 -11
  75. package/src/core/preflight.js +44 -25
  76. package/src/core/protocol.js +2 -11
  77. package/src/core/receipt.js +1 -1
  78. package/src/core/report.js +2 -2
  79. package/src/core/repository.js +46 -12
  80. package/src/core/resumability.js +6 -4
  81. package/src/core/route-artifact.js +9 -5
  82. package/src/core/router.js +11 -7
  83. package/src/core/schema-validation.js +1 -0
  84. package/src/core/task-command.js +41 -0
  85. package/src/core/task-context.js +126 -0
  86. package/src/core/task-descriptor.js +81 -0
  87. package/src/core/task-discovery.js +116 -0
  88. package/src/core/task-identity.js +76 -0
  89. package/src/core/task-lock.js +209 -0
  90. package/src/core/task-migration-validation.js +140 -0
  91. package/src/core/task-migration.js +361 -0
  92. package/src/core/task-paths.js +96 -0
  93. package/src/core/task-scope.js +179 -0
  94. package/src/core/templates.js +3 -9
  95. package/src/core/work-state.js +24 -13
@@ -1,5 +1,5 @@
1
1
  %% ForgeLoop canonical architecture flow. Render with npm run docs:flow.
2
- %%{init: {"look": "classic", "handDrawnSeed": 1, "flowchart": {"curve": "linear"}}}%%
2
+ %%{init: {"look": "classic", "handDrawnSeed": 1, "flowchart": {"curve": "linear", "htmlLabels": false}}}%%
3
3
  flowchart LR
4
4
  classDef entry fill:#1f2937,stroke:#7dd3fc,color:#f8fafc,stroke-width:2px
5
5
  classDef contract fill:#172554,stroke:#60a5fa,color:#dbeafe,stroke-width:2px
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cassiomc1/forgeloop",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Portable, verifiable engineering protocol for AI coding environments and developer workflows",
5
5
  "repository": {
6
6
  "type": "git",
@@ -47,6 +47,13 @@
47
47
  "DOCS_INDEX.md",
48
48
  "docs/forgeloop-flow.mmd",
49
49
  "docs/assets/forgeloop-flow.svg",
50
+ "docs/GETTING_STARTED.md",
51
+ "docs/CROSS_HARNESS_CONTINUITY.md",
52
+ "docs/CLI_REFERENCE.md",
53
+ "docs/ARTIFACT_REFERENCE.md",
54
+ "docs/TROUBLESHOOTING.md",
55
+ "docs/RECIPES.md",
56
+ "docs/DOCUMENTATION_GUIDE.md",
50
57
  "scripts/CI_VALIDATORS.md"
51
58
  ],
52
59
  "scripts": {
@@ -54,7 +61,11 @@
54
61
  "pack:check": "node --test tests/package.test.js",
55
62
  "release:identity": "node scripts/verify_release_identity.mjs",
56
63
  "docs:flow": "node scripts/generate-readme-flow.mjs",
57
- "docs:check": "node scripts/check-generated-diagram.mjs",
64
+ "docs:diagram:check": "node scripts/check-generated-diagram.mjs",
65
+ "docs:generate": "node scripts/generate_documentation_reference.mjs --write",
66
+ "docs:generated:check": "node scripts/generate_documentation_reference.mjs --check",
67
+ "docs:conformance": "node scripts/validate_documentation_conformance.mjs",
68
+ "docs:check": "node scripts/run-docs-check.js",
58
69
  "lint": "eslint .",
59
70
  "coverage": "c8 --all --include=src/**/*.js --reporter=text --reporter=lcov --check-coverage --lines=80 --functions=75 --branches=70 --statements=80 node scripts/run-tests.js",
60
71
  "dependency:policy": "node scripts/check-dependency-policy.mjs"
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://forgeloop.dev/schemas/task-descriptor.schema.json",
4
+ "title": "ForgeLoop Task Descriptor Schema",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "protocolVersion",
9
+ "taskId",
10
+ "taskKey",
11
+ "createdAt",
12
+ "updatedAt",
13
+ "writeClaims"
14
+ ],
15
+ "additionalProperties": false,
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "type": "integer",
19
+ "const": 1,
20
+ "description": "Task descriptor schema version (must be 1)"
21
+ },
22
+ "protocolVersion": {
23
+ "type": "integer",
24
+ "const": 1,
25
+ "description": "ForgeLoop protocol version (must be 1)"
26
+ },
27
+ "taskId": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "description": "Canonical human-readable task identifier"
31
+ },
32
+ "taskKey": {
33
+ "type": "string",
34
+ "pattern": "^[a-f0-9]{64}$",
35
+ "description": "SHA-256 hex digest of the canonical taskId (filesystem-safe namespace identifier)"
36
+ },
37
+ "createdAt": {
38
+ "type": "string",
39
+ "format": "date-time",
40
+ "description": "ISO 8601 UTC creation timestamp"
41
+ },
42
+ "updatedAt": {
43
+ "type": "string",
44
+ "format": "date-time",
45
+ "description": "ISO 8601 UTC last updated timestamp"
46
+ },
47
+ "writeClaims": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string",
51
+ "minLength": 1
52
+ },
53
+ "description": "Normalized project-relative path prefixes claimed for mutations by this task"
54
+ }
55
+ }
56
+ }
@@ -19,7 +19,24 @@
19
19
  },
20
20
  "additionalProperties": false
21
21
  },
22
- "phase": { "type": "string", "minLength": 1 },
22
+ "phase": {
23
+ "type": "string",
24
+ "enum": [
25
+ "RECEIVED",
26
+ "DISCOVERING",
27
+ "CONTRACT_READY",
28
+ "ROUTED",
29
+ "DESIGNING",
30
+ "PLANNED",
31
+ "EXECUTING",
32
+ "VERIFYING",
33
+ "DIAGNOSING",
34
+ "CORRECTING",
35
+ "REVIEWING",
36
+ "COMPLETE",
37
+ "BLOCKED"
38
+ ]
39
+ },
23
40
  "selectedGuides": { "type": "array", "items": { "type": "string" } },
24
41
  "requiredGates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
25
42
  "satisfiedGates": { "type": "array", "items": { "type": "string", "minLength": 1 } },
@@ -30,3 +30,10 @@ python3 scripts/scan_secrets.py
30
30
  The Node suite and Python suite have separate ownership: Node tests cover CLI,
31
31
  protocol behavior, schemas, and execution evidence; Python remains the
32
32
  compatibility gate for these repository-wide textual invariants.
33
+
34
+ ## Distinguishing CI Link vs Infrastructure Failures
35
+
36
+ Maintainers should distinguish between actual documentation link failures and external CI/action infrastructure errors:
37
+
38
+ - **Link-content failure (`Lychee`)**: The link checking step runs with `--verbose` and outputs the exact failing URL along with the HTTP status code (e.g. 404, 403). If a documentation URL is broken, update the link in the source Markdown. If a legitimate external host blocks shared CI runners or aggressively rate-limits CI automation, add a minimal, targeted exclusion in `.lychee.toml` with an explanatory comment.
39
+ - **Action-download / Runner infrastructure failure (GitHub 429/502/503)**: When GitHub Actions fails during action checkout or tool download before running the test steps, this is a transient infrastructure issue rather than a project defect. Rerun the workflow without modifying project files.