@warpgogol/forge 9.0.0 → 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 +28 -0
- package/bin/cli.ts +3 -2
- package/dist/bin/cli.js +3 -2
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/agent/handlers/agent-tiers-validate.d.ts.map +1 -1
- package/dist/os/agent/handlers/agent-tiers-validate.js +5 -1
- package/dist/os/agent/handlers/agent-tiers-validate.js.map +1 -1
- package/dist/os/agent/index.d.ts.map +1 -1
- package/dist/os/agent/index.js +4 -0
- package/dist/os/agent/index.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.map +1 -1
- package/dist/os/checks/checks.module.js +5 -1
- package/dist/os/checks/checks.module.js.map +1 -1
- package/dist/os/checks/handlers/contribution-report.d.ts.map +1 -1
- package/dist/os/checks/handlers/contribution-report.js +5 -4
- package/dist/os/checks/handlers/contribution-report.js.map +1 -1
- package/dist/os/checks/handlers/counters-export.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-export.js +4 -0
- package/dist/os/checks/handlers/counters-export.js.map +1 -1
- package/dist/os/checks/handlers/counters-journal.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-journal.js +2 -1
- package/dist/os/checks/handlers/counters-journal.js.map +1 -1
- package/dist/os/checks/handlers/counters-validate.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-validate.js +5 -1
- package/dist/os/checks/handlers/counters-validate.js.map +1 -1
- package/dist/os/checks/index.d.ts.map +1 -1
- package/dist/os/checks/index.js +11 -0
- package/dist/os/checks/index.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 +6 -1
- package/dist/os/compass/handlers/compass-header-scaffold.js.map +1 -1
- package/dist/os/compass/handlers/compass-invariants-generate.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-invariants-generate.js +3 -2
- package/dist/os/compass/handlers/compass-invariants-generate.js.map +1 -1
- package/dist/os/context/context.module.d.ts.map +1 -1
- package/dist/os/context/context.module.js +6 -1
- package/dist/os/context/context.module.js.map +1 -1
- package/dist/os/context/handlers/context-assemble.d.ts.map +1 -1
- package/dist/os/context/handlers/context-assemble.js +5 -1
- package/dist/os/context/handlers/context-assemble.js.map +1 -1
- package/dist/os/context/handlers/context-slate-eval.d.ts.map +1 -1
- package/dist/os/context/handlers/context-slate-eval.js +4 -0
- package/dist/os/context/handlers/context-slate-eval.js.map +1 -1
- package/dist/os/context/handlers/index-build.d.ts.map +1 -1
- package/dist/os/context/handlers/index-build.js +8 -5
- package/dist/os/context/handlers/index-build.js.map +1 -1
- package/dist/os/context/index.d.ts.map +1 -1
- package/dist/os/context/index.js +11 -0
- package/dist/os/context/index.js.map +1 -1
- package/dist/os/gate/handlers/gate-probe-catalog.d.ts.map +1 -1
- package/dist/os/gate/handlers/gate-probe-catalog.js +4 -0
- package/dist/os/gate/handlers/gate-probe-catalog.js.map +1 -1
- package/dist/os/gate/handlers/gate-probe.d.ts.map +1 -1
- package/dist/os/gate/handlers/gate-probe.js +4 -0
- package/dist/os/gate/handlers/gate-probe.js.map +1 -1
- package/dist/os/gate/index.d.ts.map +1 -1
- package/dist/os/gate/index.js +11 -0
- package/dist/os/gate/index.js.map +1 -1
- package/dist/os/instructions/instructions.module.d.ts.map +1 -1
- package/dist/os/instructions/instructions.module.js +2 -1
- package/dist/os/instructions/instructions.module.js.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-authz-probe.d.ts.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js +7 -3
- package/dist/os/knowledge/handlers/knowledge-authz-probe.js.map +1 -1
- 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.map +1 -1
- package/dist/os/knowledge/handlers/knowledge-rebuild.js +4 -0
- package/dist/os/knowledge/handlers/knowledge-rebuild.js.map +1 -1
- package/dist/os/knowledge/index.d.ts +1 -0
- package/dist/os/knowledge/index.d.ts.map +1 -1
- package/dist/os/knowledge/index.js +13 -0
- package/dist/os/knowledge/index.js.map +1 -1
- package/dist/os/knowledge/knowledge.module.d.ts.map +1 -1
- package/dist/os/knowledge/knowledge.module.js +35 -1
- package/dist/os/knowledge/knowledge.module.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/resolver/resolver.module.d.ts.map +1 -1
- package/dist/os/resolver/resolver.module.js +2 -1
- package/dist/os/resolver/resolver.module.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts +1 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-deviations.js +3 -0
- package/dist/os/rfc/handlers/implement-stamp-deviations.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.js +10 -2
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts +2 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-outcome.js +2 -0
- package/dist/os/rfc/handlers/implement-stamp-outcome.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +176 -59
- package/dist/os/rfc/handlers/implement-stamp.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 +28 -2
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/reachable-symbol.d.ts.map +1 -1
- package/dist/os/rfc/reachable-symbol.js +4 -2
- 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 +23 -7
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +22 -2
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +18 -2
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verifier/rfc-1391/support.d.ts.map +1 -1
- package/dist/os/rfc/verifier/rfc-1391/support.js +4 -0
- package/dist/os/rfc/verifier/rfc-1391/support.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.map +1 -1
- package/dist/os/session/handlers/session-audit-report.js +4 -0
- package/dist/os/session/handlers/session-audit-report.js.map +1 -1
- package/dist/os/session/handlers/session-audit.d.ts.map +1 -1
- package/dist/os/session/handlers/session-audit.js +4 -0
- package/dist/os/session/handlers/session-audit.js.map +1 -1
- package/dist/os/trajectory/handlers/journal-io.d.ts +9 -0
- package/dist/os/trajectory/handlers/journal-io.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/journal-io.js +20 -2
- package/dist/os/trajectory/handlers/journal-io.js.map +1 -1
- package/dist/os/trajectory/handlers/outcome-record.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/outcome-record.js +4 -1
- package/dist/os/trajectory/handlers/outcome-record.js.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-index.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-index.js +30 -8
- package/dist/os/trajectory/handlers/trajectory-index.js.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-recall.d.ts.map +1 -1
- package/dist/os/trajectory/handlers/trajectory-recall.js +7 -4
- package/dist/os/trajectory/handlers/trajectory-recall.js.map +1 -1
- package/dist/os/trajectory/index.d.ts.map +1 -1
- package/dist/os/trajectory/index.js +11 -0
- package/dist/os/trajectory/index.js.map +1 -1
- package/dist/os/trajectory/trajectory.module.d.ts.map +1 -1
- package/dist/os/trajectory/trajectory.module.js +16 -9
- package/dist/os/trajectory/trajectory.module.js.map +1 -1
- package/dist/os/werkstatt/handlers/session-close.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/session-close.js +3 -0
- package/dist/os/werkstatt/handlers/session-close.js.map +1 -1
- package/dist/os/werkstatt/handlers/session-engine.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/session-engine.js +3 -0
- package/dist/os/werkstatt/handlers/session-engine.js.map +1 -1
- package/dist/os/werkstatt/handlers/session-open.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/session-open.js +3 -0
- package/dist/os/werkstatt/handlers/session-open.js.map +1 -1
- package/dist/os/werkstatt/handlers/session-status.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/session-status.js +3 -0
- package/dist/os/werkstatt/handlers/session-status.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.map +1 -1
- package/dist/src/authority/delegations.js +5 -4
- 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 +1 -5
- package/dist/src/cli-flags.js.map +1 -1
- package/dist/src/compass/invariant-parser.d.ts.map +1 -1
- package/dist/src/compass/invariant-parser.js +2 -1
- package/dist/src/compass/invariant-parser.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +17 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +33 -10
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/formal/exhaustive.d.ts.map +1 -1
- package/dist/src/formal/exhaustive.js +3 -2
- package/dist/src/formal/exhaustive.js.map +1 -1
- package/dist/src/formal/index.d.ts.map +1 -1
- package/dist/src/formal/index.js +4 -0
- package/dist/src/formal/index.js.map +1 -1
- package/dist/src/formal/proof-runner.d.ts.map +1 -1
- package/dist/src/formal/proof-runner.js +4 -3
- package/dist/src/formal/proof-runner.js.map +1 -1
- package/dist/src/formal/proof-spec.d.ts.map +1 -1
- package/dist/src/formal/proof-spec.js +3 -2
- package/dist/src/formal/proof-spec.js.map +1 -1
- 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.map +1 -1
- package/dist/src/knowledge/schema.js +5 -4
- package/dist/src/knowledge/schema.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.js +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 +166 -26
- package/dist/src/onboarding/doctor.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/reachability/command-mentions.d.ts.map +1 -1
- package/dist/src/reachability/command-mentions.js +4 -2
- package/dist/src/reachability/command-mentions.js.map +1 -1
- package/dist/src/registry.d.ts +20 -0
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +129 -67
- package/dist/src/registry.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/os/agent/handlers/agent-tiers-validate.ts +5 -1
- package/os/agent/index.ts +4 -0
- package/os/authority/handlers/delegate.ts +2 -1
- package/os/authority/index.ts +2 -1
- package/os/checks/checks.module.ts +5 -1
- package/os/checks/handlers/contribution-report.test.ts +6 -0
- package/os/checks/handlers/contribution-report.ts +5 -4
- package/os/checks/handlers/counters-export.test.ts +6 -0
- package/os/checks/handlers/counters-export.ts +4 -0
- package/os/checks/handlers/counters-journal.test.ts +6 -0
- package/os/checks/handlers/counters-journal.ts +2 -1
- package/os/checks/handlers/counters-validate.test.ts +6 -0
- package/os/checks/handlers/counters-validate.ts +5 -1
- package/os/checks/handlers/variant-candidates.test.ts +6 -0
- package/os/checks/index.ts +12 -0
- package/os/compass/handlers/compass-docs-scaffold.ts +1 -1
- package/os/compass/handlers/compass-header-scaffold.ts +6 -1
- package/os/compass/handlers/compass-invariants-generate.ts +3 -2
- package/os/context/context.module.ts +6 -1
- package/os/context/handlers/context-assemble.test.ts +6 -0
- package/os/context/handlers/context-assemble.ts +5 -1
- package/os/context/handlers/context-slate-eval.test.ts +6 -0
- package/os/context/handlers/context-slate-eval.ts +4 -0
- package/os/context/handlers/index-build.test.ts +33 -0
- package/os/context/handlers/index-build.ts +8 -5
- package/os/context/handlers/no-model-deps.test.ts +6 -0
- package/os/context/handlers/slate-fill.test.ts +6 -0
- package/os/context/index.ts +12 -0
- package/os/gate/handlers/gate-probe-catalog.test.ts +6 -0
- package/os/gate/handlers/gate-probe-catalog.ts +4 -0
- package/os/gate/handlers/gate-probe.test.ts +6 -0
- package/os/gate/handlers/gate-probe.ts +4 -0
- package/os/gate/index.ts +12 -0
- package/os/instructions/budget.test.ts +6 -0
- package/os/instructions/instructions.module.ts +2 -1
- package/os/knowledge/handlers/knowledge-authz-probe.test.ts +21 -0
- package/os/knowledge/handlers/knowledge-authz-probe.ts +7 -3
- package/os/knowledge/handlers/knowledge-conflicts-resolve.ts +571 -0
- package/os/knowledge/handlers/knowledge-rebuild.test.ts +6 -0
- package/os/knowledge/handlers/knowledge-rebuild.ts +4 -0
- package/os/knowledge/index.ts +14 -0
- package/os/knowledge/knowledge.module.ts +36 -1
- package/os/queue/decision-ledger.test.ts +32 -1
- package/os/queue/manifest.ts +8 -7
- package/os/resolver/handlers/resolver-doors-audit.test.ts +3 -0
- package/os/resolver/resolver.module.ts +2 -1
- package/os/rfc/handlers/implement-stamp-deviations.ts +4 -1
- package/os/rfc/handlers/implement-stamp-origin.ts +10 -2
- package/os/rfc/handlers/implement-stamp-outcome.ts +4 -2
- package/os/rfc/handlers/implement-stamp-stale.test.ts +2 -1
- package/os/rfc/handlers/implement-stamp.ts +188 -58
- 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 +81 -0
- package/os/rfc/handlers/list-create.ts +34 -2
- package/os/rfc/handlers/validate-rules-rfc1334.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1453.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1454.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1455.test.ts +2 -1
- package/os/rfc/reachable-symbol.ts +4 -2
- package/os/rfc/rfc-0000-template.md +16 -0
- package/os/rfc/rfc.module.ts +26 -7
- package/os/rfc/types.ts +32 -2
- 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/fixtures/no-report.proof.test.ts +4 -0
- package/os/rfc/verifier/rfc-1391/fixtures/small-domain.proof.test.ts +4 -0
- package/os/rfc/verifier/rfc-1391/support.ts +4 -0
- package/os/session/handlers/save.ts +5 -2
- package/os/session/handlers/session-audit-detectors.test.ts +6 -0
- package/os/session/handlers/session-audit-report.test.ts +6 -0
- package/os/session/handlers/session-audit-report.ts +4 -0
- package/os/session/handlers/session-audit.test.ts +6 -0
- package/os/session/handlers/session-audit.ts +4 -0
- package/os/trajectory/handlers/extract-units.test.ts +7 -1
- package/os/trajectory/handlers/journal-io.ts +20 -2
- package/os/trajectory/handlers/outcome-record.test.ts +6 -0
- package/os/trajectory/handlers/outcome-record.ts +4 -1
- package/os/trajectory/handlers/producer-trust.test.ts +6 -0
- package/os/trajectory/handlers/trajectory-index.test.ts +29 -0
- package/os/trajectory/handlers/trajectory-index.ts +31 -8
- package/os/trajectory/handlers/trajectory-recall.test.ts +27 -0
- package/os/trajectory/handlers/trajectory-recall.ts +7 -4
- package/os/trajectory/handlers/trajectory.test.ts +6 -0
- package/os/trajectory/handlers/verdict-binding.test.ts +40 -0
- package/os/trajectory/index.ts +12 -0
- package/os/trajectory/trajectory.module.ts +16 -9
- package/os/werkstatt/handlers/session-close.ts +3 -0
- package/os/werkstatt/handlers/session-engine.ts +3 -0
- package/os/werkstatt/handlers/session-open.ts +3 -0
- package/os/werkstatt/handlers/session-status.ts +3 -0
- 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 +17 -1
- package/skills/fo/fo-knowledge-distill/SKILL.md +6 -5
- package/skills/fo/fo-memory-sync/SKILL.md +3 -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-session-save/SKILL.md +2 -0
- package/skills/shared/grilling/SKILL.md +3 -0
- package/skills/shared/writing-great-skills/SKILL.md +12 -9
- package/src/authority/delegations.ts +5 -4
- package/src/cli-flags.ts +1 -5
- package/src/compass/invariant-parser.ts +2 -1
- package/src/config/forge-config.ts +40 -14
- package/src/formal/exhaustive.ts +3 -2
- package/src/formal/index.ts +4 -0
- package/src/formal/proof-runner.ts +4 -3
- package/src/formal/proof-spec.ts +3 -2
- 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 +5 -4
- package/src/knowledge/sync.ts +281 -7
- package/src/onboarding/agents-generate.ts +1 -1
- package/src/onboarding/compass-docs/semantic-layer-block.ts +1 -1
- package/src/onboarding/doctor.ts +184 -26
- package/src/onboarding/nested-agents-generate.ts +1 -1
- package/src/onboarding/nested-agents-templates.ts +1 -1
- package/src/onboarding/upgrade.ts +18 -10
- package/src/reachability/command-mentions.ts +4 -2
- package/src/registry.ts +153 -74
- package/src/tests/cli-flags.test.ts +1 -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/implement-stamp.test.ts +191 -8
- 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/session-handlers.test.ts +47 -0
- package/src/tests/skill-validate-knowledge.test.ts +93 -2
- package/src/tests/upgrade.test.ts +38 -0
- package/src/validators/skill-validate.ts +37 -9
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1470 context.index.build tests — unit catalog covers the required kinds (session-block, friction, rfc-header minimum); rebuild is pure projection.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Not a contract source of truth — context.index.build and RFC-1470 own the behavior.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1481: context index retains consumer-local L-K-NNNN identity.</item>
|
|
10
|
+
<item>RFC-1481: collapse compass summaries and add missing contract blocks</item>
|
|
11
|
+
</CHANGE_SUMMARY>
|
|
5
12
|
*/
|
|
6
13
|
|
|
7
14
|
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
@@ -65,4 +72,30 @@ describe("context.index.build (RFC-1470)", () => {
|
|
|
65
72
|
const index = await readFile(join(root, "docs", ".index", "context", "index.yaml"), "utf8");
|
|
66
73
|
expect(index).toContain("forge/context-index@1");
|
|
67
74
|
});
|
|
75
|
+
|
|
76
|
+
test("indexes consumer-local L-K-NNNN knowledge entries by their full ID", async () => {
|
|
77
|
+
const knowledgeDir = join(root, ".agents", "skills", "consumer-skill");
|
|
78
|
+
await mkdir(knowledgeDir, { recursive: true });
|
|
79
|
+
await writeFile(
|
|
80
|
+
join(knowledgeDir, "qa-log.md"),
|
|
81
|
+
`<!-- knowledge-layer: L0 -->
|
|
82
|
+
|
|
83
|
+
### L-K-0001: Local identity
|
|
84
|
+
\`\`\`knowledge-entry
|
|
85
|
+
id: L-K-0001
|
|
86
|
+
layer: L0
|
|
87
|
+
created: 2026-08-03
|
|
88
|
+
status: active
|
|
89
|
+
\`\`\`
|
|
90
|
+
|
|
91
|
+
Indexed local knowledge body.
|
|
92
|
+
`,
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
await runIndexBuild(flags({}), ctx());
|
|
96
|
+
|
|
97
|
+
const index = await readFile(join(root, "docs", ".index", "context", "index.yaml"), "utf8");
|
|
98
|
+
expect(index).toContain("qa-log:L-K-0001");
|
|
99
|
+
expect(index).toContain("L-K-0001");
|
|
100
|
+
});
|
|
68
101
|
});
|
|
@@ -8,13 +8,16 @@ adr-header, skill-manifest, handoff, decision. Each unit carries id, kind,
|
|
|
8
8
|
source (path#anchor), tokens, text, meta (dates, entity refs). Drop the dir,
|
|
9
9
|
rebuild from sources — no authority lives in the index.
|
|
10
10
|
</purpose>
|
|
11
|
+
<non-goals>
|
|
12
|
+
<item>Do not treat index output as authoritative or merge authority back into sources.</item>
|
|
13
|
+
</non-goals>
|
|
11
14
|
</MODULE_CONTRACT>
|
|
12
15
|
<CHANGE_SUMMARY>
|
|
13
|
-
<item>RFC-1470: context.index.build + context.assemble + context.slate.eval — slate-retrieval projection over the artifact corpus</item>
|
|
14
|
-
<item>RFC-1470: apply r1 repairs — post-fence knowledge prose, devset re-anchored to real unit ids, source-group discount, CTX-01/02, exact-match eval, file-scoped ids, meta fields</item>
|
|
15
16
|
<item>RFC-1470: apply r2 repairs — devset real anchors, CTX-02 watermark staleness, path-scoped K-ids, eval scoring parity</item>
|
|
16
17
|
<item>RFC-1470: apply r3 repair — CTX-02 session-scoped watermark vs path-compare, regression test asserts the warn fires</item>
|
|
17
18
|
<item>RFC-1472: apply r1 repairs — outcomes replay on rebuild, real schema fields, anchored GREEN_RE, shard import, unique recallIds, archive coverage, trajectory kind</item>
|
|
19
|
+
<item>RFC-1481: index upstream K-NNNN and consumer-local L-K-NNNN knowledge entries.</item>
|
|
20
|
+
<item>RFC-1481: collapse compass summaries and add missing contract blocks</item>
|
|
18
21
|
<history>RFC-1470</history>
|
|
19
22
|
</CHANGE_SUMMARY>
|
|
20
23
|
*/
|
|
@@ -91,7 +94,7 @@ export async function runIndexBuild(
|
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
|
|
94
|
-
// knowledge-entry — K-NNNN blocks in
|
|
97
|
+
// knowledge-entry — K-NNNN and L-K-NNNN blocks in agent knowledge files.
|
|
95
98
|
const kfiles = (await walk(path.join(root, ".agents"), io)).filter((p) => /\.(md)$/.test(p) && /(qa-log|learned-principles|fix-patterns|MEMORY)/.test(p));
|
|
96
99
|
for (const kf of kfiles) {
|
|
97
100
|
const src = await io.readFile(kf).catch(() => null);
|
|
@@ -99,9 +102,9 @@ export async function runIndexBuild(
|
|
|
99
102
|
const rel = path.relative(root, kf).split(path.sep).join("/");
|
|
100
103
|
for (const m of src.matchAll(KENTRY_RE)) {
|
|
101
104
|
// The fence holds only the YAML sidecar (id/layer/created/status); the
|
|
102
|
-
//
|
|
105
|
+
// Retrievable knowledge is the entry heading's prose after the metadata fence.
|
|
103
106
|
const before = src.slice(0, m.index ?? 0);
|
|
104
|
-
const headings = [...before.matchAll(/###\s+(K-\d+)/g)];
|
|
107
|
+
const headings = [...before.matchAll(/###\s+((?:L-)?K-\d+)/g)];
|
|
105
108
|
const kid = headings[headings.length - 1]?.[1] ?? `K-${units.length}`;
|
|
106
109
|
const fm = (yamlParse(m[1]!) as Record<string, unknown>) ?? {};
|
|
107
110
|
const prose = src.slice((m.index ?? 0) + m[0].length, undefined).split(/\n###\s/).at(0) ?? "";
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1470 AC-7: the assemble path completes with zero model calls — the handlers must not import any model/embedding provider.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-context</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
13
|
import { test, expect, describe } from "vitest";
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1470 slate-fill tests — budget enforcement: units fill the token budget in rank order; skipped count is honest; a unit exceeding remaining budget is skipped not truncated.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-context</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
13
|
import { test, expect, describe } from "vitest";
|
package/os/context/index.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Barrel for forgeContextModule — re-exports the context module registration and the index-build/context-assemble/slate-eval handler entry points.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Command declarations and IO — those live in context.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-context</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
export { forgeContextModule } from "./context.module.ts";
|
|
2
14
|
export { runIndexBuild } from "./handlers/index-build.ts";
|
|
3
15
|
export { runContextAssemble } from "./handlers/context-assemble.ts";
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1469 gate.probe.catalog tests — contract coverage + unprobed error-severity rules.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
13
|
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1469: gate.probe.catalog — read-model over the fixture inventory: per-contract coverage, per-rule fixture binding, unprobed error-severity rules (gates with no liveness evidence).</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
5
8
|
<CHANGE_SUMMARY>
|
|
6
9
|
<item>RFC-1469: gate.probe.catalog fixture-inventory read-model</item>
|
|
7
10
|
<item>RFC-1469: gate liveness probes — gate.probe fixture runner + probe.catalog coverage read-model</item>
|
|
8
11
|
<item>RFC-1469: apply r1 repairs — in-tree injection + invoke, ruleId-matched verdicts, yamlParse catalog, PROBE-02/05, real fixtures</item>
|
|
9
12
|
<item>RFC-1469: apply r2 repairs — contracts-root inventory join, PROBE-03/05 declarations, dir-skeleton sweep, stale doc text</item>
|
|
13
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
14
|
</CHANGE_SUMMARY>
|
|
11
15
|
*/
|
|
12
16
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1469 gate.probe tests — check fires on the seeded violation (liveness), dead-gate fail detection, --list inventory.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
13
|
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
@@ -7,10 +7,14 @@ ruleId + pathPattern. A seeded violation the check can't see is a dead gate —
|
|
|
7
7
|
the probe proves the gate still fires on its real scan path, not a fabricated
|
|
8
8
|
fixture shape. mutatesState: true (in-tree writes, always restored).
|
|
9
9
|
</purpose>
|
|
10
|
+
<non-goals>
|
|
11
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
12
|
+
</non-goals>
|
|
10
13
|
</MODULE_CONTRACT>
|
|
11
14
|
<CHANGE_SUMMARY>
|
|
12
15
|
<item>RFC-1469: gate.probe in-tree injection + invoke + restore (r1 repair)</item>
|
|
13
16
|
<item>RFC-1469: apply r2 repairs — contracts-root inventory join, PROBE-03/05 declarations, dir-skeleton sweep, stale doc text</item>
|
|
17
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
14
18
|
</CHANGE_SUMMARY>
|
|
15
19
|
*/
|
|
16
20
|
|
package/os/gate/index.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>Barrel for forgeGateModule — re-exports the gate module registration and the gate-probe/gate-probe-catalog handler entry points.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Command declarations and fixture IO — those live in gate.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-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
11
|
+
*/
|
|
12
|
+
|
|
1
13
|
export { forgeGateModule } from "./gate.module.ts";
|
|
2
14
|
export { runGateProbe } from "./handlers/gate-probe.ts";
|
|
3
15
|
export { runGateProbeCatalog } from "./handlers/gate-probe-catalog.ts";
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1466 instructions tests — AC-3 (over-budget → INSTR-01), AC-4 (scar.migrate → fragment entry + bullet removed + catalogRefs), AC-5 (invariant-shaped bullet → blocking refusal).</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>TODO(compass): record the boundary this file must not take on.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
10
|
+
</CHANGE_SUMMARY>
|
|
5
11
|
*/
|
|
6
12
|
|
|
7
13
|
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
3
|
+
<purpose>Registers forgeInstructionsModule in the instructions module — the instruction-budget validator and scar-migration command surface.</purpose>
|
|
4
4
|
<non-goals>
|
|
5
5
|
<item>Autonomous module — no engine imports (FORGE-AUTONOMY-01).</item>
|
|
6
6
|
</non-goals>
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
9
|
<item>RFC-1466: forgeInstructionsModule registering instructions.budget.validate + scar.migrate</item>
|
|
10
10
|
<item>RFC-1466: bound the instruction layer — instructions.budget.validate, scar.migrate, catalog fragment merge</item>
|
|
11
|
+
<item>RFC-1485: sweep compass headers — forge-os-tail</item>
|
|
11
12
|
</CHANGE_SUMMARY>
|
|
12
13
|
*/
|
|
13
14
|
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>RFC-1468 knowledge.authz.probe tests — KAUTHZ-01 (authz-relevant without authorityRefs → error), KAUTHZ-03 (authorization-shaped entry without class → warning), clean entries green.</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Not a contract source of truth — knowledge.authz.probe and RFC-1468 own the behavior.</item>
|
|
6
|
+
</non-goals>
|
|
4
7
|
</MODULE_CONTRACT>
|
|
8
|
+
<CHANGE_SUMMARY>
|
|
9
|
+
<item>RFC-1481: assert authorization probes preserve consumer-local knowledge IDs.</item>
|
|
10
|
+
<item>RFC-1481: collapse compass summaries and add missing contract blocks</item>
|
|
11
|
+
</CHANGE_SUMMARY>
|
|
5
12
|
*/
|
|
6
13
|
|
|
7
14
|
import { test, expect, describe, beforeEach, afterEach } from "vitest";
|
|
@@ -83,4 +90,18 @@ The build uses turbo.`,
|
|
|
83
90
|
expect(res.data?.diagnostics).toHaveLength(0);
|
|
84
91
|
expect(res.exitCode).toBe(0);
|
|
85
92
|
});
|
|
93
|
+
|
|
94
|
+
test("RFC-1481: authorization diagnostics retain consumer-local L-K IDs", async () => {
|
|
95
|
+
await seed(
|
|
96
|
+
".agents/skills/demo/qa-log.md",
|
|
97
|
+
`### L-K-0042: local rule
|
|
98
|
+
\`\`\`knowledge-entry
|
|
99
|
+
layer: L1
|
|
100
|
+
\`\`\`
|
|
101
|
+
Agents must never run the forbidden action.`,
|
|
102
|
+
);
|
|
103
|
+
const res = await runKnowledgeAuthzProbe(flags({}), ctx());
|
|
104
|
+
|
|
105
|
+
expect(res.data?.diagnostics[0]?.entry).toBe("L-K-0042");
|
|
106
|
+
});
|
|
86
107
|
});
|
|
@@ -7,13 +7,17 @@ source row), KAUTHZ-03 skill-authored authz entry without the class marker
|
|
|
7
7
|
(grace-window warning). --classify-only proposes markers, writes nothing.
|
|
8
8
|
Autonomous — source-text scan only (FORGE-AUTONOMY-01).
|
|
9
9
|
</purpose>
|
|
10
|
+
<non-goals>
|
|
11
|
+
<item>Do not mutate knowledge files — diagnostics and marker proposals only.</item>
|
|
12
|
+
</non-goals>
|
|
10
13
|
</MODULE_CONTRACT>
|
|
11
14
|
<CHANGE_SUMMARY>
|
|
12
|
-
<item>RFC-1468: KAUTHZ-01..03 probe + classify-only assist</item>
|
|
13
|
-
<item>RFC-1468: bind authz-relevant knowledge to authoritative sources — knowledge.rebuild + knowledge.authz.probe, KAUTHZ-01..03</item>
|
|
14
15
|
<item>RFC-1468: apply r1 repairs — serializer fields, id regex, ref extraction, scan surface, real decision-log shape</item>
|
|
15
16
|
<item>RFC-1468: apply r2 repairs — archived-doc resolution, decision refs, catalog ids, blank-fill refusal, fence binding, fix-patterns coverage</item>
|
|
16
17
|
<item>RFC-1468: apply r3 repairs — dotted catalog ruleIds, queue-ledger decision refs</item>
|
|
18
|
+
<item>RFC-1481: recognize consumer-local L-K-NNNN knowledge headings.</item>
|
|
19
|
+
<item>RFC-1481: collapse compass summaries and add missing contract blocks</item>
|
|
20
|
+
<history>RFC-1468</history>
|
|
17
21
|
</CHANGE_SUMMARY>
|
|
18
22
|
*/
|
|
19
23
|
|
|
@@ -60,7 +64,7 @@ function* blocks(src: string, file: string): Generator<KnowledgeEntryBlock> {
|
|
|
60
64
|
// runs on the full section.
|
|
61
65
|
// Fence must appear before the next heading — a heading without a fence
|
|
62
66
|
// cannot bind the next entry's yaml to the wrong id.
|
|
63
|
-
const re = /###\s+(K-\d{4})\s*:(?:(?!###)[\s\S])*?```knowledge-entry\n([\s\S]*?)```([\s\S]*?)(?=\n###\s+|$)/g;
|
|
67
|
+
const re = /###\s+((?:L-)?K-\d{4})\s*:(?:(?!###)[\s\S])*?```knowledge-entry\n([\s\S]*?)```([\s\S]*?)(?=\n###\s+|$)/g;
|
|
64
68
|
for (const m of src.matchAll(re)) {
|
|
65
69
|
yield { file, id: m[1]!, text: m[0], yaml: m[2]! };
|
|
66
70
|
}
|