@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
|
@@ -731,3 +731,42 @@ status: active
|
|
|
731
731
|
- **Context:** 2026-08-14 — RFC-0854 enhancement, current Sternsystem cutover
|
|
732
732
|
- **Question:** May the replaceable single site republish directly to Main, or must it prove the Node 24 build/deploy path through Alt first?
|
|
733
733
|
- **Answer:** Require `Alt deploy → Alt smoke pass → Main deploy → Main smoke pass`. Any non-pass stops the transition and blocks RFC completion; the single-site topology does not justify bypassing the available staging proof.
|
|
734
|
+
|
|
735
|
+
### K-0057: Session-end commit-question removal — never ask whether to commit
|
|
736
|
+
|
|
737
|
+
```knowledge-entry
|
|
738
|
+
id: K-0057
|
|
739
|
+
layer: L0
|
|
740
|
+
created: 2026-10-29
|
|
741
|
+
status: active
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
- **Context:** 2026-10-29 — fo-session-retro Step 3d redesign (ADR-0121)
|
|
745
|
+
- **Question:** When the session-end protocol finds dirty files it cannot attribute to this session, should it ask the operator whether to commit each one (per-file prompt), leave them silently, or leave them with a report line — and where should the no-commit-question rule live?
|
|
746
|
+
- **Answer:** Unattributed files are left untouched and listed in the retro report (option A — visibility without a prompt); the rule is anchored globally in `_shared/fo-pipeline-conventions.md` §Commit discipline plus an explicit line in PREFERENCES.md (radius A); process = ADR + direct edits (option C). Session-attributed changes commit unconditionally — the operator is never asked whether to commit. Post-review arbitration extended the radius to the contradicting enforcement surfaces (AGENTS.md §Session-end, pre-user-prompt hook, check-clean-trees.sh, wg-mission-complete operator-edit gate).
|
|
747
|
+
|
|
748
|
+
### K-0058: Section languages — generalize, compute fallbacks, keep projections whole
|
|
749
|
+
|
|
750
|
+
```knowledge-entry
|
|
751
|
+
id: K-0058
|
|
752
|
+
layer: L0
|
|
753
|
+
created: 2026-10-30
|
|
754
|
+
status: active
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
- **Context:** 2026-10-30 — RFC-1444 grilling (dp7 German-in-section request; supersedes RFC-1436)
|
|
758
|
+
- **Question:** How should a section show its content in additional languages — language axis, declaration, switching, projections, content location, rendering, fate of the per-field companion mechanism, reference resolution, and untranslated text?
|
|
759
|
+
- **Answer:** Axis = page locale first + declared languages; one site declaration (`i18n.sectionLanguages`) with block opt-in; all renditions pre-rendered, instant ARIA-tabs switch via the existing `lang-switcher` (both `pill`/`text` variants kept, `scope: section`); no persistence, `#<blockId>-<lang>` deep link; one resolved model feeds every projection under a package-fixed policy with a parity check; non-routed languages live in same-shaped partial trees (`routed: false`), routed languages resolve by block id with zero authoring; the page builder renders the section's own component once per language (works for formatted sections); the new RFC supersedes RFC-1436 with no compatibility layer; references resolve in the rendition language with no fallback; missing German is agent-translated with `provenance: inferred` and client confirmation before main.
|
|
760
|
+
|
|
761
|
+
### K-0059: Acceptance must observe the shipped outcome, not the implementer's model
|
|
762
|
+
|
|
763
|
+
```knowledge-entry
|
|
764
|
+
id: K-0059
|
|
765
|
+
layer: L0
|
|
766
|
+
created: 2026-10-30
|
|
767
|
+
status: active
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
- **Context:** 2026-10-30 — RFC-1444 post-mortem grilling (RFC-1453, RFC-1454, RFC-1455)
|
|
771
|
+
- **Question:** How should Forge keep an implemented RFC from stamping green while the shipped product regressed (page probes silently skipped, no pilot validation, review deviations and decided values left in prose)?
|
|
772
|
+
- **Answer:** Forge executes `page` probes through project bindings (`outcomeBuild`/`outcomeServe`, per-probe `target`) and reports `unverified` — blocking — when it cannot; an implementation diff touching declared `outcomeSurfaces` requires a passing outcome probe (pilot adoption becomes part of implementation); review design deviations are typed (`fix`/`amend`) and `amend` must land in the RFC's `## Deviations` before stamping; decided observable values live in `## Fixed inputs`, each bound to an outcome probe. Three separate Forge RFCs, outcome probes first.
|
|
@@ -20,6 +20,7 @@ languagePolicy: ref(PREFERENCES.md)
|
|
|
20
20
|
|
|
21
21
|
Sweep batch 1: add Compass v2 headers to 45 SKILL.md files (purpose derived from frontmatter description). Fix non-skill-markdown exclusion to check filename not workspace-relative path (packages/AGENTS.md escaped it). Add .coverage to ignoredDirs.</item>
|
|
22
22
|
<item>RFC-1247: close RFC-1247 review r2 — CHANGE_SUMMARY items on six touched skills, fo-handoff in AGENTS enumeration, glossary applied-instance pointer, recorded per-skill phrase split</item>
|
|
23
|
+
<item>RFC-1481: sync namespaces, rollout, and verification guidance</item>
|
|
23
24
|
</CHANGE_SUMMARY>
|
|
24
25
|
-->
|
|
25
26
|
|
|
@@ -135,15 +136,17 @@ Not every skill needs all three. `grilling` uses L0 and L2 only (no fix patterns
|
|
|
135
136
|
|
|
136
137
|
In addition to the three skill-local layers, there is a fourth tier: the **shared knowledge layer** at `packages/forge/skills/shared/knowledge/learned-principles.md`. This file holds promoted cross-skill principles with `shared/K-NNNN` identifiers.
|
|
137
138
|
|
|
139
|
+
In a consumer workspace, Forge-authored upstream entries retain `K-NNNN`; consumer-authored entries use `L-K-NNNN`, including entries in the consumer's shared-knowledge copy. `forge.skill.validate` accepts both for consumer pack skills and rejects `L-K-NNNN` in Forge source. `forge knowledge.conflicts.resolve` is the explicit remediation path for existing collisions.
|
|
140
|
+
|
|
138
141
|
- **Detection**: `doctor` reports cross-skill duplicate L2 entries via normalized-title matching (exact and bounded containment).
|
|
139
|
-
- **Promotion**: `fo-knowledge-distill` executes promotions under operator grilling — the principle moves to the shared layer with summed confirmations and `promotedFrom` provenance; each skill-local copy is rewritten to a pointer entry (`promotedTo: shared
|
|
140
|
-
- **Consumption**: knowledge-adopting skills read the shared layer at run start and cite
|
|
142
|
+
- **Promotion**: `fo-knowledge-distill` executes promotions under operator grilling — the principle moves to the shared layer with summed confirmations and `promotedFrom` provenance; each skill-local copy is rewritten to a pointer entry (`promotedTo: shared/<entry-id>`, `status: superseded`).
|
|
143
|
+
- **Consumption**: knowledge-adopting skills read the shared layer at run start and cite the canonical upstream or consumer-local shared ID.
|
|
141
144
|
- **Validation**: `doctor` validates the shared layer file for schema validity and id uniqueness (it is not inside a skill directory, so `skill.validate` does not reach it).
|
|
142
145
|
- **npm portability**: the shared layer ships as an empty template — accumulated promotions are project-specific.
|
|
143
146
|
|
|
144
147
|
### Entry format
|
|
145
148
|
|
|
146
|
-
Each knowledge entry is a `### K-NNNN: title` heading followed by a `knowledge-entry` YAML metadata block and a markdown body:
|
|
149
|
+
Each knowledge entry is a `### K-NNNN: title` heading followed by a `knowledge-entry` YAML metadata block and a markdown body. Consumer-local entries use `### L-K-NNNN: title`:
|
|
147
150
|
|
|
148
151
|
````markdown
|
|
149
152
|
### K-0001: Skip non-project sessions
|
|
@@ -165,15 +168,15 @@ status: active
|
|
|
165
168
|
|
|
166
169
|
| Field | Type | Required | Layers | Meaning |
|
|
167
170
|
| --- | --- | --- | --- | --- |
|
|
168
|
-
| `id` | `K-NNNN` | all | all | Unique 4-digit identifier within the file |
|
|
171
|
+
| `id` | `K-NNNN` upstream; `L-K-NNNN` consumer-local | all | all | Unique 4-digit identifier within the file |
|
|
169
172
|
| `layer` | `L0` \| `L1` \| `L2` | all | all | Knowledge layer |
|
|
170
173
|
| `created` | `YYYY-MM-DD` | all | all | Date the entry was first written |
|
|
171
174
|
| `lastConfirmedAt` | `YYYY-MM-DD` \| `null` | L2 only | L2 | Date of last operator confirmation |
|
|
172
175
|
| `confirmations` | integer ≥ 0 | L2 only | L2 | Confirmation counter for autonomous application |
|
|
173
176
|
| `expiresAt` | `YYYY-MM-DD` \| `null` | optional | all | Date after which the entry is stale |
|
|
174
|
-
| `supersedes` | `K-NNNN[]` | optional | all | Entries this one replaces (must resolve in same file) |
|
|
175
|
-
| `promotedTo` | `shared/K-NNNN` \| `null` | optional | all | Cross-file promotion target |
|
|
176
|
-
| `promotedFrom` | `<skill>/K-NNNN[]` | optional | shared | Provenance — which skill-local entries were promoted into this shared entry |
|
|
177
|
+
| `supersedes` | `K-NNNN[]` or `L-K-NNNN[]` | optional | all | Entries this one replaces (must resolve in same file) |
|
|
178
|
+
| `promotedTo` | `shared/K-NNNN` or `shared/L-K-NNNN` \| `null` | optional | all | Cross-file promotion target |
|
|
179
|
+
| `promotedFrom` | `<skill>/K-NNNN[]` or `<skill>/L-K-NNNN[]` | optional | shared | Provenance — which skill-local entries were promoted into this shared entry |
|
|
177
180
|
| `status` | `active` \| `stale` \| `superseded` \| `archived` | all | all | Lifecycle state |
|
|
178
181
|
|
|
179
182
|
#### Layer-specific rules
|
|
@@ -184,13 +187,13 @@ status: active
|
|
|
184
187
|
|
|
185
188
|
#### Knowledge-adjacent files
|
|
186
189
|
|
|
187
|
-
Files declared in `knowledge:` frontmatter that do not use `### K-NNNN:` headings and have no `<!-- knowledge-layer: ... -->` preamble are **knowledge-adjacent** — they are exempt from SKILL-19/SKILL-20. Examples: `forge-about.md`, `operator-profile-template.md`, `project-narrative-template.md`.
|
|
190
|
+
Files declared in `knowledge:` frontmatter that do not use `### K-NNNN:` or `### L-K-NNNN:` headings and have no `<!-- knowledge-layer: ... -->` preamble are **knowledge-adjacent** — they are exempt from SKILL-19/SKILL-20. Examples: `forge-about.md`, `operator-profile-template.md`, `project-narrative-template.md`.
|
|
188
191
|
|
|
189
192
|
#### Validation
|
|
190
193
|
|
|
191
194
|
`skill.validate` enforces:
|
|
192
195
|
- **SKILL-19**: entry metadata schema validity (errors) and legacy section warnings (migration window).
|
|
193
|
-
- **SKILL-20**: identifier uniqueness (
|
|
196
|
+
- **SKILL-20**: identifier uniqueness (K or consumer-local L-K format, no duplicates, `supersedes` references resolve, `promotedTo` format, and local IDs are forbidden in Forge-authored source).
|
|
194
197
|
- **SKILL-21**: hot (L2) and warm (L1) layer character budget warnings — warnings only, never build gates. Defaults: hot=4096, warm=8192. Override in `forge.yaml` under `bindings.knowledge.budgets`.
|
|
195
198
|
|
|
196
199
|
`doctor` reports legacy section counts and knowledge budget summaries as informational warnings.
|
|
@@ -12,9 +12,9 @@ policy plus audit evidence — not a cryptographic security boundary.</purpose>
|
|
|
12
12
|
</non-goals>
|
|
13
13
|
</MODULE_CONTRACT>
|
|
14
14
|
<KEY_DECISIONS>
|
|
15
|
-
<item>Registry absence is tolerance-neutral — ENOENT yields an empty registry;
|
|
16
|
-
<item>DelegationQuery
|
|
17
|
-
<item>sites: "workspace" covers every site;
|
|
15
|
+
<item>Registry absence is tolerance-neutral — ENOENT yields an empty registry; "no file" and "no grant" are identical.</item>
|
|
16
|
+
<item>DelegationQuery's optional grantedBy binds the query to the deciding human — provenance cannot be fabricated cross-grant.</item>
|
|
17
|
+
<item>sites: "workspace" covers every site; explicit id lists bound scope — site-scoped queries never match site-less grants.</item>
|
|
18
18
|
</KEY_DECISIONS>
|
|
19
19
|
<CHANGE_SUMMARY>
|
|
20
20
|
<item>RFC-1336: initial module — schema, scope catalog, loader, resolver, serializer.</item>
|
|
@@ -31,6 +31,8 @@ delegate — a journaled no-op with no delegation, so the operator path is
|
|
|
31
31
|
unchanged. certify/promote precondition remediation now names an active
|
|
32
32
|
delegation when one covers the site.</item>
|
|
33
33
|
<item>RFC-1336: delegated rfc.decision/version.major/onboarding.decision + docs (RFC-1336 steps 4-5)</item>
|
|
34
|
+
<item>RFC-1485: sweep compass headers — forge-src + forge root eslint</item>
|
|
35
|
+
<history>RFC-1400</history>
|
|
34
36
|
</CHANGE_SUMMARY>
|
|
35
37
|
*/
|
|
36
38
|
|
|
@@ -60,6 +62,7 @@ export const DELEGABLE_SCOPES = [
|
|
|
60
62
|
"version.major",
|
|
61
63
|
"onboarding.decision",
|
|
62
64
|
"fleet.notify",
|
|
65
|
+
"translation.contract.approve",
|
|
63
66
|
] as const;
|
|
64
67
|
|
|
65
68
|
export const BORDBUCH_SCOPE_PREFIX = "bordbuch.";
|
package/src/cli-flags.ts
CHANGED
|
@@ -11,11 +11,9 @@ with `TypeError: targetId.toLowerCase is not a function`.</purpose>
|
|
|
11
11
|
</non-goals>
|
|
12
12
|
</MODULE_CONTRACT>
|
|
13
13
|
<CHANGE_SUMMARY>
|
|
14
|
-
<item>
|
|
15
|
-
<item>
|
|
16
|
-
|
|
17
|
-
kernel argv parser; bare positionals without a preceding string[] flag still
|
|
18
|
-
emit KERNEL-ARG-01.</item>
|
|
14
|
+
<item>RFC-1389 (port of RFC-1381): bare `-m` rewrites to `--message` when the merged schema declares `message` — other `-x` tokens stay KERNEL-ARG-01, now with honest hints (a known declared short alias, the command's single unsatisfied required non-boolean flag, or a truthful see-`--help` fallback) instead of the fabricated `--id <token>` template; alias-shaped tokens are never consumed as flag values.</item>
|
|
15
|
+
<item>RFC-1395: port --output → --json alias into forge CLI parser</item>
|
|
16
|
+
<item>RFC-1485: sweep compass headers — forge-src + forge root eslint</item>
|
|
19
17
|
</CHANGE_SUMMARY>
|
|
20
18
|
*/
|
|
21
19
|
|
|
@@ -67,6 +65,70 @@ const CLI_BOOLEAN_FLAGS = new Set<string>([
|
|
|
67
65
|
"write",
|
|
68
66
|
]);
|
|
69
67
|
|
|
68
|
+
/**
|
|
69
|
+
* RFC-1389 (port of RFC-1381): single-dash short aliases keyed on the letter —
|
|
70
|
+
* applied only when the resolved long flag is actually declared by the merged
|
|
71
|
+
* schema. Deliberately NOT a general short-flag system; `-m` exists because
|
|
72
|
+
* `git commit -m` is universal muscle memory and `--message` is the ecosystem's
|
|
73
|
+
* most common required flag.
|
|
74
|
+
*/
|
|
75
|
+
const CLI_SHORT_FLAG_ALIASES: Record<string, string> = {
|
|
76
|
+
m: "message",
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* RFC-1395 (port of the kernel's KERNEL_FLAG_ALIASES): long-flag aliases —
|
|
81
|
+
* `--output` resolves to `--json` as a bare switch on both parse paths,
|
|
82
|
+
* matching the kernel's argv.ts. Aliases apply to bare switches only; an
|
|
83
|
+
* `--output=<value>` token keeps the raw flag name (unknown in strict mode,
|
|
84
|
+
* literal value in the heuristic path).
|
|
85
|
+
*/
|
|
86
|
+
const CLI_FLAG_ALIASES: Record<string, string> = {
|
|
87
|
+
output: "json",
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* RFC-1389: true when a token is a bare single-dash letter whose short alias
|
|
92
|
+
* resolves to a flag the schema declares — such tokens are flag-shaped, never
|
|
93
|
+
* value-shaped.
|
|
94
|
+
*/
|
|
95
|
+
function resolvesToDeclaredFlag(token: string, schema: Record<string, ForgeFlagSpec>): boolean {
|
|
96
|
+
if (!/^-[a-zA-Z]$/.test(token)) return false;
|
|
97
|
+
const long = CLI_SHORT_FLAG_ALIASES[token[1]!];
|
|
98
|
+
return long !== undefined && schema[long] !== undefined;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* RFC-1389: honest KERNEL-ARG-01 hint — names a real declared flag where a
|
|
103
|
+
* plausible mapping exists (a known `-x` short alias, or a positional value
|
|
104
|
+
* on a command with exactly one required non-boolean flag still awaiting a
|
|
105
|
+
* value), otherwise declines to fabricate. Never emits the old arbitrary
|
|
106
|
+
* `--id <token>` template, and never names a flag that is already satisfied
|
|
107
|
+
* or cannot take a value.
|
|
108
|
+
*/
|
|
109
|
+
function positionalFixHint(
|
|
110
|
+
entry: string,
|
|
111
|
+
schema?: Record<string, ForgeFlagSpec>,
|
|
112
|
+
resolved?: Record<string, ForgeFlagValue>,
|
|
113
|
+
): string {
|
|
114
|
+
if (schema) {
|
|
115
|
+
if (/^-[a-zA-Z]$/.test(entry)) {
|
|
116
|
+
const long = CLI_SHORT_FLAG_ALIASES[entry[1]!];
|
|
117
|
+
if (long && schema[long]) {
|
|
118
|
+
return `Convert "${entry}" to a flag, e.g. --${long} <value>.`;
|
|
119
|
+
}
|
|
120
|
+
return `Unexpected argument "${entry}" — see --help for declared flags.`;
|
|
121
|
+
}
|
|
122
|
+
const required = Object.keys(schema).filter(
|
|
123
|
+
(n) => schema[n]!.required && schema[n]!.kind !== "boolean" && resolved?.[n] === undefined,
|
|
124
|
+
);
|
|
125
|
+
if (required.length === 1) {
|
|
126
|
+
return `Convert "${entry}" to a flag, e.g. --${required[0]!} "${entry}".`;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return `Unexpected argument "${entry}" — see --help for declared flags.`;
|
|
130
|
+
}
|
|
131
|
+
|
|
70
132
|
function addFlagValue(
|
|
71
133
|
target: Record<string, ForgeFlagValue>,
|
|
72
134
|
key: string,
|
|
@@ -99,13 +161,18 @@ function addFlagValue(
|
|
|
99
161
|
target[key] = value;
|
|
100
162
|
}
|
|
101
163
|
|
|
102
|
-
function positionalDiagnostic(
|
|
164
|
+
function positionalDiagnostic(
|
|
165
|
+
entry: string,
|
|
166
|
+
commandName?: string,
|
|
167
|
+
schema?: Record<string, ForgeFlagSpec>,
|
|
168
|
+
resolved?: Record<string, ForgeFlagValue>,
|
|
169
|
+
): Diagnostic {
|
|
103
170
|
const scope = commandName ? ` for command "${commandName}"` : "";
|
|
104
171
|
return {
|
|
105
172
|
ruleId: "KERNEL-ARG-01",
|
|
106
173
|
severity: "error",
|
|
107
174
|
message: `Unexpected positional argument "${entry}"${scope}. All arguments must be passed as flags.`,
|
|
108
|
-
fixHint:
|
|
175
|
+
fixHint: positionalFixHint(entry, schema, resolved),
|
|
109
176
|
};
|
|
110
177
|
}
|
|
111
178
|
|
|
@@ -142,8 +209,12 @@ export function parseCliArgs(argv: string[]): {
|
|
|
142
209
|
|
|
143
210
|
const withoutPrefix = entry.slice(2);
|
|
144
211
|
const eqIndex = withoutPrefix.indexOf("=");
|
|
145
|
-
const
|
|
212
|
+
const rawFlagName = eqIndex === -1 ? withoutPrefix : withoutPrefix.slice(0, eqIndex);
|
|
146
213
|
const inlineValue = eqIndex === -1 ? undefined : withoutPrefix.slice(eqIndex + 1);
|
|
214
|
+
// Aliases apply to bare switches only — `--output=<value>` keeps the raw
|
|
215
|
+
// flag name (heuristic path records the literal value under "output").
|
|
216
|
+
const flagName =
|
|
217
|
+
inlineValue === undefined ? (CLI_FLAG_ALIASES[rawFlagName] ?? rawFlagName) : rawFlagName;
|
|
147
218
|
if (!flagName) continue;
|
|
148
219
|
|
|
149
220
|
if (inlineValue !== undefined) {
|
|
@@ -186,7 +257,7 @@ function resolveStrict(
|
|
|
186
257
|
const entry = rawArgv[index]!;
|
|
187
258
|
|
|
188
259
|
if (passthrough) {
|
|
189
|
-
diagnostics.push(positionalDiagnostic(entry, command.name));
|
|
260
|
+
diagnostics.push(positionalDiagnostic(entry, command.name, schema, flags));
|
|
190
261
|
continue;
|
|
191
262
|
}
|
|
192
263
|
|
|
@@ -195,15 +266,28 @@ function resolveStrict(
|
|
|
195
266
|
continue;
|
|
196
267
|
}
|
|
197
268
|
|
|
198
|
-
|
|
199
|
-
|
|
269
|
+
// RFC-1389 (port of RFC-1381): a bare single-dash letter token rewrites
|
|
270
|
+
// to its long alias when the command declares it (`-m` → `--message`);
|
|
271
|
+
// unknown short tokens fall through to KERNEL-ARG-01 with the honest hint.
|
|
272
|
+
let effectiveEntry = entry;
|
|
273
|
+
if (/^-[a-zA-Z]$/.test(entry)) {
|
|
274
|
+
const long = CLI_SHORT_FLAG_ALIASES[entry[1]!];
|
|
275
|
+
if (long && schema[long]) effectiveEntry = `--${long}`;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (!effectiveEntry.startsWith("--")) {
|
|
279
|
+
diagnostics.push(positionalDiagnostic(entry, command.name, schema, flags));
|
|
200
280
|
continue;
|
|
201
281
|
}
|
|
202
282
|
|
|
203
|
-
const withoutPrefix =
|
|
283
|
+
const withoutPrefix = effectiveEntry.slice(2);
|
|
204
284
|
const eqIndex = withoutPrefix.indexOf("=");
|
|
205
|
-
const
|
|
285
|
+
const rawFlagName = eqIndex === -1 ? withoutPrefix : withoutPrefix.slice(0, eqIndex);
|
|
206
286
|
const inlineValue = eqIndex === -1 ? undefined : withoutPrefix.slice(eqIndex + 1);
|
|
287
|
+
// Aliases apply to bare switches only — `--output=<value>` keeps the raw
|
|
288
|
+
// flag name and fails KERNEL-FLAG-01 as an unknown flag.
|
|
289
|
+
const flagName =
|
|
290
|
+
inlineValue === undefined ? (CLI_FLAG_ALIASES[rawFlagName] ?? rawFlagName) : rawFlagName;
|
|
207
291
|
if (!flagName) continue;
|
|
208
292
|
|
|
209
293
|
const spec = schema[flagName];
|
|
@@ -233,10 +317,17 @@ function resolveStrict(
|
|
|
233
317
|
|
|
234
318
|
// string[] flags consume every following bare token — mirrors the kernel's
|
|
235
319
|
// resolveCommandFlags: positional args are never valid (KERNEL-ARG-01),
|
|
236
|
-
// so `--files a b` unambiguously means the value list [a, b].
|
|
320
|
+
// so `--files a b` unambiguously means the value list [a, b]. RFC-1389: a
|
|
321
|
+
// `-x` token that resolves to a declared flag is flag-shaped, not
|
|
322
|
+
// value-shaped — `-m -m` fails KERNEL-FLAG-02 instead of silently
|
|
323
|
+
// recording message="-m".
|
|
237
324
|
if (spec.kind === "string[]") {
|
|
238
325
|
let consumed = 0;
|
|
239
|
-
while (
|
|
326
|
+
while (
|
|
327
|
+
index + 1 < rawArgv.length &&
|
|
328
|
+
!rawArgv[index + 1]!.startsWith("--") &&
|
|
329
|
+
!resolvesToDeclaredFlag(rawArgv[index + 1]!, schema)
|
|
330
|
+
) {
|
|
240
331
|
addFlagValue(flags, flagName, rawArgv[index + 1]!);
|
|
241
332
|
index += 1;
|
|
242
333
|
consumed += 1;
|
|
@@ -245,7 +336,11 @@ function resolveStrict(
|
|
|
245
336
|
// fall through to the missing-value diagnostic
|
|
246
337
|
} else {
|
|
247
338
|
const next = rawArgv[index + 1];
|
|
248
|
-
if (
|
|
339
|
+
if (
|
|
340
|
+
typeof next === "string" &&
|
|
341
|
+
!next.startsWith("--") &&
|
|
342
|
+
!resolvesToDeclaredFlag(next, schema)
|
|
343
|
+
) {
|
|
249
344
|
addFlagValue(flags, flagName, next);
|
|
250
345
|
index += 1;
|
|
251
346
|
continue;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>@warpgogol/forge/compass subpath — the pure Compass parsers shared
|
|
4
|
+
across packages (RFC-1392: the tagged-invariant parser consumed by
|
|
5
|
+
werkstatt-site's TEST-WEAKEN-10).</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Do not re-export os/ surfaces — the subpath exposes src/ contracts only.</item>
|
|
8
|
+
</non-goals>
|
|
9
|
+
</MODULE_CONTRACT>
|
|
10
|
+
<CHANGE_SUMMARY>
|
|
11
|
+
<item>RFC-1392: initial barrel for the compass src surface.</item>
|
|
12
|
+
<item>RFC-1392: extend test-weakening gate to generators, invariants, proof specs (RFC-1392)
|
|
13
|
+
|
|
14
|
+
TEST-WEAKEN-08..11 extend the RFC-1331 analyzer: numRuns budget reduced
|
|
15
|
+
or removed, property input domain narrowed (fc.pre / chained .filter /
|
|
16
|
+
numeric bound), bound @ai-invariant removed-reworded-unbound via the new
|
|
17
|
+
@warpgogol/forge/compass parser export, and *.proof.yaml field weakening
|
|
18
|
+
(fail-closed on unreadable or entry-less deletion). Blob collection now
|
|
19
|
+
covers implementation files and proof specs. Warn-only until the census
|
|
20
|
+
is operator-accepted — TEST_WEAKEN_ENFORCED keeps {01..06}; EC-22 records
|
|
21
|
+
advisory rules in the Test-Weakened trailer.</item>
|
|
22
|
+
<item>RFC-1392: close RFC-1392 review r1 — per-call-site generator and budget pairing</item>
|
|
23
|
+
</CHANGE_SUMMARY>
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
extractInvariants,
|
|
28
|
+
invariantStatementSha,
|
|
29
|
+
normalizeInvariantStatement,
|
|
30
|
+
baselineKey,
|
|
31
|
+
INVARIANT_ID_RE,
|
|
32
|
+
VACUOUS_INVARIANT_PATTERNS,
|
|
33
|
+
BINDING_KINDS,
|
|
34
|
+
type InvariantBindingKind,
|
|
35
|
+
type ParsedInvariant,
|
|
36
|
+
type RawBinding,
|
|
37
|
+
} from "./invariant-parser.ts";
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1390: pure tagged-`@ai-invariant[INV-<scope>-<NN>]` parser — marker
|
|
4
|
+
grammar, comment-region scanning, statement normalization, sha256 identity, and
|
|
5
|
+
`checked-by` binding extraction. Shared by the os/compass binding resolver and
|
|
6
|
+
cross-package consumers (e.g. werkstatt-site TEST-WEAKEN-10) via
|
|
7
|
+
`@warpgogol/forge/compass`.</purpose>
|
|
8
|
+
<non-goals>
|
|
9
|
+
<item>Do not resolve bindings against the filesystem — that stays os-side (resolveInvariantBindings).</item>
|
|
10
|
+
<item>Do not import from os/ or @warpgogol/* — src/ is kernel-free and package-autonomous (FORGE-AUTONOMY-01).</item>
|
|
11
|
+
<item>Do not scan `#`/`;`-style comment syntaxes (.gd, .tscn, .tres) — marker extraction covers `//` line comments, slash-star block comments, and HTML comments only; no such files exist in this workspace.</item>
|
|
12
|
+
</non-goals>
|
|
13
|
+
</MODULE_CONTRACT>
|
|
14
|
+
<KEY_DECISIONS>
|
|
15
|
+
<item>A marker must open the comment payload — a mid-comment `@ai-invariant` mention is prose, not a declaration.</item>
|
|
16
|
+
<item>The statement runs over contiguous comment lines until code, blank, delimiter, or a fresh marker; `(checked-by: …)` wraps likewise.</item>
|
|
17
|
+
<item>Statement identity is sha256 over whitespace-normalized text — re-indentation and reflow are not weakening; word changes are.</item>
|
|
18
|
+
</KEY_DECISIONS>
|
|
19
|
+
<CHANGE_SUMMARY>
|
|
20
|
+
<item>RFC-1392: extracted the pure parser from os/compass/handlers/invariant-bindings.ts for cross-package consumption — no behavior change.</item>
|
|
21
|
+
<item>RFC-1392: extend test-weakening gate to generators, invariants, proof specs (RFC-1392)
|
|
22
|
+
|
|
23
|
+
TEST-WEAKEN-08..11 extend the RFC-1331 analyzer: numRuns budget reduced
|
|
24
|
+
or removed, property input domain narrowed (fc.pre / chained .filter /
|
|
25
|
+
numeric bound), bound @ai-invariant removed-reworded-unbound via the new
|
|
26
|
+
@warpgogol/forge/compass parser export, and *.proof.yaml field weakening
|
|
27
|
+
(fail-closed on unreadable or entry-less deletion). Blob collection now
|
|
28
|
+
covers implementation files and proof specs. Warn-only until the census
|
|
29
|
+
is operator-accepted — TEST_WEAKEN_ENFORCED keeps {01..06}; EC-22 records
|
|
30
|
+
advisory rules in the Test-Weakened trailer.</item>
|
|
31
|
+
<item>RFC-1485: sweep compass headers — forge-src + forge root eslint</item>
|
|
32
|
+
</CHANGE_SUMMARY>
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
import { createHash } from "node:crypto";
|
|
36
|
+
|
|
37
|
+
export type InvariantBindingKind = "test" | "type" | "lint" | "proof";
|
|
38
|
+
|
|
39
|
+
export const INVARIANT_ID_RE = /^INV-[a-z0-9]+(-[a-z0-9]+)*-\d{2,3}$/;
|
|
40
|
+
|
|
41
|
+
const MARKER_RE = /^@ai-invariant(?:\[([^\]]*)\])?\s*:\s?(.*)$/;
|
|
42
|
+
const CHECKED_BY_RE = /\(\s*checked-by\s*:\s*([^()]*)\)\s*$/i;
|
|
43
|
+
export const BINDING_KINDS = new Set<InvariantBindingKind>(["test", "type", "lint", "proof"]);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Boilerplate shapes observed in the seeded corpus. Extending the list needs
|
|
47
|
+
* no RFC — it is a tunable constant next to the rule, like the V-40/V-41
|
|
48
|
+
* trigger lists.
|
|
49
|
+
*/
|
|
50
|
+
export const VACUOUS_INVARIANT_PATTERNS: RegExp[] = [
|
|
51
|
+
/preserve (its|the) core logic/i,
|
|
52
|
+
/this is a high-risk (module|file)/i,
|
|
53
|
+
/minimi[sz]e (external )?side effects/i,
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
const VACUOUS_MIN_WORDS = 6;
|
|
57
|
+
|
|
58
|
+
export function normalizeInvariantStatement(statement: string): string {
|
|
59
|
+
return statement.replace(/\s+/g, " ").trim();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function invariantStatementSha(statement: string): string {
|
|
63
|
+
return createHash("sha256").update(normalizeInvariantStatement(statement)).digest("hex");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function baselineKey(path: string, statementSha256: string): string {
|
|
67
|
+
return `${path}#${statementSha256}`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Comment-region spans of one line. Tracks `/* … */` and `<!-- … -->` blocks
|
|
72
|
+
* across lines so markers are only recognised inside comments, and only when
|
|
73
|
+
* the marker opens the comment payload (mid-comment mentions are prose).
|
|
74
|
+
* This is a lexical heuristic, not a tokenizer: an opener immediately
|
|
75
|
+
* preceded by `"`, `'`, `` ` ``, `:`, `/`, or an escape sequence (`\n//`…)
|
|
76
|
+
* is treated as code (string/regex literal, URL scheme, or escaped text)
|
|
77
|
+
* and skipped — a marker inside a *larger* string literal that embeds
|
|
78
|
+
* comment sigils can still false-positive, so keep marker text out of
|
|
79
|
+
* literals (split or escape it, as the test fixtures do).
|
|
80
|
+
*/
|
|
81
|
+
const OPENER_CODE_PREFIX = new Set(['"', "'", "`", ":", "/"]);
|
|
82
|
+
|
|
83
|
+
function commentSpans(
|
|
84
|
+
line: string,
|
|
85
|
+
block: "js" | "html" | null,
|
|
86
|
+
): { spans: [number, number, boolean][]; block: "js" | "html" | null } {
|
|
87
|
+
const spans: [number, number, boolean][] = [];
|
|
88
|
+
let i = 0;
|
|
89
|
+
while (i < line.length) {
|
|
90
|
+
if (block) {
|
|
91
|
+
const closer = block === "html" ? "-->" : "*/";
|
|
92
|
+
const end = line.indexOf(closer, i);
|
|
93
|
+
if (end === -1) {
|
|
94
|
+
spans.push([i, line.length, true]);
|
|
95
|
+
return { spans, block };
|
|
96
|
+
}
|
|
97
|
+
spans.push([i, end, true]);
|
|
98
|
+
i = end + closer.length;
|
|
99
|
+
block = null;
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
const candidates: [number, "line" | "js" | "html"][] = [];
|
|
103
|
+
const lineIdx = line.indexOf("//", i);
|
|
104
|
+
if (lineIdx >= 0) candidates.push([lineIdx, "line"]);
|
|
105
|
+
const jsIdx = line.indexOf("/*", i);
|
|
106
|
+
if (jsIdx >= 0) candidates.push([jsIdx, "js"]);
|
|
107
|
+
const htmlIdx = line.indexOf("<!--", i);
|
|
108
|
+
if (htmlIdx >= 0) candidates.push([htmlIdx, "html"]);
|
|
109
|
+
if (candidates.length === 0) break;
|
|
110
|
+
candidates.sort((a, b) => a[0] - b[0]);
|
|
111
|
+
const [first, kind] = candidates[0]!;
|
|
112
|
+
// An opener glued to a quote, colon, or slash sits inside a literal or a
|
|
113
|
+
// different opener — resume the scan after it instead of opening a
|
|
114
|
+
// comment. A backslash can never precede a real comment outside a
|
|
115
|
+
// string/template/regex, so a sigil touching an escape (`\n//`, `\//`,
|
|
116
|
+
// `\\/*`, …) is literal text too.
|
|
117
|
+
if (
|
|
118
|
+
(first > 0 && (OPENER_CODE_PREFIX.has(line[first - 1]!) || line[first - 1] === "\\")) ||
|
|
119
|
+
(first > 1 && line[first - 2] === "\\")
|
|
120
|
+
) {
|
|
121
|
+
i = first + 1;
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if (kind === "line") {
|
|
125
|
+
spans.push([first + 2, line.length, false]);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
block = kind;
|
|
129
|
+
i = first + (kind === "html" ? 4 : 2);
|
|
130
|
+
}
|
|
131
|
+
return { spans, block };
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** Comment text of one line: span contents joined, block-continuation `*` stripped. */
|
|
135
|
+
function commentTextOf(line: string, block: "js" | "html" | null) {
|
|
136
|
+
const { spans, block: nextBlock } = commentSpans(line, block);
|
|
137
|
+
if (spans.length === 0) return { text: null, block: nextBlock };
|
|
138
|
+
const text = spans
|
|
139
|
+
.map(([s, e, isBlock]) => {
|
|
140
|
+
const seg = line.slice(s, e);
|
|
141
|
+
return isBlock ? seg.replace(/^\s*\*\s?(?!\*)/, "") : seg;
|
|
142
|
+
})
|
|
143
|
+
.join(" ")
|
|
144
|
+
.trim();
|
|
145
|
+
return { text, block: nextBlock };
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Whether a comment line ends a multi-line invariant statement instead of
|
|
150
|
+
* continuing it: annotations (`@param`), markup tags (`<purpose>`), delimiter
|
|
151
|
+
* runs (`// ----`), and fresh invariant markers all start something new.
|
|
152
|
+
*/
|
|
153
|
+
function isContinuationBoundary(commentText: string): boolean {
|
|
154
|
+
if (commentText.startsWith("@") || commentText.startsWith("<")) return true;
|
|
155
|
+
if (/^[-=_~*#|]{3,}/.test(commentText)) return true;
|
|
156
|
+
return MARKER_RE.test(commentText);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface RawBinding {
|
|
160
|
+
kind: string;
|
|
161
|
+
target: string;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function parseBindingRef(ref: string): RawBinding {
|
|
165
|
+
const idx = ref.indexOf(":");
|
|
166
|
+
if (idx === -1) return { kind: ref.trim(), target: "" };
|
|
167
|
+
return { kind: ref.slice(0, idx).trim(), target: ref.slice(idx + 1).trim() };
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface ParsedInvariant {
|
|
171
|
+
id: string | null;
|
|
172
|
+
malformedId?: string;
|
|
173
|
+
/** A `checked-by` group is present but is not the trailing parenthesised group. */
|
|
174
|
+
malformedCheckedBy?: boolean;
|
|
175
|
+
line: number;
|
|
176
|
+
statement: string;
|
|
177
|
+
rawBindings: RawBinding[];
|
|
178
|
+
vacuous: boolean;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Extract every `@ai-invariant` from source text — legacy `// @ai-invariant …`
|
|
183
|
+
* (id null) and tagged `// @ai-invariant[INV-x-01] … (checked-by: …)` forms.
|
|
184
|
+
* The marker must open the comment payload — a `@ai-invariant` mention inside
|
|
185
|
+
* a sentence is prose, not a declaration. A statement runs until a code line,
|
|
186
|
+
* a blank comment line, a delimiter-prefixed line, a markup/annotation line,
|
|
187
|
+
* or a fresh marker — contiguous comment lines are the statement (the
|
|
188
|
+
* `(checked-by: …)` tail wraps the same way).
|
|
189
|
+
*/
|
|
190
|
+
export function extractInvariants(source: string): ParsedInvariant[] {
|
|
191
|
+
const lines = source.split("\n");
|
|
192
|
+
const found: ParsedInvariant[] = [];
|
|
193
|
+
|
|
194
|
+
// Comment text per line — markers outside comments never declare invariants.
|
|
195
|
+
const commentTexts: (string | null)[] = [];
|
|
196
|
+
let block: "js" | "html" | null = null;
|
|
197
|
+
for (const line of lines) {
|
|
198
|
+
const { text, block: nextBlock } = commentTextOf(line, block);
|
|
199
|
+
commentTexts.push(text);
|
|
200
|
+
block = nextBlock;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
204
|
+
const comment = commentTexts[i];
|
|
205
|
+
if (comment === null) continue;
|
|
206
|
+
const match = MARKER_RE.exec(comment);
|
|
207
|
+
if (!match) continue;
|
|
208
|
+
|
|
209
|
+
const bracket = match[1];
|
|
210
|
+
let text = match[2] ?? "";
|
|
211
|
+
const markerLine = i + 1;
|
|
212
|
+
|
|
213
|
+
// Join continuation comment lines: the statement runs until a code line,
|
|
214
|
+
// a blank comment line, a delimiter run, a markup/annotation line, or a
|
|
215
|
+
// new invariant marker (the `(checked-by: …)` tail may wrap the same way).
|
|
216
|
+
while (i + 1 < lines.length) {
|
|
217
|
+
const next = commentTexts[i + 1];
|
|
218
|
+
if (next === null || next === "" || isContinuationBoundary(next)) break;
|
|
219
|
+
i += 1;
|
|
220
|
+
text = `${text} ${next}`.trim();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
let bindings: RawBinding[] = [];
|
|
224
|
+
let statement = text;
|
|
225
|
+
const checkedBy = CHECKED_BY_RE.exec(text);
|
|
226
|
+
if (checkedBy) {
|
|
227
|
+
statement = text.slice(0, checkedBy.index).trim();
|
|
228
|
+
bindings = checkedBy[1]!
|
|
229
|
+
.split(",")
|
|
230
|
+
.map((ref) => ref.trim())
|
|
231
|
+
.filter((ref) => ref.length > 0)
|
|
232
|
+
.map(parseBindingRef);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const normalized = normalizeInvariantStatement(statement);
|
|
236
|
+
const malformedId =
|
|
237
|
+
bracket !== undefined && !INVARIANT_ID_RE.test(bracket.trim()) ? bracket.trim() : undefined;
|
|
238
|
+
const malformedCheckedBy = !checkedBy && /\(\s*checked-by\s*:/i.test(statement);
|
|
239
|
+
|
|
240
|
+
found.push({
|
|
241
|
+
id: malformedId === undefined && bracket !== undefined ? bracket.trim() : null,
|
|
242
|
+
malformedId,
|
|
243
|
+
malformedCheckedBy: malformedCheckedBy || undefined,
|
|
244
|
+
line: markerLine,
|
|
245
|
+
statement: normalized,
|
|
246
|
+
rawBindings: bindings,
|
|
247
|
+
vacuous:
|
|
248
|
+
VACUOUS_INVARIANT_PATTERNS.some((re) => re.test(normalized)) ||
|
|
249
|
+
normalized.split(" ").filter((w) => w.length > 0).length < VACUOUS_MIN_WORDS,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return found;
|
|
254
|
+
}
|