@warpgogol/forge 8.0.4 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/bin/cli.ts +26 -13
- package/dist/bin/cli.js +18 -13
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +1 -0
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/adr/types.d.ts +2 -0
- package/dist/os/adr/types.d.ts.map +1 -1
- package/dist/os/agent/agent.module.d.ts +3 -0
- package/dist/os/agent/agent.module.d.ts.map +1 -0
- package/dist/os/agent/agent.module.js +60 -0
- package/dist/os/agent/agent.module.js.map +1 -0
- package/dist/os/agent/handlers/agent-delegate.d.ts +29 -0
- package/dist/os/agent/handlers/agent-delegate.d.ts.map +1 -0
- package/dist/os/agent/handlers/agent-delegate.js +187 -0
- package/dist/os/agent/handlers/agent-delegate.js.map +1 -0
- package/dist/os/agent/handlers/agent-tiers-validate.d.ts +15 -0
- package/dist/os/agent/handlers/agent-tiers-validate.d.ts.map +1 -0
- package/dist/os/agent/handlers/agent-tiers-validate.js +209 -0
- package/dist/os/agent/handlers/agent-tiers-validate.js.map +1 -0
- package/dist/os/agent/index.d.ts +5 -0
- package/dist/os/agent/index.d.ts.map +1 -0
- package/dist/os/agent/index.js +18 -0
- package/dist/os/agent/index.js.map +1 -0
- package/dist/os/agent/invoke-adapter.d.ts +43 -0
- package/dist/os/agent/invoke-adapter.d.ts.map +1 -0
- package/dist/os/agent/invoke-adapter.js +83 -0
- package/dist/os/agent/invoke-adapter.js.map +1 -0
- package/dist/os/authority/authority.module.d.ts.map +1 -1
- package/dist/os/authority/authority.module.js +2 -10
- package/dist/os/authority/authority.module.js.map +1 -1
- package/dist/os/authority/handlers/delegate.d.ts.map +1 -1
- package/dist/os/authority/handlers/delegate.js +2 -1
- package/dist/os/authority/handlers/delegate.js.map +1 -1
- package/dist/os/authority/index.d.ts.map +1 -1
- package/dist/os/authority/index.js +2 -1
- package/dist/os/authority/index.js.map +1 -1
- package/dist/os/checks/checks.module.d.ts +3 -0
- package/dist/os/checks/checks.module.d.ts.map +1 -0
- package/dist/os/checks/checks.module.js +94 -0
- package/dist/os/checks/checks.module.js.map +1 -0
- package/dist/os/checks/handlers/contribution-report.d.ts +35 -0
- package/dist/os/checks/handlers/contribution-report.d.ts.map +1 -0
- package/dist/os/checks/handlers/contribution-report.js +265 -0
- package/dist/os/checks/handlers/contribution-report.js.map +1 -0
- package/dist/os/checks/handlers/counters-export.d.ts +19 -0
- package/dist/os/checks/handlers/counters-export.d.ts.map +1 -0
- package/dist/os/checks/handlers/counters-export.js +126 -0
- package/dist/os/checks/handlers/counters-export.js.map +1 -0
- package/dist/os/checks/handlers/counters-journal.d.ts +67 -0
- package/dist/os/checks/handlers/counters-journal.d.ts.map +1 -0
- package/dist/os/checks/handlers/counters-journal.js +155 -0
- package/dist/os/checks/handlers/counters-journal.js.map +1 -0
- package/dist/os/checks/handlers/counters-validate.d.ts +11 -0
- package/dist/os/checks/handlers/counters-validate.d.ts.map +1 -0
- package/dist/os/checks/handlers/counters-validate.js +135 -0
- package/dist/os/checks/handlers/counters-validate.js.map +1 -0
- package/dist/os/checks/index.d.ts +6 -0
- package/dist/os/checks/index.d.ts.map +1 -0
- package/dist/os/checks/index.js +17 -0
- package/dist/os/checks/index.js.map +1 -0
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +55 -20
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/compass-docs-scaffold.js +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold.js +10 -3
- package/dist/os/compass/handlers/compass-header-scaffold.js.map +1 -1
- package/dist/os/compass/handlers/compass-invariants-generate.d.ts +15 -0
- package/dist/os/compass/handlers/compass-invariants-generate.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-invariants-generate.js +209 -0
- package/dist/os/compass/handlers/compass-invariants-generate.js.map +1 -0
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +46 -4
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/invariant-bindings.d.ts +85 -0
- package/dist/os/compass/handlers/invariant-bindings.d.ts.map +1 -0
- package/dist/os/compass/handlers/invariant-bindings.js +390 -0
- package/dist/os/compass/handlers/invariant-bindings.js.map +1 -0
- package/dist/os/conformance/conformance.module.d.ts +3 -0
- package/dist/os/conformance/conformance.module.d.ts.map +1 -0
- package/dist/os/conformance/conformance.module.js +96 -0
- package/dist/os/conformance/conformance.module.js.map +1 -0
- package/dist/os/conformance/handlers/conformance-run.d.ts +14 -0
- package/dist/os/conformance/handlers/conformance-run.d.ts.map +1 -0
- package/dist/os/conformance/handlers/conformance-run.js +149 -0
- package/dist/os/conformance/handlers/conformance-run.js.map +1 -0
- package/dist/os/conformance/handlers/conformance-validate.d.ts +14 -0
- package/dist/os/conformance/handlers/conformance-validate.d.ts.map +1 -0
- package/dist/os/conformance/handlers/conformance-validate.js +216 -0
- package/dist/os/conformance/handlers/conformance-validate.js.map +1 -0
- package/dist/os/conformance/index.d.ts +6 -0
- package/dist/os/conformance/index.d.ts.map +1 -0
- package/dist/os/conformance/index.js +17 -0
- package/dist/os/conformance/index.js.map +1 -0
- package/dist/os/context/context.module.d.ts +3 -0
- package/dist/os/context/context.module.d.ts.map +1 -0
- package/dist/os/context/context.module.js +73 -0
- package/dist/os/context/context.module.js.map +1 -0
- package/dist/os/context/handlers/context-assemble.d.ts +28 -0
- package/dist/os/context/handlers/context-assemble.d.ts.map +1 -0
- package/dist/os/context/handlers/context-assemble.js +146 -0
- package/dist/os/context/handlers/context-assemble.js.map +1 -0
- package/dist/os/context/handlers/context-slate-eval.d.ts +15 -0
- package/dist/os/context/handlers/context-slate-eval.d.ts.map +1 -0
- package/dist/os/context/handlers/context-slate-eval.js +74 -0
- package/dist/os/context/handlers/context-slate-eval.js.map +1 -0
- package/dist/os/context/handlers/index-build.d.ts +19 -0
- package/dist/os/context/handlers/index-build.d.ts.map +1 -0
- package/dist/os/context/handlers/index-build.js +191 -0
- package/dist/os/context/handlers/index-build.js.map +1 -0
- package/dist/os/context/index.d.ts +5 -0
- package/dist/os/context/index.d.ts.map +1 -0
- package/dist/os/context/index.js +16 -0
- package/dist/os/context/index.js.map +1 -0
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +34 -11
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/formal/formal.module.d.ts +3 -0
- package/dist/os/formal/formal.module.d.ts.map +1 -0
- package/dist/os/formal/formal.module.js +63 -0
- package/dist/os/formal/formal.module.js.map +1 -0
- package/dist/os/formal/handlers/proof-check.d.ts +10 -0
- package/dist/os/formal/handlers/proof-check.d.ts.map +1 -0
- package/dist/os/formal/handlers/proof-check.js +82 -0
- package/dist/os/formal/handlers/proof-check.js.map +1 -0
- package/dist/os/formal/index.d.ts +4 -0
- package/dist/os/formal/index.d.ts.map +1 -0
- package/dist/os/formal/index.js +16 -0
- package/dist/os/formal/index.js.map +1 -0
- package/dist/os/friction/friction.module.d.ts +3 -0
- package/dist/os/friction/friction.module.d.ts.map +1 -0
- package/dist/os/friction/friction.module.js +71 -0
- package/dist/os/friction/friction.module.js.map +1 -0
- package/dist/os/friction/handlers/friction-validate.d.ts +4 -0
- package/dist/os/friction/handlers/friction-validate.d.ts.map +1 -0
- package/dist/os/friction/handlers/friction-validate.js +228 -0
- package/dist/os/friction/handlers/friction-validate.js.map +1 -0
- package/dist/os/friction/index.d.ts +4 -0
- package/dist/os/friction/index.d.ts.map +1 -0
- package/dist/os/friction/index.js +23 -0
- package/dist/os/friction/index.js.map +1 -0
- package/dist/os/friction/types.d.ts +97 -0
- package/dist/os/friction/types.d.ts.map +1 -0
- package/dist/os/friction/types.js +78 -0
- package/dist/os/friction/types.js.map +1 -0
- package/dist/os/gate/gate.module.d.ts +3 -0
- package/dist/os/gate/gate.module.d.ts.map +1 -0
- package/dist/os/gate/gate.module.js +65 -0
- package/dist/os/gate/gate.module.js.map +1 -0
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts +18 -0
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -0
- package/dist/os/gate/handlers/gate-probe-catalog.js +70 -0
- package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -0
- package/dist/os/gate/handlers/gate-probe.d.ts +32 -0
- package/dist/os/gate/handlers/gate-probe.d.ts.map +1 -0
- package/dist/os/gate/handlers/gate-probe.js +232 -0
- package/dist/os/gate/handlers/gate-probe.js.map +1 -0
- package/dist/os/gate/index.d.ts +4 -0
- package/dist/os/gate/index.d.ts.map +1 -0
- package/dist/os/gate/index.js +15 -0
- package/dist/os/gate/index.js.map +1 -0
- package/dist/os/instructions/handlers/budget-validate.d.ts +29 -0
- package/dist/os/instructions/handlers/budget-validate.d.ts.map +1 -0
- package/dist/os/instructions/handlers/budget-validate.js +164 -0
- package/dist/os/instructions/handlers/budget-validate.js.map +1 -0
- package/dist/os/instructions/handlers/scar-migrate.d.ts +13 -0
- package/dist/os/instructions/handlers/scar-migrate.d.ts.map +1 -0
- package/dist/os/instructions/handlers/scar-migrate.js +270 -0
- package/dist/os/instructions/handlers/scar-migrate.js.map +1 -0
- package/dist/os/instructions/instructions.module.d.ts +3 -0
- package/dist/os/instructions/instructions.module.d.ts.map +1 -0
- package/dist/os/instructions/instructions.module.js +75 -0
- package/dist/os/instructions/instructions.module.js.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts +16 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js +202 -0
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.d.ts +11 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.d.ts.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.js +428 -0
- package/dist/os/knowledge/handlers/knowledge-conflicts-resolve.js.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.d.ts +15 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.d.ts.map +1 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.js +141 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.js.map +1 -0
- package/dist/os/knowledge/index.d.ts +5 -0
- package/dist/os/knowledge/index.d.ts.map +1 -0
- package/dist/os/knowledge/index.js +17 -0
- package/dist/os/knowledge/index.js.map +1 -0
- package/dist/os/knowledge/knowledge.module.d.ts +3 -0
- package/dist/os/knowledge/knowledge.module.d.ts.map +1 -0
- package/dist/os/knowledge/knowledge.module.js +95 -0
- package/dist/os/knowledge/knowledge.module.js.map +1 -0
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +102 -6
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/mission.module.d.ts.map +1 -1
- package/dist/os/mission/mission.module.js +7 -0
- package/dist/os/mission/mission.module.js.map +1 -1
- package/dist/os/naming/naming-convention.d.ts.map +1 -1
- package/dist/os/naming/naming-convention.js +2 -1
- package/dist/os/naming/naming-convention.js.map +1 -1
- package/dist/os/program/schemas.d.ts +5 -5
- package/dist/os/queue/handlers/queue-validate.d.ts.map +1 -1
- package/dist/os/queue/handlers/queue-validate.js +129 -5
- package/dist/os/queue/handlers/queue-validate.js.map +1 -1
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +8 -7
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/queue/queue.module.d.ts.map +1 -1
- package/dist/os/queue/queue.module.js +12 -31
- package/dist/os/queue/queue.module.js.map +1 -1
- package/dist/os/queue/types.d.ts +23 -0
- package/dist/os/queue/types.d.ts.map +1 -1
- package/dist/os/queue/types.js +24 -3
- package/dist/os/queue/types.js.map +1 -1
- package/dist/os/resolver/handlers/resolver-doors-audit.d.ts +22 -0
- package/dist/os/resolver/handlers/resolver-doors-audit.d.ts.map +1 -0
- package/dist/os/resolver/handlers/resolver-doors-audit.js +238 -0
- package/dist/os/resolver/handlers/resolver-doors-audit.js.map +1 -0
- package/dist/os/resolver/resolver.module.d.ts +3 -0
- package/dist/os/resolver/resolver.module.d.ts.map +1 -0
- package/dist/os/resolver/resolver.module.js +41 -0
- package/dist/os/resolver/resolver.module.js.map +1 -0
- package/dist/os/rfc/acceptance.d.ts +2 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +158 -82
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts +10 -0
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +14 -0
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/handlers/fixed-inputs.d.ts +29 -0
- package/dist/os/rfc/handlers/fixed-inputs.d.ts.map +1 -0
- package/dist/os/rfc/handlers/fixed-inputs.js +214 -0
- package/dist/os/rfc/handlers/fixed-inputs.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts +48 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.js +148 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts +15 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.js +67 -7
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts +44 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.js +104 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +262 -56
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.d.ts +4 -2
- package/dist/os/rfc/handlers/index-graph.d.ts.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +57 -3
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -1
- package/dist/os/rfc/handlers/lifecycle.js +13 -6
- package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +144 -13
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.d.ts.map +1 -1
- package/dist/os/rfc/handlers/supersede-propose.js +34 -7
- package/dist/os/rfc/handlers/supersede-propose.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +4 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +159 -11
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +10 -1
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/outcome-probe.d.ts +20 -0
- package/dist/os/rfc/outcome-probe.d.ts.map +1 -0
- package/dist/os/rfc/outcome-probe.js +315 -0
- package/dist/os/rfc/outcome-probe.js.map +1 -0
- package/dist/os/rfc/reachable-symbol.d.ts.map +1 -1
- package/dist/os/rfc/reachable-symbol.js +54 -13
- package/dist/os/rfc/reachable-symbol.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +68 -15
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +110 -12
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +24 -7
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +4 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +69 -17
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +8 -0
- package/dist/os/rfc/verification-origin.d.ts.map +1 -1
- package/dist/os/rfc/verification-origin.js +48 -1
- package/dist/os/rfc/verification-origin.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +19 -2
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/rfc/verification-verdicts.d.ts +14 -0
- package/dist/os/rfc/verification-verdicts.d.ts.map +1 -0
- package/dist/os/rfc/verification-verdicts.js +104 -0
- package/dist/os/rfc/verification-verdicts.js.map +1 -0
- package/dist/os/rfc/verifier/rfc-1391/support.d.ts +34 -0
- package/dist/os/rfc/verifier/rfc-1391/support.d.ts.map +1 -0
- package/dist/os/rfc/verifier/rfc-1391/support.js +188 -0
- package/dist/os/rfc/verifier/rfc-1391/support.js.map +1 -0
- package/dist/os/session/frontmatter-io.d.ts +3 -1
- package/dist/os/session/frontmatter-io.d.ts.map +1 -1
- package/dist/os/session/frontmatter-io.js +3 -1
- package/dist/os/session/frontmatter-io.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +5 -2
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/session/handlers/session-audit-report.d.ts +20 -0
- package/dist/os/session/handlers/session-audit-report.d.ts.map +1 -0
- package/dist/os/session/handlers/session-audit-report.js +82 -0
- package/dist/os/session/handlers/session-audit-report.js.map +1 -0
- package/dist/os/session/handlers/session-audit.d.ts +25 -0
- package/dist/os/session/handlers/session-audit.d.ts.map +1 -0
- package/dist/os/session/handlers/session-audit.js +269 -0
- package/dist/os/session/handlers/session-audit.js.map +1 -0
- package/dist/os/session/session.module.d.ts.map +1 -1
- package/dist/os/session/session.module.js +49 -2
- package/dist/os/session/session.module.js.map +1 -1
- package/dist/os/spec/spec-amendments.d.ts +7 -0
- package/dist/os/spec/spec-amendments.d.ts.map +1 -0
- package/dist/os/spec/spec-amendments.js +86 -0
- package/dist/os/spec/spec-amendments.js.map +1 -0
- package/dist/os/spec/spec-materialize.d.ts.map +1 -1
- package/dist/os/spec/spec-materialize.js +22 -24
- package/dist/os/spec/spec-materialize.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +25 -29
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +9 -29
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/spec/spec.module.d.ts.map +1 -1
- package/dist/os/spec/spec.module.js +7 -36
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/trajectory/handlers/journal-io.d.ts +60 -0
- package/dist/os/trajectory/handlers/journal-io.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/journal-io.js +179 -0
- package/dist/os/trajectory/handlers/journal-io.js.map +1 -0
- package/dist/os/trajectory/handlers/outcome-record.d.ts +16 -0
- package/dist/os/trajectory/handlers/outcome-record.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/outcome-record.js +145 -0
- package/dist/os/trajectory/handlers/outcome-record.js.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-index.d.ts +59 -0
- package/dist/os/trajectory/handlers/trajectory-index.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-index.js +449 -0
- package/dist/os/trajectory/handlers/trajectory-index.js.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-recall.d.ts +21 -0
- package/dist/os/trajectory/handlers/trajectory-recall.d.ts.map +1 -0
- package/dist/os/trajectory/handlers/trajectory-recall.js +179 -0
- package/dist/os/trajectory/handlers/trajectory-recall.js.map +1 -0
- package/dist/os/trajectory/index.d.ts +5 -0
- package/dist/os/trajectory/index.d.ts.map +1 -0
- package/dist/os/trajectory/index.js +16 -0
- package/dist/os/trajectory/index.js.map +1 -0
- package/dist/os/trajectory/trajectory.module.d.ts +3 -0
- package/dist/os/trajectory/trajectory.module.d.ts.map +1 -0
- package/dist/os/trajectory/trajectory.module.js +98 -0
- package/dist/os/trajectory/trajectory.module.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-close.d.ts +13 -0
- package/dist/os/werkstatt/handlers/session-close.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-close.js +56 -0
- package/dist/os/werkstatt/handlers/session-close.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-engine.d.ts +3 -0
- package/dist/os/werkstatt/handlers/session-engine.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-engine.js +28 -0
- package/dist/os/werkstatt/handlers/session-engine.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-open.d.ts +10 -0
- package/dist/os/werkstatt/handlers/session-open.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-open.js +46 -0
- package/dist/os/werkstatt/handlers/session-open.js.map +1 -0
- package/dist/os/werkstatt/handlers/session-status.d.ts +9 -0
- package/dist/os/werkstatt/handlers/session-status.d.ts.map +1 -0
- package/dist/os/werkstatt/handlers/session-status.js +34 -0
- package/dist/os/werkstatt/handlers/session-status.js.map +1 -0
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +98 -3
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/os/yaml/handlers/scalars-validate.d.ts +28 -0
- package/dist/os/yaml/handlers/scalars-validate.d.ts.map +1 -0
- package/dist/os/yaml/handlers/scalars-validate.js +311 -0
- package/dist/os/yaml/handlers/scalars-validate.js.map +1 -0
- package/dist/os/yaml/index.d.ts +4 -0
- package/dist/os/yaml/index.d.ts.map +1 -0
- package/dist/os/yaml/index.js +15 -0
- package/dist/os/yaml/index.js.map +1 -0
- package/dist/os/yaml/yaml.module.d.ts +3 -0
- package/dist/os/yaml/yaml.module.d.ts.map +1 -0
- package/dist/os/yaml/yaml.module.js +58 -0
- package/dist/os/yaml/yaml.module.js.map +1 -0
- package/dist/src/authority/delegations.d.ts +1 -1
- package/dist/src/authority/delegations.d.ts.map +1 -1
- package/dist/src/authority/delegations.js +6 -3
- package/dist/src/authority/delegations.js.map +1 -1
- package/dist/src/cli-flags.d.ts.map +1 -1
- package/dist/src/cli-flags.js +91 -16
- package/dist/src/cli-flags.js.map +1 -1
- package/dist/src/compass/index.d.ts +2 -0
- package/dist/src/compass/index.d.ts.map +1 -0
- package/dist/src/compass/index.js +26 -0
- package/dist/src/compass/index.js.map +1 -0
- package/dist/src/compass/invariant-parser.d.ts +37 -0
- package/dist/src/compass/invariant-parser.d.ts.map +1 -0
- package/dist/src/compass/invariant-parser.js +219 -0
- package/dist/src/compass/invariant-parser.js.map +1 -0
- package/dist/src/config/forge-config.d.ts +125 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +110 -17
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/conformance/index.d.ts +42 -0
- package/dist/src/conformance/index.d.ts.map +1 -0
- package/dist/src/conformance/index.js +193 -0
- package/dist/src/conformance/index.js.map +1 -0
- package/dist/src/formal/exhaustive.d.ts +40 -0
- package/dist/src/formal/exhaustive.d.ts.map +1 -0
- package/dist/src/formal/exhaustive.js +141 -0
- package/dist/src/formal/exhaustive.js.map +1 -0
- package/dist/src/formal/index.d.ts +7 -0
- package/dist/src/formal/index.d.ts.map +1 -0
- package/dist/src/formal/index.js +17 -0
- package/dist/src/formal/index.js.map +1 -0
- package/dist/src/formal/proof-runner.d.ts +51 -0
- package/dist/src/formal/proof-runner.d.ts.map +1 -0
- package/dist/src/formal/proof-runner.js +451 -0
- package/dist/src/formal/proof-runner.js.map +1 -0
- package/dist/src/formal/proof-spec.d.ts +69 -0
- package/dist/src/formal/proof-spec.d.ts.map +1 -0
- package/dist/src/formal/proof-spec.js +97 -0
- package/dist/src/formal/proof-spec.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/knowledge/index.d.ts +2 -2
- package/dist/src/knowledge/index.d.ts.map +1 -1
- package/dist/src/knowledge/index.js +4 -3
- package/dist/src/knowledge/index.js.map +1 -1
- package/dist/src/knowledge/parse.d.ts +1 -0
- package/dist/src/knowledge/parse.d.ts.map +1 -1
- package/dist/src/knowledge/parse.js +20 -18
- package/dist/src/knowledge/parse.js.map +1 -1
- package/dist/src/knowledge/schema.d.ts +8 -0
- package/dist/src/knowledge/schema.d.ts.map +1 -1
- package/dist/src/knowledge/schema.js +10 -4
- package/dist/src/knowledge/schema.js.map +1 -1
- package/dist/src/knowledge/serialize.d.ts.map +1 -1
- package/dist/src/knowledge/serialize.js +3 -0
- package/dist/src/knowledge/serialize.js.map +1 -1
- package/dist/src/knowledge/sync.d.ts +61 -0
- package/dist/src/knowledge/sync.d.ts.map +1 -1
- package/dist/src/knowledge/sync.js +202 -7
- package/dist/src/knowledge/sync.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +18 -3
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/compass-docs/semantic-layer-block.js +1 -1
- package/dist/src/onboarding/doctor.d.ts +2 -0
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +253 -27
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.js +3 -3
- package/dist/src/onboarding/init.js.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.js +1 -1
- package/dist/src/onboarding/nested-agents-templates.js +1 -1
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +18 -10
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/profiles/profile-schema.d.ts +8 -0
- package/dist/src/profiles/profile-schema.d.ts.map +1 -1
- package/dist/src/profiles/profile-schema.js +10 -2
- package/dist/src/profiles/profile-schema.js.map +1 -1
- package/dist/src/profiles/stack-profile.d.ts +4 -0
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/reachability/command-mentions.d.ts +17 -0
- package/dist/src/reachability/command-mentions.d.ts.map +1 -0
- package/dist/src/reachability/command-mentions.js +83 -0
- package/dist/src/reachability/command-mentions.js.map +1 -0
- package/dist/src/registry.d.ts +30 -0
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +168 -68
- package/dist/src/registry.js.map +1 -1
- package/dist/src/types.d.ts +51 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +11 -14
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/sync-fs.d.ts +1 -1
- package/dist/src/utils/sync-fs.d.ts.map +1 -1
- package/dist/src/utils/sync-fs.js +2 -1
- package/dist/src/utils/sync-fs.js.map +1 -1
- package/dist/src/validators/skill-validate.d.ts +5 -0
- package/dist/src/validators/skill-validate.d.ts.map +1 -1
- package/dist/src/validators/skill-validate.js +34 -8
- package/dist/src/validators/skill-validate.js.map +1 -1
- package/docs/reference/forge-yaml.md +20 -0
- package/os/adr/handlers/implement-stamp.ts +2 -0
- package/os/adr/types.ts +2 -0
- package/os/agent/agent.module.ts +64 -0
- package/os/agent/handlers/agent-delegate.ts +227 -0
- package/os/agent/handlers/agent-tiers-validate.ts +232 -0
- package/os/agent/index.ts +18 -0
- package/os/agent/invoke-adapter.ts +119 -0
- package/os/authority/authority.module.ts +2 -10
- package/os/authority/handlers/delegate.ts +2 -1
- package/os/authority/index.ts +2 -1
- package/os/checks/checks.module.ts +99 -0
- package/os/checks/handlers/contribution-report.test.ts +250 -0
- package/os/checks/handlers/contribution-report.ts +317 -0
- package/os/checks/handlers/counters-export.test.ts +181 -0
- package/os/checks/handlers/counters-export.ts +174 -0
- package/os/checks/handlers/counters-journal.test.ts +193 -0
- package/os/checks/handlers/counters-journal.ts +180 -0
- package/os/checks/handlers/counters-validate.test.ts +182 -0
- package/os/checks/handlers/counters-validate.ts +163 -0
- package/os/checks/handlers/variant-candidates.test.ts +71 -0
- package/os/checks/index.ts +27 -0
- package/os/compass/compass.module.ts +58 -20
- package/os/compass/handlers/compass-docs-scaffold.ts +1 -1
- package/os/compass/handlers/compass-header-scaffold.ts +10 -3
- package/os/compass/handlers/compass-invariants-generate.ts +294 -0
- package/os/compass/handlers/compass-inventory-handler.ts +59 -4
- package/os/compass/handlers/invariant-bindings.ts +526 -0
- package/os/compass/handlers/tests/compass-invariant-binding.test.ts +500 -0
- package/os/compass/handlers/tests/compass-invariants-generate.test.ts +235 -0
- package/os/compass/handlers/tests/compass-migrate.test.ts +5 -3
- package/os/conformance/conformance.module.ts +105 -0
- package/os/conformance/handlers/conformance-run.ts +175 -0
- package/os/conformance/handlers/conformance-validate.ts +334 -0
- package/os/conformance/handlers/tests/conformance.test.ts +657 -0
- package/os/conformance/index.ts +19 -0
- package/os/context/context.module.ts +78 -0
- package/os/context/handlers/context-assemble.test.ts +95 -0
- package/os/context/handlers/context-assemble.ts +175 -0
- package/os/context/handlers/context-slate-eval.test.ts +70 -0
- package/os/context/handlers/context-slate-eval.ts +90 -0
- package/os/context/handlers/index-build.test.ts +101 -0
- package/os/context/handlers/index-build.ts +214 -0
- package/os/context/handlers/no-model-deps.test.ts +38 -0
- package/os/context/handlers/slate-fill.test.ts +37 -0
- package/os/context/index.ts +16 -0
- package/os/core/core.module.ts +34 -11
- package/os/formal/formal.module.ts +67 -0
- package/os/formal/handlers/proof-check.test.ts +337 -0
- package/os/formal/handlers/proof-check.ts +100 -0
- package/os/formal/index.ts +17 -0
- package/os/friction/friction-validate.test.ts +442 -0
- package/os/friction/friction.module.ts +74 -0
- package/os/friction/handlers/friction-validate.ts +349 -0
- package/os/friction/index.ts +30 -0
- package/os/friction/types.ts +113 -0
- package/os/gate/gate.module.ts +69 -0
- package/os/gate/handlers/gate-probe-catalog.test.ts +82 -0
- package/os/gate/handlers/gate-probe-catalog.ts +89 -0
- package/os/gate/handlers/gate-probe.test.ts +114 -0
- package/os/gate/handlers/gate-probe.ts +256 -0
- package/os/gate/index.ts +15 -0
- package/os/instructions/budget.test.ts +131 -0
- package/os/instructions/handlers/budget-validate.ts +197 -0
- package/os/instructions/handlers/scar-migrate.ts +292 -0
- package/os/instructions/instructions.module.ts +79 -0
- package/os/knowledge/handlers/knowledge-authz-probe.test.ts +107 -0
- package/os/knowledge/handlers/knowledge-authz-probe.ts +240 -0
- package/os/knowledge/handlers/knowledge-conflicts-resolve.ts +571 -0
- package/os/knowledge/handlers/knowledge-rebuild.test.ts +82 -0
- package/os/knowledge/handlers/knowledge-rebuild.ts +167 -0
- package/os/knowledge/index.ts +17 -0
- package/os/knowledge/knowledge.module.ts +100 -0
- package/os/mission/handlers/archive.ts +113 -6
- package/os/mission/handlers/ship-inflight-degraded.test.ts +105 -0
- package/os/mission/mission.module.ts +8 -0
- package/os/naming/naming-convention.ts +2 -1
- package/os/queue/decision-ledger.test.ts +71 -1
- package/os/queue/handlers/queue-validate.ts +132 -5
- package/os/queue/manifest.ts +8 -7
- package/os/queue/queue-validate.test.ts +194 -0
- package/os/queue/queue.module.ts +12 -31
- package/os/queue/types.ts +26 -3
- package/os/resolver/handlers/resolver-doors-audit.test.ts +150 -0
- package/os/resolver/handlers/resolver-doors-audit.ts +281 -0
- package/os/resolver/resolver.module.ts +44 -0
- package/os/rfc/acceptance-reachable.test.ts +78 -0
- package/os/rfc/acceptance.test.ts +229 -1
- package/os/rfc/acceptance.ts +141 -45
- package/os/rfc/decision-log.ts +15 -0
- package/os/rfc/handlers/fixed-inputs.ts +252 -0
- package/os/rfc/handlers/implement-stamp-deviations.test.ts +140 -0
- package/os/rfc/handlers/implement-stamp-deviations.ts +186 -0
- package/os/rfc/handlers/implement-stamp-formal.test.ts +168 -0
- package/os/rfc/handlers/implement-stamp-origin.ts +97 -13
- package/os/rfc/handlers/implement-stamp-outcome.test.ts +193 -0
- package/os/rfc/handlers/implement-stamp-outcome.ts +148 -0
- package/os/rfc/handlers/implement-stamp-stale.test.ts +2 -1
- package/os/rfc/handlers/implement-stamp.ts +280 -53
- package/os/rfc/handlers/index-graph.ts +66 -4
- package/os/rfc/handlers/lifecycle.test.ts +59 -1
- package/os/rfc/handlers/lifecycle.ts +25 -15
- package/os/rfc/handlers/list-create.test.ts +223 -0
- package/os/rfc/handlers/list-create.ts +173 -13
- package/os/rfc/handlers/supersede-propose.ts +50 -7
- package/os/rfc/handlers/tests/index-graph.test.ts +165 -0
- package/os/rfc/handlers/validate-rules-rfc1334.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1453.test.ts +164 -0
- package/os/rfc/handlers/validate-rules-rfc1454.test.ts +137 -0
- package/os/rfc/handlers/validate-rules-rfc1455.test.ts +283 -0
- package/os/rfc/handlers/validate-rules.test.ts +129 -2
- package/os/rfc/handlers/validate-rules.ts +233 -9
- package/os/rfc/handlers/validate.ts +11 -0
- package/os/rfc/outcome-probe.ts +326 -0
- package/os/rfc/reachable-symbol.ts +67 -17
- package/os/rfc/rfc-0000-template.md +20 -0
- package/os/rfc/rfc.module.ts +74 -15
- package/os/rfc/types.ts +139 -14
- package/os/rfc/verification-evidence.ts +74 -14
- package/os/rfc/verification-origin.ts +61 -1
- package/os/rfc/verification-refresh.test.ts +63 -0
- package/os/rfc/verification-refresh.ts +24 -2
- package/os/rfc/verification-verdicts.ts +123 -0
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1333/imp12-gate.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1333/skills-and-types.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1333/verify-workspace.acceptance.test.ts +12 -0
- package/os/rfc/verifier/rfc-1391/ac1-proved-exit-0.acceptance.test.ts +151 -0
- package/os/rfc/verifier/rfc-1391/ac2-unavailable-nonzero.acceptance.test.ts +111 -0
- package/os/rfc/verifier/rfc-1391/ac3-version-mismatch-error.acceptance.test.ts +97 -0
- package/os/rfc/verifier/rfc-1391/ac4-cardinality-mismatch-error.acceptance.test.ts +179 -0
- package/os/rfc/verifier/rfc-1391/ac5-imp13-formal-stamp-block.acceptance.test.ts +295 -0
- package/os/rfc/verifier/rfc-1391/ac6-formal-high-tier-gates.acceptance.test.ts +203 -0
- package/os/rfc/verifier/rfc-1391/ac7-v46-empty-assumptions.acceptance.test.ts +126 -0
- package/os/rfc/verifier/rfc-1391/cx1-emit-proof-envelope.acceptance.test.ts +130 -0
- package/os/rfc/verifier/rfc-1391/fixtures/no-report.proof.test.ts +39 -0
- package/os/rfc/verifier/rfc-1391/fixtures/small-domain.proof.test.ts +45 -0
- package/os/rfc/verifier/rfc-1391/origin-proof-spec-entry.acceptance.test.ts +175 -0
- package/os/rfc/verifier/rfc-1391/support.ts +209 -0
- package/os/session/fixtures/audit/clean.md +7 -0
- package/os/session/fixtures/audit/denied-retry.md +10 -0
- package/os/session/frontmatter-io.ts +3 -1
- package/os/session/handlers/save.ts +5 -2
- package/os/session/handlers/session-audit-detectors.test.ts +97 -0
- package/os/session/handlers/session-audit-report.test.ts +70 -0
- package/os/session/handlers/session-audit-report.ts +97 -0
- package/os/session/handlers/session-audit.test.ts +86 -0
- package/os/session/handlers/session-audit.ts +321 -0
- package/os/session/session.module.ts +51 -2
- package/os/spec/spec-amendments.ts +91 -0
- package/os/spec/spec-materialize.ts +20 -22
- package/os/spec/spec-status.test.ts +17 -1
- package/os/spec/spec-status.ts +23 -29
- package/os/spec/spec-validate.test.ts +45 -0
- package/os/spec/spec-validate.ts +9 -29
- package/os/spec/spec.module.ts +7 -36
- package/os/trajectory/handlers/extract-units.test.ts +75 -0
- package/os/trajectory/handlers/journal-io.ts +229 -0
- package/os/trajectory/handlers/outcome-record.test.ts +198 -0
- package/os/trajectory/handlers/outcome-record.ts +165 -0
- package/os/trajectory/handlers/producer-trust.test.ts +169 -0
- package/os/trajectory/handlers/trajectory-index.test.ts +275 -0
- package/os/trajectory/handlers/trajectory-index.ts +493 -0
- package/os/trajectory/handlers/trajectory-recall.test.ts +254 -0
- package/os/trajectory/handlers/trajectory-recall.ts +201 -0
- package/os/trajectory/handlers/trajectory.test.ts +100 -0
- package/os/trajectory/handlers/verdict-binding.test.ts +249 -0
- package/os/trajectory/index.ts +16 -0
- package/os/trajectory/trajectory.module.ts +103 -0
- package/os/werkstatt/handlers/session-close.ts +82 -0
- package/os/werkstatt/handlers/session-engine.ts +34 -0
- package/os/werkstatt/handlers/session-open.ts +68 -0
- package/os/werkstatt/handlers/session-status.ts +55 -0
- package/os/werkstatt/werkstatt.module.ts +101 -3
- package/os/yaml/handlers/scalars-validate.ts +343 -0
- package/os/yaml/index.ts +23 -0
- package/os/yaml/scalars.test.ts +152 -0
- package/os/yaml/yaml.module.ts +61 -0
- package/package.json +210 -1
- package/profiles/forge-shell.yaml +3 -1
- package/profiles/godot-game.yaml +3 -1
- package/profiles/knowledge.yaml +3 -1
- package/profiles/phaser-game.yaml +3 -1
- package/profiles/site-workshop.yaml +3 -1
- package/profiles/typescript.yaml +3 -1
- package/skills/_shared/agent-operating-model.md +1 -1
- package/skills/_shared/fo-pipeline-conventions.md +5 -1
- package/skills/fo/fo-add-tests/SKILL.md +9 -1
- package/skills/fo/fo-add-tests/pbt-guide.md +1 -0
- package/skills/fo/fo-compass-annotate/SKILL.md +18 -0
- package/skills/fo/fo-compass-annotate/templates/header-format.md +3 -2
- package/skills/fo/fo-fix/SKILL.md +14 -8
- package/skills/fo/fo-idea-create-adr/SKILL.md +5 -3
- package/skills/fo/fo-idea-create-rfc/SKILL.md +20 -8
- package/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md +20 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +31 -13
- package/skills/fo/fo-idea-implement/SKILL.md +20 -14
- package/skills/fo/fo-idea-plan/SKILL.md +1 -1
- package/skills/fo/fo-knowledge-distill/SKILL.md +13 -5
- package/skills/fo/fo-memory-sync/SKILL.md +9 -0
- package/skills/fo/fo-memory-sync/fix-patterns.md +65 -0
- package/skills/fo/fo-memory-sync/learned-principles.md +10 -0
- package/skills/fo/fo-memory-sync/qa-log.md +30 -0
- package/skills/fo/fo-reproduce/SKILL.md +116 -0
- package/skills/fo/fo-review/SKILL.md +11 -5
- package/skills/fo/fo-session-retro/SKILL.md +134 -49
- package/skills/fo/fo-session-save/SKILL.md +2 -0
- package/skills/fo/fo-step-commit/SKILL.md +4 -3
- package/skills/fo/fo-triage/SKILL.md +9 -0
- package/skills/shared/grilling/SKILL.md +7 -0
- package/skills/shared/grilling/learned-principles.md +7 -0
- package/skills/shared/grilling/qa-log.md +39 -0
- package/skills/shared/writing-great-skills/SKILL.md +12 -9
- package/src/authority/delegations.ts +6 -3
- package/src/cli-flags.ts +111 -16
- package/src/compass/index.ts +37 -0
- package/src/compass/invariant-parser.ts +254 -0
- package/src/config/forge-config.ts +150 -22
- package/src/conformance/index.ts +281 -0
- package/src/formal/exhaustive.test.ts +117 -0
- package/src/formal/exhaustive.ts +183 -0
- package/src/formal/index.ts +27 -0
- package/src/formal/proof-runner.test.ts +310 -0
- package/src/formal/proof-runner.ts +563 -0
- package/src/formal/proof-spec.test.ts +70 -0
- package/src/formal/proof-spec.ts +132 -0
- package/src/index.ts +1 -0
- package/src/knowledge/index.ts +11 -2
- package/src/knowledge/parse.ts +20 -17
- package/src/knowledge/schema.ts +14 -4
- package/src/knowledge/serialize.ts +3 -0
- package/src/knowledge/sync.ts +281 -7
- package/src/onboarding/agents-generate.ts +19 -3
- package/src/onboarding/compass-docs/semantic-layer-block.ts +1 -1
- package/src/onboarding/doctor.ts +277 -27
- package/src/onboarding/init.ts +3 -3
- package/src/onboarding/nested-agents-generate.ts +1 -1
- package/src/onboarding/nested-agents-templates.ts +1 -1
- package/src/onboarding/templates/behavioral-layer-core.md +1 -1
- package/src/onboarding/upgrade.ts +18 -10
- package/src/profiles/profile-schema.ts +10 -2
- package/src/reachability/command-mentions.ts +89 -0
- package/src/registry.ts +197 -76
- package/src/tests/bindings-schema.test.ts +4 -0
- package/src/tests/cli-flags.test.ts +226 -1
- package/src/tests/discover-pack-skills.test.ts +26 -0
- package/src/tests/doctor-autonomy.test.ts +144 -0
- package/src/tests/doctor-dist-freshness.test.ts +24 -0
- package/src/tests/doctor-knowledge-conflicts.test.ts +135 -0
- package/src/tests/doctor-nested-agents.test.ts +30 -1
- package/src/tests/fixtures/agents-generate-business-before.txt +4 -2
- package/src/tests/forge-config.test.ts +5 -2
- package/src/tests/implement-stamp.test.ts +238 -4
- package/src/tests/knowledge-conflicts-resolve.pbt.test.ts +38 -0
- package/src/tests/knowledge-conflicts-resolve.test.ts +648 -0
- package/src/tests/knowledge-parse.test.ts +26 -1
- package/src/tests/rfc-verification-verdict-ingest.test.ts +244 -0
- package/src/tests/session-handlers.test.ts +47 -0
- package/src/tests/session-retro.test.ts +47 -0
- package/src/tests/skill-validate-knowledge.test.ts +93 -2
- package/src/tests/upgrade.test.ts +38 -0
- package/src/types.ts +59 -18
- package/src/utils/sync-fs.ts +2 -0
- package/src/validators/skill-validate.ts +37 -9
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1475 verdict-binding tests — verdictRef resolves to a concrete artifact/field (AC-1), TRAJ-04 drops units whose binding no longer resolves green (AC-2).</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-trajectory</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
14
|
+
import { mkdtemp, rm, mkdir, writeFile, readFile } from "node:fs/promises";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
import { tmpdir } from "node:os";
|
|
17
|
+
import { runTrajectoryIndex } from "./trajectory-index.ts";
|
|
18
|
+
import type { ForgeRuntimeContext } from "../../../src/types.ts";
|
|
19
|
+
|
|
20
|
+
let root: string;
|
|
21
|
+
|
|
22
|
+
function ctx(): ForgeRuntimeContext {
|
|
23
|
+
return {
|
|
24
|
+
workspaceRoot: root,
|
|
25
|
+
outputFormat: "json",
|
|
26
|
+
logger: { info() {}, warn() {}, error() {}, success() {}, section() {} },
|
|
27
|
+
} as unknown as ForgeRuntimeContext;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function flags(f: Record<string, unknown> = {}) {
|
|
31
|
+
return { argv: [], flags: f } as never;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async function writeSession(name: string, frontmatter: string): Promise<void> {
|
|
35
|
+
await writeFile(join(root, "docs", "sessions", name), `---\n${frontmatter}\n---\nbody\n`);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function writeShard(units: unknown[]): Promise<string> {
|
|
39
|
+
const rel = "docs/.index/trajectory/incoming-shard.yaml";
|
|
40
|
+
await mkdir(join(root, "docs", ".index", "trajectory"), { recursive: true });
|
|
41
|
+
const { stringify } = await import("yaml");
|
|
42
|
+
await writeFile(join(root, rel), stringify({ schema: "forge/trajectory-shard@1", units }) + "\n");
|
|
43
|
+
return rel;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function vendoredUnit(overrides: Record<string, unknown> = {}) {
|
|
47
|
+
return {
|
|
48
|
+
id: "trajectory:vendored-1",
|
|
49
|
+
kind: "trajectory",
|
|
50
|
+
situation: { taskKind: "deploy", touchedPathClasses: ["packages/x"], recentActions: ["deploy"] },
|
|
51
|
+
continuation: { commandSequence: ["leitstand.ship"], decisions: [], outcomeHash: "abc123" },
|
|
52
|
+
producer: {
|
|
53
|
+
workshopId: "other-shop",
|
|
54
|
+
sessionId: "vendored-1",
|
|
55
|
+
completedAt: "2026-10-01",
|
|
56
|
+
verdictRef: "verdict:green",
|
|
57
|
+
sessionClass: "adhoc",
|
|
58
|
+
origin: "vendored",
|
|
59
|
+
...((overrides.producer as object) ?? {}),
|
|
60
|
+
},
|
|
61
|
+
source: "shard",
|
|
62
|
+
tokens: 10,
|
|
63
|
+
text: "vendored",
|
|
64
|
+
usedBy: { recalled: 0, helped: 0, hurt: 0 },
|
|
65
|
+
utilityScore: 0,
|
|
66
|
+
...overrides,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
beforeEach(async () => {
|
|
71
|
+
root = await mkdtemp(join(tmpdir(), "trajectory-verdict-"));
|
|
72
|
+
await mkdir(join(root, "docs", "sessions"), { recursive: true });
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
afterEach(async () => {
|
|
76
|
+
await rm(root, { recursive: true, force: true });
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
describe("verdictRef binding (RFC-1475 AC-1)", () => {
|
|
80
|
+
test("mission session with green evidence binds the artifact path", async () => {
|
|
81
|
+
await mkdir(join(root, "missions", "dp7", "evidence"), { recursive: true });
|
|
82
|
+
await writeFile(join(root, "missions", "dp7", "evidence", "validation-report.json"), JSON.stringify({ verdict: "green" }));
|
|
83
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-mission
|
|
84
|
+
types: [mission]
|
|
85
|
+
commits: [abc123]
|
|
86
|
+
files: [missions/dp7/wip.md]
|
|
87
|
+
date: 2026-10-30`);
|
|
88
|
+
await runTrajectoryIndex(flags({}), ctx());
|
|
89
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
90
|
+
expect(index).toContain("verdictRef: missions/dp7/evidence/validation-report.json");
|
|
91
|
+
expect(index).not.toContain("commits:");
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test("explicit frontmatter verdict binds verdict:<value>", async () => {
|
|
95
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-green
|
|
96
|
+
verdict: green
|
|
97
|
+
taskKind: reconcile
|
|
98
|
+
commands: [mission.reconcile]
|
|
99
|
+
date: 2026-10-30`);
|
|
100
|
+
await runTrajectoryIndex(flags({}), ctx());
|
|
101
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
102
|
+
expect(index).toContain("verdictRef: verdict:green");
|
|
103
|
+
expect(index).not.toContain("commits:0");
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
test("commits-signal session binds signal:commits — never a literal count", async () => {
|
|
107
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-commits
|
|
108
|
+
commits: [abc123, def456]
|
|
109
|
+
commands: [mission.close]
|
|
110
|
+
date: 2026-10-30`);
|
|
111
|
+
await runTrajectoryIndex(flags({}), ctx());
|
|
112
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
113
|
+
expect(index).toContain("verdictRef: signal:commits");
|
|
114
|
+
expect(index).not.toContain("commits:2");
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("non-green mission evidence demotes to commits-signal admission", async () => {
|
|
118
|
+
await mkdir(join(root, "missions", "dp7", "evidence"), { recursive: true });
|
|
119
|
+
await writeFile(join(root, "missions", "dp7", "evidence", "validation-report.json"), JSON.stringify({ verdict: "red" }));
|
|
120
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-demoted
|
|
121
|
+
verdict: green
|
|
122
|
+
types: [mission]
|
|
123
|
+
commits: [abc123]
|
|
124
|
+
files: [missions/dp7/wip.md]
|
|
125
|
+
date: 2026-10-30`);
|
|
126
|
+
const res = await runTrajectoryIndex(flags({}), ctx());
|
|
127
|
+
expect(res.data?.admitted).toBe(1);
|
|
128
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
129
|
+
expect(index).toContain("verdictRef: signal:commits");
|
|
130
|
+
expect(index).not.toContain("verdict:green");
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
test("non-green mission evidence without a commits signal rejects the session", async () => {
|
|
134
|
+
await mkdir(join(root, "missions", "dp7", "evidence"), { recursive: true });
|
|
135
|
+
await writeFile(join(root, "missions", "dp7", "evidence", "validation-report.json"), JSON.stringify({ verdict: "red" }));
|
|
136
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-red-mission
|
|
137
|
+
verdict: green
|
|
138
|
+
types: [mission]
|
|
139
|
+
files: [missions/dp7/wip.md]
|
|
140
|
+
date: 2026-10-30`);
|
|
141
|
+
const res = await runTrajectoryIndex(flags({}), ctx());
|
|
142
|
+
expect(res.data?.admitted).toBe(0);
|
|
143
|
+
expect(res.data?.rejected).toBe(1);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
describe("TRAJ-04 rebuild drop (RFC-1475 AC-2)", () => {
|
|
148
|
+
test("vendored unit with an unresolvable artifact verdictRef is dropped", async () => {
|
|
149
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-green
|
|
150
|
+
verdict: green
|
|
151
|
+
taskKind: reconcile
|
|
152
|
+
commands: [mission.reconcile]
|
|
153
|
+
date: 2026-10-30`);
|
|
154
|
+
const shard = await writeShard([
|
|
155
|
+
vendoredUnit({ producer: { workshopId: "other-shop", sessionId: "v1", completedAt: "2026-10-01", verdictRef: "missions/gone/evidence/validation-report.json", sessionClass: "adhoc", origin: "vendored" } }),
|
|
156
|
+
]);
|
|
157
|
+
const res = await runTrajectoryIndex(flags({ import: shard }), ctx());
|
|
158
|
+
expect(res.data?.dropped).toBe(1);
|
|
159
|
+
expect(res.data?.diagnostics?.[0]?.ruleId).toBe("TRAJ-04");
|
|
160
|
+
expect(res.summary).toContain("TRAJ-04");
|
|
161
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
162
|
+
expect(index).not.toContain("trajectory:vendored-1");
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
test("verdictRef escaping the workspace root is unresolvable — unit dropped (confinement)", async () => {
|
|
166
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-green
|
|
167
|
+
verdict: green
|
|
168
|
+
taskKind: reconcile
|
|
169
|
+
commands: [mission.reconcile]
|
|
170
|
+
date: 2026-10-30`);
|
|
171
|
+
const shard = await writeShard([
|
|
172
|
+
vendoredUnit({ id: "trajectory:escape", producer: { workshopId: "other-shop", sessionId: "v1", completedAt: "2026-10-01", verdictRef: "../../outside.json", sessionClass: "adhoc", origin: "vendored" } }),
|
|
173
|
+
vendoredUnit({ id: "trajectory:absolute", producer: { workshopId: "other-shop", sessionId: "v2", completedAt: "2026-10-01", verdictRef: "/etc/passwd", sessionClass: "adhoc", origin: "vendored" } }),
|
|
174
|
+
]);
|
|
175
|
+
const res = await runTrajectoryIndex(flags({ import: shard }), ctx());
|
|
176
|
+
expect(res.data?.dropped).toBe(2);
|
|
177
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
178
|
+
expect(index).not.toContain("trajectory:escape");
|
|
179
|
+
expect(index).not.toContain("trajectory:absolute");
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
test("vendored units with resolvable bindings survive — verdict:<green> and signal:commits exempt", async () => {
|
|
183
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-green
|
|
184
|
+
verdict: green
|
|
185
|
+
taskKind: reconcile
|
|
186
|
+
commands: [mission.reconcile]
|
|
187
|
+
date: 2026-10-30`);
|
|
188
|
+
const shard = await writeShard([
|
|
189
|
+
vendoredUnit({ id: "trajectory:vendored-1" }),
|
|
190
|
+
vendoredUnit({ id: "trajectory:vendored-2", producer: { workshopId: "other-shop", sessionId: "v2", completedAt: "2026-10-01", verdictRef: "signal:commits", sessionClass: "adhoc", origin: "vendored" } }),
|
|
191
|
+
]);
|
|
192
|
+
const res = await runTrajectoryIndex(flags({ import: shard }), ctx());
|
|
193
|
+
expect(res.data?.dropped).toBe(0);
|
|
194
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
195
|
+
expect(index).toContain("trajectory:vendored-1");
|
|
196
|
+
expect(index).toContain("trajectory:vendored-2");
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test("evidence file flipped red post-admission rejects the session on the next rebuild", async () => {
|
|
200
|
+
await mkdir(join(root, "missions", "dp7", "evidence"), { recursive: true });
|
|
201
|
+
const evidence = join(root, "missions", "dp7", "evidence", "validation-report.json");
|
|
202
|
+
await writeFile(evidence, JSON.stringify({ verdict: "green" }));
|
|
203
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-mission
|
|
204
|
+
types: [mission]
|
|
205
|
+
commits: []
|
|
206
|
+
files: [missions/dp7/wip.md]
|
|
207
|
+
date: 2026-10-30`);
|
|
208
|
+
const first = await runTrajectoryIndex(flags({}), ctx());
|
|
209
|
+
expect(first.data?.units).toBe(1);
|
|
210
|
+
await writeFile(evidence, JSON.stringify({ verdict: "red" }));
|
|
211
|
+
const second = await runTrajectoryIndex(flags({}), ctx());
|
|
212
|
+
expect(second.data?.units).toBe(0);
|
|
213
|
+
expect(second.data?.rejected).toBe(1);
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
describe("resolved-path confinement (RFC-1480 AC-5)", () => {
|
|
218
|
+
test("verdictRef inside a ..-prefixed directory resolves — the over-drop is closed", async () => {
|
|
219
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-green
|
|
220
|
+
verdict: green
|
|
221
|
+
taskKind: reconcile
|
|
222
|
+
commands: [mission.reconcile]
|
|
223
|
+
date: 2026-10-30`);
|
|
224
|
+
await mkdir(join(root, "..wip"), { recursive: true });
|
|
225
|
+
await writeFile(join(root, "..wip", "verdict.json"), JSON.stringify({ verdict: "green" }));
|
|
226
|
+
const shard = await writeShard([
|
|
227
|
+
vendoredUnit({ id: "trajectory:dotdot-dir", producer: { workshopId: "other-shop", sessionId: "v1", completedAt: "2026-10-01", verdictRef: "..wip/verdict.json", sessionClass: "adhoc", origin: "vendored" } }),
|
|
228
|
+
]);
|
|
229
|
+
const res = await runTrajectoryIndex(flags({ import: shard }), ctx());
|
|
230
|
+
expect(res.data?.dropped).toBe(0);
|
|
231
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
232
|
+
expect(index).toContain("trajectory:dotdot-dir");
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
test("verdictRef genuinely escaping the root still drops", async () => {
|
|
236
|
+
await writeSession("2026-10-30-12-00-00-aaaaaa.md", `id: s-green
|
|
237
|
+
verdict: green
|
|
238
|
+
taskKind: reconcile
|
|
239
|
+
commands: [mission.reconcile]
|
|
240
|
+
date: 2026-10-30`);
|
|
241
|
+
const shard = await writeShard([
|
|
242
|
+
vendoredUnit({ id: "trajectory:real-escape", producer: { workshopId: "other-shop", sessionId: "v1", completedAt: "2026-10-01", verdictRef: "../outside/verdict.json", sessionClass: "adhoc", origin: "vendored" } }),
|
|
243
|
+
]);
|
|
244
|
+
const res = await runTrajectoryIndex(flags({ import: shard }), ctx());
|
|
245
|
+
expect(res.data?.dropped).toBe(1);
|
|
246
|
+
const index = await readFile(join(root, "docs", ".index", "trajectory", "units.yaml"), "utf8");
|
|
247
|
+
expect(index).not.toContain("trajectory:real-escape");
|
|
248
|
+
});
|
|
249
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Barrel for forgeTrajectoryModule — re-exports the trajectory module registration and the index/recall/outcome-record handler entry points.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Command declarations and journal IO — those live in trajectory.module.ts and the handlers; this file only re-exports.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-trajectory</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export { forgeTrajectoryModule } from "./trajectory.module.ts";
|
|
14
|
+
export { runTrajectoryIndex } from "./handlers/trajectory-index.ts";
|
|
15
|
+
export { runTrajectoryRecall } from "./handlers/trajectory-recall.ts";
|
|
16
|
+
export { runOutcomeRecord } from "./handlers/outcome-record.ts";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Registers forgeTrajectoryModule — the trajectory.index, trajectory.recall, and trajectory.outcome.record commands that retrieve procedure units from green-verified sessions.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1475: apply review round-2 findings — element-shape index validation, early-return TRAJ-06 diagnostics, declared forge.yaml/journal reads, hardened shard-unit shape</item>
|
|
10
|
+
<item>RFC-1475: apply review round-3 findings — element-type guards on journal/unit arrays, declared yaml journal reads, honest TRAJ-02 empty-vs-malformed messages, RFC deviations recorded</item>
|
|
11
|
+
<item>RFC-1480: trajectory-memory residual debt — rebuild flag, recallId derivation, TRAJ-07, confinement</item>
|
|
12
|
+
<item>RFC-1470: declare generated index files in context.index.build and trajectory.index writes</item>
|
|
13
|
+
<item>RFC-1485: sweep compass headers — forge-os-trajectory</item>
|
|
14
|
+
<history>RFC-1472, RFC-1475</history>
|
|
15
|
+
</CHANGE_SUMMARY>
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { ForgeModule } from "../../src/forge-module.ts";
|
|
19
|
+
import { runTrajectoryIndex } from "./handlers/trajectory-index.ts";
|
|
20
|
+
import { runTrajectoryRecall } from "./handlers/trajectory-recall.ts";
|
|
21
|
+
import { runOutcomeRecord } from "./handlers/outcome-record.ts";
|
|
22
|
+
|
|
23
|
+
export const forgeTrajectoryModule: ForgeModule = {
|
|
24
|
+
name: "forge-trajectory",
|
|
25
|
+
version: "0.1.0",
|
|
26
|
+
runtime: "autonomous",
|
|
27
|
+
declarations: [],
|
|
28
|
+
commands: [
|
|
29
|
+
{
|
|
30
|
+
name: "trajectory.index",
|
|
31
|
+
coverage: "operator" as const,
|
|
32
|
+
contract: "trajectory",
|
|
33
|
+
rules: [
|
|
34
|
+
{ id: "TRAJ-03", severity: "error" },
|
|
35
|
+
{ id: "TRAJ-04", severity: "warning" },
|
|
36
|
+
{ id: "TRAJ-06", severity: "warning" },
|
|
37
|
+
{ id: "TRAJ-07", severity: "warning" },
|
|
38
|
+
],
|
|
39
|
+
mutatesState: true,
|
|
40
|
+
cacheable: false,
|
|
41
|
+
description:
|
|
42
|
+
"RFC-1472: extract procedure units from GREEN-verified sessions into docs/.index/trajectory/units.yaml — admission at extraction (non-green sessions produce nothing). Flags: --session, --since, --export <file>, --import <file>.",
|
|
43
|
+
scope: "workspace",
|
|
44
|
+
acceptsAllFlag: false,
|
|
45
|
+
flags: {
|
|
46
|
+
session: { kind: "string", description: "Restrict to one session id." },
|
|
47
|
+
since: { kind: "string", description: "Only sessions after this date." },
|
|
48
|
+
export: { kind: "string", description: "Write a forge/trajectory-shard@1 file." },
|
|
49
|
+
import: { kind: "string", description: "Merge a vendored shard read-only." },
|
|
50
|
+
},
|
|
51
|
+
reads: ["docs/sessions/**/*.md", "missions/*/evidence/validation-report.json", "docs/.index/trajectory/*.jsonl", "docs/.index/trajectory/*.yaml", "forge.yaml"],
|
|
52
|
+
writes: ["docs/.index/trajectory/**", "docs/.index/trajectory/units.yaml"],
|
|
53
|
+
generates: [{ path: "docs/.index/trajectory/units.yaml", phase: "on-demand" as const }],
|
|
54
|
+
execute: runTrajectoryIndex,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "trajectory.recall",
|
|
58
|
+
coverage: "operator" as const,
|
|
59
|
+
contract: "trajectory",
|
|
60
|
+
rules: [{ id: "TRAJ-01", severity: "error" }, { id: "TRAJ-02", severity: "error" }, { id: "TRAJ-06", severity: "warning" }],
|
|
61
|
+
mutatesState: true,
|
|
62
|
+
// A journaled invocation must never replay — the kernel result cache
|
|
63
|
+
// would skip both the recalls.jsonl append and the TRAJ-02 staleness gate.
|
|
64
|
+
cacheable: false,
|
|
65
|
+
description:
|
|
66
|
+
"RFC-1472: top-k procedure units by situation similarity — decision-point recall (task start, approach selection, unfamiliar diagnostic). Journaled to docs/.index/trajectory/recalls.jsonl. Flags: --task, --paths, --k.",
|
|
67
|
+
scope: "workspace",
|
|
68
|
+
acceptsAllFlag: false,
|
|
69
|
+
flags: {
|
|
70
|
+
task: { kind: "string", description: "Task description for situation matching." },
|
|
71
|
+
paths: { kind: "string", description: "Path terms to boost (files being edited)." },
|
|
72
|
+
k: { kind: "string", description: "Top-k units (default 5)." },
|
|
73
|
+
},
|
|
74
|
+
reads: ["docs/.index/trajectory/units.yaml", "docs/.index/trajectory/*.jsonl", "docs/.index/trajectory/*.yaml", "docs/sessions/**/*.md"],
|
|
75
|
+
writes: ["docs/.index/trajectory/recalls.jsonl"],
|
|
76
|
+
generates: [],
|
|
77
|
+
execute: runTrajectoryRecall,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "trajectory.outcome.record",
|
|
81
|
+
coverage: "operator" as const,
|
|
82
|
+
contract: "trajectory",
|
|
83
|
+
rules: [{ id: "TRAJ-01", severity: "error" }, { id: "TRAJ-02", severity: "error" }, { id: "TRAJ-05", severity: "error" }, { id: "TRAJ-06", severity: "warning" }],
|
|
84
|
+
mutatesState: true,
|
|
85
|
+
cacheable: false,
|
|
86
|
+
description:
|
|
87
|
+
"RFC-1472: record helped/hurt for a recall — feeds utilityScore re-ranking + producerTrust. Flags: --recall <id>, --helped | --hurt, --note.",
|
|
88
|
+
scope: "workspace",
|
|
89
|
+
acceptsAllFlag: false,
|
|
90
|
+
flags: {
|
|
91
|
+
recall: { kind: "string", description: "The recall id to label." },
|
|
92
|
+
helped: { kind: "boolean", description: "The recall helped." },
|
|
93
|
+
hurt: { kind: "boolean", description: "The recall hurt." },
|
|
94
|
+
note: { kind: "string", description: "Free-text annotation." },
|
|
95
|
+
},
|
|
96
|
+
reads: ["docs/.index/trajectory/*.jsonl", "docs/.index/trajectory/*.yaml", "docs/.index/trajectory/units.yaml"],
|
|
97
|
+
writes: ["docs/.index/trajectory/units.yaml", "docs/.index/trajectory/outcomes.jsonl", "docs/.index/trajectory/recalls.jsonl"],
|
|
98
|
+
generates: [],
|
|
99
|
+
execute: runOutcomeRecord,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
pipelines: [],
|
|
103
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Thin handler for werkstatt.session.close (RFC-1462) — delegates to the engine session-worktree API; rerun-safe on closed sessions.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>No session logic here — packages/werkstatt-engine/src/werkstatt/session-worktree.ts owns it.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { loadSessionEngine } from "./session-engine.ts";
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
+
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
16
|
+
import type { SessionEntry } from "@warpgogol/werkstatt-engine/werkstatt";
|
|
17
|
+
import type {
|
|
18
|
+
ForgeCommandInput,
|
|
19
|
+
ForgeCommandResult,
|
|
20
|
+
ForgeRuntimeContext,
|
|
21
|
+
} from "../../../src/types.ts";
|
|
22
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
23
|
+
|
|
24
|
+
export interface SessionCloseData {
|
|
25
|
+
command: "werkstatt.session.close";
|
|
26
|
+
status: "ok";
|
|
27
|
+
session: SessionEntry;
|
|
28
|
+
merged: boolean;
|
|
29
|
+
discarded: boolean;
|
|
30
|
+
conflicted: boolean;
|
|
31
|
+
conflictFiles: string[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function runSessionClose(
|
|
35
|
+
input: ForgeCommandInput,
|
|
36
|
+
context: ForgeRuntimeContext,
|
|
37
|
+
): Promise<ForgeCommandResult<SessionCloseData>> {
|
|
38
|
+
const session = input.flags["session"] as string | undefined;
|
|
39
|
+
if (!session) {
|
|
40
|
+
throw new Error("werkstatt.session.close requires --session <id>");
|
|
41
|
+
}
|
|
42
|
+
if (input.flags["discard"] === true && input.flags["merge"] === true) {
|
|
43
|
+
throw new Error("werkstatt.session.close: --merge and --discard are mutually exclusive");
|
|
44
|
+
}
|
|
45
|
+
const mode = input.flags["discard"] === true ? "discard" : "merge";
|
|
46
|
+
const allowDirty = input.flags["allow-dirty"] === true;
|
|
47
|
+
const into = input.flags["into"] as string | undefined;
|
|
48
|
+
|
|
49
|
+
const engine = await loadSessionEngine();
|
|
50
|
+
const result = await engine.sessionClose((context.io ?? ambientIo), context.workspaceRoot, {
|
|
51
|
+
session,
|
|
52
|
+
mode,
|
|
53
|
+
allowDirty,
|
|
54
|
+
into,
|
|
55
|
+
});
|
|
56
|
+
if (context.outputFormat === "pretty") {
|
|
57
|
+
if (result.conflicted) {
|
|
58
|
+
context.logger.warn(
|
|
59
|
+
`Merge conflict — worktree kept at ${result.session.worktree}; conflicting: ${result.conflictFiles.join(", ")}`,
|
|
60
|
+
);
|
|
61
|
+
} else {
|
|
62
|
+
context.logger.success(
|
|
63
|
+
`Closed session ${result.session.id} (${result.merged ? "merged" : result.discarded ? "discarded" : "already closed"})`,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
data: {
|
|
69
|
+
command: "werkstatt.session.close",
|
|
70
|
+
status: "ok",
|
|
71
|
+
session: result.session,
|
|
72
|
+
merged: result.merged,
|
|
73
|
+
discarded: result.discarded,
|
|
74
|
+
conflicted: result.conflicted,
|
|
75
|
+
conflictFiles: result.conflictFiles,
|
|
76
|
+
},
|
|
77
|
+
summary: result.conflicted
|
|
78
|
+
? `session ${result.session.id} merge-conflict — ${result.conflictFiles.length} file(s), worktree kept`
|
|
79
|
+
: `Closed session ${result.session.id}`,
|
|
80
|
+
exitCode: result.conflicted ? 1 : 0,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Lazy dynamic-import bridge for @warpgogol/werkstatt-engine/werkstatt — the session-worktree API backing werkstatt.session.* handlers. The engine is a workspace dependency absent on standalone npm installs; handlers must degrade to a clear error instead of breaking module load.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Do not use static imports — that would break npm installs without workspace deps.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
14
|
+
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
15
|
+
export type SessionEngineApi = typeof import("@warpgogol/werkstatt-engine/werkstatt");
|
|
16
|
+
|
|
17
|
+
let cached: SessionEngineApi | null = null;
|
|
18
|
+
|
|
19
|
+
export async function loadSessionEngine(): Promise<SessionEngineApi> {
|
|
20
|
+
if (cached) return cached;
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24
|
+
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
25
|
+
cached = (await import("@warpgogol/werkstatt-engine/werkstatt")) as SessionEngineApi;
|
|
26
|
+
return cached;
|
|
27
|
+
} catch (err) {
|
|
28
|
+
throw new Error(
|
|
29
|
+
`@warpgogol/werkstatt-engine is required for werkstatt.session.* commands but not installed. ` +
|
|
30
|
+
`When using forge standalone from npm, run inside a werkstatt workspace that provides it. ` +
|
|
31
|
+
`Error: ${(err as Error).message}`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Thin handler for werkstatt.session.open (RFC-1462) — delegates to the engine session-worktree API.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>No session logic here — packages/werkstatt-engine/src/werkstatt/session-worktree.ts owns it.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { loadSessionEngine } from "./session-engine.ts";
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
+
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
16
|
+
import type { SessionEntry } from "@warpgogol/werkstatt-engine/werkstatt";
|
|
17
|
+
import type {
|
|
18
|
+
ForgeCommandInput,
|
|
19
|
+
ForgeCommandResult,
|
|
20
|
+
ForgeRuntimeContext,
|
|
21
|
+
} from "../../../src/types.ts";
|
|
22
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
23
|
+
|
|
24
|
+
export interface SessionOpenData {
|
|
25
|
+
command: "werkstatt.session.open";
|
|
26
|
+
status: "ok";
|
|
27
|
+
session: SessionEntry;
|
|
28
|
+
adopted: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function runSessionOpen(
|
|
32
|
+
input: ForgeCommandInput,
|
|
33
|
+
context: ForgeRuntimeContext,
|
|
34
|
+
): Promise<ForgeCommandResult<SessionOpenData>> {
|
|
35
|
+
const agent = input.flags["agent"] as string | undefined;
|
|
36
|
+
if (!agent) {
|
|
37
|
+
throw new Error("werkstatt.session.open requires --agent <id>");
|
|
38
|
+
}
|
|
39
|
+
const brief = input.flags["brief"] as string | undefined;
|
|
40
|
+
const resume = input.flags["resume"] === true;
|
|
41
|
+
|
|
42
|
+
const engine = await loadSessionEngine();
|
|
43
|
+
const result = await engine.sessionOpen(context.io ?? ambientIo, context.workspaceRoot, {
|
|
44
|
+
agent,
|
|
45
|
+
brief,
|
|
46
|
+
resume,
|
|
47
|
+
});
|
|
48
|
+
if (context.outputFormat === "pretty") {
|
|
49
|
+
context.logger.success(
|
|
50
|
+
`${result.adopted ? "Re-adopted" : "Opened"} session ${result.session.id} → ${result.session.worktree} (branch ${result.session.branch})`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
data: {
|
|
55
|
+
command: "werkstatt.session.open",
|
|
56
|
+
status: "ok",
|
|
57
|
+
session: result.session,
|
|
58
|
+
adopted: result.adopted,
|
|
59
|
+
},
|
|
60
|
+
summary: `${result.adopted ? "Re-adopted" : "Opened"} session ${result.session.id} — worktree ${result.session.worktree}`,
|
|
61
|
+
nextSteps: [
|
|
62
|
+
{
|
|
63
|
+
action: `Work inside ${result.session.worktree}; close with werkstatt.session.close --session ${result.session.id} --merge`,
|
|
64
|
+
kind: "required",
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Thin handler for werkstatt.session.status (RFC-1462) — lists live sessions, dirty counts, staleness; all state is filesystem/gitdir so it survives a dead agent.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>No session logic here — packages/werkstatt-engine/src/werkstatt/session-worktree.ts owns it.</item>
|
|
6
|
+
</non-goals>
|
|
7
|
+
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { loadSessionEngine } from "./session-engine.ts";
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
+
// @ts-ignore — workspace dep, may not be installed when forge is used standalone from npm
|
|
16
|
+
import type { SessionStatusEntry } from "@warpgogol/werkstatt-engine/werkstatt";
|
|
17
|
+
import type {
|
|
18
|
+
ForgeCommandInput,
|
|
19
|
+
ForgeCommandResult,
|
|
20
|
+
ForgeRuntimeContext,
|
|
21
|
+
} from "../../../src/types.ts";
|
|
22
|
+
import { ambientIo } from "../../../src/utils/io.ts";
|
|
23
|
+
|
|
24
|
+
export interface SessionStatusData {
|
|
25
|
+
command: "werkstatt.session.status";
|
|
26
|
+
status: "ok";
|
|
27
|
+
sessions: SessionStatusEntry[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function runSessionStatus(
|
|
31
|
+
input: ForgeCommandInput,
|
|
32
|
+
context: ForgeRuntimeContext,
|
|
33
|
+
): Promise<ForgeCommandResult<SessionStatusData>> {
|
|
34
|
+
const staleAfterFlag = input.flags["stale-after"];
|
|
35
|
+
const staleAfterMs =
|
|
36
|
+
typeof staleAfterFlag === "string" ? Number(staleAfterFlag) * 60_000 : undefined;
|
|
37
|
+
const engine = await loadSessionEngine();
|
|
38
|
+
const sessions = await engine.sessionStatus((context.io ?? ambientIo), context.workspaceRoot, {
|
|
39
|
+
staleAfterMs: Number.isFinite(staleAfterMs) ? staleAfterMs : undefined,
|
|
40
|
+
});
|
|
41
|
+
if (context.outputFormat === "pretty") {
|
|
42
|
+
if (sessions.length === 0) {
|
|
43
|
+
context.logger.info("No sessions registered.");
|
|
44
|
+
}
|
|
45
|
+
for (const s of sessions) {
|
|
46
|
+
context.logger.info(
|
|
47
|
+
`${s.id} [${s.status}] ${s.worktree} — dirty:${s.dirtyCount}${s.stale ? " STALE" : ""} (base ${s.baseBranch})`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
data: { command: "werkstatt.session.status", status: "ok", sessions },
|
|
53
|
+
summary: `${sessions.length} session(s)`,
|
|
54
|
+
};
|
|
55
|
+
}
|