@warpgogol/forge 8.0.4 → 9.0.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.
- package/CHANGELOG.md +28 -0
- package/bin/cli.ts +25 -13
- package/dist/bin/cli.js +17 -13
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +1 -0
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/adr/types.d.ts +2 -0
- package/dist/os/adr/types.d.ts.map +1 -1
- package/dist/os/agent/agent.module.d.ts +3 -0
- package/dist/os/agent/agent.module.d.ts.map +1 -0
- package/dist/os/agent/agent.module.js +60 -0
- package/dist/os/agent/agent.module.js.map +1 -0
- package/dist/os/agent/handlers/agent-delegate.d.ts +29 -0
- package/dist/os/agent/handlers/agent-delegate.d.ts.map +1 -0
- package/dist/os/agent/handlers/agent-delegate.js +187 -0
- package/dist/os/agent/handlers/agent-delegate.js.map +1 -0
- package/dist/os/agent/handlers/agent-tiers-validate.d.ts +15 -0
- package/dist/os/agent/handlers/agent-tiers-validate.d.ts.map +1 -0
- package/dist/os/agent/handlers/agent-tiers-validate.js +205 -0
- package/dist/os/agent/handlers/agent-tiers-validate.js.map +1 -0
- package/dist/os/agent/index.d.ts +5 -0
- package/dist/os/agent/index.d.ts.map +1 -0
- package/dist/os/agent/index.js +14 -0
- package/dist/os/agent/index.js.map +1 -0
- package/dist/os/agent/invoke-adapter.d.ts +43 -0
- package/dist/os/agent/invoke-adapter.d.ts.map +1 -0
- package/dist/os/agent/invoke-adapter.js +83 -0
- package/dist/os/agent/invoke-adapter.js.map +1 -0
- package/dist/os/authority/authority.module.d.ts.map +1 -1
- package/dist/os/authority/authority.module.js +2 -10
- package/dist/os/authority/authority.module.js.map +1 -1
- package/dist/os/checks/checks.module.d.ts +3 -0
- package/dist/os/checks/checks.module.d.ts.map +1 -0
- package/dist/os/checks/checks.module.js +90 -0
- package/dist/os/checks/checks.module.js.map +1 -0
- package/dist/os/checks/handlers/contribution-report.d.ts +35 -0
- package/dist/os/checks/handlers/contribution-report.d.ts.map +1 -0
- package/dist/os/checks/handlers/contribution-report.js +264 -0
- package/dist/os/checks/handlers/contribution-report.js.map +1 -0
- package/dist/os/checks/handlers/counters-export.d.ts +19 -0
- package/dist/os/checks/handlers/counters-export.d.ts.map +1 -0
- package/dist/os/checks/handlers/counters-export.js +122 -0
- package/dist/os/checks/handlers/counters-export.js.map +1 -0
- package/dist/os/checks/handlers/counters-journal.d.ts +67 -0
- package/dist/os/checks/handlers/counters-journal.d.ts.map +1 -0
- package/dist/os/checks/handlers/counters-journal.js +154 -0
- package/dist/os/checks/handlers/counters-journal.js.map +1 -0
- package/dist/os/checks/handlers/counters-validate.d.ts +11 -0
- package/dist/os/checks/handlers/counters-validate.d.ts.map +1 -0
- package/dist/os/checks/handlers/counters-validate.js +131 -0
- package/dist/os/checks/handlers/counters-validate.js.map +1 -0
- package/dist/os/checks/index.d.ts +6 -0
- package/dist/os/checks/index.d.ts.map +1 -0
- package/dist/os/checks/index.js +6 -0
- package/dist/os/checks/index.js.map +1 -0
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +55 -20
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold.js +4 -2
- package/dist/os/compass/handlers/compass-header-scaffold.js.map +1 -1
- package/dist/os/compass/handlers/compass-invariants-generate.d.ts +15 -0
- package/dist/os/compass/handlers/compass-invariants-generate.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-invariants-generate.js +208 -0
- package/dist/os/compass/handlers/compass-invariants-generate.js.map +1 -0
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +46 -4
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/invariant-bindings.d.ts +85 -0
- package/dist/os/compass/handlers/invariant-bindings.d.ts.map +1 -0
- package/dist/os/compass/handlers/invariant-bindings.js +390 -0
- package/dist/os/compass/handlers/invariant-bindings.js.map +1 -0
- package/dist/os/conformance/conformance.module.d.ts +3 -0
- package/dist/os/conformance/conformance.module.d.ts.map +1 -0
- package/dist/os/conformance/conformance.module.js +96 -0
- package/dist/os/conformance/conformance.module.js.map +1 -0
- package/dist/os/conformance/handlers/conformance-run.d.ts +14 -0
- package/dist/os/conformance/handlers/conformance-run.d.ts.map +1 -0
- package/dist/os/conformance/handlers/conformance-run.js +149 -0
- package/dist/os/conformance/handlers/conformance-run.js.map +1 -0
- package/dist/os/conformance/handlers/conformance-validate.d.ts +14 -0
- package/dist/os/conformance/handlers/conformance-validate.d.ts.map +1 -0
- package/dist/os/conformance/handlers/conformance-validate.js +216 -0
- package/dist/os/conformance/handlers/conformance-validate.js.map +1 -0
- package/dist/os/conformance/index.d.ts +6 -0
- package/dist/os/conformance/index.d.ts.map +1 -0
- package/dist/os/conformance/index.js +17 -0
- package/dist/os/conformance/index.js.map +1 -0
- package/dist/os/context/context.module.d.ts +3 -0
- package/dist/os/context/context.module.d.ts.map +1 -0
- package/dist/os/context/context.module.js +68 -0
- package/dist/os/context/context.module.js.map +1 -0
- package/dist/os/context/handlers/context-assemble.d.ts +28 -0
- package/dist/os/context/handlers/context-assemble.d.ts.map +1 -0
- package/dist/os/context/handlers/context-assemble.js +142 -0
- package/dist/os/context/handlers/context-assemble.js.map +1 -0
- package/dist/os/context/handlers/context-slate-eval.d.ts +15 -0
- package/dist/os/context/handlers/context-slate-eval.d.ts.map +1 -0
- package/dist/os/context/handlers/context-slate-eval.js +70 -0
- package/dist/os/context/handlers/context-slate-eval.js.map +1 -0
- package/dist/os/context/handlers/index-build.d.ts +19 -0
- package/dist/os/context/handlers/index-build.d.ts.map +1 -0
- package/dist/os/context/handlers/index-build.js +188 -0
- package/dist/os/context/handlers/index-build.js.map +1 -0
- package/dist/os/context/index.d.ts +5 -0
- package/dist/os/context/index.d.ts.map +1 -0
- package/dist/os/context/index.js +5 -0
- package/dist/os/context/index.js.map +1 -0
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +34 -11
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/formal/formal.module.d.ts +3 -0
- package/dist/os/formal/formal.module.d.ts.map +1 -0
- package/dist/os/formal/formal.module.js +63 -0
- package/dist/os/formal/formal.module.js.map +1 -0
- package/dist/os/formal/handlers/proof-check.d.ts +10 -0
- package/dist/os/formal/handlers/proof-check.d.ts.map +1 -0
- package/dist/os/formal/handlers/proof-check.js +82 -0
- package/dist/os/formal/handlers/proof-check.js.map +1 -0
- package/dist/os/formal/index.d.ts +4 -0
- package/dist/os/formal/index.d.ts.map +1 -0
- package/dist/os/formal/index.js +16 -0
- package/dist/os/formal/index.js.map +1 -0
- package/dist/os/friction/friction.module.d.ts +3 -0
- package/dist/os/friction/friction.module.d.ts.map +1 -0
- package/dist/os/friction/friction.module.js +71 -0
- package/dist/os/friction/friction.module.js.map +1 -0
- package/dist/os/friction/handlers/friction-validate.d.ts +4 -0
- package/dist/os/friction/handlers/friction-validate.d.ts.map +1 -0
- package/dist/os/friction/handlers/friction-validate.js +228 -0
- package/dist/os/friction/handlers/friction-validate.js.map +1 -0
- package/dist/os/friction/index.d.ts +4 -0
- package/dist/os/friction/index.d.ts.map +1 -0
- package/dist/os/friction/index.js +23 -0
- package/dist/os/friction/index.js.map +1 -0
- package/dist/os/friction/types.d.ts +97 -0
- package/dist/os/friction/types.d.ts.map +1 -0
- package/dist/os/friction/types.js +78 -0
- package/dist/os/friction/types.js.map +1 -0
- package/dist/os/gate/gate.module.d.ts +3 -0
- package/dist/os/gate/gate.module.d.ts.map +1 -0
- package/dist/os/gate/gate.module.js +65 -0
- package/dist/os/gate/gate.module.js.map +1 -0
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts +18 -0
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -0
- package/dist/os/gate/handlers/gate-probe-catalog.js +66 -0
- package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -0
- package/dist/os/gate/handlers/gate-probe.d.ts +32 -0
- package/dist/os/gate/handlers/gate-probe.d.ts.map +1 -0
- package/dist/os/gate/handlers/gate-probe.js +228 -0
- package/dist/os/gate/handlers/gate-probe.js.map +1 -0
- package/dist/os/gate/index.d.ts +4 -0
- package/dist/os/gate/index.d.ts.map +1 -0
- package/dist/os/gate/index.js +4 -0
- package/dist/os/gate/index.js.map +1 -0
- package/dist/os/instructions/handlers/budget-validate.d.ts +29 -0
- package/dist/os/instructions/handlers/budget-validate.d.ts.map +1 -0
- package/dist/os/instructions/handlers/budget-validate.js +164 -0
- package/dist/os/instructions/handlers/budget-validate.js.map +1 -0
- package/dist/os/instructions/handlers/scar-migrate.d.ts +13 -0
- package/dist/os/instructions/handlers/scar-migrate.d.ts.map +1 -0
- package/dist/os/instructions/handlers/scar-migrate.js +270 -0
- package/dist/os/instructions/handlers/scar-migrate.js.map +1 -0
- package/dist/os/instructions/instructions.module.d.ts +3 -0
- package/dist/os/instructions/instructions.module.d.ts.map +1 -0
- package/dist/os/instructions/instructions.module.js +74 -0
- package/dist/os/instructions/instructions.module.js.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts +16 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js +198 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.d.ts +15 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.d.ts.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.js +137 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.js.map +1 -0
- package/dist/os/knowledge/index.d.ts +4 -0
- package/dist/os/knowledge/index.d.ts.map +1 -0
- package/dist/os/knowledge/index.js +4 -0
- package/dist/os/knowledge/index.js.map +1 -0
- package/dist/os/knowledge/knowledge.module.d.ts +3 -0
- package/dist/os/knowledge/knowledge.module.d.ts.map +1 -0
- package/dist/os/knowledge/knowledge.module.js +61 -0
- package/dist/os/knowledge/knowledge.module.js.map +1 -0
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +102 -6
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/mission.module.d.ts.map +1 -1
- package/dist/os/mission/mission.module.js +7 -0
- package/dist/os/mission/mission.module.js.map +1 -1
- package/dist/os/naming/naming-convention.d.ts.map +1 -1
- package/dist/os/naming/naming-convention.js +2 -1
- package/dist/os/naming/naming-convention.js.map +1 -1
- package/dist/os/program/schemas.d.ts +5 -5
- package/dist/os/queue/handlers/queue-validate.d.ts.map +1 -1
- package/dist/os/queue/handlers/queue-validate.js +129 -5
- package/dist/os/queue/handlers/queue-validate.js.map +1 -1
- package/dist/os/queue/queue.module.d.ts.map +1 -1
- package/dist/os/queue/queue.module.js +12 -31
- package/dist/os/queue/queue.module.js.map +1 -1
- package/dist/os/queue/types.d.ts +23 -0
- package/dist/os/queue/types.d.ts.map +1 -1
- package/dist/os/queue/types.js +24 -3
- package/dist/os/queue/types.js.map +1 -1
- package/dist/os/resolver/handlers/resolver-doors-audit.d.ts +22 -0
- package/dist/os/resolver/handlers/resolver-doors-audit.d.ts.map +1 -0
- package/dist/os/resolver/handlers/resolver-doors-audit.js +238 -0
- package/dist/os/resolver/handlers/resolver-doors-audit.js.map +1 -0
- package/dist/os/resolver/resolver.module.d.ts +3 -0
- package/dist/os/resolver/resolver.module.d.ts.map +1 -0
- package/dist/os/resolver/resolver.module.js +40 -0
- package/dist/os/resolver/resolver.module.js.map +1 -0
- package/dist/os/rfc/acceptance.d.ts +2 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +158 -82
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts +10 -0
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +14 -0
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/handlers/fixed-inputs.d.ts +29 -0
- package/dist/os/rfc/handlers/fixed-inputs.d.ts.map +1 -0
- package/dist/os/rfc/handlers/fixed-inputs.js +214 -0
- package/dist/os/rfc/handlers/fixed-inputs.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts +47 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.js +145 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts +15 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.js +57 -5
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts +42 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.js +102 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +101 -12
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.d.ts +4 -2
- package/dist/os/rfc/handlers/index-graph.d.ts.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +57 -3
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +117 -12
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.d.ts.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.js +34 -7
- package/dist/os/rfc/handlers/supersede-propose.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +4 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +159 -11
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +10 -1
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/outcome-probe.d.ts +20 -0
- package/dist/os/rfc/outcome-probe.d.ts.map +1 -0
- package/dist/os/rfc/outcome-probe.js +315 -0
- package/dist/os/rfc/outcome-probe.js.map +1 -0
- package/dist/os/rfc/reachable-symbol.d.ts.map +1 -1
- package/dist/os/rfc/reachable-symbol.js +51 -12
- package/dist/os/rfc/reachable-symbol.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +48 -11
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +90 -12
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +8 -7
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +4 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +69 -17
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +8 -0
- package/dist/os/rfc/verification-origin.d.ts.map +1 -1
- package/dist/os/rfc/verification-origin.js +48 -1
- package/dist/os/rfc/verification-origin.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +19 -2
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/rfc/verification-verdicts.d.ts +14 -0
- package/dist/os/rfc/verification-verdicts.d.ts.map +1 -0
- package/dist/os/rfc/verification-verdicts.js +104 -0
- package/dist/os/rfc/verification-verdicts.js.map +1 -0
- package/dist/os/rfc/verifier/rfc-1391/support.d.ts +34 -0
- package/dist/os/rfc/verifier/rfc-1391/support.d.ts.map +1 -0
- package/dist/os/rfc/verifier/rfc-1391/support.js +184 -0
- package/dist/os/rfc/verifier/rfc-1391/support.js.map +1 -0
- package/dist/os/session/frontmatter-io.d.ts +3 -1
- package/dist/os/session/frontmatter-io.d.ts.map +1 -1
- package/dist/os/session/frontmatter-io.js +3 -1
- package/dist/os/session/frontmatter-io.js.map +1 -1
- package/dist/os/session/handlers/session-audit-report.d.ts +20 -0
- package/dist/os/session/handlers/session-audit-report.d.ts.map +1 -0
- package/dist/os/session/handlers/session-audit-report.js +78 -0
- package/dist/os/session/handlers/session-audit-report.js.map +1 -0
- package/dist/os/session/handlers/session-audit.d.ts +25 -0
- package/dist/os/session/handlers/session-audit.d.ts.map +1 -0
- package/dist/os/session/handlers/session-audit.js +265 -0
- package/dist/os/session/handlers/session-audit.js.map +1 -0
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +49 -2
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/spec/spec-amendments.d.ts +7 -0
- package/dist/os/spec/spec-amendments.d.ts.map +1 -0
- package/dist/os/spec/spec-amendments.js +86 -0
- package/dist/os/spec/spec-amendments.js.map +1 -0
- package/dist/os/spec/spec-materialize.d.ts.map +1 -1
- package/dist/os/spec/spec-materialize.js +22 -24
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +25 -29
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +9 -29
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/spec/spec.module.d.ts.map +1 -1
- package/dist/os/spec/spec.module.js +7 -36
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/trajectory/handlers/journal-io.d.ts +51 -0
- package/dist/os/trajectory/handlers/journal-io.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/journal-io.js +161 -0
- package/dist/os/trajectory/handlers/journal-io.js.map +1 -0
- package/dist/os/trajectory/handlers/outcome-record.d.ts +16 -0
- package/dist/os/trajectory/handlers/outcome-record.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/outcome-record.js +142 -0
- package/dist/os/trajectory/handlers/outcome-record.js.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-index.d.ts +59 -0
- package/dist/os/trajectory/handlers/trajectory-index.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-index.js +427 -0
- package/dist/os/trajectory/handlers/trajectory-index.js.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-recall.d.ts +21 -0
- package/dist/os/trajectory/handlers/trajectory-recall.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-recall.js +176 -0
- package/dist/os/trajectory/handlers/trajectory-recall.js.map +1 -0
- package/dist/os/trajectory/index.d.ts +5 -0
- package/dist/os/trajectory/index.d.ts.map +1 -0
- package/dist/os/trajectory/index.js +5 -0
- package/dist/os/trajectory/index.js.map +1 -0
- package/dist/os/trajectory/trajectory.module.d.ts +3 -0
- package/dist/os/trajectory/trajectory.module.d.ts.map +1 -0
- package/dist/os/trajectory/trajectory.module.js +91 -0
- package/dist/os/trajectory/trajectory.module.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-close.d.ts +13 -0
- package/dist/os/werkstatt/handlers/session-close.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-close.js +53 -0
- package/dist/os/werkstatt/handlers/session-close.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-engine.d.ts +3 -0
- package/dist/os/werkstatt/handlers/session-engine.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-engine.js +25 -0
- package/dist/os/werkstatt/handlers/session-engine.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-open.d.ts +10 -0
- package/dist/os/werkstatt/handlers/session-open.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-open.js +43 -0
- package/dist/os/werkstatt/handlers/session-open.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-status.d.ts +9 -0
- package/dist/os/werkstatt/handlers/session-status.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-status.js +31 -0
- package/dist/os/werkstatt/handlers/session-status.js.map +1 -0
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +98 -3
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/src/authority/delegations.d.ts +1 -1
- package/dist/src/authority/delegations.d.ts.map +1 -1
- package/dist/src/authority/delegations.js +2 -0
- package/dist/src/authority/delegations.js.map +1 -1
- package/dist/src/cli-flags.d.ts.map +1 -1
- package/dist/src/cli-flags.js +90 -11
- package/dist/src/cli-flags.js.map +1 -1
- package/dist/src/compass/index.d.ts +2 -0
- package/dist/src/compass/index.d.ts.map +1 -0
- package/dist/src/compass/index.js +26 -0
- package/dist/src/compass/index.js.map +1 -0
- package/dist/src/compass/invariant-parser.d.ts +37 -0
- package/dist/src/compass/invariant-parser.d.ts.map +1 -0
- package/dist/src/compass/invariant-parser.js +218 -0
- package/dist/src/compass/invariant-parser.js.map +1 -0
- package/dist/src/config/forge-config.d.ts +108 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +79 -9
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/conformance/index.d.ts +42 -0
- package/dist/src/conformance/index.d.ts.map +1 -0
- package/dist/src/conformance/index.js +193 -0
- package/dist/src/conformance/index.js.map +1 -0
- package/dist/src/formal/exhaustive.d.ts +40 -0
- package/dist/src/formal/exhaustive.d.ts.map +1 -0
- package/dist/src/formal/exhaustive.js +140 -0
- package/dist/src/formal/exhaustive.js.map +1 -0
- package/dist/src/formal/index.d.ts +7 -0
- package/dist/src/formal/index.d.ts.map +1 -0
- package/dist/src/formal/index.js +13 -0
- package/dist/src/formal/index.js.map +1 -0
- package/dist/src/formal/proof-runner.d.ts +51 -0
- package/dist/src/formal/proof-runner.d.ts.map +1 -0
- package/dist/src/formal/proof-runner.js +450 -0
- package/dist/src/formal/proof-runner.js.map +1 -0
- package/dist/src/formal/proof-spec.d.ts +69 -0
- package/dist/src/formal/proof-spec.d.ts.map +1 -0
- package/dist/src/formal/proof-spec.js +96 -0
- package/dist/src/formal/proof-spec.js.map +1 -0
- package/dist/src/knowledge/schema.d.ts +8 -0
- package/dist/src/knowledge/schema.d.ts.map +1 -1
- package/dist/src/knowledge/schema.js +5 -0
- package/dist/src/knowledge/schema.js.map +1 -1
- package/dist/src/knowledge/serialize.d.ts.map +1 -1
- package/dist/src/knowledge/serialize.js +3 -0
- package/dist/src/knowledge/serialize.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +17 -2
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +87 -1
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.js +3 -3
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/profiles/profile-schema.d.ts +8 -0
- package/dist/src/profiles/profile-schema.d.ts.map +1 -1
- package/dist/src/profiles/profile-schema.js +10 -2
- package/dist/src/profiles/profile-schema.js.map +1 -1
- package/dist/src/profiles/stack-profile.d.ts +4 -0
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/reachability/command-mentions.d.ts +17 -0
- package/dist/src/reachability/command-mentions.d.ts.map +1 -0
- package/dist/src/reachability/command-mentions.js +81 -0
- package/dist/src/reachability/command-mentions.js.map +1 -0
- package/dist/src/registry.d.ts +10 -0
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +40 -2
- package/dist/src/registry.js.map +1 -1
- package/dist/src/types.d.ts +51 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +11 -14
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/sync-fs.d.ts +1 -1
- package/dist/src/utils/sync-fs.d.ts.map +1 -1
- package/dist/src/utils/sync-fs.js +2 -1
- package/dist/src/utils/sync-fs.js.map +1 -1
- package/docs/reference/forge-yaml.md +20 -0
- package/os/adr/handlers/implement-stamp.ts +2 -0
- package/os/adr/types.ts +2 -0
- package/os/agent/agent.module.ts +64 -0
- package/os/agent/handlers/agent-delegate.ts +227 -0
- package/os/agent/handlers/agent-tiers-validate.ts +228 -0
- package/os/agent/index.ts +14 -0
- package/os/agent/invoke-adapter.ts +119 -0
- package/os/authority/authority.module.ts +2 -10
- package/os/checks/checks.module.ts +95 -0
- package/os/checks/handlers/contribution-report.test.ts +244 -0
- package/os/checks/handlers/contribution-report.ts +316 -0
- package/os/checks/handlers/counters-export.test.ts +175 -0
- package/os/checks/handlers/counters-export.ts +170 -0
- package/os/checks/handlers/counters-journal.test.ts +187 -0
- package/os/checks/handlers/counters-journal.ts +179 -0
- package/os/checks/handlers/counters-validate.test.ts +176 -0
- package/os/checks/handlers/counters-validate.ts +159 -0
- package/os/checks/handlers/variant-candidates.test.ts +65 -0
- package/os/checks/index.ts +15 -0
- package/os/compass/compass.module.ts +58 -20
- package/os/compass/handlers/compass-header-scaffold.ts +4 -2
- package/os/compass/handlers/compass-invariants-generate.ts +293 -0
- package/os/compass/handlers/compass-inventory-handler.ts +59 -4
- package/os/compass/handlers/invariant-bindings.ts +526 -0
- package/os/compass/handlers/tests/compass-invariant-binding.test.ts +500 -0
- package/os/compass/handlers/tests/compass-invariants-generate.test.ts +235 -0
- package/os/compass/handlers/tests/compass-migrate.test.ts +5 -3
- package/os/conformance/conformance.module.ts +105 -0
- package/os/conformance/handlers/conformance-run.ts +175 -0
- package/os/conformance/handlers/conformance-validate.ts +334 -0
- package/os/conformance/handlers/tests/conformance.test.ts +657 -0
- package/os/conformance/index.ts +19 -0
- package/os/context/context.module.ts +73 -0
- package/os/context/handlers/context-assemble.test.ts +89 -0
- package/os/context/handlers/context-assemble.ts +171 -0
- package/os/context/handlers/context-slate-eval.test.ts +64 -0
- package/os/context/handlers/context-slate-eval.ts +86 -0
- package/os/context/handlers/index-build.test.ts +68 -0
- package/os/context/handlers/index-build.ts +211 -0
- package/os/context/handlers/no-model-deps.test.ts +32 -0
- package/os/context/handlers/slate-fill.test.ts +31 -0
- package/os/context/index.ts +4 -0
- package/os/core/core.module.ts +34 -11
- package/os/formal/formal.module.ts +67 -0
- package/os/formal/handlers/proof-check.test.ts +337 -0
- package/os/formal/handlers/proof-check.ts +100 -0
- package/os/formal/index.ts +17 -0
- package/os/friction/friction-validate.test.ts +442 -0
- package/os/friction/friction.module.ts +74 -0
- package/os/friction/handlers/friction-validate.ts +349 -0
- package/os/friction/index.ts +30 -0
- package/os/friction/types.ts +113 -0
- package/os/gate/gate.module.ts +69 -0
- package/os/gate/handlers/gate-probe-catalog.test.ts +76 -0
- package/os/gate/handlers/gate-probe-catalog.ts +85 -0
- package/os/gate/handlers/gate-probe.test.ts +108 -0
- package/os/gate/handlers/gate-probe.ts +252 -0
- package/os/gate/index.ts +3 -0
- package/os/instructions/budget.test.ts +125 -0
- package/os/instructions/handlers/budget-validate.ts +197 -0
- package/os/instructions/handlers/scar-migrate.ts +292 -0
- package/os/instructions/instructions.module.ts +78 -0
- package/os/knowledge/handlers/knowledge-authz-probe.test.ts +86 -0
- package/os/knowledge/handlers/knowledge-authz-probe.ts +236 -0
- package/os/knowledge/handlers/knowledge-rebuild.test.ts +76 -0
- package/os/knowledge/handlers/knowledge-rebuild.ts +163 -0
- package/os/knowledge/index.ts +3 -0
- package/os/knowledge/knowledge.module.ts +65 -0
- package/os/mission/handlers/archive.ts +113 -6
- package/os/mission/handlers/ship-inflight-degraded.test.ts +105 -0
- package/os/mission/mission.module.ts +8 -0
- package/os/naming/naming-convention.ts +2 -1
- package/os/queue/decision-ledger.test.ts +39 -0
- package/os/queue/handlers/queue-validate.ts +132 -5
- package/os/queue/queue-validate.test.ts +194 -0
- package/os/queue/queue.module.ts +12 -31
- package/os/queue/types.ts +26 -3
- package/os/resolver/handlers/resolver-doors-audit.test.ts +147 -0
- package/os/resolver/handlers/resolver-doors-audit.ts +281 -0
- package/os/resolver/resolver.module.ts +43 -0
- package/os/rfc/acceptance-reachable.test.ts +78 -0
- package/os/rfc/acceptance.test.ts +229 -1
- package/os/rfc/acceptance.ts +141 -45
- package/os/rfc/decision-log.ts +15 -0
- package/os/rfc/handlers/fixed-inputs.ts +252 -0
- package/os/rfc/handlers/implement-stamp-deviations.test.ts +140 -0
- package/os/rfc/handlers/implement-stamp-deviations.ts +183 -0
- package/os/rfc/handlers/implement-stamp-formal.test.ts +168 -0
- package/os/rfc/handlers/implement-stamp-origin.ts +87 -11
- package/os/rfc/handlers/implement-stamp-outcome.test.ts +193 -0
- package/os/rfc/handlers/implement-stamp-outcome.ts +146 -0
- package/os/rfc/handlers/implement-stamp.ts +107 -10
- package/os/rfc/handlers/index-graph.ts +66 -4
- package/os/rfc/handlers/list-create.test.ts +142 -0
- package/os/rfc/handlers/list-create.ts +140 -12
- package/os/rfc/handlers/supersede-propose.ts +50 -7
- package/os/rfc/handlers/tests/index-graph.test.ts +165 -0
- package/os/rfc/handlers/validate-rules-rfc1453.test.ts +163 -0
- package/os/rfc/handlers/validate-rules-rfc1454.test.ts +136 -0
- package/os/rfc/handlers/validate-rules-rfc1455.test.ts +282 -0
- package/os/rfc/handlers/validate-rules.test.ts +129 -2
- package/os/rfc/handlers/validate-rules.ts +233 -9
- package/os/rfc/handlers/validate.ts +11 -0
- package/os/rfc/outcome-probe.ts +326 -0
- package/os/rfc/reachable-symbol.ts +64 -16
- package/os/rfc/rfc-0000-template.md +4 -0
- package/os/rfc/rfc.module.ts +51 -11
- package/os/rfc/types.ts +109 -14
- package/os/rfc/verification-evidence.ts +74 -14
- package/os/rfc/verification-origin.ts +61 -1
- package/os/rfc/verification-refresh.test.ts +63 -0
- package/os/rfc/verification-refresh.ts +24 -2
- package/os/rfc/verification-verdicts.ts +123 -0
- package/os/rfc/verifier/rfc-1391/ac1-proved-exit-0.acceptance.test.ts +151 -0
- package/os/rfc/verifier/rfc-1391/ac2-unavailable-nonzero.acceptance.test.ts +111 -0
- package/os/rfc/verifier/rfc-1391/ac3-version-mismatch-error.acceptance.test.ts +97 -0
- package/os/rfc/verifier/rfc-1391/ac4-cardinality-mismatch-error.acceptance.test.ts +179 -0
- package/os/rfc/verifier/rfc-1391/ac5-imp13-formal-stamp-block.acceptance.test.ts +295 -0
- package/os/rfc/verifier/rfc-1391/ac6-formal-high-tier-gates.acceptance.test.ts +203 -0
- package/os/rfc/verifier/rfc-1391/ac7-v46-empty-assumptions.acceptance.test.ts +126 -0
- package/os/rfc/verifier/rfc-1391/cx1-emit-proof-envelope.acceptance.test.ts +130 -0
- package/os/rfc/verifier/rfc-1391/fixtures/no-report.proof.test.ts +35 -0
- package/os/rfc/verifier/rfc-1391/fixtures/small-domain.proof.test.ts +41 -0
- package/os/rfc/verifier/rfc-1391/origin-proof-spec-entry.acceptance.test.ts +175 -0
- package/os/rfc/verifier/rfc-1391/support.ts +205 -0
- package/os/session/fixtures/audit/clean.md +7 -0
- package/os/session/fixtures/audit/denied-retry.md +10 -0
- package/os/session/frontmatter-io.ts +3 -1
- package/os/session/handlers/session-audit-detectors.test.ts +91 -0
- package/os/session/handlers/session-audit-report.test.ts +64 -0
- package/os/session/handlers/session-audit-report.ts +93 -0
- package/os/session/handlers/session-audit.test.ts +80 -0
- package/os/session/handlers/session-audit.ts +317 -0
- package/os/session/session.module.ts +51 -2
- package/os/spec/spec-amendments.ts +91 -0
- package/os/spec/spec-materialize.ts +20 -22
- package/os/spec/spec-status.test.ts +17 -1
- package/os/spec/spec-status.ts +23 -29
- package/os/spec/spec-validate.test.ts +45 -0
- package/os/spec/spec-validate.ts +9 -29
- package/os/spec/spec.module.ts +7 -36
- package/os/trajectory/handlers/extract-units.test.ts +69 -0
- package/os/trajectory/handlers/journal-io.ts +211 -0
- package/os/trajectory/handlers/outcome-record.test.ts +192 -0
- package/os/trajectory/handlers/outcome-record.ts +162 -0
- package/os/trajectory/handlers/producer-trust.test.ts +163 -0
- package/os/trajectory/handlers/trajectory-index.test.ts +246 -0
- package/os/trajectory/handlers/trajectory-index.ts +470 -0
- package/os/trajectory/handlers/trajectory-recall.test.ts +227 -0
- package/os/trajectory/handlers/trajectory-recall.ts +198 -0
- package/os/trajectory/handlers/trajectory.test.ts +94 -0
- package/os/trajectory/handlers/verdict-binding.test.ts +209 -0
- package/os/trajectory/index.ts +4 -0
- package/os/trajectory/trajectory.module.ts +96 -0
- package/os/werkstatt/handlers/session-close.ts +79 -0
- package/os/werkstatt/handlers/session-engine.ts +31 -0
- package/os/werkstatt/handlers/session-open.ts +65 -0
- package/os/werkstatt/handlers/session-status.ts +52 -0
- package/os/werkstatt/werkstatt.module.ts +101 -3
- package/package.json +194 -1
- package/profiles/forge-shell.yaml +3 -1
- package/profiles/godot-game.yaml +3 -1
- package/profiles/knowledge.yaml +3 -1
- package/profiles/phaser-game.yaml +3 -1
- package/profiles/site-workshop.yaml +3 -1
- package/profiles/typescript.yaml +3 -1
- package/skills/_shared/agent-operating-model.md +1 -1
- package/skills/_shared/fo-pipeline-conventions.md +5 -1
- package/skills/fo/fo-add-tests/SKILL.md +9 -1
- package/skills/fo/fo-add-tests/pbt-guide.md +1 -0
- package/skills/fo/fo-compass-annotate/SKILL.md +18 -0
- package/skills/fo/fo-compass-annotate/templates/header-format.md +3 -2
- package/skills/fo/fo-fix/SKILL.md +14 -8
- package/skills/fo/fo-idea-create-adr/SKILL.md +5 -3
- package/skills/fo/fo-idea-create-rfc/SKILL.md +20 -8
- package/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md +20 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +31 -13
- package/skills/fo/fo-idea-implement/SKILL.md +20 -14
- package/skills/fo/fo-idea-plan/SKILL.md +1 -1
- package/skills/fo/fo-knowledge-distill/SKILL.md +7 -0
- package/skills/fo/fo-memory-sync/SKILL.md +6 -0
- package/skills/fo/fo-reproduce/SKILL.md +116 -0
- package/skills/fo/fo-review/SKILL.md +11 -5
- package/skills/fo/fo-session-retro/SKILL.md +134 -49
- package/skills/fo/fo-step-commit/SKILL.md +4 -3
- package/skills/fo/fo-triage/SKILL.md +9 -0
- package/skills/shared/grilling/SKILL.md +4 -0
- package/skills/shared/grilling/learned-principles.md +7 -0
- package/skills/shared/grilling/qa-log.md +39 -0
- package/src/authority/delegations.ts +2 -0
- package/src/cli-flags.ts +110 -11
- package/src/compass/index.ts +37 -0
- package/src/compass/invariant-parser.ts +253 -0
- package/src/config/forge-config.ts +111 -9
- package/src/conformance/index.ts +281 -0
- package/src/formal/exhaustive.test.ts +117 -0
- package/src/formal/exhaustive.ts +182 -0
- package/src/formal/index.ts +23 -0
- package/src/formal/proof-runner.test.ts +310 -0
- package/src/formal/proof-runner.ts +562 -0
- package/src/formal/proof-spec.test.ts +70 -0
- package/src/formal/proof-spec.ts +131 -0
- package/src/knowledge/schema.ts +9 -0
- package/src/knowledge/serialize.ts +3 -0
- package/src/onboarding/agents-generate.ts +18 -2
- package/src/onboarding/doctor.ts +93 -1
- package/src/onboarding/init.ts +3 -3
- package/src/onboarding/templates/behavioral-layer-core.md +1 -1
- package/src/profiles/profile-schema.ts +10 -2
- package/src/reachability/command-mentions.ts +87 -0
- package/src/registry.ts +44 -2
- package/src/tests/bindings-schema.test.ts +4 -0
- package/src/tests/cli-flags.test.ts +225 -0
- package/src/tests/fixtures/agents-generate-business-before.txt +4 -2
- package/src/tests/forge-config.test.ts +5 -2
- package/src/tests/implement-stamp.test.ts +51 -0
- package/src/tests/rfc-verification-verdict-ingest.test.ts +244 -0
- package/src/tests/session-retro.test.ts +47 -0
- package/src/types.ts +59 -18
- package/src/utils/sync-fs.ts +2 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1474: checks.counters.validate — counters-journal integrity gate.
|
|
4
|
+
COUNT-01 (error): a record's ruleId resolves to no inventory rule — journal
|
|
5
|
+
drifted from the rule universe; malformed middle lines are the same
|
|
6
|
+
unresolvable class. COUNT-02 (error): `at` append order is non-monotonic —
|
|
7
|
+
readers can no longer take the tail as latest. A crash-truncated final
|
|
8
|
+
record is tolerated (dropped, still surfaced as truncatedTail in data).
|
|
9
|
+
</purpose>
|
|
10
|
+
</MODULE_CONTRACT>
|
|
11
|
+
<CHANGE_SUMMARY>
|
|
12
|
+
<item>RFC-1474: checks.counters.validate — COUNT-01 unknown-rule/malformed + COUNT-02 non-monotonic gates</item>
|
|
13
|
+
<item>RFC-1474: per-rule check-execution counters
|
|
14
|
+
|
|
15
|
+
Append-only counters.jsonl journaled per evaluated rule ({runId, ruleId, contract, outcome, at}; runId = commandInvocationId; outcomes pass|diagnostic|skipped|ensured; dry-run suppressed; append failures warn never fail). checks.counters.validate audits the journal against the validator inventory (COUNT-01/02); checks.counters.export projects deterministic per-rule totals (COUNT-03, generatedAt = max journal at; producer-tail tolerated). checks.contribution.report joins counters as the canonical firing source (CONTRIB-03 on absent/empty journal; coverage none|partial|complete; live effectiveCoverage positive). Validator inventory now includes every rules[]-declaring command — fail-closed gate surfaced 9 contract-declaration defects, fixed with domain contracts.</item>
|
|
16
|
+
<item>RFC-1474: check-execution counters — apply re-review findings (structural skip flag, violations extraction, Date.parse ordering, DEV-5/6)</item>
|
|
17
|
+
<item>RFC-1474: check-execution counters — close emission-shape extraction class (round-3 review)</item>
|
|
18
|
+
<item>RFC-1474: check-execution counters — null-doc inventory fail-closed + token boundaries (round-4 review)</item>
|
|
19
|
+
</CHANGE_SUMMARY>
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import path from "node:path";
|
|
23
|
+
import { parse as yamlParse } from "yaml";
|
|
24
|
+
import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
25
|
+
import type {
|
|
26
|
+
Diagnostic,
|
|
27
|
+
ForgeCommandInput,
|
|
28
|
+
ForgeCommandResult,
|
|
29
|
+
ForgeRuntimeContext,
|
|
30
|
+
} from "../../../src/types.ts";
|
|
31
|
+
import { readCountersJournal } from "./counters-journal.ts";
|
|
32
|
+
|
|
33
|
+
const INVENTORY_PATH = "docs/validator-inventory.generated.yaml";
|
|
34
|
+
|
|
35
|
+
export interface CountersValidateData {
|
|
36
|
+
command: "checks.counters.validate";
|
|
37
|
+
status: "ok";
|
|
38
|
+
records: number;
|
|
39
|
+
malformedLines: number;
|
|
40
|
+
truncatedTail: boolean;
|
|
41
|
+
diagnostics: Diagnostic[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export async function runCountersValidate(
|
|
45
|
+
_input: ForgeCommandInput,
|
|
46
|
+
context: ForgeRuntimeContext,
|
|
47
|
+
): Promise<ForgeCommandResult<CountersValidateData>> {
|
|
48
|
+
const io = resolveIo(context.io ?? ambientIo);
|
|
49
|
+
const root = context.workspaceRoot;
|
|
50
|
+
const diagnostics: Diagnostic[] = [];
|
|
51
|
+
|
|
52
|
+
const { records, malformedLines, truncatedTail } = await readCountersJournal(root);
|
|
53
|
+
|
|
54
|
+
for (let i = 0; i < malformedLines; i++) {
|
|
55
|
+
diagnostics.push({
|
|
56
|
+
ruleId: "COUNT-01",
|
|
57
|
+
severity: "error",
|
|
58
|
+
message: `malformed journal record (unparseable non-tail line) — counters journal drifted from the record schema`,
|
|
59
|
+
file: "docs/.index/checks/counters.jsonl",
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const invSrc = await io.readFile(path.join(root, INVENTORY_PATH)).catch((error: unknown) => {
|
|
64
|
+
// Only ENOENT means "absent" — EACCES/EISDIR etc. must surface as real
|
|
65
|
+
// I/O failures, not misreport as a missing rule universe.
|
|
66
|
+
if ((error as NodeJS.ErrnoException).code === "ENOENT") return null;
|
|
67
|
+
throw error;
|
|
68
|
+
});
|
|
69
|
+
let inventoryIds: Set<string> | undefined;
|
|
70
|
+
if (invSrc === null) {
|
|
71
|
+
if (records.length > 0) {
|
|
72
|
+
diagnostics.push({
|
|
73
|
+
ruleId: "COUNT-01",
|
|
74
|
+
severity: "error",
|
|
75
|
+
message: `${INVENTORY_PATH} missing — rule universe unavailable, ${records.length} journal record(s) cannot resolve`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
const parsed = (() => {
|
|
80
|
+
try {
|
|
81
|
+
return yamlParse(invSrc) as {
|
|
82
|
+
contracts?: { contract?: string; validators?: { rules?: { id?: string }[] }[] }[];
|
|
83
|
+
} | null;
|
|
84
|
+
} catch {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
})();
|
|
88
|
+
// undefined = unparseable, null = empty document — both leave the rule
|
|
89
|
+
// universe unavailable and must surface, never pass silently.
|
|
90
|
+
if (parsed == null) {
|
|
91
|
+
diagnostics.push({
|
|
92
|
+
ruleId: "COUNT-01",
|
|
93
|
+
severity: "error",
|
|
94
|
+
message: `${INVENTORY_PATH} ${parsed === undefined ? "malformed — rule universe unparseable" : "empty — no contracts declared"}; journal records cannot resolve`,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
inventoryIds = parsed
|
|
98
|
+
? new Set(
|
|
99
|
+
(parsed.contracts ?? []).flatMap((c) =>
|
|
100
|
+
(c.validators ?? []).flatMap((v) => (v.rules ?? []).map((r) => `${c.contract}/${r.id}`)),
|
|
101
|
+
),
|
|
102
|
+
)
|
|
103
|
+
: undefined;
|
|
104
|
+
records.forEach((r, i) => {
|
|
105
|
+
if (inventoryIds !== undefined && !inventoryIds.has(r.ruleId)) {
|
|
106
|
+
diagnostics.push({
|
|
107
|
+
ruleId: "COUNT-01",
|
|
108
|
+
severity: "error",
|
|
109
|
+
message: `journal record ${i} ruleId "${r.ruleId}" resolves to no inventory rule — journal drifted from the rule universe`,
|
|
110
|
+
file: "docs/.index/checks/counters.jsonl",
|
|
111
|
+
});
|
|
112
|
+
} else if (!r.ruleId.startsWith(`${r.contract}/`)) {
|
|
113
|
+
diagnostics.push({
|
|
114
|
+
ruleId: "COUNT-01",
|
|
115
|
+
severity: "error",
|
|
116
|
+
message: `journal record ${i} ruleId "${r.ruleId}" disagrees with its contract "${r.contract}"`,
|
|
117
|
+
file: "docs/.index/checks/counters.jsonl",
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let prevAt = "";
|
|
124
|
+
let prevAtMs = Number.NEGATIVE_INFINITY;
|
|
125
|
+
records.forEach((r, i) => {
|
|
126
|
+
const atMs = Date.parse(r.at);
|
|
127
|
+
// Numeric ordering, not lexical — z.datetime() admits second-precision
|
|
128
|
+
// ISO whose string sort would misorder against millisecond stamps.
|
|
129
|
+
if (prevAt !== "" && atMs < prevAtMs) {
|
|
130
|
+
diagnostics.push({
|
|
131
|
+
ruleId: "COUNT-02",
|
|
132
|
+
severity: "error",
|
|
133
|
+
message: `journal record ${i} at "${r.at}" precedes record ${i - 1} at "${prevAt}" — append order is non-monotonic`,
|
|
134
|
+
file: "docs/.index/checks/counters.jsonl",
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (atMs > prevAtMs) {
|
|
138
|
+
prevAtMs = atMs;
|
|
139
|
+
prevAt = r.at;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const errors = diagnostics.filter((d) => d.severity === "error").length;
|
|
144
|
+
return {
|
|
145
|
+
data: {
|
|
146
|
+
command: "checks.counters.validate",
|
|
147
|
+
status: "ok",
|
|
148
|
+
records: records.length,
|
|
149
|
+
malformedLines,
|
|
150
|
+
truncatedTail,
|
|
151
|
+
diagnostics,
|
|
152
|
+
},
|
|
153
|
+
summary:
|
|
154
|
+
diagnostics.length === 0
|
|
155
|
+
? `${records.length} journal record(s) — integrity clean`
|
|
156
|
+
: `${diagnostics.length} counter(s) violation(s): ${errors} error`,
|
|
157
|
+
exitCode: errors > 0 ? 1 : 0,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1473 variantCandidates tests — rules with ≥1 unique emitted finding join the variant-candidate list for sibling sweeps; silent/redundant rules are excluded.</purpose>
|
|
4
|
+
</MODULE_CONTRACT>
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
8
|
+
import { mkdtemp, rm, mkdir, writeFile } from "node:fs/promises";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { tmpdir } from "node:os";
|
|
11
|
+
import { runContributionReport } from "./contribution-report.ts";
|
|
12
|
+
import type { ForgeRuntimeContext } from "../../../src/types.ts";
|
|
13
|
+
|
|
14
|
+
let root: string;
|
|
15
|
+
|
|
16
|
+
function ctx(): ForgeRuntimeContext {
|
|
17
|
+
return {
|
|
18
|
+
workspaceRoot: root,
|
|
19
|
+
outputFormat: "json",
|
|
20
|
+
logger: { info() {}, warn() {}, error() {}, success() {}, section() {} },
|
|
21
|
+
} as unknown as ForgeRuntimeContext;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function flags(f: Record<string, unknown> = {}) {
|
|
25
|
+
return { argv: [], flags: f } as never;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
beforeEach(async () => {
|
|
29
|
+
root = await mkdtemp(join(tmpdir(), "variant-"));
|
|
30
|
+
await mkdir(join(root, "docs", "sessions", "audit"), { recursive: true });
|
|
31
|
+
await mkdir(join(root, "docs", "metrics"), { recursive: true });
|
|
32
|
+
await writeFile(
|
|
33
|
+
join(root, "docs", "validator-inventory.generated.yaml"),
|
|
34
|
+
`contracts:
|
|
35
|
+
- contract: knowledge
|
|
36
|
+
validators:
|
|
37
|
+
- rules:
|
|
38
|
+
- id: FIRED-01
|
|
39
|
+
severity: error
|
|
40
|
+
- id: QUIET-01
|
|
41
|
+
severity: error
|
|
42
|
+
`,
|
|
43
|
+
);
|
|
44
|
+
await writeFile(join(root, "docs", "frictions.yaml"), "frictions: []\n");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
afterEach(async () => {
|
|
48
|
+
await rm(root, { recursive: true, force: true });
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
describe("variantCandidates (RFC-1473)", () => {
|
|
52
|
+
test("fired-with-unique-finding → candidate; silent rule excluded", async () => {
|
|
53
|
+
await writeFile(
|
|
54
|
+
join(root, "docs", "sessions", "audit", "s1.audit.yaml"),
|
|
55
|
+
`sessionId: s1
|
|
56
|
+
findings:
|
|
57
|
+
- ruleId: FIRED-01
|
|
58
|
+
signature: "sig-x"
|
|
59
|
+
`,
|
|
60
|
+
);
|
|
61
|
+
const res = await runContributionReport(flags({}), ctx());
|
|
62
|
+
expect(res.data?.variantCandidates.some((v) => v.rule === "FIRED-01" && v.siblingScope === "knowledge")).toBe(true);
|
|
63
|
+
expect(res.data?.variantCandidates.some((v) => v.rule === "QUIET-01")).toBe(false);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { forgeChecksModule } from "./checks.module.ts";
|
|
2
|
+
export { runContributionReport } from "./handlers/contribution-report.ts";
|
|
3
|
+
export { runCountersExport, type CountersExportData, type CounterRuleTotal } from "./handlers/counters-export.ts";
|
|
4
|
+
export { runCountersValidate, type CountersValidateData } from "./handlers/counters-validate.ts";
|
|
5
|
+
export {
|
|
6
|
+
COUNTERS_JOURNAL_PATH,
|
|
7
|
+
CHECK_COUNTER_OUTCOMES,
|
|
8
|
+
checkCounterRecordSchema,
|
|
9
|
+
computeRunOutcomes,
|
|
10
|
+
readCountersJournal,
|
|
11
|
+
recordRuleEvaluations,
|
|
12
|
+
type CheckCounterOutcome,
|
|
13
|
+
type CheckCounterRecord,
|
|
14
|
+
type CountersJournalRead,
|
|
15
|
+
} from "./handlers/counters-journal.ts";
|
|
@@ -6,17 +6,12 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<item>RFC-1248: VITE-CLIENT-DEP-02 lazy-import gate + SCAN-02 validator reads-root existence check (RFC-1248)</item>
|
|
16
|
-
<item>RFC-1251: step 3 — diagnostic.rule-id.validate gate + RULEID-CANONICAL-01, pipeline-wired</item>
|
|
17
|
-
<item>RFC-1318: add compass.header.scaffold codemod for mechanical header sweeps</item>
|
|
18
|
-
<item>RFC-1323: write-time comment-terminator safety — shared comment-safety seam, authored CS-08 reject, injected neutralization, header-region scan</item>
|
|
19
|
-
<history>KERNEL-FLAG-02, RFC-0374, RFC-0538, RFC-0556, RFC-1095, RFC-1097, RFC-1173, RFC-1242</history>
|
|
9
|
+
<item>RFC-1354: step 4 — CMD-MAN-02 sweep: writes/generates on mutating commands, mutatesState:false on read-only and port/in-memory commands, execOnReadOnly on subprocess commands (0 CMD-MAN-02; 42 ENV-INPUT-02 excluded per Q-1)</item>
|
|
10
|
+
<item>RFC-1390: bind code invariants to enforcing checks (INV-tags, checked-by, baseline, generator)</item>
|
|
11
|
+
<item>RFC-1390: close review findings on invariant binding machinery</item>
|
|
12
|
+
<item>RFC-1390: close round-2 review findings on invariant binding machinery</item>
|
|
13
|
+
<item>RFC-1461: declare rules[] severity via CommandRuleDecl workspace-wide (RFC-1461)</item>
|
|
14
|
+
<history>KERNEL-FLAG-02, RFC-0374, RFC-0538, RFC-0556, RFC-1095, RFC-1097, RFC-1173, RFC-1231, RFC-1242, RFC-1248, RFC-1251, RFC-1318, RFC-1323, RFC-1351</history>
|
|
20
15
|
</CHANGE_SUMMARY>
|
|
21
16
|
*/
|
|
22
17
|
|
|
@@ -35,6 +30,7 @@ import { runCompassMigrate } from "./handlers/compass-migrate-handler.ts";
|
|
|
35
30
|
import { runCompassHeaderScaffold } from "./handlers/compass-header-scaffold-handler.ts";
|
|
36
31
|
import { runCompassDocsValidate } from "./handlers/compass-docs-validate.ts";
|
|
37
32
|
import { runCompassDocsScaffold } from "./handlers/compass-docs-scaffold.ts";
|
|
33
|
+
import { runCompassInvariantsGenerate } from "./handlers/compass-invariants-generate.ts";
|
|
38
34
|
|
|
39
35
|
const compassScanFlags = {
|
|
40
36
|
packages: {
|
|
@@ -72,6 +68,8 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
72
68
|
{
|
|
73
69
|
name: "compass.inventory",
|
|
74
70
|
mutatesState: true,
|
|
71
|
+
writes: ["docs/compass-inventory.xml"],
|
|
72
|
+
generates: [],
|
|
75
73
|
description: "Generate the repository-wide Compass source inventory XML report.",
|
|
76
74
|
scope: "workspace",
|
|
77
75
|
acceptsAllFlag: true,
|
|
@@ -89,13 +87,19 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
89
87
|
contract: "compass",
|
|
90
88
|
// RFC-1323: first declared CS-family id — sibling CS-05/06/07 stay
|
|
91
89
|
// undeclared (pre-existing inconsistency the RFC does not backfill).
|
|
92
|
-
|
|
90
|
+
// COMPASS-INVARIANT-01 (high-risk file without any @ai-invariant) is
|
|
91
|
+
// emitted by compass-inventory-handler and declared so lint: bindings
|
|
92
|
+
// can name it; 02..07 are the RFC-1390 binding rules.
|
|
93
|
+
rules: [{ id: "COMPASS-CS-08", severity: "error" }, { id: "COMPASS-INVARIANT-01", severity: "error" }, { id: "COMPASS-INVARIANT-02", severity: "warning" }, { id: "COMPASS-INVARIANT-03", severity: "error" }, { id: "COMPASS-INVARIANT-04", severity: "error" }, { id: "COMPASS-INVARIANT-05", severity: "error" }, { id: "COMPASS-INVARIANT-06", severity: "error" }, { id: "COMPASS-INVARIANT-07", severity: "warning" }],
|
|
93
94
|
description:
|
|
94
95
|
"Validate authored source files against current Compass scaffolding requirements.",
|
|
95
96
|
scope: "workspace",
|
|
96
97
|
acceptsAllFlag: true,
|
|
97
98
|
flags: { ...compassScanFlags, mode: compassModeFlag },
|
|
98
99
|
reads: [
|
|
100
|
+
"docs/invariants.generated.yaml",
|
|
101
|
+
"docs/invariants.baseline.generated.yaml",
|
|
102
|
+
"docs/validator-inventory.generated.yaml",
|
|
99
103
|
"packages/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
100
104
|
"apps/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}", // scan-coverage: consumer-workshop root — apps/ exists in consumer workshops, not this monorepo
|
|
101
105
|
"services/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
@@ -103,6 +107,47 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
103
107
|
],
|
|
104
108
|
execute: runCompassValidation,
|
|
105
109
|
},
|
|
110
|
+
{
|
|
111
|
+
name: "compass.invariants.generate",
|
|
112
|
+
mutatesState: true,
|
|
113
|
+
contract: "compass",
|
|
114
|
+
rules: [],
|
|
115
|
+
writes: ["docs/invariants.generated.yaml", "docs/invariants.baseline.generated.yaml"],
|
|
116
|
+
generates: [
|
|
117
|
+
{ path: "docs/invariants.generated.yaml", phase: "on-demand" },
|
|
118
|
+
{ path: "docs/invariants.baseline.generated.yaml", phase: "on-demand" },
|
|
119
|
+
],
|
|
120
|
+
description:
|
|
121
|
+
"RFC-1390: project every @ai-invariant into docs/invariants.generated.yaml and manage the shrink-only unbound-invariant baseline. --seed writes the baseline once; --shrink removes resolved entries only; plain runs refresh the index with retiredIds merged forward.",
|
|
122
|
+
scope: "workspace",
|
|
123
|
+
acceptsAllFlag: true,
|
|
124
|
+
flags: {
|
|
125
|
+
...compassScanFlags,
|
|
126
|
+
seed: {
|
|
127
|
+
kind: "boolean",
|
|
128
|
+
description:
|
|
129
|
+
"Write docs/invariants.baseline.generated.yaml once from the current unbound corpus (refuses when the baseline exists).",
|
|
130
|
+
},
|
|
131
|
+
shrink: {
|
|
132
|
+
kind: "boolean",
|
|
133
|
+
description:
|
|
134
|
+
"Remove baseline entries whose invariants are now bound or deleted. Never adds entries — exits non-zero when the scan reveals unseeded unbound debt.",
|
|
135
|
+
},
|
|
136
|
+
"dry-run": {
|
|
137
|
+
kind: "boolean",
|
|
138
|
+
description: "Report the projection without writing any file.",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
reads: [
|
|
142
|
+
"packages/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
143
|
+
"apps/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
144
|
+
"services/**/*.{ts,tsx,astro,js,mjs,css,cs,tscn,tres,gd,md}",
|
|
145
|
+
"docs/invariants.generated.yaml",
|
|
146
|
+
"docs/invariants.baseline.generated.yaml",
|
|
147
|
+
"docs/validator-inventory.generated.yaml",
|
|
148
|
+
],
|
|
149
|
+
execute: runCompassInvariantsGenerate,
|
|
150
|
+
},
|
|
106
151
|
{
|
|
107
152
|
name: "compass.summary.record",
|
|
108
153
|
coverage: "operator" as const,
|
|
@@ -215,7 +260,6 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
215
260
|
},
|
|
216
261
|
{
|
|
217
262
|
name: "compass.header.scaffold",
|
|
218
|
-
coverage: "operator" as const,
|
|
219
263
|
description:
|
|
220
264
|
"Author and repair Compass v2 headers (RFC-1318): append-only merge, closed-block guarantee, derived-or-sentinel purposes, fixture-string safety (SCAFFOLD-01), high-risk deference. --census reports the coverage manifest without writing; apply refuses when target files carry uncommitted changes unless --force.",
|
|
221
265
|
scope: "workspace",
|
|
@@ -365,13 +409,7 @@ export const forgeCompassModule: ForgeModule = {
|
|
|
365
409
|
modulePath: "packages/forge/os/compass/compass.module.ts",
|
|
366
410
|
mutatesState: false,
|
|
367
411
|
contract: "compass",
|
|
368
|
-
rules: [
|
|
369
|
-
"COMPASS-DOC-00",
|
|
370
|
-
"COMPASS-DOC-01",
|
|
371
|
-
"COMPASS-DOC-02",
|
|
372
|
-
"COMPASS-DOC-03",
|
|
373
|
-
"COMPASS-DOC-04",
|
|
374
|
-
],
|
|
412
|
+
rules: [{ id: "COMPASS-DOC-00", severity: "error" }, { id: "COMPASS-DOC-01", severity: "error" }, { id: "COMPASS-DOC-02", severity: "error" }, { id: "COMPASS-DOC-03", severity: "error" }, { id: "COMPASS-DOC-04", severity: "warning" }],
|
|
375
413
|
description:
|
|
376
414
|
"Validate that the live docs/*.xml corpus ∪ bindings.paths.compassDocs resolves every path, workspace id, and knowledge-graph link target it references, and that corpus documents carry the forge/compass-docs@1 schema marker (RFC-1242, RFC-1253). Read-only.",
|
|
377
415
|
scope: "workspace",
|
|
@@ -14,10 +14,12 @@ deference, deterministic repair of known malformation shapes.
|
|
|
14
14
|
</non-goals>
|
|
15
15
|
</MODULE_CONTRACT>
|
|
16
16
|
<CHANGE_SUMMARY>
|
|
17
|
-
<item>RFC-1318: add compass.header.scaffold codemod for mechanical header sweeps</item>
|
|
18
17
|
<item>RFC-1318</item>
|
|
19
18
|
<item>RFC-1323: write-time comment-terminator safety — shared comment-safety seam, authored CS-08 reject, injected neutralization, header-region scan</item>
|
|
20
19
|
<item>RFC-1323: review pass — still-open enclosing-style detection, per-file pre-pass parity, scaffold never-throws, docs.scaffold raw-leaf assert, trim per-file skip, CS-08 always-error severity</item>
|
|
20
|
+
<item>RFC-1390: close review findings on invariant binding machinery</item>
|
|
21
|
+
<item>RFC-1390: close round-2 review findings on invariant binding machinery</item>
|
|
22
|
+
<history>RFC-1318</history>
|
|
21
23
|
</CHANGE_SUMMARY>
|
|
22
24
|
*/
|
|
23
25
|
|
|
@@ -459,7 +461,7 @@ function scaffoldFileImpl(input: ScaffoldFileInput, policy: CompassPolicy): Scaf
|
|
|
459
461
|
}
|
|
460
462
|
|
|
461
463
|
// High-risk deference — a new header on a high-risk file requires an
|
|
462
|
-
// @ai-invariant the codemod cannot invent
|
|
464
|
+
// authored @ai-invariant comment; the codemod cannot invent it.
|
|
463
465
|
const aiInvariants = collectAiInvariants(source, policy);
|
|
464
466
|
if (!span && riskClass === "high" && aiInvariants.length === 0) {
|
|
465
467
|
return skipped(
|