@warpgogol/forge 8.0.4 → 9.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.
- package/CHANGELOG.md +56 -0
- package/bin/cli.ts +26 -13
- package/dist/bin/cli.js +18 -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 +209 -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 +18 -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/authority/handlers/delegate.d.ts.map +1 -1
- package/dist/os/authority/handlers/delegate.js +2 -1
- package/dist/os/authority/handlers/delegate.js.map +1 -1
- package/dist/os/authority/index.d.ts.map +1 -1
- package/dist/os/authority/index.js +2 -1
- package/dist/os/authority/index.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 +94 -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 +265 -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 +126 -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 +155 -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 +135 -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 +17 -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-docs-scaffold.js +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold.js +10 -3
- 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 +209 -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 +73 -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 +146 -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 +74 -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 +191 -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 +16 -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 +70 -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 +232 -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 +15 -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 +75 -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 +202 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.d.ts +11 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.d.ts.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.js +428 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.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 +141 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.js.map +1 -0
- package/dist/os/knowledge/index.d.ts +5 -0
- package/dist/os/knowledge/index.d.ts.map +1 -0
- package/dist/os/knowledge/index.js +17 -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 +95 -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/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +8 -7
- package/dist/os/queue/manifest.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 +41 -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 +48 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.js +148 -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 +67 -7
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts +44 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.js +104 -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 +262 -56
- 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/lifecycle.d.ts.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.js +13 -6
- package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +144 -13
- 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 +54 -13
- 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 +68 -15
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +110 -12
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +24 -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 +188 -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/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +5 -2
- package/dist/os/session/handlers/save.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 +82 -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 +269 -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 +60 -0
- package/dist/os/trajectory/handlers/journal-io.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/journal-io.js +179 -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 +145 -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 +449 -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 +179 -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 +16 -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 +98 -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 +56 -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 +28 -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 +46 -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 +34 -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/os/yaml/handlers/scalars-validate.d.ts +28 -0
- package/dist/os/yaml/handlers/scalars-validate.d.ts.map +1 -0
- package/dist/os/yaml/handlers/scalars-validate.js +311 -0
- package/dist/os/yaml/handlers/scalars-validate.js.map +1 -0
- package/dist/os/yaml/index.d.ts +4 -0
- package/dist/os/yaml/index.d.ts.map +1 -0
- package/dist/os/yaml/index.js +15 -0
- package/dist/os/yaml/index.js.map +1 -0
- package/dist/os/yaml/yaml.module.d.ts +3 -0
- package/dist/os/yaml/yaml.module.d.ts.map +1 -0
- package/dist/os/yaml/yaml.module.js +58 -0
- package/dist/os/yaml/yaml.module.js.map +1 -0
- 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 +6 -3
- 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 +91 -16
- 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 +219 -0
- package/dist/src/compass/invariant-parser.js.map +1 -0
- package/dist/src/config/forge-config.d.ts +125 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +110 -17
- 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 +141 -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 +17 -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 +451 -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 +97 -0
- package/dist/src/formal/proof-spec.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/knowledge/index.d.ts +2 -2
- package/dist/src/knowledge/index.d.ts.map +1 -1
- package/dist/src/knowledge/index.js +4 -3
- package/dist/src/knowledge/index.js.map +1 -1
- package/dist/src/knowledge/parse.d.ts +1 -0
- package/dist/src/knowledge/parse.d.ts.map +1 -1
- package/dist/src/knowledge/parse.js +20 -18
- package/dist/src/knowledge/parse.js.map +1 -1
- 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 +10 -4
- 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/knowledge/sync.d.ts +61 -0
- package/dist/src/knowledge/sync.d.ts.map +1 -1
- package/dist/src/knowledge/sync.js +202 -7
- package/dist/src/knowledge/sync.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +18 -3
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/compass-docs/semantic-layer-block.js +1 -1
- package/dist/src/onboarding/doctor.d.ts +2 -0
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +253 -27
- 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/onboarding/nested-agents-generate.js +1 -1
- package/dist/src/onboarding/nested-agents-templates.js +1 -1
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +18 -10
- package/dist/src/onboarding/upgrade.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 +83 -0
- package/dist/src/reachability/command-mentions.js.map +1 -0
- package/dist/src/registry.d.ts +30 -0
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +168 -68
- 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/dist/src/validators/skill-validate.d.ts +5 -0
- package/dist/src/validators/skill-validate.d.ts.map +1 -1
- package/dist/src/validators/skill-validate.js +34 -8
- package/dist/src/validators/skill-validate.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 +232 -0
- package/os/agent/index.ts +18 -0
- package/os/agent/invoke-adapter.ts +119 -0
- package/os/authority/authority.module.ts +2 -10
- package/os/authority/handlers/delegate.ts +2 -1
- package/os/authority/index.ts +2 -1
- package/os/checks/checks.module.ts +99 -0
- package/os/checks/handlers/contribution-report.test.ts +250 -0
- package/os/checks/handlers/contribution-report.ts +317 -0
- package/os/checks/handlers/counters-export.test.ts +181 -0
- package/os/checks/handlers/counters-export.ts +174 -0
- package/os/checks/handlers/counters-journal.test.ts +193 -0
- package/os/checks/handlers/counters-journal.ts +180 -0
- package/os/checks/handlers/counters-validate.test.ts +182 -0
- package/os/checks/handlers/counters-validate.ts +163 -0
- package/os/checks/handlers/variant-candidates.test.ts +71 -0
- package/os/checks/index.ts +27 -0
- package/os/compass/compass.module.ts +58 -20
- package/os/compass/handlers/compass-docs-scaffold.ts +1 -1
- package/os/compass/handlers/compass-header-scaffold.ts +10 -3
- package/os/compass/handlers/compass-invariants-generate.ts +294 -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 +78 -0
- package/os/context/handlers/context-assemble.test.ts +95 -0
- package/os/context/handlers/context-assemble.ts +175 -0
- package/os/context/handlers/context-slate-eval.test.ts +70 -0
- package/os/context/handlers/context-slate-eval.ts +90 -0
- package/os/context/handlers/index-build.test.ts +101 -0
- package/os/context/handlers/index-build.ts +214 -0
- package/os/context/handlers/no-model-deps.test.ts +38 -0
- package/os/context/handlers/slate-fill.test.ts +37 -0
- package/os/context/index.ts +16 -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 +82 -0
- package/os/gate/handlers/gate-probe-catalog.ts +89 -0
- package/os/gate/handlers/gate-probe.test.ts +114 -0
- package/os/gate/handlers/gate-probe.ts +256 -0
- package/os/gate/index.ts +15 -0
- package/os/instructions/budget.test.ts +131 -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 +79 -0
- package/os/knowledge/handlers/knowledge-authz-probe.test.ts +107 -0
- package/os/knowledge/handlers/knowledge-authz-probe.ts +240 -0
- package/os/knowledge/handlers/knowledge-conflicts-resolve.ts +571 -0
- package/os/knowledge/handlers/knowledge-rebuild.test.ts +82 -0
- package/os/knowledge/handlers/knowledge-rebuild.ts +167 -0
- package/os/knowledge/index.ts +17 -0
- package/os/knowledge/knowledge.module.ts +100 -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 +71 -1
- package/os/queue/handlers/queue-validate.ts +132 -5
- package/os/queue/manifest.ts +8 -7
- 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 +150 -0
- package/os/resolver/handlers/resolver-doors-audit.ts +281 -0
- package/os/resolver/resolver.module.ts +44 -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 +186 -0
- package/os/rfc/handlers/implement-stamp-formal.test.ts +168 -0
- package/os/rfc/handlers/implement-stamp-origin.ts +97 -13
- package/os/rfc/handlers/implement-stamp-outcome.test.ts +193 -0
- package/os/rfc/handlers/implement-stamp-outcome.ts +148 -0
- package/os/rfc/handlers/implement-stamp-stale.test.ts +2 -1
- package/os/rfc/handlers/implement-stamp.ts +280 -53
- package/os/rfc/handlers/index-graph.ts +66 -4
- package/os/rfc/handlers/lifecycle.test.ts +59 -1
- package/os/rfc/handlers/lifecycle.ts +25 -15
- package/os/rfc/handlers/list-create.test.ts +223 -0
- package/os/rfc/handlers/list-create.ts +173 -13
- 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-rfc1334.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1453.test.ts +164 -0
- package/os/rfc/handlers/validate-rules-rfc1454.test.ts +137 -0
- package/os/rfc/handlers/validate-rules-rfc1455.test.ts +283 -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 +67 -17
- package/os/rfc/rfc-0000-template.md +20 -0
- package/os/rfc/rfc.module.ts +74 -15
- package/os/rfc/types.ts +139 -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-1333/imp12-binding.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1333/imp12-gate.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1333/skills-and-types.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1333/verify-workspace.acceptance.test.ts +12 -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 +39 -0
- package/os/rfc/verifier/rfc-1391/fixtures/small-domain.proof.test.ts +45 -0
- package/os/rfc/verifier/rfc-1391/origin-proof-spec-entry.acceptance.test.ts +175 -0
- package/os/rfc/verifier/rfc-1391/support.ts +209 -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/save.ts +5 -2
- package/os/session/handlers/session-audit-detectors.test.ts +97 -0
- package/os/session/handlers/session-audit-report.test.ts +70 -0
- package/os/session/handlers/session-audit-report.ts +97 -0
- package/os/session/handlers/session-audit.test.ts +86 -0
- package/os/session/handlers/session-audit.ts +321 -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 +75 -0
- package/os/trajectory/handlers/journal-io.ts +229 -0
- package/os/trajectory/handlers/outcome-record.test.ts +198 -0
- package/os/trajectory/handlers/outcome-record.ts +165 -0
- package/os/trajectory/handlers/producer-trust.test.ts +169 -0
- package/os/trajectory/handlers/trajectory-index.test.ts +275 -0
- package/os/trajectory/handlers/trajectory-index.ts +493 -0
- package/os/trajectory/handlers/trajectory-recall.test.ts +254 -0
- package/os/trajectory/handlers/trajectory-recall.ts +201 -0
- package/os/trajectory/handlers/trajectory.test.ts +100 -0
- package/os/trajectory/handlers/verdict-binding.test.ts +249 -0
- package/os/trajectory/index.ts +16 -0
- package/os/trajectory/trajectory.module.ts +103 -0
- package/os/werkstatt/handlers/session-close.ts +82 -0
- package/os/werkstatt/handlers/session-engine.ts +34 -0
- package/os/werkstatt/handlers/session-open.ts +68 -0
- package/os/werkstatt/handlers/session-status.ts +55 -0
- package/os/werkstatt/werkstatt.module.ts +101 -3
- package/os/yaml/handlers/scalars-validate.ts +343 -0
- package/os/yaml/index.ts +23 -0
- package/os/yaml/scalars.test.ts +152 -0
- package/os/yaml/yaml.module.ts +61 -0
- package/package.json +210 -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 +13 -5
- package/skills/fo/fo-memory-sync/SKILL.md +9 -0
- package/skills/fo/fo-memory-sync/fix-patterns.md +65 -0
- package/skills/fo/fo-memory-sync/learned-principles.md +10 -0
- package/skills/fo/fo-memory-sync/qa-log.md +30 -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-session-save/SKILL.md +2 -0
- 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 +7 -0
- package/skills/shared/grilling/learned-principles.md +7 -0
- package/skills/shared/grilling/qa-log.md +39 -0
- package/skills/shared/writing-great-skills/SKILL.md +12 -9
- package/src/authority/delegations.ts +6 -3
- package/src/cli-flags.ts +111 -16
- package/src/compass/index.ts +37 -0
- package/src/compass/invariant-parser.ts +254 -0
- package/src/config/forge-config.ts +150 -22
- package/src/conformance/index.ts +281 -0
- package/src/formal/exhaustive.test.ts +117 -0
- package/src/formal/exhaustive.ts +183 -0
- package/src/formal/index.ts +27 -0
- package/src/formal/proof-runner.test.ts +310 -0
- package/src/formal/proof-runner.ts +563 -0
- package/src/formal/proof-spec.test.ts +70 -0
- package/src/formal/proof-spec.ts +132 -0
- package/src/index.ts +1 -0
- package/src/knowledge/index.ts +11 -2
- package/src/knowledge/parse.ts +20 -17
- package/src/knowledge/schema.ts +14 -4
- package/src/knowledge/serialize.ts +3 -0
- package/src/knowledge/sync.ts +281 -7
- package/src/onboarding/agents-generate.ts +19 -3
- package/src/onboarding/compass-docs/semantic-layer-block.ts +1 -1
- package/src/onboarding/doctor.ts +277 -27
- package/src/onboarding/init.ts +3 -3
- package/src/onboarding/nested-agents-generate.ts +1 -1
- package/src/onboarding/nested-agents-templates.ts +1 -1
- package/src/onboarding/templates/behavioral-layer-core.md +1 -1
- package/src/onboarding/upgrade.ts +18 -10
- package/src/profiles/profile-schema.ts +10 -2
- package/src/reachability/command-mentions.ts +89 -0
- package/src/registry.ts +197 -76
- package/src/tests/bindings-schema.test.ts +4 -0
- package/src/tests/cli-flags.test.ts +226 -1
- package/src/tests/discover-pack-skills.test.ts +26 -0
- package/src/tests/doctor-autonomy.test.ts +144 -0
- package/src/tests/doctor-dist-freshness.test.ts +24 -0
- package/src/tests/doctor-knowledge-conflicts.test.ts +135 -0
- package/src/tests/doctor-nested-agents.test.ts +30 -1
- 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 +238 -4
- package/src/tests/knowledge-conflicts-resolve.pbt.test.ts +38 -0
- package/src/tests/knowledge-conflicts-resolve.test.ts +648 -0
- package/src/tests/knowledge-parse.test.ts +26 -1
- package/src/tests/rfc-verification-verdict-ingest.test.ts +244 -0
- package/src/tests/session-handlers.test.ts +47 -0
- package/src/tests/session-retro.test.ts +47 -0
- package/src/tests/skill-validate-knowledge.test.ts +93 -2
- package/src/tests/upgrade.test.ts +38 -0
- package/src/types.ts +59 -18
- package/src/utils/sync-fs.ts +2 -0
- package/src/validators/skill-validate.ts +37 -9
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
RFC-1391: formal-tier stamp gates — RFC-IMP-13 blocks a formal RFC whose proof
|
|
5
|
+
probes lack a `proved` envelope verdict (no waiver), and RFC-IMP-11/RFC-IMP-12
|
|
6
|
+
apply to `verificationTier: formal` exactly as to `high` (AC-5, AC-6).
|
|
7
|
+
</purpose>
|
|
8
|
+
<non-goals>
|
|
9
|
+
<item>Do not exercise git — origins, reports, and envelope records are supplied directly.</item>
|
|
10
|
+
</non-goals>
|
|
11
|
+
</MODULE_CONTRACT>
|
|
12
|
+
<CHANGE_SUMMARY>
|
|
13
|
+
<item>RFC-1391: IMP-13 formal gate + formal-tier IMP-11/12 applicability tests.</item>
|
|
14
|
+
<item>RFC-1391: make the formal verification tier checker-bound (RFC-1391)</item>
|
|
15
|
+
</CHANGE_SUMMARY>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { describe, expect, it } from "vitest";
|
|
19
|
+
import {
|
|
20
|
+
evaluateAcceptanceVerificationGate,
|
|
21
|
+
evaluateFormalProofGate,
|
|
22
|
+
evaluateOriginGates,
|
|
23
|
+
} from "./implement-stamp-origin.ts";
|
|
24
|
+
import type {
|
|
25
|
+
AcceptanceProbe,
|
|
26
|
+
ProbeOriginRecord,
|
|
27
|
+
VerificationEvidenceProbeRecord,
|
|
28
|
+
} from "../types.ts";
|
|
29
|
+
|
|
30
|
+
const BODY = `
|
|
31
|
+
## Acceptance criteria
|
|
32
|
+
|
|
33
|
+
- [ ] AC-1: WHEN the gate sees a weakened test, THE commit SHALL be blocked.
|
|
34
|
+
- [ ] AC-2: THE module SHALL export the evaluator.
|
|
35
|
+
|
|
36
|
+
## Implementation notes for agents
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
const proofProbe: AcceptanceProbe = {
|
|
40
|
+
probe: "proof",
|
|
41
|
+
criterion: "AC-1",
|
|
42
|
+
spec: "docs/specs/proofs/x.proof.yaml",
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const formalFm = (extra: Record<string, unknown> = {}) => ({
|
|
46
|
+
createdAt: "2026-10-18",
|
|
47
|
+
verificationTier: "formal",
|
|
48
|
+
...extra,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const record = (
|
|
52
|
+
probe: AcceptanceProbe,
|
|
53
|
+
verdict: "proved" | "refuted" | "unavailable" | "error" | undefined,
|
|
54
|
+
): VerificationEvidenceProbeRecord => ({
|
|
55
|
+
probe,
|
|
56
|
+
ok: verdict === "proved",
|
|
57
|
+
detail: "",
|
|
58
|
+
durationMs: 1,
|
|
59
|
+
...(verdict
|
|
60
|
+
? { proof: { tool: "t", toolVersion: "1", verdict, specSha256: "s", entrySha256: "e" } }
|
|
61
|
+
: {}),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
describe("RFC-IMP-13 (RFC-1391)", () => {
|
|
65
|
+
it("blocks RFC-IMP-13 for a formal-tier RFC without a proved proof probe", () => {
|
|
66
|
+
// No proof probe at all → blocked.
|
|
67
|
+
const noProbe = evaluateFormalProofGate({
|
|
68
|
+
targetId: "RFC-9001",
|
|
69
|
+
frontmatter: formalFm(),
|
|
70
|
+
probes: [
|
|
71
|
+
{ probe: "test", criterion: "AC-1", file: "x.test.ts", expect: { exitCode: 0 } },
|
|
72
|
+
],
|
|
73
|
+
evidenceRecords: [],
|
|
74
|
+
});
|
|
75
|
+
expect(noProbe.errors.map((e) => e.rule)).toEqual(["RFC-IMP-13"]);
|
|
76
|
+
expect(noProbe.errors[0]!.message).toContain("no proof probe");
|
|
77
|
+
|
|
78
|
+
// Proof probe present but envelope verdict is not proved → blocked per verdict.
|
|
79
|
+
for (const verdict of ["refuted", "unavailable", "error"] as const) {
|
|
80
|
+
const res = evaluateFormalProofGate({
|
|
81
|
+
targetId: "RFC-9001",
|
|
82
|
+
frontmatter: formalFm(),
|
|
83
|
+
probes: [proofProbe],
|
|
84
|
+
evidenceRecords: [record(proofProbe, verdict)],
|
|
85
|
+
});
|
|
86
|
+
expect(res.errors.map((e) => e.rule)).toEqual(["RFC-IMP-13"]);
|
|
87
|
+
expect(res.errors[0]!.message).toContain(`"${verdict}"`);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Missing envelope record entirely → blocked.
|
|
91
|
+
const missing = evaluateFormalProofGate({
|
|
92
|
+
targetId: "RFC-9001",
|
|
93
|
+
frontmatter: formalFm(),
|
|
94
|
+
probes: [proofProbe],
|
|
95
|
+
evidenceRecords: [],
|
|
96
|
+
});
|
|
97
|
+
expect(missing.errors.map((e) => e.rule)).toEqual(["RFC-IMP-13"]);
|
|
98
|
+
expect(missing.errors[0]!.message).toContain('"missing"');
|
|
99
|
+
|
|
100
|
+
// Proved → gate passes.
|
|
101
|
+
const ok = evaluateFormalProofGate({
|
|
102
|
+
targetId: "RFC-9001",
|
|
103
|
+
frontmatter: formalFm(),
|
|
104
|
+
probes: [proofProbe],
|
|
105
|
+
evidenceRecords: [record(proofProbe, "proved")],
|
|
106
|
+
});
|
|
107
|
+
expect(ok.errors).toEqual([]);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it("does not fire for non-formal tiers", () => {
|
|
111
|
+
for (const tier of ["high", "standard"]) {
|
|
112
|
+
const res = evaluateFormalProofGate({
|
|
113
|
+
targetId: "RFC-9001",
|
|
114
|
+
frontmatter: formalFm({ verificationTier: tier }),
|
|
115
|
+
probes: [],
|
|
116
|
+
evidenceRecords: [],
|
|
117
|
+
});
|
|
118
|
+
expect(res.errors).toEqual([]);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
describe("formal tier inherits the strict gates (RFC-1391)", () => {
|
|
124
|
+
it("applies RFC-IMP-11 and RFC-IMP-12 to formal-tier RFCs", async () => {
|
|
125
|
+
// IMP-11: formal WHEN/IF criterion with only self-origin evidence → blocked.
|
|
126
|
+
const selfOrigin: ProbeOriginRecord = {
|
|
127
|
+
declared: "self",
|
|
128
|
+
derivedOrigin: "self",
|
|
129
|
+
effective: "self",
|
|
130
|
+
reason: ["abc1234 touched x.test.ts"],
|
|
131
|
+
};
|
|
132
|
+
const imp11 = evaluateOriginGates({
|
|
133
|
+
targetId: "RFC-9001",
|
|
134
|
+
frontmatter: formalFm(),
|
|
135
|
+
body: BODY,
|
|
136
|
+
probes: [
|
|
137
|
+
{ probe: "test", criterion: "AC-1", file: "x.test.ts", expect: { exitCode: 0 } },
|
|
138
|
+
],
|
|
139
|
+
origins: [selfOrigin],
|
|
140
|
+
});
|
|
141
|
+
expect(imp11.errors.map((e) => e.rule)).toEqual(["RFC-IMP-11"]);
|
|
142
|
+
expect(imp11.errors[0]!.message).toContain("formal");
|
|
143
|
+
|
|
144
|
+
// IMP-12: formal RFC with no bound pass report → blocked.
|
|
145
|
+
const imp12 = await evaluateAcceptanceVerificationGate({
|
|
146
|
+
targetId: "RFC-9001",
|
|
147
|
+
frontmatter: formalFm(),
|
|
148
|
+
reports: [],
|
|
149
|
+
isCandidateBound: async () => true,
|
|
150
|
+
});
|
|
151
|
+
expect(imp12.errors.map((e) => e.rule)).toEqual(["RFC-IMP-12"]);
|
|
152
|
+
expect(imp12.errors[0]!.message).toContain("formal");
|
|
153
|
+
|
|
154
|
+
// And a bound passing report clears IMP-12 for formal too.
|
|
155
|
+
const cleared = await evaluateAcceptanceVerificationGate({
|
|
156
|
+
targetId: "RFC-9001",
|
|
157
|
+
frontmatter: formalFm(),
|
|
158
|
+
reports: [
|
|
159
|
+
{
|
|
160
|
+
path: "docs/reviews/acceptance/rfc-9001/acceptance-2026-10-18-r0.md",
|
|
161
|
+
frontmatter: { verdict: "pass", candidateSha: "abc1234", isolation: "subagent" },
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
isCandidateBound: async () => true,
|
|
165
|
+
});
|
|
166
|
+
expect(cleared.errors).toEqual([]);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
@@ -14,17 +14,26 @@ verificationTier: high RFC.
|
|
|
14
14
|
<KEY_DECISIONS>
|
|
15
15
|
<item>Origins are derived fresh at stamp time (head = HEAD), never read from the committed envelope.</item>
|
|
16
16
|
<item>`unresolved` never fires RFC-IMP-10 — no contradiction is proven without history.</item>
|
|
17
|
-
<item>
|
|
17
|
+
<item>The high-tier evidence gate severity stays a module constant until the acceptance-report layer lands non-self evidence.</item>
|
|
18
18
|
</KEY_DECISIONS>
|
|
19
19
|
<CHANGE_SUMMARY>
|
|
20
|
-
<item>RFC-1330: RFC-IMP-10 (blocking) and RFC-IMP-11 (warning until RFC-1333) origin gates.</item>
|
|
21
20
|
<item>RFC-1333: steps 1-3 — report contract, rfc.verify.workspace export, RFC-IMP-12 gate, RFC-IMP-11 blocking</item>
|
|
22
21
|
<item>RFC-1333: CX-1/CX-2 fixes — docs/** binding, waiver covers a missing report, IMP-12 for probe-less RFCs; merge-aware fail-closed binding.</item>
|
|
22
|
+
<item>RFC-1391: make the formal verification tier checker-bound (RFC-1391)</item>
|
|
23
|
+
<item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
|
|
24
|
+
<item>RFC-1485: sweep compass headers — forge-os-rfc</item>
|
|
25
|
+
<history>RFC-1330</history>
|
|
23
26
|
</CHANGE_SUMMARY>
|
|
24
27
|
*/
|
|
25
28
|
|
|
26
29
|
import { RFC_ORIGIN_CUTOFF } from "../types.ts";
|
|
27
|
-
import type {
|
|
30
|
+
import type {
|
|
31
|
+
AcceptanceProbe,
|
|
32
|
+
ProbeOriginRecord,
|
|
33
|
+
RfcImplementStampViolation,
|
|
34
|
+
VerificationEvidenceProbeRecord,
|
|
35
|
+
} from "../types.ts";
|
|
36
|
+
import { probeDeclarationKey } from "../verification-origin.ts";
|
|
28
37
|
import { listBehavioralCriteria } from "./validate-rules.ts";
|
|
29
38
|
|
|
30
39
|
/**
|
|
@@ -35,6 +44,21 @@ export const RFC_IMP_11_BLOCKING = true;
|
|
|
35
44
|
|
|
36
45
|
const NON_SELF = new Set(["requirement", "independent", "external"]);
|
|
37
46
|
|
|
47
|
+
/** RFC-1391: tiers that require the strict (non-self + report-bound) evidence gates. */
|
|
48
|
+
const NON_SELF_TIERS = new Set(["high", "formal"]);
|
|
49
|
+
|
|
50
|
+
function describeProbe(probe: AcceptanceProbe, index: number): string {
|
|
51
|
+
const target =
|
|
52
|
+
probe.probe === "test"
|
|
53
|
+
? probe.file
|
|
54
|
+
: probe.probe === "run"
|
|
55
|
+
? probe.command
|
|
56
|
+
: probe.probe === "proof"
|
|
57
|
+
? probe.spec
|
|
58
|
+
: probe.probe;
|
|
59
|
+
return `probe ${index} (${probe.probe}${probe.criterion ? ` → ${probe.criterion}` : ""}: ${target})`;
|
|
60
|
+
}
|
|
61
|
+
|
|
38
62
|
export interface OriginGateInput {
|
|
39
63
|
targetId: string;
|
|
40
64
|
frontmatter: Record<string, unknown>;
|
|
@@ -50,12 +74,6 @@ export interface OriginGateResult {
|
|
|
50
74
|
warnings: RfcImplementStampViolation[];
|
|
51
75
|
}
|
|
52
76
|
|
|
53
|
-
function describeProbe(probe: AcceptanceProbe, index: number): string {
|
|
54
|
-
const target =
|
|
55
|
-
probe.probe === "test" ? probe.file : probe.probe === "run" ? probe.command : probe.probe;
|
|
56
|
-
return `probe ${index} (${probe.probe}${probe.criterion ? ` → ${probe.criterion}` : ""}: ${target})`;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
77
|
/** Evaluate RFC-IMP-10 / RFC-IMP-11 for a post-cutoff RFC. Pure function. */
|
|
60
78
|
export function evaluateOriginGates(input: OriginGateInput): OriginGateResult {
|
|
61
79
|
const errors: RfcImplementStampViolation[] = [];
|
|
@@ -71,11 +89,13 @@ export function evaluateOriginGates(input: OriginGateInput): OriginGateResult {
|
|
|
71
89
|
message:
|
|
72
90
|
`${input.targetId} ${describeProbe(probe, i)} declares expectationSource "${origin.declared}" but git derives it self ` +
|
|
73
91
|
`(${origin.reason.join("; ")}). Correct the declaration to "self", or obtain non-self evidence — never rewrite history.`,
|
|
92
|
+
fixHint: `correct the expectationSource declaration to "self", or bind genuinely non-self evidence — never rewrite history`,
|
|
74
93
|
});
|
|
75
94
|
}
|
|
76
95
|
});
|
|
77
96
|
|
|
78
|
-
if (input.frontmatter["verificationTier"]
|
|
97
|
+
if (NON_SELF_TIERS.has(String(input.frontmatter["verificationTier"] ?? ""))) {
|
|
98
|
+
const tier = String(input.frontmatter["verificationTier"]);
|
|
79
99
|
const blocking = input.imp11Blocking ?? RFC_IMP_11_BLOCKING;
|
|
80
100
|
for (const id of listBehavioralCriteria(input.body)) {
|
|
81
101
|
const hasNonSelf = input.probes.some(
|
|
@@ -84,7 +104,8 @@ export function evaluateOriginGates(input: OriginGateInput): OriginGateResult {
|
|
|
84
104
|
if (hasNonSelf) continue;
|
|
85
105
|
const violation: RfcImplementStampViolation = {
|
|
86
106
|
rule: "RFC-IMP-11",
|
|
87
|
-
message: `${input.targetId} is verificationTier:
|
|
107
|
+
message: `${input.targetId} is verificationTier: ${tier} but ${id} (WHEN/IF) has no bound probe with a non-self effective origin. Obtain independent evidence (post-commitment verification) for ${id}.`,
|
|
108
|
+
fixHint: `bind a probe with a non-self effective origin to ${id}, or lower the declared verificationTier`,
|
|
88
109
|
};
|
|
89
110
|
(blocking ? errors : warnings).push(violation);
|
|
90
111
|
}
|
|
@@ -113,9 +134,13 @@ export async function evaluateAcceptanceVerificationGate(
|
|
|
113
134
|
const errors: RfcImplementStampViolation[] = [];
|
|
114
135
|
const warnings: RfcImplementStampViolation[] = [];
|
|
115
136
|
const fm = input.frontmatter;
|
|
116
|
-
if (
|
|
137
|
+
if (
|
|
138
|
+
String(fm["createdAt"] ?? "") < RFC_ORIGIN_CUTOFF ||
|
|
139
|
+
!NON_SELF_TIERS.has(String(fm["verificationTier"] ?? ""))
|
|
140
|
+
) {
|
|
117
141
|
return { errors, warnings };
|
|
118
142
|
}
|
|
143
|
+
const tier = String(fm["verificationTier"]);
|
|
119
144
|
const passing = input.reports.filter((r) => r.frontmatter["verdict"] === "pass");
|
|
120
145
|
const bound: typeof passing = [];
|
|
121
146
|
for (const r of passing) {
|
|
@@ -132,7 +157,8 @@ export async function evaluateAcceptanceVerificationGate(
|
|
|
132
157
|
}
|
|
133
158
|
errors.push({
|
|
134
159
|
rule: "RFC-IMP-12",
|
|
135
|
-
message: `${input.targetId} is verificationTier:
|
|
160
|
+
message: `${input.targetId} is verificationTier: ${tier} but has no committed verdict: pass acceptance report in ${ACCEPTANCE_REPORTS_DIR}/${input.targetId.toLowerCase()}/ bound to the current code (only verifier-trailer or docs commits may follow the candidate). Run the independent acceptance verification step.`,
|
|
161
|
+
fixHint: `run the independent acceptance verification step and commit the verdict: pass report — or the operator may pass --waive-independent-verification "<reason>"`,
|
|
136
162
|
});
|
|
137
163
|
return { errors, warnings };
|
|
138
164
|
}
|
|
@@ -140,6 +166,7 @@ export async function evaluateAcceptanceVerificationGate(
|
|
|
140
166
|
const v: RfcImplementStampViolation = {
|
|
141
167
|
rule: "RFC-IMP-12",
|
|
142
168
|
message: `${input.targetId} acceptance report ${bound[0]!.path} records isolation "${String(bound[0]!.frontmatter["isolation"])}", not subagent.`,
|
|
169
|
+
fixHint: `re-run the acceptance verification in a clean-context subagent, or the operator may waive with --waive-independent-verification "<reason>"`,
|
|
143
170
|
};
|
|
144
171
|
if (input.waiverReason) {
|
|
145
172
|
warnings.push({ ...v, message: `${v.message} Waived by operator: ${input.waiverReason}` });
|
|
@@ -152,3 +179,60 @@ export async function evaluateAcceptanceVerificationGate(
|
|
|
152
179
|
}
|
|
153
180
|
return { errors, warnings };
|
|
154
181
|
}
|
|
182
|
+
|
|
183
|
+
// ─── RFC-1391: RFC-IMP-13 formal proof verdict gate ─────────────────────────
|
|
184
|
+
|
|
185
|
+
export interface FormalProofGateInput {
|
|
186
|
+
targetId: string;
|
|
187
|
+
frontmatter: Record<string, unknown>;
|
|
188
|
+
probes: AcceptanceProbe[];
|
|
189
|
+
/** Probe records from the committed verification envelope (may be absent). */
|
|
190
|
+
evidenceRecords?: VerificationEvidenceProbeRecord[];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* RFC-IMP-13 — a `verificationTier: formal` RFC may stamp `implemented` only
|
|
195
|
+
* when it declares at least one `proof` probe AND every such probe's envelope
|
|
196
|
+
* record carries `proof.verdict: "proved"`. Hard error, no waiver flag:
|
|
197
|
+
* formal evidence exists only when a mechanical checker has run.
|
|
198
|
+
*/
|
|
199
|
+
export function evaluateFormalProofGate(input: FormalProofGateInput): OriginGateResult {
|
|
200
|
+
const errors: RfcImplementStampViolation[] = [];
|
|
201
|
+
const warnings: RfcImplementStampViolation[] = [];
|
|
202
|
+
if (input.frontmatter["verificationTier"] !== "formal") return { errors, warnings };
|
|
203
|
+
|
|
204
|
+
const proofIndexes = input.probes
|
|
205
|
+
.map((p, i) => ({ p, i }))
|
|
206
|
+
.filter(({ p }) => p.probe === "proof");
|
|
207
|
+
if (proofIndexes.length === 0) {
|
|
208
|
+
errors.push({
|
|
209
|
+
rule: "RFC-IMP-13",
|
|
210
|
+
message:
|
|
211
|
+
`${input.targetId} is verificationTier: formal but declares no proof probe — ` +
|
|
212
|
+
`formal-tier evidence exists only as a mechanical checker verdict. Add a ` +
|
|
213
|
+
`\`probe: proof\` binding a forge/proof-spec@1 file.`,
|
|
214
|
+
fixHint: `add a \`probe: proof\` binding a forge/proof-spec@1 file — formal tier has no waiver`,
|
|
215
|
+
});
|
|
216
|
+
return { errors, warnings };
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const recordsByKey = new Map(
|
|
220
|
+
(input.evidenceRecords ?? []).map((r) => [probeDeclarationKey(r.probe), r]),
|
|
221
|
+
);
|
|
222
|
+
for (const { p, i } of proofIndexes) {
|
|
223
|
+
const record = recordsByKey.get(probeDeclarationKey(p));
|
|
224
|
+
const verdict = record?.proof?.verdict;
|
|
225
|
+
if (verdict !== "proved") {
|
|
226
|
+
errors.push({
|
|
227
|
+
rule: "RFC-IMP-13",
|
|
228
|
+
message:
|
|
229
|
+
`${input.targetId} ${describeProbe(p, i)} lacks proved evidence — ` +
|
|
230
|
+
`envelope verdict is "${verdict ?? "missing"}". Run \`proof.check --spec ` +
|
|
231
|
+
`${(p as { spec: string }).spec}\` then \`rfc.verification.emit --id ${input.targetId}\` ` +
|
|
232
|
+
`until the checker reports proved.`,
|
|
233
|
+
fixHint: `run \`proof.check\` on the bound spec, then \`rfc.verification.emit --id ${input.targetId}\` until the verdict is proved`,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return { errors, warnings };
|
|
238
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
RFC-1453: RFC-IMP-14 gate tests — outcome-surface diffs require a passing
|
|
5
|
+
outcome probe (AC-5), untouched surfaces skip the gate (AC-6), and
|
|
6
|
+
--waive-outcome converts the block into a recorded warning (AC-7). Covers
|
|
7
|
+
the run-probe/outcomeBuild normalization and the unresolved-range fallback
|
|
8
|
+
to the implementation commit's own changed file set.
|
|
9
|
+
</purpose>
|
|
10
|
+
<non-goals>
|
|
11
|
+
<item>Do not exercise real git — OriginGit is stubbed; diff derivation is covered by verification-origin tests.</item>
|
|
12
|
+
</non-goals>
|
|
13
|
+
</MODULE_CONTRACT>
|
|
14
|
+
<CHANGE_SUMMARY>
|
|
15
|
+
<item>RFC-1453: RFC-IMP-14 outcome gate unit tests.</item>
|
|
16
|
+
<item>RFC-1453: executed outcome probes, IMP-14 surface gate, outcome.serve + V-47/V-48</item>
|
|
17
|
+
</CHANGE_SUMMARY>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { describe, expect, it } from "vitest";
|
|
21
|
+
import {
|
|
22
|
+
evaluateOutcomeGate,
|
|
23
|
+
normalizeOutcomeBuildCommand,
|
|
24
|
+
runProbeMatchesOutcomeBuild,
|
|
25
|
+
} from "./implement-stamp-outcome.ts";
|
|
26
|
+
import type { OriginGit } from "../verification-origin.ts";
|
|
27
|
+
import type { AcceptanceProbe, VerificationEvidenceProbeRecord } from "../types.ts";
|
|
28
|
+
|
|
29
|
+
const SURFACES = ["packages/ui/**"];
|
|
30
|
+
|
|
31
|
+
const pageProbe: AcceptanceProbe = {
|
|
32
|
+
probe: "page",
|
|
33
|
+
target: "site-a",
|
|
34
|
+
path: "/",
|
|
35
|
+
selector: "header .lang-switcher__link",
|
|
36
|
+
criterion: "AC-1",
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const runProbe: AcceptanceProbe = {
|
|
40
|
+
probe: "run",
|
|
41
|
+
command: "werkstatt run mission.validate --site site-a --json",
|
|
42
|
+
expect: { exitCode: 0 },
|
|
43
|
+
criterion: "AC-2",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const record = (
|
|
47
|
+
probe: AcceptanceProbe,
|
|
48
|
+
verdict: "pass" | "fail" | "unverified",
|
|
49
|
+
): VerificationEvidenceProbeRecord => ({
|
|
50
|
+
probe,
|
|
51
|
+
ok: verdict === "pass",
|
|
52
|
+
verdict,
|
|
53
|
+
detail: "fixture",
|
|
54
|
+
durationMs: 0,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/** Fake OriginGit — resolves the range from `base`, serves `files` for diff/show. */
|
|
58
|
+
function fakeGit(opts: { base?: string | null; files: string[] }): OriginGit {
|
|
59
|
+
return {
|
|
60
|
+
run: async (args: string[]) => {
|
|
61
|
+
if (args[0] === "rev-parse") return "headsha\n";
|
|
62
|
+
if (args[0] === "log") return opts.base ? `${opts.base}\n` : "";
|
|
63
|
+
if (args[0] === "diff") return opts.files.join("\n") + "\n";
|
|
64
|
+
if (args[0] === "show") return opts.files.join("\n") + "\n";
|
|
65
|
+
return null;
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const gate = (over: Partial<Parameters<typeof evaluateOutcomeGate>[0]> = {}) =>
|
|
71
|
+
evaluateOutcomeGate({
|
|
72
|
+
targetId: "RFC-9001",
|
|
73
|
+
probes: [pageProbe],
|
|
74
|
+
evidenceRecords: [record(pageProbe, "pass")],
|
|
75
|
+
git: fakeGit({ base: "basesha", files: ["packages/ui/button.ts"] }),
|
|
76
|
+
rfcRelPath: "docs/rfcs/rfc-9001-x.md",
|
|
77
|
+
implementationCommit: "implsha",
|
|
78
|
+
outcomeSurfaces: SURFACES,
|
|
79
|
+
outcomeBuild: "pnpm exec werkstatt run mission.validate --site {target} --json",
|
|
80
|
+
...over,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
describe("RFC-IMP-14 outcome gate (AC-5)", () => {
|
|
84
|
+
it("blocks when the diff touches an outcome surface and no outcome probe passed", async () => {
|
|
85
|
+
const res = await gate({ evidenceRecords: [record(pageProbe, "fail")] });
|
|
86
|
+
expect(res.errors).toHaveLength(1);
|
|
87
|
+
expect(res.errors[0]?.rule).toBe("RFC-IMP-14");
|
|
88
|
+
expect(res.errors[0]?.message).toContain("packages/ui/button.ts");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it("blocks when the only page probe is unverified — unverified is not pass", async () => {
|
|
92
|
+
const res = await gate({ evidenceRecords: [record(pageProbe, "unverified")] });
|
|
93
|
+
expect(res.errors).toHaveLength(1);
|
|
94
|
+
expect(res.errors[0]?.rule).toBe("RFC-IMP-14");
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("passes when a page probe passed", async () => {
|
|
98
|
+
const res = await gate();
|
|
99
|
+
expect(res.errors).toEqual([]);
|
|
100
|
+
expect(res.warnings).toEqual([]);
|
|
101
|
+
expect(res.waived).toBe(false);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it("passes on a `run` probe equal to the normalized outcomeBuild binding", async () => {
|
|
105
|
+
const res = await gate({
|
|
106
|
+
probes: [runProbe],
|
|
107
|
+
evidenceRecords: [record(runProbe, "pass")],
|
|
108
|
+
});
|
|
109
|
+
expect(res.errors).toEqual([]);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("a `run` probe that is not the outcomeBuild binding does not satisfy the gate", async () => {
|
|
113
|
+
const otherRun: AcceptanceProbe = {
|
|
114
|
+
probe: "run",
|
|
115
|
+
command: "werkstatt run some.other --site site-a",
|
|
116
|
+
expect: { exitCode: 0 },
|
|
117
|
+
criterion: "AC-2",
|
|
118
|
+
};
|
|
119
|
+
const res = await gate({
|
|
120
|
+
probes: [otherRun],
|
|
121
|
+
evidenceRecords: [record(otherRun, "pass")],
|
|
122
|
+
});
|
|
123
|
+
expect(res.errors).toHaveLength(1);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
it("uses the implementation commit's file set when no accepted base resolves", async () => {
|
|
127
|
+
const res = await gate({
|
|
128
|
+
git: fakeGit({ base: null, files: ["packages/ui/x.ts"] }),
|
|
129
|
+
evidenceRecords: [record(pageProbe, "unverified")],
|
|
130
|
+
});
|
|
131
|
+
expect(res.errors).toHaveLength(1);
|
|
132
|
+
expect(res.errors[0]?.rule).toBe("RFC-IMP-14");
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
describe("RFC-IMP-14 outcome gate (AC-6)", () => {
|
|
137
|
+
it("does not evaluate when no outcomeSurfaces are declared", async () => {
|
|
138
|
+
const res = await gate({ outcomeSurfaces: [], evidenceRecords: [] });
|
|
139
|
+
expect(res.errors).toEqual([]);
|
|
140
|
+
expect(res.warnings).toEqual([]);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("does not evaluate when the diff touches no surface", async () => {
|
|
144
|
+
const res = await gate({
|
|
145
|
+
git: fakeGit({ base: "basesha", files: ["packages/core/x.ts", "docs/rfcs/rfc-9001-x.md"] }),
|
|
146
|
+
evidenceRecords: [],
|
|
147
|
+
});
|
|
148
|
+
expect(res.errors).toEqual([]);
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
describe("RFC-IMP-14 outcome gate (AC-7)", () => {
|
|
153
|
+
it("converts the block into a recorded warning under --waive-outcome", async () => {
|
|
154
|
+
const res = await gate({
|
|
155
|
+
evidenceRecords: [record(pageProbe, "fail")],
|
|
156
|
+
waiveOutcome: "pilot dist rebuild pending — operator approved",
|
|
157
|
+
});
|
|
158
|
+
expect(res.errors).toEqual([]);
|
|
159
|
+
expect(res.warnings).toHaveLength(1);
|
|
160
|
+
expect(res.warnings[0]?.rule).toBe("RFC-IMP-14");
|
|
161
|
+
expect(res.warnings[0]?.message).toContain("X-Outcome-Waiver");
|
|
162
|
+
expect(res.waived).toBe(true);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
describe("runProbeMatchesOutcomeBuild / normalizeOutcomeBuildCommand", () => {
|
|
167
|
+
const binding = "pnpm exec werkstatt run mission.validate --site {target} --json";
|
|
168
|
+
|
|
169
|
+
it("strips the pnpm exec prefix and substitutes {target}", () => {
|
|
170
|
+
expect(normalizeOutcomeBuildCommand(binding)).toBe(
|
|
171
|
+
"werkstatt run mission.validate --site {target} --json",
|
|
172
|
+
);
|
|
173
|
+
expect(runProbeMatchesOutcomeBuild("werkstatt run mission.validate --site dp7 --json", binding)).toBe(
|
|
174
|
+
true,
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it("collapses whitespace differences", () => {
|
|
179
|
+
expect(
|
|
180
|
+
runProbeMatchesOutcomeBuild("werkstatt run mission.validate --site dp7 --json", binding),
|
|
181
|
+
).toBe(true);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it("rejects a different command", () => {
|
|
185
|
+
expect(runProbeMatchesOutcomeBuild("werkstatt run other.cmd --site dp7", binding)).toBe(false);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it("rejects when the binding is absent", () => {
|
|
189
|
+
expect(runProbeMatchesOutcomeBuild("werkstatt run mission.validate --site dp7 --json", null)).toBe(
|
|
190
|
+
false,
|
|
191
|
+
);
|
|
192
|
+
});
|
|
193
|
+
});
|