@warpgogol/forge 8.0.2 → 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 +37 -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 +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 +3 -0
- package/dist/os/authority/authority.module.d.ts.map +1 -0
- package/dist/os/authority/authority.module.js +161 -0
- package/dist/os/authority/authority.module.js.map +1 -0
- package/dist/os/authority/handlers/delegate-revoke.d.ts +15 -0
- package/dist/os/authority/handlers/delegate-revoke.d.ts.map +1 -0
- package/dist/os/authority/handlers/delegate-revoke.js +91 -0
- package/dist/os/authority/handlers/delegate-revoke.js.map +1 -0
- package/dist/os/authority/handlers/delegate.d.ts +14 -0
- package/dist/os/authority/handlers/delegate.d.ts.map +1 -0
- package/dist/os/authority/handlers/delegate.js +134 -0
- package/dist/os/authority/handlers/delegate.js.map +1 -0
- package/dist/os/authority/handlers/delegation-list.d.ts +12 -0
- package/dist/os/authority/handlers/delegation-list.d.ts.map +1 -0
- package/dist/os/authority/handlers/delegation-list.js +54 -0
- package/dist/os/authority/handlers/delegation-list.js.map +1 -0
- package/dist/os/authority/handlers/delegation-validate.d.ts +11 -0
- package/dist/os/authority/handlers/delegation-validate.d.ts.map +1 -0
- package/dist/os/authority/handlers/delegation-validate.js +132 -0
- package/dist/os/authority/handlers/delegation-validate.js.map +1 -0
- package/dist/os/authority/helpers.d.ts +36 -0
- package/dist/os/authority/helpers.d.ts.map +1 -0
- package/dist/os/authority/helpers.js +83 -0
- package/dist/os/authority/helpers.js.map +1 -0
- package/dist/os/authority/index.d.ts +2 -0
- package/dist/os/authority/index.d.ts.map +1 -0
- package/dist/os/authority/index.js +14 -0
- package/dist/os/authority/index.js.map +1 -0
- 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 +188 -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 +97 -11
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +9 -6
- 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/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +41 -10
- 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 +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 +108 -0
- package/dist/src/authority/delegations.d.ts.map +1 -0
- package/dist/src/authority/delegations.js +219 -0
- package/dist/src/authority/delegations.js.map +1 -0
- package/dist/src/authority/index.d.ts +3 -0
- package/dist/src/authority/index.d.ts.map +1 -0
- package/dist/src/authority/index.js +17 -0
- package/dist/src/authority/index.js.map +1 -0
- package/dist/src/authority/signing.d.ts +8 -0
- package/dist/src/authority/signing.d.ts.map +1 -0
- package/dist/src/authority/signing.js +72 -0
- package/dist/src/authority/signing.js.map +1 -0
- 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 +175 -0
- package/os/authority/authority.test.ts +328 -0
- package/os/authority/handlers/delegate-revoke.ts +123 -0
- package/os/authority/handlers/delegate.ts +190 -0
- package/os/authority/handlers/delegation-list.ts +80 -0
- package/os/authority/handlers/delegation-validate.ts +231 -0
- package/os/authority/helpers.ts +111 -0
- package/os/authority/index.ts +14 -0
- 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 +274 -14
- 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 +118 -13
- 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/save.ts +43 -9
- 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 +206 -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 +269 -0
- package/src/authority/index.ts +38 -0
- package/src/authority/signing.ts +73 -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-validate-delegation.test.ts +178 -0
- package/src/tests/rfc-verification-verdict-ingest.test.ts +244 -0
- package/src/tests/session-handlers.test.ts +65 -0
- package/src/tests/session-retro.test.ts +47 -0
- package/src/types.ts +59 -18
- package/src/utils/sync-fs.ts +2 -0
|
@@ -13,6 +13,7 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
|
|
|
13
13
|
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
14
14
|
|
|
15
15
|
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
16
|
+
<item>RFC-1364: robust rfc index generation — bounded retry, RFC-IDX-04, atomic writes</item>
|
|
16
17
|
</CHANGE_SUMMARY>
|
|
17
18
|
*/
|
|
18
19
|
|
|
@@ -26,28 +27,66 @@ import type {
|
|
|
26
27
|
ForgeCommandResult,
|
|
27
28
|
ForgeRuntimeContext,
|
|
28
29
|
} from "../../../src/types.ts";
|
|
30
|
+
import { writeFileAtomic } from "../../../src/utils/fs-atomic.ts";
|
|
29
31
|
import type {
|
|
30
32
|
RfcStatus,
|
|
31
33
|
RfcKind,
|
|
32
34
|
RfcIndexEntry,
|
|
33
35
|
RfcIndexResult,
|
|
36
|
+
RfcIndexFailure,
|
|
34
37
|
RfcGraphResult,
|
|
35
38
|
} from "../types.ts";
|
|
36
39
|
import { RFC_DIR } from "../types.ts";
|
|
37
40
|
import { toIsoDate } from "./shared.ts";
|
|
38
41
|
|
|
42
|
+
// RFC-1364: injected reader seam — tests simulate a partial file that parses
|
|
43
|
+
// only on a later read; no real concurrency in tests.
|
|
44
|
+
let parseRfcImpl: typeof readAndParseRfc = readAndParseRfc;
|
|
45
|
+
export function __setParseRfcImplForTests(impl: typeof readAndParseRfc | undefined): void {
|
|
46
|
+
parseRfcImpl = impl ?? readAndParseRfc;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const INDEX_PARSE_READS = 3;
|
|
50
|
+
const INDEX_RETRY_DELAY_MS = 100;
|
|
51
|
+
|
|
52
|
+
function sleep(ms: number): Promise<void> {
|
|
53
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
54
|
+
}
|
|
55
|
+
|
|
39
56
|
export async function runRfcIndexGenerate(
|
|
40
57
|
input: ForgeCommandInput,
|
|
41
58
|
context: ForgeRuntimeContext,
|
|
42
|
-
): Promise<ForgeCommandResult<RfcIndexResult>> {
|
|
59
|
+
): Promise<ForgeCommandResult<RfcIndexResult | RfcIndexFailure>> {
|
|
43
60
|
const { workspaceRoot, logger, outputFormat } = context;
|
|
44
61
|
const rfcDirPath = path.join(workspaceRoot, RFC_DIR);
|
|
45
62
|
|
|
46
63
|
const files = await listRfcFiles(rfcDirPath);
|
|
47
64
|
const entries: RfcIndexEntry[] = [];
|
|
65
|
+
const parseFailures: RfcIndexFailure["violations"] = [];
|
|
48
66
|
for (const fileName of files) {
|
|
49
|
-
|
|
50
|
-
|
|
67
|
+
// RFC-1364: retry a file that fails to parse — a concurrent writer may
|
|
68
|
+
// still be mid-rename. Up to 3 reads, 100 ms apart.
|
|
69
|
+
let result = await parseRfcImpl(rfcDirPath, fileName);
|
|
70
|
+
for (let attempt = 1; attempt < INDEX_PARSE_READS && result && "error" in result; attempt++) {
|
|
71
|
+
await sleep(INDEX_RETRY_DELAY_MS);
|
|
72
|
+
result = await parseRfcImpl(rfcDirPath, fileName);
|
|
73
|
+
}
|
|
74
|
+
if (!result) {
|
|
75
|
+
parseFailures.push({
|
|
76
|
+
rule: "RFC-IDX-04",
|
|
77
|
+
file: path.join(RFC_DIR, fileName),
|
|
78
|
+
message: "file not readable",
|
|
79
|
+
});
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
if ("error" in result) {
|
|
83
|
+
parseFailures.push({
|
|
84
|
+
rule: "RFC-IDX-04",
|
|
85
|
+
file: path.join(RFC_DIR, fileName),
|
|
86
|
+
message: result.error,
|
|
87
|
+
});
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
51
90
|
const fm = result.parsed.frontmatter;
|
|
52
91
|
const arr = (k: string): string[] =>
|
|
53
92
|
Array.isArray(fm[k]) ? (fm[k] as unknown[]).map(String) : [];
|
|
@@ -69,6 +108,29 @@ export async function runRfcIndexGenerate(
|
|
|
69
108
|
}
|
|
70
109
|
entries.sort((a, b) => a.id.localeCompare(b.id));
|
|
71
110
|
|
|
111
|
+
// RFC-1364: a persistent parse failure fails the run without writing —
|
|
112
|
+
// a partial index built over unreadable sources is worse than a stale one.
|
|
113
|
+
if (parseFailures.length > 0) {
|
|
114
|
+
const failure: RfcIndexFailure = {
|
|
115
|
+
command: "rfc.index.generate",
|
|
116
|
+
status: "fail",
|
|
117
|
+
violations: parseFailures,
|
|
118
|
+
};
|
|
119
|
+
if (outputFormat === "pretty") {
|
|
120
|
+
for (const v of parseFailures) {
|
|
121
|
+
logger.error(`RFC-IDX-04: ${v.file}: ${v.message}`);
|
|
122
|
+
}
|
|
123
|
+
logger.error(
|
|
124
|
+
`${parseFailures.length} RFC file(s) unparseable after ${INDEX_PARSE_READS} reads — index not written.`,
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
data: failure,
|
|
129
|
+
exitCode: 1,
|
|
130
|
+
summary: `${parseFailures.length} unparseable RFC file(s) after ${INDEX_PARSE_READS} reads — index not written`,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
72
134
|
let written: string | undefined;
|
|
73
135
|
if (input.flags["write"] === true) {
|
|
74
136
|
const outRel = path.join(RFC_DIR, "index.yaml");
|
|
@@ -78,7 +140,7 @@ export async function runRfcIndexGenerate(
|
|
|
78
140
|
count: entries.length,
|
|
79
141
|
entries,
|
|
80
142
|
};
|
|
81
|
-
await
|
|
143
|
+
await writeFileAtomic(path.join(workspaceRoot, outRel), `${yamlStringify(payload)}`);
|
|
82
144
|
written = outRel;
|
|
83
145
|
}
|
|
84
146
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
RFC-1467 near-duplicate gate tests — AC-1/2/3/5/8: terminal-kind
|
|
5
|
+
(rejected/superseded) decision-log hits at the reproposal threshold block
|
|
6
|
+
rfc.create until --revisit acknowledges a colliding id; the review band cites
|
|
7
|
+
hits via related + NEEDS CLARIFICATION; a non-colliding --revisit is refused
|
|
8
|
+
with candidates listed.
|
|
9
|
+
</purpose>
|
|
10
|
+
<non-goals>
|
|
11
|
+
<item>Not a template-content contract — fixtures carry the minimal template shape the handler rewrites.</item>
|
|
12
|
+
</non-goals>
|
|
13
|
+
</MODULE_CONTRACT>
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
17
|
+
import { mkdtemp, mkdir, writeFile, rm, readFile } from "node:fs/promises";
|
|
18
|
+
import { join } from "node:path";
|
|
19
|
+
import { tmpdir } from "node:os";
|
|
20
|
+
import { runRfcCreate } from "./list-create.ts";
|
|
21
|
+
|
|
22
|
+
const TEMPLATE = `id: RFC-0000
|
|
23
|
+
title: "Template"
|
|
24
|
+
status: draft
|
|
25
|
+
kind: command
|
|
26
|
+
scope: workspace
|
|
27
|
+
owners: [architecture]
|
|
28
|
+
createdAt: YYYY-MM-DD
|
|
29
|
+
updatedAt: YYYY-MM-DD
|
|
30
|
+
satisfies: []
|
|
31
|
+
related:
|
|
32
|
+
|
|
33
|
+
# RFC-0000: Template
|
|
34
|
+
|
|
35
|
+
## Decision
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const REJECTED_BODY = `---
|
|
39
|
+
id: RFC-1312
|
|
40
|
+
title: "Isolate parallel agent sessions in per-session worktrees"
|
|
41
|
+
status: rejected
|
|
42
|
+
kind: architecture
|
|
43
|
+
scope: workspace
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
# RFC-1312: rejected
|
|
47
|
+
|
|
48
|
+
## Decision
|
|
49
|
+
|
|
50
|
+
Rejected — isolation belongs to the scheduler, not the worktree.
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
const REJECTED_TITLE = "Isolate parallel agent sessions in per-session worktrees";
|
|
54
|
+
|
|
55
|
+
let root: string;
|
|
56
|
+
const context = () => ({
|
|
57
|
+
workspaceRoot: root,
|
|
58
|
+
dryRun: false,
|
|
59
|
+
logger: {
|
|
60
|
+
info: () => {},
|
|
61
|
+
warn: () => {},
|
|
62
|
+
error: () => {},
|
|
63
|
+
success: () => {},
|
|
64
|
+
section: () => {},
|
|
65
|
+
getEvents: () => [],
|
|
66
|
+
},
|
|
67
|
+
outputFormat: "json" as const,
|
|
68
|
+
io: undefined as never,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
async function seed(opts: { rejected?: boolean } = {}) {
|
|
72
|
+
root = await mkdtemp(join(tmpdir(), "rfc1467-create-"));
|
|
73
|
+
const rfcDir = join(root, "docs", "rfcs");
|
|
74
|
+
await mkdir(join(rfcDir, "archive", "rejected"), { recursive: true });
|
|
75
|
+
await writeFile(join(rfcDir, "rfc-0000-template.md"), TEMPLATE);
|
|
76
|
+
if (opts.rejected !== false) {
|
|
77
|
+
await writeFile(join(rfcDir, "archive", "rejected", "rfc-1312-test.md"), REJECTED_BODY);
|
|
78
|
+
}
|
|
79
|
+
return root;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const flags = (extra: Record<string, unknown> = {}) => ({
|
|
83
|
+
title: REJECTED_TITLE,
|
|
84
|
+
kind: "command",
|
|
85
|
+
scope: "workspace",
|
|
86
|
+
...extra,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
describe("RFC-1467 rfc.create near-duplicate gate", () => {
|
|
90
|
+
beforeEach(async () => {
|
|
91
|
+
await seed();
|
|
92
|
+
});
|
|
93
|
+
afterEach(async () => {
|
|
94
|
+
await rm(root, { recursive: true, force: true });
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test("AC-2: a terminal hit at the reproposal threshold blocks without --revisit", async () => {
|
|
98
|
+
const result = await runRfcCreate({ flags: flags() } as never, context());
|
|
99
|
+
expect(result.exitCode).toBe(1);
|
|
100
|
+
expect(result.data?.blocked).toBe(true);
|
|
101
|
+
expect(result.data?.status).toBe("blocked");
|
|
102
|
+
expect(result.data?.colliding?.map((d) => d.rfcId)).toEqual(["RFC-1312"]);
|
|
103
|
+
expect(result.data?.colliding?.[0]?.kind).toBe("rejected-rfc");
|
|
104
|
+
expect(result.data?.colliding?.[0]?.score).toBeGreaterThanOrEqual(12);
|
|
105
|
+
expect(result.data?.remedy).toContain("--revisit RFC-1312");
|
|
106
|
+
// AC-1: the escalation payload accompanies consultedDecisions in JSON.
|
|
107
|
+
expect(Array.isArray(result.data?.consultedDecisions)).toBe(true);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test("AC-3: --revisit scaffolds with related + NEEDS CLARIFICATION marker", async () => {
|
|
111
|
+
const result = await runRfcCreate(
|
|
112
|
+
{ flags: flags({ revisit: "RFC-1312" }) } as never,
|
|
113
|
+
context(),
|
|
114
|
+
);
|
|
115
|
+
expect(result.exitCode ?? 0).toBe(0);
|
|
116
|
+
expect(result.data?.status).toBe("ok");
|
|
117
|
+
const body = await readFile(join(root, result.data!.file!), "utf8");
|
|
118
|
+
expect(body).toContain(" - RFC-1312");
|
|
119
|
+
expect(body).toContain("> NEEDS CLARIFICATION:");
|
|
120
|
+
expect(body).toContain("RFC-1312 is a rejected/superseded precedent");
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
test("AC-8: --revisit naming a non-colliding id refuses and lists candidates", async () => {
|
|
124
|
+
const result = await runRfcCreate(
|
|
125
|
+
{ flags: flags({ revisit: "RFC-9999" }) } as never,
|
|
126
|
+
context(),
|
|
127
|
+
);
|
|
128
|
+
expect(result.exitCode).toBe(1);
|
|
129
|
+
expect(result.data?.blocked).toBe(true);
|
|
130
|
+
expect(result.data?.remedy).toContain("RFC-1312");
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
test("AC-5: sub-threshold titles scaffold normally carrying consultedDecisions", async () => {
|
|
134
|
+
const result = await runRfcCreate(
|
|
135
|
+
{ flags: flags({ title: "Rotate the cache eviction cadence" }) } as never,
|
|
136
|
+
context(),
|
|
137
|
+
);
|
|
138
|
+
expect(result.exitCode ?? 0).toBe(0);
|
|
139
|
+
expect(result.data?.status).toBe("ok");
|
|
140
|
+
expect(result.data?.colliding).toBeUndefined();
|
|
141
|
+
});
|
|
142
|
+
});
|
|
@@ -6,21 +6,19 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
10
|
-
|
|
11
|
-
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
12
|
-
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
13
|
-
|
|
14
|
-
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
15
|
-
<item>RFC-1138: pipeline hygiene — module-scoped exempt entries, archive gitignore guard, dns upsert to deploy phases, promote auto-sync, rfc.create claim protocol, siteHasRuntime filter</item>
|
|
16
9
|
<item>RFC-1139: CLI hint accuracy and agent-safety hygiene — rfc.create hint, EC-14-PARTIAL, amend delegation, ledger scope, sync footer, mission.open remnants</item>
|
|
17
10
|
<item>RFC-1139: second hint fix (rfc.list empty-state) + read-only test fix</item>
|
|
18
|
-
<
|
|
11
|
+
<item>RFC-1364: robust rfc index generation — bounded retry, RFC-IDX-04, atomic writes</item>
|
|
12
|
+
<item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
|
|
13
|
+
<item>RFC-1467: address review r1 findings — object-shaped colliding payload, cite all colliding siblings, reviewBand field, supersede.propose escalation, flag-shape guard</item>
|
|
14
|
+
<history>RFC-0303, RFC-1097, RFC-1138</history>
|
|
19
15
|
</CHANGE_SUMMARY>
|
|
20
16
|
*/
|
|
21
17
|
|
|
22
18
|
import { ambientIo as fs } from "../../../src/utils/io.ts";
|
|
23
19
|
import { writeFileSync } from "../../../src/utils/sync-fs.ts";
|
|
20
|
+
import { writeFileAtomic } from "../../../src/utils/fs-atomic.ts";
|
|
21
|
+
import { existsSync } from "node:fs";
|
|
24
22
|
import path from "node:path";
|
|
25
23
|
import { toKebabCase } from "../../../src/utils/string-utils.ts";
|
|
26
24
|
import { listRfcFiles, readAndParseRfc } from "../frontmatter-io.ts";
|
|
@@ -40,7 +38,13 @@ import type {
|
|
|
40
38
|
} from "../types.ts";
|
|
41
39
|
import { RFC_DIR, RFC_KINDS, RFC_SCOPES, RFC_METADATA_CUTOFF } from "../types.ts";
|
|
42
40
|
import { DNA_DOCS, loadInvariantIds, toIsoDate, resolveRfcTemplate } from "./shared.ts";
|
|
43
|
-
import {
|
|
41
|
+
import {
|
|
42
|
+
collectDecisionLog,
|
|
43
|
+
scoreDecisions,
|
|
44
|
+
REPROPOSED_SCORE,
|
|
45
|
+
REVIEW_SCORE,
|
|
46
|
+
TERMINAL_KINDS,
|
|
47
|
+
} from "../decision-log.ts";
|
|
44
48
|
import type { ConsultedDecision } from "../types.ts";
|
|
45
49
|
|
|
46
50
|
function parseSatisfiesFlag(value: unknown): string[] {
|
|
@@ -198,11 +202,15 @@ export async function runRfcCreate(
|
|
|
198
202
|
|
|
199
203
|
const kebabTitle = toKebabCase(title);
|
|
200
204
|
|
|
201
|
-
// RFC-0329: consult decision log before scaffolding
|
|
205
|
+
// RFC-0329: consult decision log before scaffolding. RFC-1467: scoring
|
|
206
|
+
// runs untruncated for the collision bands — the `consultedDecisions`
|
|
207
|
+
// payload stays capped at the display limit.
|
|
202
208
|
let consultedDecisions: ConsultedDecision[] = [];
|
|
209
|
+
let scoredAll: ConsultedDecision[] = [];
|
|
203
210
|
try {
|
|
204
211
|
const logEntries = await collectDecisionLog(rfcDirPath);
|
|
205
|
-
|
|
212
|
+
scoredAll = scoreDecisions(title, logEntries, Number.MAX_SAFE_INTEGER);
|
|
213
|
+
consultedDecisions = scoredAll.slice(0, 5);
|
|
206
214
|
} catch {
|
|
207
215
|
// graceful degradation — never block creation
|
|
208
216
|
}
|
|
@@ -218,6 +226,88 @@ export async function runRfcCreate(
|
|
|
218
226
|
}
|
|
219
227
|
}
|
|
220
228
|
|
|
229
|
+
// RFC-1467: near-duplicate gate — terminal-kind hits (rejected-rfc /
|
|
230
|
+
// superseded-rfc) at or above the reproposal threshold block creation
|
|
231
|
+
// until --revisit acknowledges one of the colliding ids; the review band
|
|
232
|
+
// (REVIEW_SCORE..REPROPOSED_SCORE-1) cites hits via `related` + a NEEDS
|
|
233
|
+
// CLARIFICATION marker. rejected-alternative stays informational.
|
|
234
|
+
const revisitRaw = input.flags["revisit"];
|
|
235
|
+
const revisit =
|
|
236
|
+
typeof revisitRaw === "string" ? revisitRaw.trim().toUpperCase() || undefined : undefined;
|
|
237
|
+
// Best-score-per-id — the same RFC can collide via multiple log entries.
|
|
238
|
+
const byId = (hits: ConsultedDecision[]): ConsultedDecision[] => {
|
|
239
|
+
const best = new Map<string, ConsultedDecision>();
|
|
240
|
+
for (const h of hits) {
|
|
241
|
+
const prev = best.get(h.rfcId);
|
|
242
|
+
if (!prev || h.score > prev.score) best.set(h.rfcId, h);
|
|
243
|
+
}
|
|
244
|
+
return [...best.values()].sort((a, b) => b.score - a.score || a.rfcId.localeCompare(b.rfcId));
|
|
245
|
+
};
|
|
246
|
+
const colliding = byId(
|
|
247
|
+
scoredAll.filter((d) => TERMINAL_KINDS.has(d.kind) && d.score >= REPROPOSED_SCORE),
|
|
248
|
+
);
|
|
249
|
+
const collidingIds = colliding.map((d) => d.rfcId);
|
|
250
|
+
const reviewBand = byId(
|
|
251
|
+
scoredAll.filter(
|
|
252
|
+
(d) =>
|
|
253
|
+
TERMINAL_KINDS.has(d.kind) && d.score >= REVIEW_SCORE && d.score < REPROPOSED_SCORE,
|
|
254
|
+
),
|
|
255
|
+
);
|
|
256
|
+
const reviewBandIds = reviewBand.map((d) => d.rfcId);
|
|
257
|
+
|
|
258
|
+
if (revisit && !collidingIds.includes(revisit)) {
|
|
259
|
+
const remedy =
|
|
260
|
+
collidingIds.length > 0
|
|
261
|
+
? `--revisit must name a colliding precedent — valid candidates: ${collidingIds.join(", ")}.`
|
|
262
|
+
: "No terminal-kind precedent collides with this title — drop --revisit and scaffold normally.";
|
|
263
|
+
if (outputFormat === "pretty") {
|
|
264
|
+
logger.error(`rfc.create refused: ${remedy}`);
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
data: {
|
|
268
|
+
command: "rfc.create",
|
|
269
|
+
status: "blocked",
|
|
270
|
+
blocked: true,
|
|
271
|
+
colliding,
|
|
272
|
+
remedy,
|
|
273
|
+
consultedDecisions,
|
|
274
|
+
},
|
|
275
|
+
summary: `rfc.create refused: ${remedy}`,
|
|
276
|
+
exitCode: 1,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if (collidingIds.length > 0 && !revisit) {
|
|
281
|
+
const remedy =
|
|
282
|
+
`Re-run with --revisit ${collidingIds[0]} to acknowledge the precedent — the scaffold will cite it ` +
|
|
283
|
+
`in related with a NEEDS CLARIFICATION marker and the draft's Decision must state why it differs ` +
|
|
284
|
+
`from the rejection/supersession rationale. If this is genuinely different work, sharpen the title ` +
|
|
285
|
+
`so it no longer collides at the reproposal threshold (score ≥ ${REPROPOSED_SCORE}).`;
|
|
286
|
+
if (outputFormat === "pretty") {
|
|
287
|
+
logger.error(
|
|
288
|
+
`rfc.create blocked: ${collidingIds.length} terminal precedent(s) collide — ${collidingIds.join(", ")}`,
|
|
289
|
+
);
|
|
290
|
+
logger.error(remedy);
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
data: {
|
|
294
|
+
command: "rfc.create",
|
|
295
|
+
status: "blocked",
|
|
296
|
+
blocked: true,
|
|
297
|
+
colliding,
|
|
298
|
+
remedy,
|
|
299
|
+
consultedDecisions,
|
|
300
|
+
},
|
|
301
|
+
summary: `rfc.create blocked: terminal precedent ${collidingIds.join(", ")} collides — re-run with --revisit ${collidingIds[0]} to acknowledge`,
|
|
302
|
+
exitCode: 1,
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// Ids cited in the scaffold's `related`: EVERY colliding precedent (a
|
|
307
|
+
// --revisit acknowledges the gate, but sibling collisions still need
|
|
308
|
+
// citation or the draft is born failing V-52) plus every review-band hit.
|
|
309
|
+
const citedIds = [...new Set([...collidingIds, ...reviewBandIds])].sort();
|
|
310
|
+
|
|
221
311
|
// RFC-1138: atomic id allocation — scan → claim the id via wx on a
|
|
222
312
|
// title-independent `rfc-NNNN.claim` file → write the real file → release.
|
|
223
313
|
// The claim must be on the id, not the filename: two creates with different
|
|
@@ -281,10 +371,38 @@ export async function runRfcCreate(
|
|
|
281
371
|
`satisfies:\n${satisfies.map((id) => ` - ${id}`).join("\n")}`,
|
|
282
372
|
);
|
|
283
373
|
}
|
|
374
|
+
// RFC-1467: cite the acknowledged/review-band precedents in `related`
|
|
375
|
+
// and leave a NEEDS CLARIFICATION marker in the Decision section.
|
|
376
|
+
if (citedIds.length > 0) {
|
|
377
|
+
const relatedEntries = citedIds.map((id) => ` - ${id}`).join("\n");
|
|
378
|
+
content = /^related:$/m.test(content)
|
|
379
|
+
? content.replace(/^related:$/m, `related:\n${relatedEntries}`)
|
|
380
|
+
: content.replace(/^related: \[\]$/m, `related:\n${relatedEntries}`);
|
|
381
|
+
const siblingCollisions = collidingIds.filter((id) => id !== revisit);
|
|
382
|
+
const marker = revisit
|
|
383
|
+
? `> NEEDS CLARIFICATION: ${revisit} is a rejected/superseded precedent acknowledged via --revisit — the Decision must state why this proposal differs from the earlier rejection or supersession rationale.` +
|
|
384
|
+
(siblingCollisions.length > 0
|
|
385
|
+
? `\n> NEEDS CLARIFICATION: additional terminal precedent(s) ${siblingCollisions.join(", ")} collide at the reproposal threshold — the Decision must also distinguish them.`
|
|
386
|
+
: "") +
|
|
387
|
+
(reviewBandIds.length > 0
|
|
388
|
+
? `\n> NEEDS CLARIFICATION: near-duplicate precedent(s) ${reviewBandIds.join(", ")} scored in the review band — cite them or distinguish scope in the Decision.`
|
|
389
|
+
: "")
|
|
390
|
+
: `> NEEDS CLARIFICATION: near-duplicate precedent(s) ${reviewBandIds.join(", ")} scored in the review band — cite them or distinguish scope in the Decision.`;
|
|
391
|
+
content = content.replace(/^## Decision$/m, `## Decision\n\n${marker}\n`);
|
|
392
|
+
}
|
|
284
393
|
content = content.replace(/^# RFC-0000: .+$/m, `# ${nextId}: ${title}`);
|
|
285
394
|
|
|
286
395
|
const targetPath = path.join(rfcDirPath, fileName);
|
|
287
|
-
|
|
396
|
+
// RFC-1364: atomic write (temp + rename) so concurrent readers never
|
|
397
|
+
// observe a half-written RFC. The claim file already guarantees single
|
|
398
|
+
// id allocation; the existence check preserves the old `wx` behavior
|
|
399
|
+
// of failing loudly when the target somehow exists.
|
|
400
|
+
if (existsSync(targetPath)) {
|
|
401
|
+
throw Object.assign(new Error(`rfc target already exists: ${fileName}`), {
|
|
402
|
+
code: "EEXIST",
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
await writeFileAtomic(targetPath, content);
|
|
288
406
|
relativeFile = path.join(RFC_DIR, fileName);
|
|
289
407
|
allocated = true;
|
|
290
408
|
} finally {
|
|
@@ -303,6 +421,14 @@ export async function runRfcCreate(
|
|
|
303
421
|
logger.success(`Created ${nextId}: ${title}`);
|
|
304
422
|
logger.info(`File: ${relativeFile}`);
|
|
305
423
|
logger.info(`Template: full`);
|
|
424
|
+
if (revisit) {
|
|
425
|
+
logger.info(`Acknowledged precedent via --revisit: ${revisit} (cited in related)`);
|
|
426
|
+
}
|
|
427
|
+
if (reviewBandIds.length > 0) {
|
|
428
|
+
logger.info(
|
|
429
|
+
`Near-duplicate precedent(s) cited in related: ${reviewBandIds.join(", ")} — distinguish or cite them in the Decision`,
|
|
430
|
+
);
|
|
431
|
+
}
|
|
306
432
|
logger.info("Status: draft (only a human with role 'architecture' may change status)");
|
|
307
433
|
}
|
|
308
434
|
|
|
@@ -314,6 +440,8 @@ export async function runRfcCreate(
|
|
|
314
440
|
id: nextId,
|
|
315
441
|
satisfies,
|
|
316
442
|
consultedDecisions,
|
|
443
|
+
...(colliding.length > 0 ? { colliding, blocked: false } : {}),
|
|
444
|
+
...(reviewBand.length > 0 ? { reviewBand } : {}),
|
|
317
445
|
},
|
|
318
446
|
summary: `Created ${nextId}: ${title}`,
|
|
319
447
|
nextSteps: [
|
|
@@ -10,13 +10,16 @@ Scaffolds a new draft RFC with supersedes pre-linked, conflict context, and TODO
|
|
|
10
10
|
</non-goals>
|
|
11
11
|
</MODULE_CONTRACT>
|
|
12
12
|
<CHANGE_SUMMARY>
|
|
13
|
-
<item>RFC-0334: initial implementation.</item>
|
|
14
13
|
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
15
14
|
|
|
16
15
|
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
17
16
|
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
18
17
|
|
|
19
18
|
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
19
|
+
<item>RFC-1467: address review r1 findings — object-shaped colliding payload, cite all colliding siblings, reviewBand field, supersede.propose escalation, flag-shape guard</item>
|
|
20
|
+
<item>RFC-1467: declare supersede.propose escalation fields + repair dead related-injector regex</item>
|
|
21
|
+
<item>RFC-1467: harden supersede.propose empty-invariant guard per RFC-1467 review</item>
|
|
22
|
+
<history>RFC-0334</history>
|
|
20
23
|
</CHANGE_SUMMARY>
|
|
21
24
|
*/
|
|
22
25
|
|
|
@@ -26,7 +29,13 @@ import { ambientIo, resolveIo } from "../../../src/utils/io.ts";
|
|
|
26
29
|
import { toKebabCase } from "../../../src/utils/string-utils.ts";
|
|
27
30
|
import { writeFileAtomic } from "../../../src/utils/fs-atomic.ts";
|
|
28
31
|
import { listRfcFiles, readAndParseRfc, rfcFileMatchesId } from "../frontmatter-io.ts";
|
|
29
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
collectDecisionLog,
|
|
34
|
+
scoreDecisions,
|
|
35
|
+
REPROPOSED_SCORE,
|
|
36
|
+
REVIEW_SCORE,
|
|
37
|
+
TERMINAL_KINDS,
|
|
38
|
+
} from "../decision-log.ts";
|
|
30
39
|
import { RFC_DIR } from "../types.ts";
|
|
31
40
|
import { resolveRfcTemplate } from "./shared.ts";
|
|
32
41
|
import type { ConsultedDecision, RfcSupersedeProposeResult } from "../types.ts";
|
|
@@ -88,11 +97,17 @@ export async function runRfcSupersedePropose(
|
|
|
88
97
|
"rfc.supersede.propose requires --invariant flag (comma-separated DNA-N or RFC-XXXX).",
|
|
89
98
|
);
|
|
90
99
|
|
|
91
|
-
// Parse and validate invariant ids
|
|
100
|
+
// Parse and validate invariant ids — an all-empty flag (e.g. ",") parses
|
|
101
|
+
// to zero ids and would emit a bare `related:` + empty conflict list.
|
|
92
102
|
const invariantIds = invariantStr
|
|
93
103
|
.split(",")
|
|
94
104
|
.map((s) => s.trim())
|
|
95
105
|
.filter(Boolean);
|
|
106
|
+
if (invariantIds.length === 0) {
|
|
107
|
+
throw new Error(
|
|
108
|
+
"rfc.supersede.propose requires --invariant to name at least one DNA-N or RFC-XXXX.",
|
|
109
|
+
);
|
|
110
|
+
}
|
|
96
111
|
const idRe = /^(DNA-\d+|RFC-\d{4})$/;
|
|
97
112
|
for (const id of invariantIds) {
|
|
98
113
|
if (!idRe.test(id)) {
|
|
@@ -162,11 +177,22 @@ export async function runRfcSupersedePropose(
|
|
|
162
177
|
const kebabTitle = toKebabCase(title);
|
|
163
178
|
const fileName = `${nextSlug}-${kebabTitle}.md`;
|
|
164
179
|
|
|
165
|
-
// Decision-log consultation (RFC-0329)
|
|
180
|
+
// Decision-log consultation (RFC-0329). RFC-1467: score untruncated for the
|
|
181
|
+
// collision bands — terminal-kind hits at the reproposal threshold surface
|
|
182
|
+
// as an escalation payload alongside the capped consultedDecisions.
|
|
166
183
|
let consultedDecisions: ConsultedDecision[] = [];
|
|
184
|
+
let colliding: ConsultedDecision[] = [];
|
|
185
|
+
let reviewBand: ConsultedDecision[] = [];
|
|
167
186
|
try {
|
|
168
187
|
const logEntries = await collectDecisionLog(rfcDirPath);
|
|
169
|
-
|
|
188
|
+
const scoredAll = scoreDecisions(title, logEntries, Number.MAX_SAFE_INTEGER);
|
|
189
|
+
consultedDecisions = scoredAll.slice(0, 5);
|
|
190
|
+
colliding = scoredAll.filter(
|
|
191
|
+
(d) => TERMINAL_KINDS.has(d.kind) && d.score >= REPROPOSED_SCORE,
|
|
192
|
+
);
|
|
193
|
+
reviewBand = scoredAll.filter(
|
|
194
|
+
(d) => TERMINAL_KINDS.has(d.kind) && d.score >= REVIEW_SCORE && d.score < REPROPOSED_SCORE,
|
|
195
|
+
);
|
|
170
196
|
} catch {
|
|
171
197
|
// graceful degradation
|
|
172
198
|
}
|
|
@@ -202,8 +228,10 @@ TODO(agent): expand — what was attempted, where exactly the conflict surfaces
|
|
|
202
228
|
// Replace supersedes
|
|
203
229
|
content = content.replace(/^supersedes: \[\]$/m, supersedesYaml);
|
|
204
230
|
|
|
205
|
-
// Replace related
|
|
206
|
-
|
|
231
|
+
// Replace related — `related:` plus its indented comment block (the
|
|
232
|
+
// previous pattern anchored at end-of-line and silently no-oped whenever
|
|
233
|
+
// non-comment content followed the comments, e.g. the # RFC-0331 hint).
|
|
234
|
+
content = content.replace(/^related:\n(?: #[^\n]*\n)*/m, `${relatedYaml}\n`);
|
|
207
235
|
|
|
208
236
|
// Replace Context section with consultation block
|
|
209
237
|
content = content.replace(/## Context\n[\s\S]*?(?=\n## )/, consultationBlock);
|
|
@@ -234,6 +262,19 @@ TODO(agent): expand — what was attempted, where exactly the conflict surfaces
|
|
|
234
262
|
logger.info(` ${d.rfcId} [${d.kind}] (score ${d.score}): ${d.title}`);
|
|
235
263
|
}
|
|
236
264
|
}
|
|
265
|
+
// RFC-1467: terminal precedents at the reproposal threshold surface in
|
|
266
|
+
// both modes — a supersede proposal is inherently a revisit, so the gate
|
|
267
|
+
// informs rather than blocks.
|
|
268
|
+
if (colliding.length > 0) {
|
|
269
|
+
logger.warn(
|
|
270
|
+
`Terminal precedent(s) collide at the reproposal threshold: ${colliding.map((d) => d.rfcId).join(", ")} — the proposal must distinguish them in the Decision`,
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
if (reviewBand.length > 0) {
|
|
274
|
+
logger.info(
|
|
275
|
+
`Near-duplicate precedent(s) in the review band: ${reviewBand.map((d) => d.rfcId).join(", ")}`,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
237
278
|
}
|
|
238
279
|
|
|
239
280
|
return {
|
|
@@ -245,6 +286,8 @@ TODO(agent): expand — what was attempted, where exactly the conflict surfaces
|
|
|
245
286
|
supersedesTarget: targetId,
|
|
246
287
|
invariants: invariantIds,
|
|
247
288
|
consultedDecisions,
|
|
289
|
+
...(colliding.length > 0 ? { colliding } : {}),
|
|
290
|
+
...(reviewBand.length > 0 ? { reviewBand } : {}),
|
|
248
291
|
},
|
|
249
292
|
summary: `Created ${nextId} proposing to supersede ${targetId} (conflict: ${invariantList})`,
|
|
250
293
|
};
|