@ybotok/loam 0.1.0-beta.3 → 0.2.0-alpha.13
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 +5992 -82
- package/COMPARISON.md +168 -63
- package/CONTRIBUTING.md +121 -0
- package/MIGRATING-from-OpenSpec.md +238 -55
- package/QUICKSTART.md +302 -0
- package/README.md +653 -144
- package/ROADMAP.md +1035 -0
- package/SCHEMA.md +3916 -263
- package/SECURITY.md +21 -3
- package/WORKFLOW.md +927 -0
- package/dist/cli.js +133 -21
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt/adopt.js +204 -0
- package/dist/commands/adopt/adopt.js.map +1 -0
- package/dist/commands/adopt/render.js +309 -0
- package/dist/commands/adopt/render.js.map +1 -0
- package/dist/commands/archive/archive.js +74 -0
- package/dist/commands/archive/archive.js.map +1 -0
- package/dist/commands/archive/closing.js +42 -0
- package/dist/commands/archive/closing.js.map +1 -0
- package/dist/commands/archive/plan/contracts/asyncapi.js +172 -0
- package/dist/commands/archive/plan/contracts/asyncapi.js.map +1 -0
- package/dist/commands/archive/plan/contracts/consumers.js +56 -0
- package/dist/commands/archive/plan/contracts/consumers.js.map +1 -0
- package/dist/commands/archive/plan/contracts/openapi.js +193 -0
- package/dist/commands/archive/plan/contracts/openapi.js.map +1 -0
- package/dist/commands/archive/plan/contracts/verdict-lines.js +103 -0
- package/dist/commands/archive/plan/contracts/verdict-lines.js.map +1 -0
- package/dist/commands/archive/plan/document/head.js +151 -0
- package/dist/commands/archive/plan/document/head.js.map +1 -0
- package/dist/commands/archive/plan/document/links.js +284 -0
- package/dist/commands/archive/plan/document/links.js.map +1 -0
- package/dist/commands/archive/plan/document/run.js +136 -0
- package/dist/commands/archive/plan/document/run.js.map +1 -0
- package/dist/commands/archive/plan/gate.js +319 -0
- package/dist/commands/archive/plan/gate.js.map +1 -0
- package/dist/commands/archive/plan/landscape.js +298 -0
- package/dist/commands/archive/plan/landscape.js.map +1 -0
- package/dist/commands/archive/plan/model/extending.js +85 -0
- package/dist/commands/archive/plan/model/extending.js.map +1 -0
- package/dist/commands/archive/plan/refusal.js +106 -0
- package/dist/commands/archive/plan/refusal.js.map +1 -0
- package/dist/commands/archive/plan/specs.js +318 -0
- package/dist/commands/archive/plan/specs.js.map +1 -0
- package/dist/commands/archive/plan/state.js +30 -0
- package/dist/commands/archive/plan/state.js.map +1 -0
- package/dist/commands/archive/run.js +355 -0
- package/dist/commands/archive/run.js.map +1 -0
- package/dist/commands/archive/shipped.js +49 -0
- package/dist/commands/archive/shipped.js.map +1 -0
- package/dist/commands/context/context.js +166 -0
- package/dist/commands/context/context.js.map +1 -0
- package/dist/commands/context/print.js +305 -0
- package/dist/commands/context/print.js.map +1 -0
- package/dist/commands/delta/delta.js +367 -0
- package/dist/commands/delta/delta.js.map +1 -0
- package/dist/commands/delta/print.js +221 -0
- package/dist/commands/delta/print.js.map +1 -0
- package/dist/commands/dependencies.js +6 -8
- package/dist/commands/dependencies.js.map +1 -1
- package/dist/commands/diff/diff.js +86 -0
- package/dist/commands/diff/diff.js.map +1 -0
- package/dist/commands/diff/print.js +38 -0
- package/dist/commands/diff/print.js.map +1 -0
- package/dist/commands/doctor.js +65 -5
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/explain/explain.js +227 -0
- package/dist/commands/explain/explain.js.map +1 -0
- package/dist/commands/explore.js +39 -28
- package/dist/commands/explore.js.map +1 -1
- package/dist/commands/gate/gate.js +152 -0
- package/dist/commands/gate/gate.js.map +1 -0
- package/dist/commands/gate/print.js +66 -0
- package/dist/commands/gate/print.js.map +1 -0
- package/dist/commands/gherkin/commit.js +105 -0
- package/dist/commands/gherkin/commit.js.map +1 -0
- package/dist/commands/gherkin/gherkin.js +262 -0
- package/dist/commands/gherkin/gherkin.js.map +1 -0
- package/dist/commands/gherkin/reconcile.js +146 -0
- package/dist/commands/gherkin/reconcile.js.map +1 -0
- package/dist/commands/gherkin/render.js +77 -0
- package/dist/commands/gherkin/render.js.map +1 -0
- package/dist/commands/init/example.js +204 -0
- package/dist/commands/init/example.js.map +1 -0
- package/dist/commands/init/first-hour.js +72 -0
- package/dist/commands/init/first-hour.js.map +1 -0
- package/dist/commands/{init.js → init/init.js} +142 -71
- package/dist/commands/init/init.js.map +1 -0
- package/dist/commands/init/mcp.js +131 -0
- package/dist/commands/init/mcp.js.map +1 -0
- package/dist/commands/init/options.js +78 -0
- package/dist/commands/init/options.js.map +1 -0
- package/dist/commands/instructions.js +72 -14
- package/dist/commands/instructions.js.map +1 -1
- package/dist/commands/list/campaign/campaign.js +63 -0
- package/dist/commands/list/campaign/campaign.js.map +1 -0
- package/dist/commands/list/campaign/owners.js +65 -0
- package/dist/commands/list/campaign/owners.js.map +1 -0
- package/dist/commands/list/json.js +155 -0
- package/dist/commands/list/json.js.map +1 -0
- package/dist/commands/list/list.js +358 -0
- package/dist/commands/list/list.js.map +1 -0
- package/dist/commands/list/print.js +344 -0
- package/dist/commands/list/print.js.map +1 -0
- package/dist/commands/list/review.js +120 -0
- package/dist/commands/list/review.js.map +1 -0
- package/dist/commands/list/suites/suites.js +140 -0
- package/dist/commands/list/suites/suites.js.map +1 -0
- package/dist/commands/list/views.js +108 -0
- package/dist/commands/list/views.js.map +1 -0
- package/dist/commands/mcp/dispatch.js +238 -0
- package/dist/commands/mcp/dispatch.js.map +1 -0
- package/dist/commands/mcp/mcp.js +75 -0
- package/dist/commands/mcp/mcp.js.map +1 -0
- package/dist/commands/mcp/serve.js +55 -0
- package/dist/commands/mcp/serve.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/active.js +175 -0
- package/dist/commands/migrate-openspec/materialize/active.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/feature.js +41 -0
- package/dist/commands/migrate-openspec/materialize/feature.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/living.js +62 -0
- package/dist/commands/migrate-openspec/materialize/living.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/stage.js +143 -0
- package/dist/commands/migrate-openspec/materialize/stage.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/target.js +219 -0
- package/dist/commands/migrate-openspec/materialize/target.js.map +1 -0
- package/dist/commands/migrate-openspec/migrate-openspec.js +142 -0
- package/dist/commands/migrate-openspec/migrate-openspec.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/decisions.js +86 -0
- package/dist/commands/migrate-openspec/openspec/decisions.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/error.js +18 -0
- package/dist/commands/migrate-openspec/openspec/error.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/mapping.js +162 -0
- package/dist/commands/migrate-openspec/openspec/mapping.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/paths.js +40 -0
- package/dist/commands/migrate-openspec/openspec/paths.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/read.js +49 -0
- package/dist/commands/migrate-openspec/openspec/read.js.map +1 -0
- package/dist/commands/migrate-openspec/print.js +89 -0
- package/dist/commands/migrate-openspec/print.js.map +1 -0
- package/dist/commands/new/capability-template.js +118 -0
- package/dist/commands/new/capability-template.js.map +1 -0
- package/dist/commands/new/commit.js +62 -0
- package/dist/commands/new/commit.js.map +1 -0
- package/dist/commands/new/modifies.js +206 -0
- package/dist/commands/new/modifies.js.map +1 -0
- package/dist/commands/new/new.js +328 -0
- package/dist/commands/new/new.js.map +1 -0
- package/dist/commands/new/templates.js +279 -0
- package/dist/commands/new/templates.js.map +1 -0
- package/dist/commands/open.js +199 -0
- package/dist/commands/open.js.map +1 -0
- package/dist/commands/policy/format.js +152 -0
- package/dist/commands/policy/format.js.map +1 -0
- package/dist/commands/{docs-repo-gate.js → policy/gate.js} +38 -11
- package/dist/commands/policy/gate.js.map +1 -0
- package/dist/commands/rebase/edit.js +106 -0
- package/dist/commands/rebase/edit.js.map +1 -0
- package/dist/commands/rebase/living.js +185 -0
- package/dist/commands/rebase/living.js.map +1 -0
- package/dist/commands/rebase/plan.js +245 -0
- package/dist/commands/rebase/plan.js.map +1 -0
- package/dist/commands/rebase/rebase.js +300 -0
- package/dist/commands/rebase/rebase.js.map +1 -0
- package/dist/commands/seed/commit.js +221 -0
- package/dist/commands/seed/commit.js.map +1 -0
- package/dist/commands/seed/plan.js +278 -0
- package/dist/commands/seed/plan.js.map +1 -0
- package/dist/commands/seed/seed.js +174 -0
- package/dist/commands/seed/seed.js.map +1 -0
- package/dist/commands/show/feature.js +182 -0
- package/dist/commands/show/feature.js.map +1 -0
- package/dist/commands/show/introduced.js +157 -0
- package/dist/commands/show/introduced.js.map +1 -0
- package/dist/commands/show/marks.js +53 -0
- package/dist/commands/show/marks.js.map +1 -0
- package/dist/commands/show/service.js +239 -0
- package/dist/commands/show/service.js.map +1 -0
- package/dist/commands/show/show.js +87 -0
- package/dist/commands/show/show.js.map +1 -0
- package/dist/commands/status/fleet-next.js +90 -0
- package/dist/commands/status/fleet-next.js.map +1 -0
- package/dist/commands/status/json.js +47 -0
- package/dist/commands/status/json.js.map +1 -0
- package/dist/commands/status/print.js +209 -0
- package/dist/commands/status/print.js.map +1 -0
- package/dist/commands/status/status.js +115 -0
- package/dist/commands/status/status.js.map +1 -0
- package/dist/commands/steps/steps.js +269 -0
- package/dist/commands/steps/steps.js.map +1 -0
- package/dist/commands/subsystem/edit.js +192 -0
- package/dist/commands/subsystem/edit.js.map +1 -0
- package/dist/commands/subsystem/move.js +325 -0
- package/dist/commands/subsystem/move.js.map +1 -0
- package/dist/commands/subsystem/query.js +113 -0
- package/dist/commands/subsystem/query.js.map +1 -0
- package/dist/commands/subsystem/subsystem.js +98 -0
- package/dist/commands/subsystem/subsystem.js.map +1 -0
- package/dist/commands/subsystem/sync.js +318 -0
- package/dist/commands/subsystem/sync.js.map +1 -0
- package/dist/commands/subsystem/txn/exclude.js +132 -0
- package/dist/commands/subsystem/txn/exclude.js.map +1 -0
- package/dist/commands/subsystem/txn/links.js +128 -0
- package/dist/commands/subsystem/txn/links.js.map +1 -0
- package/dist/commands/subsystem/txn/report.js +174 -0
- package/dist/commands/subsystem/txn/report.js.map +1 -0
- package/dist/commands/subsystem/txn/txn.js +196 -0
- package/dist/commands/subsystem/txn/txn.js.map +1 -0
- package/dist/commands/subsystem/txn/views.js +249 -0
- package/dist/commands/subsystem/txn/views.js.map +1 -0
- package/dist/commands/tasks/actions.js +107 -0
- package/dist/commands/tasks/actions.js.map +1 -0
- package/dist/commands/tasks/render.js +253 -0
- package/dist/commands/tasks/render.js.map +1 -0
- package/dist/commands/tasks/tasks.js +119 -0
- package/dist/commands/tasks/tasks.js.map +1 -0
- package/dist/commands/unarchive/manifest.js +176 -0
- package/dist/commands/unarchive/manifest.js.map +1 -0
- package/dist/commands/unarchive/restore.js +254 -0
- package/dist/commands/unarchive/restore.js.map +1 -0
- package/dist/commands/unarchive/unarchive.js +59 -0
- package/dist/commands/unarchive/unarchive.js.map +1 -0
- package/dist/commands/validate/arch-coverage.js +245 -0
- package/dist/commands/validate/arch-coverage.js.map +1 -0
- package/dist/commands/validate/checks/fleet-shape.js +204 -0
- package/dist/commands/validate/checks/fleet-shape.js.map +1 -0
- package/dist/commands/validate/checks/health-deps.js +58 -0
- package/dist/commands/validate/checks/health-deps.js.map +1 -0
- package/dist/commands/validate/checks/introduced.js +102 -0
- package/dist/commands/validate/checks/introduced.js.map +1 -0
- package/dist/commands/validate/checks/requirements.js +264 -0
- package/dist/commands/validate/checks/requirements.js.map +1 -0
- package/dist/commands/validate/checks/sources.js +85 -0
- package/dist/commands/validate/checks/sources.js.map +1 -0
- package/dist/commands/validate/coverage/covers-after.js +105 -0
- package/dist/commands/validate/coverage/covers-after.js.map +1 -0
- package/dist/commands/validate/feature.js +222 -0
- package/dist/commands/validate/feature.js.map +1 -0
- package/dist/commands/validate/fleet/census.js +93 -0
- package/dist/commands/validate/fleet/census.js.map +1 -0
- package/dist/commands/validate/fleet/kind-tags.js +39 -0
- package/dist/commands/validate/fleet/kind-tags.js.map +1 -0
- package/dist/commands/validate/fleet/landscape.js +371 -0
- package/dist/commands/validate/fleet/landscape.js.map +1 -0
- package/dist/commands/validate/fleet/load.js +118 -0
- package/dist/commands/validate/fleet/load.js.map +1 -0
- package/dist/commands/validate/fleet/map/attest.js +98 -0
- package/dist/commands/validate/fleet/map/attest.js.map +1 -0
- package/dist/commands/validate/fleet/map/bindings.js +107 -0
- package/dist/commands/validate/fleet/map/bindings.js.map +1 -0
- package/dist/commands/validate/fleet/map/consumers.js +244 -0
- package/dist/commands/validate/fleet/map/consumers.js.map +1 -0
- package/dist/commands/validate/fleet/map/isolation.js +116 -0
- package/dist/commands/validate/fleet/map/isolation.js.map +1 -0
- package/dist/commands/validate/fleet/map/usecases.js +54 -0
- package/dist/commands/validate/fleet/map/usecases.js.map +1 -0
- package/dist/commands/validate/fleet/obligations.js +266 -0
- package/dist/commands/validate/fleet/obligations.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/adoption.js +102 -0
- package/dist/commands/validate/fleet/scorecard/adoption.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/contracts.js +98 -0
- package/dist/commands/validate/fleet/scorecard/contracts.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/print.js +71 -0
- package/dist/commands/validate/fleet/scorecard/print.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/scorecard.js +162 -0
- package/dist/commands/validate/fleet/scorecard/scorecard.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/place.js +13 -0
- package/dist/commands/validate/fleet/usecases/place.js.map +1 -0
- package/dist/commands/validate/fleet/views/fleet-project.js +217 -0
- package/dist/commands/validate/fleet/views/fleet-project.js.map +1 -0
- package/dist/commands/validate/fleet/views/ids.js +75 -0
- package/dist/commands/validate/fleet/views/ids.js.map +1 -0
- package/dist/commands/validate/fleet/views/projects.js +278 -0
- package/dist/commands/validate/fleet/views/projects.js.map +1 -0
- package/dist/commands/validate/fleet/views/root-documents.js +83 -0
- package/dist/commands/validate/fleet/views/root-documents.js.map +1 -0
- package/dist/commands/validate/fleet/views/stale.js +52 -0
- package/dist/commands/validate/fleet/views/stale.js.map +1 -0
- package/dist/commands/validate/links/corpus.js +89 -0
- package/dist/commands/validate/links/corpus.js.map +1 -0
- package/dist/commands/validate/links/glossary.js +75 -0
- package/dist/commands/validate/links/glossary.js.map +1 -0
- package/dist/commands/validate/render/repeats.js +63 -0
- package/dist/commands/validate/render/repeats.js.map +1 -0
- package/dist/commands/validate/render/rollups.js +115 -0
- package/dist/commands/validate/render/rollups.js.map +1 -0
- package/dist/commands/validate/render/text.js +199 -0
- package/dist/commands/validate/render/text.js.map +1 -0
- package/dist/commands/validate/report.js +145 -0
- package/dist/commands/validate/report.js.map +1 -0
- package/dist/commands/validate/scope.js +113 -0
- package/dist/commands/validate/scope.js.map +1 -0
- package/dist/commands/validate/service/api.js +252 -0
- package/dist/commands/validate/service/api.js.map +1 -0
- package/dist/commands/validate/service/contracts/generated.js +134 -0
- package/dist/commands/validate/service/contracts/generated.js.map +1 -0
- package/dist/commands/validate/service/events/events.js +241 -0
- package/dist/commands/validate/service/events/events.js.map +1 -0
- package/dist/commands/validate/service/events/message-producers.js +77 -0
- package/dist/commands/validate/service/events/message-producers.js.map +1 -0
- package/dist/commands/validate/service/evidence-pins.js +177 -0
- package/dist/commands/validate/service/evidence-pins.js.map +1 -0
- package/dist/commands/validate/service/model/diverged.js +226 -0
- package/dist/commands/validate/service/model/diverged.js.map +1 -0
- package/dist/commands/validate/service/model/grade.js +163 -0
- package/dist/commands/validate/service/model/grade.js.map +1 -0
- package/dist/commands/validate/service/service.js +310 -0
- package/dist/commands/validate/service/service.js.map +1 -0
- package/dist/commands/validate/service/specs.js +279 -0
- package/dist/commands/validate/service/specs.js.map +1 -0
- package/dist/commands/validate/service/spine.js +148 -0
- package/dist/commands/validate/service/spine.js.map +1 -0
- package/dist/commands/validate/service/usecases/tags.js +113 -0
- package/dist/commands/validate/service/usecases/tags.js.map +1 -0
- package/dist/commands/validate/service/usecases/usecases.js +209 -0
- package/dist/commands/validate/service/usecases/usecases.js.map +1 -0
- package/dist/commands/validate/validate.js +363 -0
- package/dist/commands/validate/validate.js.map +1 -0
- package/dist/commands/verify/cross/diff.js +178 -0
- package/dist/commands/verify/cross/diff.js.map +1 -0
- package/dist/commands/verify/evidence/contract.js +32 -0
- package/dist/commands/verify/evidence/contract.js.map +1 -0
- package/dist/commands/verify/evidence/pins.js +52 -0
- package/dist/commands/verify/evidence/pins.js.map +1 -0
- package/dist/commands/verify/evidence/read.js +81 -0
- package/dist/commands/verify/evidence/read.js.map +1 -0
- package/dist/commands/verify/frozen.js +263 -0
- package/dist/commands/verify/frozen.js.map +1 -0
- package/dist/commands/verify/record.js +278 -0
- package/dist/commands/verify/record.js.map +1 -0
- package/dist/commands/verify/report.js +206 -0
- package/dist/commands/verify/report.js.map +1 -0
- package/dist/commands/verify/results.js +328 -0
- package/dist/commands/verify/results.js.map +1 -0
- package/dist/commands/verify/verify.js +220 -0
- package/dist/commands/verify/verify.js.map +1 -0
- package/dist/commands/vouch/contract.js +11 -0
- package/dist/commands/vouch/contract.js.map +1 -0
- package/dist/commands/vouch/pack/contract.js +2 -0
- package/dist/commands/vouch/pack/contract.js.map +1 -0
- package/dist/commands/vouch/pack/pack.js +266 -0
- package/dist/commands/vouch/pack/pack.js.map +1 -0
- package/dist/commands/vouch/pack/print.js +266 -0
- package/dist/commands/vouch/pack/print.js.map +1 -0
- package/dist/commands/vouch/pack/sections.js +141 -0
- package/dist/commands/vouch/pack/sections.js.map +1 -0
- package/dist/commands/vouch/prompt/confirm.js +46 -0
- package/dist/commands/vouch/prompt/confirm.js.map +1 -0
- package/dist/commands/vouch/report.js +101 -0
- package/dist/commands/vouch/report.js.map +1 -0
- package/dist/commands/vouch/run.js +230 -0
- package/dist/commands/vouch/run.js.map +1 -0
- package/dist/commands/vouch/sample/plan.js +111 -0
- package/dist/commands/vouch/sample/plan.js.map +1 -0
- package/dist/commands/vouch/sample/print.js +109 -0
- package/dist/commands/vouch/sample/print.js.map +1 -0
- package/dist/commands/vouch/vet/verify.js +155 -0
- package/dist/commands/vouch/vet/verify.js.map +1 -0
- package/dist/commands/vouch/vouch.js +169 -0
- package/dist/commands/vouch/vouch.js.map +1 -0
- package/dist/core/agent/agents-md/command-map.js +299 -0
- package/dist/core/agent/agents-md/command-map.js.map +1 -0
- package/dist/core/agent/agents-md/map/explain.js +46 -0
- package/dist/core/agent/agents-md/map/explain.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/context.js +50 -0
- package/dist/core/agent/agents-md/map/lenses/context.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/diff.js +59 -0
- package/dist/core/agent/agents-md/map/lenses/diff.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/gate.js +65 -0
- package/dist/core/agent/agents-md/map/lenses/gate.js.map +1 -0
- package/dist/core/agent/agents-md/map/mcp.js +44 -0
- package/dist/core/agent/agents-md/map/mcp.js.map +1 -0
- package/dist/core/agent/agents-md/map/status.js +78 -0
- package/dist/core/agent/agents-md/map/status.js.map +1 -0
- package/dist/core/agent/agents-md/map/subsystem.js +104 -0
- package/dist/core/agent/agents-md/map/subsystem.js.map +1 -0
- package/dist/core/agent/agents-md/map/usecases.js +138 -0
- package/dist/core/agent/agents-md/map/usecases.js.map +1 -0
- package/dist/core/agent/agents-md/refusals.js +273 -0
- package/dist/core/agent/agents-md/refusals.js.map +1 -0
- package/dist/core/agent/agents-md.js +203 -0
- package/dist/core/agent/agents-md.js.map +1 -0
- package/dist/core/{agents-stamp.js → agent/agents-stamp.js} +60 -0
- package/dist/core/agent/agents-stamp.js.map +1 -0
- package/dist/core/agent/contract.js +2 -0
- package/dist/core/agent/contract.js.map +1 -0
- package/dist/core/agent/protocol.js +193 -0
- package/dist/core/agent/protocol.js.map +1 -0
- package/dist/core/agent/scaffold.js +254 -0
- package/dist/core/agent/scaffold.js.map +1 -0
- package/dist/core/agent/support/report.js +144 -0
- package/dist/core/agent/support/report.js.map +1 -0
- package/dist/core/agent/tools/dialects.js +151 -0
- package/dist/core/agent/tools/dialects.js.map +1 -0
- package/dist/core/agent/tools/registry.js +193 -0
- package/dist/core/agent/tools/registry.js.map +1 -0
- package/dist/core/agent/workflows/adopt.js +280 -0
- package/dist/core/agent/workflows/adopt.js.map +1 -0
- package/dist/core/agent/workflows/check.js +373 -0
- package/dist/core/agent/workflows/check.js.map +1 -0
- package/dist/core/agent/workflows/closing.js +323 -0
- package/dist/core/agent/workflows/closing.js.map +1 -0
- package/dist/core/agent/workflows/feature.js +220 -0
- package/dist/core/agent/workflows/feature.js.map +1 -0
- package/dist/core/agent/workflows/implement.js +188 -0
- package/dist/core/agent/workflows/implement.js.map +1 -0
- package/dist/core/agent/workflows/reference/authoring.js +311 -0
- package/dist/core/agent/workflows/reference/authoring.js.map +1 -0
- package/dist/core/agent/workflows/reference/codes.js +67 -0
- package/dist/core/agent/workflows/reference/codes.js.map +1 -0
- package/dist/core/agent/workflows/reference/done-check.js +210 -0
- package/dist/core/agent/workflows/reference/done-check.js.map +1 -0
- package/dist/core/agent/workflows/reference/drawing/drawing.js +253 -0
- package/dist/core/agent/workflows/reference/drawing/drawing.js.map +1 -0
- package/dist/core/agent/workflows/reference/reference.js +19 -0
- package/dist/core/agent/workflows/reference/reference.js.map +1 -0
- package/dist/core/agent/workflows/reference/spine.js +338 -0
- package/dist/core/agent/workflows/reference/spine.js.map +1 -0
- package/dist/core/asyncapi/baseline/plan.js +43 -0
- package/dist/core/asyncapi/baseline/plan.js.map +1 -0
- package/dist/core/asyncapi/baseline/surfaces.js +54 -0
- package/dist/core/asyncapi/baseline/surfaces.js.map +1 -0
- package/dist/core/asyncapi/depth.js +164 -0
- package/dist/core/asyncapi/depth.js.map +1 -0
- package/dist/core/asyncapi/digest.js +146 -0
- package/dist/core/asyncapi/digest.js.map +1 -0
- package/dist/core/asyncapi/merge/components.js +92 -0
- package/dist/core/asyncapi/merge/components.js.map +1 -0
- package/dist/core/asyncapi/merge/error.js +38 -0
- package/dist/core/asyncapi/merge/error.js.map +1 -0
- package/dist/core/asyncapi/merge/markers.js +290 -0
- package/dist/core/asyncapi/merge/markers.js.map +1 -0
- package/dist/core/asyncapi/merge/merge.js +195 -0
- package/dist/core/asyncapi/merge/merge.js.map +1 -0
- package/dist/core/asyncapi/merge/pin.js +83 -0
- package/dist/core/asyncapi/merge/pin.js.map +1 -0
- package/dist/core/asyncapi/model.js +11 -0
- package/dist/core/asyncapi/model.js.map +1 -0
- package/dist/core/asyncapi/producers.js +50 -0
- package/dist/core/asyncapi/producers.js.map +1 -0
- package/dist/core/asyncapi/read.js +263 -0
- package/dist/core/asyncapi/read.js.map +1 -0
- package/dist/core/brief/brief.js +285 -0
- package/dist/core/brief/brief.js.map +1 -0
- package/dist/core/brief/checks.js +385 -0
- package/dist/core/brief/checks.js.map +1 -0
- package/dist/core/brief/landscape.js +273 -0
- package/dist/core/brief/landscape.js.map +1 -0
- package/dist/core/brief/map/extend.js +84 -0
- package/dist/core/brief/map/extend.js.map +1 -0
- package/dist/core/brief/map/owed.js +266 -0
- package/dist/core/brief/map/owed.js.map +1 -0
- package/dist/core/brief/targets.js +304 -0
- package/dist/core/brief/targets.js.map +1 -0
- package/dist/core/brief/unchecked.js +58 -0
- package/dist/core/brief/unchecked.js.map +1 -0
- package/dist/core/c4/arch.js +190 -0
- package/dist/core/c4/arch.js.map +1 -0
- package/dist/core/c4/direction/direction.js +114 -0
- package/dist/core/c4/direction/direction.js.map +1 -0
- package/dist/core/c4/likec4.js +243 -0
- package/dist/core/c4/likec4.js.map +1 -0
- package/dist/core/c4/locate/unlocated.js +150 -0
- package/dist/core/c4/locate/unlocated.js.map +1 -0
- package/dist/core/c4/parsed/deployment.js +160 -0
- package/dist/core/c4/parsed/deployment.js.map +1 -0
- package/dist/core/c4/parsed/dynamic-views.js +132 -0
- package/dist/core/c4/parsed/dynamic-views.js.map +1 -0
- package/dist/core/c4/parsed/specification.js +78 -0
- package/dist/core/c4/parsed/specification.js.map +1 -0
- package/dist/core/c4/parsed/values.js +110 -0
- package/dist/core/c4/parsed/values.js.map +1 -0
- package/dist/core/c4/parsed/view-ids.js +113 -0
- package/dist/core/c4/parsed/view-ids.js.map +1 -0
- package/dist/core/c4/prefetch/fleet.js +134 -0
- package/dist/core/c4/prefetch/fleet.js.map +1 -0
- package/dist/core/c4/project/architecture.js +161 -0
- package/dist/core/c4/project/architecture.js.map +1 -0
- package/dist/core/c4/project/batch.js +140 -0
- package/dist/core/c4/project/batch.js.map +1 -0
- package/dist/core/c4/project/documents.js +89 -0
- package/dist/core/c4/project/documents.js.map +1 -0
- package/dist/core/c4/project/load.js +219 -0
- package/dist/core/c4/project/load.js.map +1 -0
- package/dist/core/c4/project/staged.js +277 -0
- package/dist/core/c4/project/staged.js.map +1 -0
- package/dist/core/c4/resolve/attested.js +0 -0
- package/dist/core/c4/resolve/attested.js.map +1 -0
- package/dist/core/c4/resolve/external.js +51 -0
- package/dist/core/c4/resolve/external.js.map +1 -0
- package/dist/core/c4/resolve/service.js +174 -0
- package/dist/core/c4/resolve/service.js.map +1 -0
- package/dist/core/c4/resolve/steps.js +290 -0
- package/dist/core/c4/resolve/steps.js.map +1 -0
- package/dist/core/c4/resolve/systems.js +154 -0
- package/dist/core/c4/resolve/systems.js.map +1 -0
- package/dist/core/c4/root-project/exclude.js +352 -0
- package/dist/core/c4/root-project/exclude.js.map +1 -0
- package/dist/core/c4/seed/fleet-file.js +201 -0
- package/dist/core/c4/seed/fleet-file.js.map +1 -0
- package/dist/core/c4/seed/items.js +91 -0
- package/dist/core/c4/seed/items.js.map +1 -0
- package/dist/core/c4/seed/stamp.js +48 -0
- package/dist/core/c4/seed/stamp.js.map +1 -0
- package/dist/core/c4/seed/template.js +173 -0
- package/dist/core/c4/seed/template.js.map +1 -0
- package/dist/core/c4/service-model/created/models.js +96 -0
- package/dist/core/c4/service-model/created/models.js.map +1 -0
- package/dist/core/c4/service-model/documents.js +47 -0
- package/dist/core/c4/service-model/documents.js.map +1 -0
- package/dist/core/c4/service-model/fleet/extending.js +82 -0
- package/dist/core/c4/service-model/fleet/extending.js.map +1 -0
- package/dist/core/c4/service-model/load.js +165 -0
- package/dist/core/c4/service-model/load.js.map +1 -0
- package/dist/core/c4/service-model/renderer.js +128 -0
- package/dist/core/c4/service-model/renderer.js.map +1 -0
- package/dist/core/c4/service-model/shape.js +106 -0
- package/dist/core/c4/service-model/shape.js.map +1 -0
- package/dist/core/c4/service-model/slice.js +188 -0
- package/dist/core/c4/service-model/slice.js.map +1 -0
- package/dist/core/c4/source-mask.js +369 -0
- package/dist/core/c4/source-mask.js.map +1 -0
- package/dist/core/c4/source-scan.js +308 -0
- package/dist/core/c4/source-scan.js.map +1 -0
- package/dist/core/c4/splice/authored-source.js +167 -0
- package/dist/core/c4/splice/authored-source.js.map +1 -0
- package/dist/core/c4/splice/contract.js +30 -0
- package/dist/core/c4/splice/contract.js.map +1 -0
- package/dist/core/c4/splice/delta-blocks.js +126 -0
- package/dist/core/c4/splice/delta-blocks.js.map +1 -0
- package/dist/core/c4/splice/identity/declared.js +87 -0
- package/dist/core/c4/splice/identity/declared.js.map +1 -0
- package/dist/core/c4/splice/identity/edges.js +73 -0
- package/dist/core/c4/splice/identity/edges.js.map +1 -0
- package/dist/core/c4/splice/identity/existing.js +80 -0
- package/dist/core/c4/splice/identity/existing.js.map +1 -0
- package/dist/core/c4/splice/identity/interior.js +80 -0
- package/dist/core/c4/splice/identity/interior.js.map +1 -0
- package/dist/core/c4/splice/identity/owner.js +50 -0
- package/dist/core/c4/splice/identity/owner.js.map +1 -0
- package/dist/core/c4/splice/landscape-merge.js +337 -0
- package/dist/core/c4/splice/landscape-merge.js.map +1 -0
- package/dist/core/c4/splice/model/merge.js +151 -0
- package/dist/core/c4/splice/model/merge.js.map +1 -0
- package/dist/core/c4/splice/placement.js +298 -0
- package/dist/core/c4/splice/placement.js.map +1 -0
- package/dist/core/c4/splice/text/spot.js +131 -0
- package/dist/core/c4/splice/text/spot.js.map +1 -0
- package/dist/core/c4/workspace.js +166 -0
- package/dist/core/c4/workspace.js.map +1 -0
- package/dist/core/capabilities/authoring/notes.js +141 -0
- package/dist/core/capabilities/authoring/notes.js.map +1 -0
- package/dist/core/capabilities/capabilities.js +124 -0
- package/dist/core/capabilities/capabilities.js.map +1 -0
- package/dist/core/capabilities/delta/doc.js +47 -0
- package/dist/core/capabilities/delta/doc.js.map +1 -0
- package/dist/core/capabilities/delta/overlay.js +129 -0
- package/dist/core/capabilities/delta/overlay.js.map +1 -0
- package/dist/core/capabilities/delta/summary.js +57 -0
- package/dist/core/capabilities/delta/summary.js.map +1 -0
- package/dist/core/capabilities/delta/tree.js +43 -0
- package/dist/core/capabilities/delta/tree.js.map +1 -0
- package/dist/core/capabilities/delta/uncovered.js +222 -0
- package/dist/core/capabilities/delta/uncovered.js.map +1 -0
- package/dist/core/capabilities/findings.js +338 -0
- package/dist/core/capabilities/findings.js.map +1 -0
- package/dist/core/capabilities/realizes/findings.js +174 -0
- package/dist/core/capabilities/realizes/findings.js.map +1 -0
- package/dist/core/capabilities/realizes/join.js +123 -0
- package/dist/core/capabilities/realizes/join.js.map +1 -0
- package/dist/core/capabilities/rollup.js +205 -0
- package/dist/core/capabilities/rollup.js.map +1 -0
- package/dist/core/capabilities/tree.js +104 -0
- package/dist/core/capabilities/tree.js.map +1 -0
- package/dist/core/capabilities/usecase-join.js +267 -0
- package/dist/core/capabilities/usecase-join.js.map +1 -0
- package/dist/core/coherence/authoring/scaffold.js +185 -0
- package/dist/core/coherence/authoring/scaffold.js.map +1 -0
- package/dist/core/coherence/authoring/sentinels.js +75 -0
- package/dist/core/coherence/authoring/sentinels.js.map +1 -0
- package/dist/core/coherence/calls/called.js +52 -0
- package/dist/core/coherence/calls/called.js.map +1 -0
- package/dist/core/coherence/coherence.js +332 -0
- package/dist/core/coherence/coherence.js.map +1 -0
- package/dist/core/coherence/consumed/operations.js +70 -0
- package/dist/core/coherence/consumed/operations.js.map +1 -0
- package/dist/core/coherence/consumed/refusal.js +38 -0
- package/dist/core/coherence/consumed/refusal.js.map +1 -0
- package/dist/core/coherence/covers/health.js +85 -0
- package/dist/core/coherence/covers/health.js.map +1 -0
- package/dist/core/coherence/declared.js +295 -0
- package/dist/core/coherence/declared.js.map +1 -0
- package/dist/core/coherence/events/declared.js +191 -0
- package/dist/core/coherence/events/declared.js.map +1 -0
- package/dist/core/coherence/events/events.js +335 -0
- package/dist/core/coherence/events/events.js.map +1 -0
- package/dist/core/coherence/events/grades.js +189 -0
- package/dist/core/coherence/events/grades.js.map +1 -0
- package/dist/core/coherence/events/lookups.js +63 -0
- package/dist/core/coherence/events/lookups.js.map +1 -0
- package/dist/core/coherence/events/produced.js +100 -0
- package/dist/core/coherence/events/produced.js.map +1 -0
- package/dist/core/coherence/living.js +198 -0
- package/dist/core/coherence/living.js.map +1 -0
- package/dist/core/coherence/lookups.js +95 -0
- package/dist/core/coherence/lookups.js.map +1 -0
- package/dist/core/coherence/pending.js +39 -0
- package/dist/core/coherence/pending.js.map +1 -0
- package/dist/core/coherence/retired/archived.js +285 -0
- package/dist/core/coherence/retired/archived.js.map +1 -0
- package/dist/core/coherence/retired/event-pair.js +62 -0
- package/dist/core/coherence/retired/event-pair.js.map +1 -0
- package/dist/core/coherence/retired/merged.js +79 -0
- package/dist/core/coherence/retired/merged.js.map +1 -0
- package/dist/core/coherence/retired/retirement.js +49 -0
- package/dist/core/coherence/retired/retirement.js.map +1 -0
- package/dist/core/coherence/retired/revival/arrivals.js +131 -0
- package/dist/core/coherence/retired/revival/arrivals.js.map +1 -0
- package/dist/core/coherence/retired/revival/revived.js +297 -0
- package/dist/core/coherence/retired/revival/revived.js.map +1 -0
- package/dist/core/conflict-markers.js +60 -0
- package/dist/core/conflict-markers.js.map +1 -0
- package/dist/core/consumers/after.js +113 -0
- package/dist/core/consumers/after.js.map +1 -0
- package/dist/core/consumers/consumers.js +296 -0
- package/dist/core/consumers/consumers.js.map +1 -0
- package/dist/core/consumers/current.js +211 -0
- package/dist/core/consumers/current.js.map +1 -0
- package/dist/core/consumers/scan.js +46 -0
- package/dist/core/consumers/scan.js.map +1 -0
- package/dist/core/consumers/state.js +27 -0
- package/dist/core/consumers/state.js.map +1 -0
- package/dist/core/delta/claims.js +73 -0
- package/dist/core/delta/claims.js.map +1 -0
- package/dist/core/delta/delta.js +341 -0
- package/dist/core/delta/delta.js.map +1 -0
- package/dist/core/delta/document.js +177 -0
- package/dist/core/delta/document.js.map +1 -0
- package/dist/core/delta/scope.js +48 -0
- package/dist/core/delta/scope.js.map +1 -0
- package/dist/core/delta/select.js +237 -0
- package/dist/core/delta/select.js.map +1 -0
- package/dist/core/dependencies/dependencies.js +141 -0
- package/dist/core/dependencies/dependencies.js.map +1 -0
- package/dist/core/dependencies/facts.js +165 -0
- package/dist/core/dependencies/facts.js.map +1 -0
- package/dist/core/dependencies/fanin.js +88 -0
- package/dist/core/dependencies/fanin.js.map +1 -0
- package/dist/core/dependencies/graph.js +106 -0
- package/dist/core/dependencies/graph.js.map +1 -0
- package/dist/core/deployment/delta.js +191 -0
- package/dist/core/deployment/delta.js.map +1 -0
- package/dist/core/deployment/objects.js +145 -0
- package/dist/core/deployment/objects.js.map +1 -0
- package/dist/core/diff/base-git.js +230 -0
- package/dist/core/diff/base-git.js.map +1 -0
- package/dist/core/diff/base-state.js +237 -0
- package/dist/core/diff/base-state.js.map +1 -0
- package/dist/core/diff/joins.js +136 -0
- package/dist/core/diff/joins.js.map +1 -0
- package/dist/core/diff/scope/changed-paths.js +204 -0
- package/dist/core/diff/scope/changed-paths.js.map +1 -0
- package/dist/core/diff/scope/edges.js +82 -0
- package/dist/core/diff/scope/edges.js.map +1 -0
- package/dist/core/diff/semantic.js +312 -0
- package/dist/core/diff/semantic.js.map +1 -0
- package/dist/core/docs.js +37 -85
- package/dist/core/docs.js.map +1 -1
- package/dist/core/doctor/agents.js +238 -0
- package/dist/core/doctor/agents.js.map +1 -0
- package/dist/core/doctor/config.js +139 -0
- package/dist/core/doctor/config.js.map +1 -0
- package/dist/core/doctor/doctor.js +355 -0
- package/dist/core/doctor/doctor.js.map +1 -0
- package/dist/core/doctor/report.js +13 -0
- package/dist/core/doctor/report.js.map +1 -0
- package/dist/core/doctor/reports/scan.js +242 -0
- package/dist/core/doctor/reports/scan.js.map +1 -0
- package/dist/core/doctor/residue.js +110 -0
- package/dist/core/doctor/residue.js.map +1 -0
- package/dist/core/document/apply.js +224 -0
- package/dist/core/document/apply.js.map +1 -0
- package/dist/core/{frontmatter.js → document/frontmatter.js} +103 -2
- package/dist/core/document/frontmatter.js.map +1 -0
- package/dist/core/document/grammar/directives.js +143 -0
- package/dist/core/document/grammar/directives.js.map +1 -0
- package/dist/core/document/parse.js +286 -0
- package/dist/core/document/parse.js.map +1 -0
- package/dist/core/document/scenarios.js +238 -0
- package/dist/core/document/scenarios.js.map +1 -0
- package/dist/core/document/spec.js +234 -0
- package/dist/core/document/spec.js.map +1 -0
- package/dist/core/{config.js → envelope/config.js} +89 -18
- package/dist/core/envelope/config.js.map +1 -0
- package/dist/core/envelope/json.js +209 -0
- package/dist/core/envelope/json.js.map +1 -0
- package/dist/core/{version.js → envelope/version.js} +3 -3
- package/dist/core/envelope/version.js.map +1 -0
- package/dist/core/explain/families.js +180 -0
- package/dist/core/explain/families.js.map +1 -0
- package/dist/core/explain/fix-tables.js +178 -0
- package/dist/core/explain/fix-tables.js.map +1 -0
- package/dist/core/explain/lookup.js +194 -0
- package/dist/core/explain/lookup.js.map +1 -0
- package/dist/core/explain/refusals.js +49 -0
- package/dist/core/explain/refusals.js.map +1 -0
- package/dist/core/explain/terms/documents.js +227 -0
- package/dist/core/explain/terms/documents.js.map +1 -0
- package/dist/core/explain/terms/done-check.js +144 -0
- package/dist/core/explain/terms/done-check.js.map +1 -0
- package/dist/core/explain/terms/entry.js +14 -0
- package/dist/core/explain/terms/entry.js.map +1 -0
- package/dist/core/explain/terms/stages.js +71 -0
- package/dist/core/explain/terms/stages.js.map +1 -0
- package/dist/core/explain/terms/tasks.js +97 -0
- package/dist/core/explain/terms/tasks.js.map +1 -0
- package/dist/core/explain/terms.js +103 -0
- package/dist/core/explain/terms.js.map +1 -0
- package/dist/core/explore/describe.js +105 -0
- package/dist/core/explore/describe.js.map +1 -0
- package/dist/core/explore/explore.js +204 -0
- package/dist/core/explore/explore.js.map +1 -0
- package/dist/core/fleet-context.js +174 -146
- package/dist/core/fleet-context.js.map +1 -1
- package/dist/core/gate/checks.js +208 -0
- package/dist/core/gate/checks.js.map +1 -0
- package/dist/core/gate/partners.js +246 -0
- package/dist/core/gate/partners.js.map +1 -0
- package/dist/core/gate/report.js +47 -0
- package/dist/core/gate/report.js.map +1 -0
- package/dist/core/gate/verification.js +176 -0
- package/dist/core/gate/verification.js.map +1 -0
- package/dist/core/gherkin/digest.js +60 -0
- package/dist/core/gherkin/digest.js.map +1 -0
- package/dist/core/gherkin/emit.js +177 -0
- package/dist/core/gherkin/emit.js.map +1 -0
- package/dist/core/gherkin/read.js +76 -0
- package/dist/core/gherkin/read.js.map +1 -0
- package/dist/core/gherkin/stale.js +210 -0
- package/dist/core/gherkin/stale.js.map +1 -0
- package/dist/core/gherkin/stamp.js +77 -0
- package/dist/core/gherkin/stamp.js.map +1 -0
- package/dist/core/gherkin/steps/catalogue.js +154 -0
- package/dist/core/gherkin/steps/catalogue.js.map +1 -0
- package/dist/core/gherkin/steps/inventory.js +98 -0
- package/dist/core/gherkin/steps/inventory.js.map +1 -0
- package/dist/core/gherkin/steps/phrase.js +72 -0
- package/dist/core/gherkin/steps/phrase.js.map +1 -0
- package/dist/core/glossary/delta.js +109 -0
- package/dist/core/glossary/delta.js.map +1 -0
- package/dist/core/glossary/tree.js +73 -0
- package/dist/core/glossary/tree.js.map +1 -0
- package/dist/core/{concurrency.js → kernel/concurrency.js} +19 -0
- package/dist/core/kernel/concurrency.js.map +1 -0
- package/dist/core/{document-bytes.js → kernel/document-bytes.js} +1 -1
- package/dist/core/kernel/document-bytes.js.map +1 -0
- package/dist/core/kernel/fences.js +42 -0
- package/dist/core/kernel/fences.js.map +1 -0
- package/dist/core/kernel/ids/capability.js +72 -0
- package/dist/core/kernel/ids/capability.js.map +1 -0
- package/dist/core/kernel/ids/dirs.js +33 -0
- package/dist/core/kernel/ids/dirs.js.map +1 -0
- package/dist/core/kernel/ids/feature.js +75 -0
- package/dist/core/kernel/ids/feature.js.map +1 -0
- package/dist/core/kernel/ids/fqn/ancestors.js +65 -0
- package/dist/core/kernel/ids/fqn/ancestors.js.map +1 -0
- package/dist/core/kernel/ids/service.js +156 -0
- package/dist/core/kernel/ids/service.js.map +1 -0
- package/dist/core/kernel/ids/subsystem.js +63 -0
- package/dist/core/kernel/ids/subsystem.js.map +1 -0
- package/dist/core/{path-safety.js → kernel/path-safety.js} +56 -4
- package/dist/core/kernel/path-safety.js.map +1 -0
- package/dist/core/{records.js → kernel/records.js} +11 -0
- package/dist/core/kernel/records.js.map +1 -0
- package/dist/core/links/backlinks.js +66 -0
- package/dist/core/links/backlinks.js.map +1 -0
- package/dist/core/links/case.js +74 -0
- package/dist/core/links/case.js.map +1 -0
- package/dist/core/links/corpus.js +118 -0
- package/dist/core/links/corpus.js.map +1 -0
- package/dist/core/links/findings.js +110 -0
- package/dist/core/links/findings.js.map +1 -0
- package/dist/core/links/parse.js +265 -0
- package/dist/core/links/parse.js.map +1 -0
- package/dist/core/mcp/argv.js +212 -0
- package/dist/core/mcp/argv.js.map +1 -0
- package/dist/core/mcp/author-tools.js +73 -0
- package/dist/core/mcp/author-tools.js.map +1 -0
- package/dist/core/mcp/framing.js +46 -0
- package/dist/core/mcp/framing.js.map +1 -0
- package/dist/core/mcp/protocol.js +280 -0
- package/dist/core/mcp/protocol.js.map +1 -0
- package/dist/core/mcp/tools.js +324 -0
- package/dist/core/mcp/tools.js.map +1 -0
- package/dist/core/obligations/obligations.js +106 -0
- package/dist/core/obligations/obligations.js.map +1 -0
- package/dist/core/openapi/baseline/gate.js +207 -0
- package/dist/core/openapi/baseline/gate.js.map +1 -0
- package/dist/core/openapi/baseline/plan.js +142 -0
- package/dist/core/openapi/baseline/plan.js.map +1 -0
- package/dist/core/openapi/baseline/record.js +174 -0
- package/dist/core/openapi/baseline/record.js.map +1 -0
- package/dist/core/openapi/contract-text.js +33 -0
- package/dist/core/openapi/contract-text.js.map +1 -0
- package/dist/core/openapi/contract-tree.js +301 -0
- package/dist/core/openapi/contract-tree.js.map +1 -0
- package/dist/core/openapi/depth.js +136 -0
- package/dist/core/openapi/depth.js.map +1 -0
- package/dist/core/openapi/digest.js +239 -0
- package/dist/core/openapi/digest.js.map +1 -0
- package/dist/core/{openapi.js → openapi/doc.js} +54 -108
- package/dist/core/openapi/doc.js.map +1 -0
- package/dist/core/openapi/merge/components.js +199 -0
- package/dist/core/openapi/merge/components.js.map +1 -0
- package/dist/core/openapi/merge/error.js +16 -0
- package/dist/core/openapi/merge/error.js.map +1 -0
- package/dist/core/openapi/merge/markers.js +204 -0
- package/dist/core/openapi/merge/markers.js.map +1 -0
- package/dist/core/openapi/merge/merge.js +232 -0
- package/dist/core/openapi/merge/merge.js.map +1 -0
- package/dist/core/openapi/merge/pin.js +110 -0
- package/dist/core/openapi/merge/pin.js.map +1 -0
- package/dist/core/openspec/decide/capabilities.js +244 -0
- package/dist/core/openspec/decide/capabilities.js.map +1 -0
- package/dist/core/openspec/decide/dispositions.js +63 -0
- package/dist/core/openspec/decide/dispositions.js.map +1 -0
- package/dist/core/openspec/decide/renames.js +179 -0
- package/dist/core/openspec/decide/renames.js.map +1 -0
- package/dist/core/openspec/decide/verdict.js +84 -0
- package/dist/core/openspec/decide/verdict.js.map +1 -0
- package/dist/core/openspec/inventory.js +220 -0
- package/dist/core/openspec/inventory.js.map +1 -0
- package/dist/core/openspec/model/mapping.js +78 -0
- package/dist/core/openspec/model/mapping.js.map +1 -0
- package/dist/core/openspec/model/model.js +70 -0
- package/dist/core/openspec/model/model.js.map +1 -0
- package/dist/core/openspec/scan/changes.js +241 -0
- package/dist/core/openspec/scan/changes.js.map +1 -0
- package/dist/core/openspec/scan/config.js +191 -0
- package/dist/core/openspec/scan/config.js.map +1 -0
- package/dist/core/openspec/scan/shape.js +304 -0
- package/dist/core/openspec/scan/shape.js.map +1 -0
- package/dist/core/openspec/scan/walk.js +116 -0
- package/dist/core/openspec/scan/walk.js.map +1 -0
- package/dist/core/openspec/scan/workspace.js +71 -0
- package/dist/core/openspec/scan/workspace.js.map +1 -0
- package/dist/core/owners/codeowners.js +141 -0
- package/dist/core/owners/codeowners.js.map +1 -0
- package/dist/core/pack/features.js +120 -0
- package/dist/core/pack/features.js.map +1 -0
- package/dist/core/pack/joins.js +112 -0
- package/dist/core/pack/joins.js.map +1 -0
- package/dist/core/pack/living.js +157 -0
- package/dist/core/pack/living.js.map +1 -0
- package/dist/core/pack/pack.js +120 -0
- package/dist/core/pack/pack.js.map +1 -0
- package/dist/core/permissions/permissions.js +87 -0
- package/dist/core/permissions/permissions.js.map +1 -0
- package/dist/core/projection/api.js +84 -0
- package/dist/core/projection/api.js.map +1 -0
- package/dist/core/projection/arch-slice.js +63 -0
- package/dist/core/projection/arch-slice.js.map +1 -0
- package/dist/core/projection/events.js +34 -0
- package/dist/core/projection/events.js.map +1 -0
- package/dist/core/projection/introduced.js +14 -0
- package/dist/core/projection/introduced.js.map +1 -0
- package/dist/core/provenance/findings.js +244 -0
- package/dist/core/provenance/findings.js.map +1 -0
- package/dist/core/provenance/git.js +201 -0
- package/dist/core/provenance/git.js.map +1 -0
- package/dist/core/provenance/gitq/moves.js +139 -0
- package/dist/core/provenance/gitq/moves.js.map +1 -0
- package/dist/core/provenance/gitq/vouched-ancestor.js +179 -0
- package/dist/core/provenance/gitq/vouched-ancestor.js.map +1 -0
- package/dist/core/provenance/sample/scope.js +238 -0
- package/dist/core/provenance/sample/scope.js.map +1 -0
- package/dist/core/provenance/sample/sections.js +61 -0
- package/dist/core/provenance/sample/sections.js.map +1 -0
- package/dist/core/provenance/sources.js +280 -0
- package/dist/core/provenance/sources.js.map +1 -0
- package/dist/core/provenance/stamp.js +220 -0
- package/dist/core/provenance/stamp.js.map +1 -0
- package/dist/core/provenance/walk.js +157 -0
- package/dist/core/provenance/walk.js.map +1 -0
- package/dist/core/repo/authored/paths.js +210 -0
- package/dist/core/repo/authored/paths.js.map +1 -0
- package/dist/core/repo/entries.js +126 -0
- package/dist/core/repo/entries.js.map +1 -0
- package/dist/core/repo/paths.js +322 -0
- package/dist/core/repo/paths.js.map +1 -0
- package/dist/core/repo/repo.js +308 -0
- package/dist/core/repo/repo.js.map +1 -0
- package/dist/core/repo/service-target.js +153 -0
- package/dist/core/repo/service-target.js.map +1 -0
- package/dist/core/repo/state.js +58 -0
- package/dist/core/repo/state.js.map +1 -0
- package/dist/core/repo/tree/find.js +61 -0
- package/dist/core/repo/tree/find.js.map +1 -0
- package/dist/core/repo/tree/fs.js +90 -0
- package/dist/core/repo/tree/fs.js.map +1 -0
- package/dist/core/repo/tree/marker.js +61 -0
- package/dist/core/repo/tree/marker.js.map +1 -0
- package/dist/core/repo/tree/render/body.js +258 -0
- package/dist/core/repo/tree/render/body.js.map +1 -0
- package/dist/core/repo/tree/render/projects.js +182 -0
- package/dist/core/repo/tree/render/projects.js.map +1 -0
- package/dist/core/repo/tree/render/service/header.js +125 -0
- package/dist/core/repo/tree/render/service/header.js.map +1 -0
- package/dist/core/repo/tree/render/service/peers.js +28 -0
- package/dist/core/repo/tree/render/service/peers.js.map +1 -0
- package/dist/core/repo/tree/render/service/view-id.js +67 -0
- package/dist/core/repo/tree/render/service/view-id.js.map +1 -0
- package/dist/core/repo/tree/render/service/views.js +78 -0
- package/dist/core/repo/tree/render/service/views.js.map +1 -0
- package/dist/core/repo/tree/render/stale.js +42 -0
- package/dist/core/repo/tree/render/stale.js.map +1 -0
- package/dist/core/repo/tree/render/text.js +84 -0
- package/dist/core/repo/tree/render/text.js.map +1 -0
- package/dist/core/repo/tree/render/views.js +293 -0
- package/dist/core/repo/tree/render/views.js.map +1 -0
- package/dist/core/repo/tree/walk.js +255 -0
- package/dist/core/repo/tree/walk.js.map +1 -0
- package/dist/core/results.js +146 -14
- package/dist/core/results.js.map +1 -1
- package/dist/core/scaffold/landscape.js +239 -0
- package/dist/core/scaffold/landscape.js.map +1 -0
- package/dist/core/scaffold/legacy.js +271 -0
- package/dist/core/scaffold/legacy.js.map +1 -0
- package/dist/core/scaffold/readme.js +84 -0
- package/dist/core/scaffold/readme.js.map +1 -0
- package/dist/core/staging/commit.js +252 -0
- package/dist/core/staging/commit.js.map +1 -0
- package/dist/core/staging/interrupted.js +96 -0
- package/dist/core/staging/interrupted.js.map +1 -0
- package/dist/core/staging/lock.js +268 -0
- package/dist/core/staging/lock.js.map +1 -0
- package/dist/core/staging/recovery/finding.js +35 -0
- package/dist/core/staging/recovery/finding.js.map +1 -0
- package/dist/core/staging/recovery/intent.js +95 -0
- package/dist/core/staging/recovery/intent.js.map +1 -0
- package/dist/core/staging/recovery/recover.js +204 -0
- package/dist/core/staging/recovery/recover.js.map +1 -0
- package/dist/core/staging/recovery/residue.js +62 -0
- package/dist/core/staging/recovery/residue.js.map +1 -0
- package/dist/core/staging/snapshot/manifest.js +188 -0
- package/dist/core/staging/snapshot/manifest.js.map +1 -0
- package/dist/core/staging/snapshot/snapshot.js +196 -0
- package/dist/core/staging/snapshot/snapshot.js.map +1 -0
- package/dist/core/staging/txn/forward.js +181 -0
- package/dist/core/staging/txn/forward.js.map +1 -0
- package/dist/core/staging/txn/journal.js +139 -0
- package/dist/core/staging/txn/journal.js.map +1 -0
- package/dist/core/staging/txn/transaction.js +75 -0
- package/dist/core/staging/txn/transaction.js.map +1 -0
- package/dist/core/staging/writes.js +113 -0
- package/dist/core/staging/writes.js.map +1 -0
- package/dist/core/status/actions/execution.js +60 -0
- package/dist/core/status/actions/execution.js.map +1 -0
- package/dist/core/status/contracts.js +126 -0
- package/dist/core/status/contracts.js.map +1 -0
- package/dist/core/status/feature/artifacts.js +196 -0
- package/dist/core/status/feature/artifacts.js.map +1 -0
- package/dist/core/status/feature/feature.js +214 -0
- package/dist/core/status/feature/feature.js.map +1 -0
- package/dist/core/status/feature/next.js +163 -0
- package/dist/core/status/feature/next.js.map +1 -0
- package/dist/core/status/feature/state.js +21 -0
- package/dist/core/status/feature/state.js.map +1 -0
- package/dist/core/status/feature/words.js +96 -0
- package/dist/core/status/feature/words.js.map +1 -0
- package/dist/core/status/fleet/fleet.js +216 -0
- package/dist/core/status/fleet/fleet.js.map +1 -0
- package/dist/core/status/fleet/next.js +302 -0
- package/dist/core/status/fleet/next.js.map +1 -0
- package/dist/core/status/interrupted.js +97 -0
- package/dist/core/status/interrupted.js.map +1 -0
- package/dist/core/status/report.js +31 -0
- package/dist/core/status/report.js.map +1 -0
- package/dist/core/status/scan.js +41 -0
- package/dist/core/status/scan.js.map +1 -0
- package/dist/core/status/verification.js +216 -0
- package/dist/core/status/verification.js.map +1 -0
- package/dist/core/tasks/packet.js +199 -0
- package/dist/core/tasks/packet.js.map +1 -0
- package/dist/core/tasks/record.js +43 -0
- package/dist/core/tasks/record.js.map +1 -0
- package/dist/core/tasks/sources.js +181 -0
- package/dist/core/tasks/sources.js.map +1 -0
- package/dist/core/tasks/stamps.js +76 -0
- package/dist/core/tasks/stamps.js.map +1 -0
- package/dist/core/tasks/unit.js +0 -0
- package/dist/core/tasks/unit.js.map +1 -0
- package/dist/core/usecases/capability.js +166 -0
- package/dist/core/usecases/capability.js.map +1 -0
- package/dist/core/usecases/delta/claims.js +140 -0
- package/dist/core/usecases/delta/claims.js.map +1 -0
- package/dist/core/usecases/delta/flows.js +101 -0
- package/dist/core/usecases/delta/flows.js.map +1 -0
- package/dist/core/usecases/delta/modified.js +315 -0
- package/dist/core/usecases/delta/modified.js.map +1 -0
- package/dist/core/usecases/delta/overlay.js +76 -0
- package/dist/core/usecases/delta/overlay.js.map +1 -0
- package/dist/core/usecases/fleet.js +296 -0
- package/dist/core/usecases/fleet.js.map +1 -0
- package/dist/core/usecases/grade/capability-tag.js +93 -0
- package/dist/core/usecases/grade/capability-tag.js.map +1 -0
- package/dist/core/usecases/grade/feature.js +88 -0
- package/dist/core/usecases/grade/feature.js.map +1 -0
- package/dist/core/usecases/grade/requirement-tag.js +94 -0
- package/dist/core/usecases/grade/requirement-tag.js.map +1 -0
- package/dist/core/usecases/grade/steps.js +266 -0
- package/dist/core/usecases/grade/steps.js.map +1 -0
- package/dist/core/usecases/grade/usecases.js +112 -0
- package/dist/core/usecases/grade/usecases.js.map +1 -0
- package/dist/core/usecases/operations.js +123 -0
- package/dist/core/usecases/operations.js.map +1 -0
- package/dist/core/usecases/place.js +44 -0
- package/dist/core/usecases/place.js.map +1 -0
- package/dist/core/usecases/service/exclude.js +119 -0
- package/dist/core/usecases/service/exclude.js.map +1 -0
- package/dist/core/usecases/service/flows.js +164 -0
- package/dist/core/usecases/service/flows.js.map +1 -0
- package/dist/core/usecases/suites/participants.js +83 -0
- package/dist/core/usecases/suites/participants.js.map +1 -0
- package/dist/core/usecases/suites/suites.js +45 -0
- package/dist/core/usecases/suites/suites.js.map +1 -0
- package/dist/core/usecases/touch.js +101 -0
- package/dist/core/usecases/touch.js.map +1 -0
- package/dist/core/verify/answers.js +180 -0
- package/dist/core/verify/answers.js.map +1 -0
- package/dist/core/verify/build.js +170 -0
- package/dist/core/verify/build.js.map +1 -0
- package/dist/core/verify/checklist.js +259 -0
- package/dist/core/verify/checklist.js.map +1 -0
- package/dist/core/verify/claims/identity.js +61 -0
- package/dist/core/verify/claims/identity.js.map +1 -0
- package/dist/core/verify/cross/diff.js +97 -0
- package/dist/core/verify/cross/diff.js.map +1 -0
- package/dist/core/verify/evidence/contract.js +169 -0
- package/dist/core/verify/evidence/contract.js.map +1 -0
- package/dist/core/verify/location.js +67 -0
- package/dist/core/verify/location.js.map +1 -0
- package/dist/core/verify/pins/lint.js +158 -0
- package/dist/core/verify/pins/lint.js.map +1 -0
- package/dist/core/verify/pins/pin.js +95 -0
- package/dist/core/verify/pins/pin.js.map +1 -0
- package/dist/core/verify/read/file.js +224 -0
- package/dist/core/verify/read/file.js.map +1 -0
- package/dist/core/verify/read/shape.js +169 -0
- package/dist/core/verify/read/shape.js.map +1 -0
- package/dist/core/verify/read/union.js +105 -0
- package/dist/core/verify/read/union.js.map +1 -0
- package/dist/core/verify/record.js +165 -0
- package/dist/core/verify/record.js.map +1 -0
- package/dist/core/verify/store/commit.js +99 -0
- package/dist/core/verify/store/commit.js.map +1 -0
- package/dist/core/verify/store/render.js +61 -0
- package/dist/core/verify/store/render.js.map +1 -0
- package/dist/core/vocabulary/health.js +91 -0
- package/dist/core/vocabulary/health.js.map +1 -0
- package/dist/core/vocabulary/issue.js +59 -0
- package/dist/core/vocabulary/issue.js.map +1 -0
- package/dist/core/vocabulary/maturity.js +216 -0
- package/dist/core/vocabulary/maturity.js.map +1 -0
- package/dist/core/vocabulary/report.js +90 -0
- package/dist/core/vocabulary/report.js.map +1 -0
- package/dist/core/vocabulary/steps.js +266 -0
- package/dist/core/vocabulary/steps.js.map +1 -0
- package/dist/core/workspace/discover.js +239 -0
- package/dist/core/workspace/discover.js.map +1 -0
- package/dist/core/workspace/render.js +52 -0
- package/dist/core/workspace/render.js.map +1 -0
- package/examples/README.md +232 -0
- package/examples/docs/architecture/adrs/0001-transactional-outbox.md +33 -0
- package/examples/docs/architecture/capabilities.yaml +31 -0
- package/examples/docs/architecture/landscape.likec4 +336 -0
- package/examples/docs/architecture/obligations.yaml +23 -0
- package/examples/docs/architecture/permissions.yaml +50 -0
- package/examples/docs/architecture/services.likec4 +70 -0
- package/examples/docs/architecture/subsystems.likec4 +18 -0
- package/examples/docs/architecture/usecases/order-notification.likec4 +74 -0
- package/examples/docs/capabilities/checkout/spec.md +55 -0
- package/examples/docs/capabilities/identity/tokens/spec.md +42 -0
- package/examples/docs/capabilities/order-notifications/spec.md +43 -0
- package/examples/docs/features/FEAT-101-payment-splitting/adrs/0001-dedicated-split-service.md +18 -0
- package/examples/docs/features/FEAT-101-payment-splitting/delta.likec4 +94 -0
- package/examples/docs/features/FEAT-101-payment-splitting/intent.md +44 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/checkout-web/spec.md +21 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-service/asyncapi.yaml +132 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-service/spec.md +36 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/arch.spec.md +40 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/openapi.yaml +116 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/spec.md +55 -0
- package/examples/docs/features/FEAT-112-retire-order-v1/intent.md +35 -0
- package/examples/docs/features/FEAT-112-retire-order-v1/specs/order-service/openapi.yaml +31 -0
- package/examples/docs/features/FEAT-112-retire-order-v1/specs/order-service/spec.md +17 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/architecture/landscape.likec4 +253 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/services/order-service/spec.md +121 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/services/payment-service/openapi.yaml +111 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/services/payment-service/spec.md +58 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/manifest.json +32 -0
- package/examples/docs/features/archive/FEAT-088-refunds/adrs/0001-refunds-stay-in-payment-service.md +26 -0
- package/examples/docs/features/archive/FEAT-088-refunds/delta.likec4 +28 -0
- package/examples/docs/features/archive/FEAT-088-refunds/intent.md +26 -0
- package/examples/docs/features/archive/FEAT-088-refunds/specs/order-service/spec.md +37 -0
- package/examples/docs/features/archive/FEAT-088-refunds/specs/payment-service/openapi.yaml +73 -0
- package/examples/docs/features/archive/FEAT-088-refunds/specs/payment-service/spec.md +23 -0
- package/examples/docs/features/archive/FEAT-088-refunds/verification.yaml +76 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/architecture/landscape.likec4 +275 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/payment-service/asyncapi.yaml +96 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/payment-service/spec.md +82 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/platform/notification-service/asyncapi.yaml +164 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/platform/notification-service/spec.md +91 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/manifest.json +46 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/delta.likec4 +36 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/intent.md +22 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/scenario-report.json +10 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/notification-service/asyncapi.yaml +208 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/notification-service/spec.md +24 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/payment-service/asyncapi.yaml +137 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/payment-service/spec.md +31 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/verification.yaml +84 -0
- package/examples/docs/glossary/order.md +15 -0
- package/examples/docs/glossary/payments/authorization.md +14 -0
- package/examples/docs/likec4.config.json +8 -0
- package/examples/docs/loam.json +3 -0
- package/examples/docs/services/checkout-web/model.likec4 +92 -0
- package/examples/docs/services/checkout-web/spec.md +91 -0
- package/examples/docs/services/checkout-web/ui/pages/checkout.page.yaml +40 -0
- package/examples/docs/services/checkout-web/ui/pages/order-status.page.yaml +24 -0
- package/examples/docs/services/checkout-web/ui/pages/split-payment.page.yaml +26 -0
- package/examples/docs/services/order-service/adrs/0001-orchestrated-order-lifecycle.md +52 -0
- package/examples/docs/services/order-service/arch.spec.md +134 -0
- package/examples/docs/services/order-service/asyncapi.yaml +109 -0
- package/examples/docs/services/order-service/health.yaml +57 -0
- package/examples/docs/services/order-service/model.likec4 +126 -0
- package/examples/docs/services/order-service/openapi.yaml +257 -0
- package/examples/docs/services/order-service/runbook.md +62 -0
- package/examples/docs/services/order-service/spec.md +134 -0
- package/examples/docs/services/payment-service/adrs/0001-payments-outbox.md +18 -0
- package/examples/docs/services/payment-service/adrs/0002-idempotency-keys-on-authorization.md +27 -0
- package/examples/docs/services/payment-service/arch.spec.md +76 -0
- package/examples/docs/services/payment-service/asyncapi.yaml +130 -0
- package/examples/docs/services/payment-service/health.yaml +39 -0
- package/examples/docs/services/payment-service/model.likec4 +68 -0
- package/examples/docs/services/payment-service/openapi.yaml +151 -0
- package/examples/docs/services/payment-service/runbook.md +37 -0
- package/examples/docs/services/payment-service/spec.md +88 -0
- package/examples/docs/services/platform/identity-service/adrs/0001-token-introspection-over-local-validation.md +60 -0
- package/examples/docs/services/platform/identity-service/arch.spec.md +120 -0
- package/examples/docs/services/platform/identity-service/health.yaml +70 -0
- package/examples/docs/services/platform/identity-service/model.likec4 +81 -0
- package/examples/docs/services/platform/identity-service/openapi.yaml +197 -0
- package/examples/docs/services/platform/identity-service/runbook.md +95 -0
- package/examples/docs/services/platform/identity-service/spec.md +119 -0
- package/examples/docs/services/platform/notification-service/asyncapi.yaml +200 -0
- package/examples/docs/services/platform/notification-service/health.yaml +40 -0
- package/examples/docs/services/platform/notification-service/model.likec4 +97 -0
- package/examples/docs/services/platform/notification-service/runbook.md +48 -0
- package/examples/docs/services/platform/notification-service/spec.md +112 -0
- package/examples/docs/services/platform/subsystem.yaml +2 -0
- package/examples/fleet.yaml +57 -0
- package/package.json +19 -6
- package/dist/commands/adopt.js +0 -240
- package/dist/commands/adopt.js.map +0 -1
- package/dist/commands/archive.js +0 -1313
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/delta.js +0 -388
- package/dist/commands/delta.js.map +0 -1
- package/dist/commands/docs-repo-gate.js.map +0 -1
- package/dist/commands/format.js +0 -17
- package/dist/commands/format.js.map +0 -1
- package/dist/commands/gherkin.js +0 -309
- package/dist/commands/gherkin.js.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.js +0 -295
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/migrate-openspec.js +0 -950
- package/dist/commands/migrate-openspec.js.map +0 -1
- package/dist/commands/new.js +0 -413
- package/dist/commands/new.js.map +0 -1
- package/dist/commands/rebase.js +0 -356
- package/dist/commands/rebase.js.map +0 -1
- package/dist/commands/show.js +0 -320
- package/dist/commands/show.js.map +0 -1
- package/dist/commands/status.js +0 -262
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/unarchive.js +0 -317
- package/dist/commands/unarchive.js.map +0 -1
- package/dist/commands/validate.js +0 -1773
- package/dist/commands/validate.js.map +0 -1
- package/dist/commands/verify.js +0 -775
- package/dist/commands/verify.js.map +0 -1
- package/dist/commands/vouch.js +0 -421
- package/dist/commands/vouch.js.map +0 -1
- package/dist/core/agent.js +0 -2173
- package/dist/core/agent.js.map +0 -1
- package/dist/core/agents-stamp.js.map +0 -1
- package/dist/core/arch.js +0 -130
- package/dist/core/arch.js.map +0 -1
- package/dist/core/asyncapi.js +0 -253
- package/dist/core/asyncapi.js.map +0 -1
- package/dist/core/brief.js +0 -755
- package/dist/core/brief.js.map +0 -1
- package/dist/core/coherence.js +0 -577
- package/dist/core/coherence.js.map +0 -1
- package/dist/core/concurrency.js.map +0 -1
- package/dist/core/config.js.map +0 -1
- package/dist/core/delta.js +0 -476
- package/dist/core/delta.js.map +0 -1
- package/dist/core/dependencies.js +0 -356
- package/dist/core/dependencies.js.map +0 -1
- package/dist/core/doctor.js +0 -596
- package/dist/core/doctor.js.map +0 -1
- package/dist/core/document-bytes.js.map +0 -1
- package/dist/core/explore.js +0 -225
- package/dist/core/explore.js.map +0 -1
- package/dist/core/frontmatter.js.map +0 -1
- package/dist/core/gherkin.js +0 -463
- package/dist/core/gherkin.js.map +0 -1
- package/dist/core/health.js +0 -67
- package/dist/core/health.js.map +0 -1
- package/dist/core/ids.js +0 -122
- package/dist/core/ids.js.map +0 -1
- package/dist/core/issue.js +0 -9
- package/dist/core/issue.js.map +0 -1
- package/dist/core/json.js +0 -74
- package/dist/core/json.js.map +0 -1
- package/dist/core/likec4.js +0 -489
- package/dist/core/likec4.js.map +0 -1
- package/dist/core/maturity.js +0 -66
- package/dist/core/maturity.js.map +0 -1
- package/dist/core/openapi-merge.js +0 -552
- package/dist/core/openapi-merge.js.map +0 -1
- package/dist/core/openapi.js.map +0 -1
- package/dist/core/openspec-inventory.js +0 -1440
- package/dist/core/openspec-inventory.js.map +0 -1
- package/dist/core/path-safety.js.map +0 -1
- package/dist/core/provenance.js +0 -787
- package/dist/core/provenance.js.map +0 -1
- package/dist/core/records.js.map +0 -1
- package/dist/core/repo.js +0 -438
- package/dist/core/repo.js.map +0 -1
- package/dist/core/report.js +0 -47
- package/dist/core/report.js.map +0 -1
- package/dist/core/spec.js +0 -505
- package/dist/core/spec.js.map +0 -1
- package/dist/core/staging.js +0 -890
- package/dist/core/staging.js.map +0 -1
- package/dist/core/status.js +0 -1132
- package/dist/core/status.js.map +0 -1
- package/dist/core/steps.js +0 -72
- package/dist/core/steps.js.map +0 -1
- package/dist/core/verify.js +0 -807
- package/dist/core/verify.js.map +0 -1
- package/dist/core/version.js.map +0 -1
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { featureChecklist } from "../verify/checklist.js";
|
|
2
|
+
import { answering, readVerificationState } from "../verify/read/file.js";
|
|
3
|
+
import { attestedNotice, confirmedProvenance, tallyRecord, verificationVerdict, } from "../verify/record.js";
|
|
4
|
+
/**
|
|
5
|
+
* Is the done-check discharged? `verificationVerdict`'s answer and nobody
|
|
6
|
+
* else's — status re-deriving it would be a fourth place the words "verified"
|
|
7
|
+
* are defined, and the day one of them changed (a scenario claim on an agent's
|
|
8
|
+
* word stopped counting) the reader's copy would be the one still saying yes.
|
|
9
|
+
* `attested` is deliberately NOT `done` here: it is complete work resting on an
|
|
10
|
+
* assertion, which is what `ready` has always meant — the document is right and
|
|
11
|
+
* the world has not caught up.
|
|
12
|
+
*/
|
|
13
|
+
export function fullyVerified(v) {
|
|
14
|
+
return v.verdict === "verified";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The record's own rung. `stale` and `unreadable` are `draft` because both mean
|
|
18
|
+
* the file on disk is the thing to fix; unconfirmed claims are `ready` because
|
|
19
|
+
* the file is fine and the answer lives in the code.
|
|
20
|
+
*
|
|
21
|
+
* All four states are spelled, `recorded` included, so the `never` below fails
|
|
22
|
+
* the build rather than the reader: a fifth record state added to
|
|
23
|
+
* {@link VerificationState} would otherwise fall through into the last branch
|
|
24
|
+
* and be graded by `fullyVerified` alone — silently answering `ready` about a
|
|
25
|
+
* record whose new state nobody here has decided a rung for.
|
|
26
|
+
*/
|
|
27
|
+
export function verificationStatus(v) {
|
|
28
|
+
if (v.state === "absent")
|
|
29
|
+
return "missing";
|
|
30
|
+
if (v.state === "unreadable" || v.state === "stale")
|
|
31
|
+
return "draft";
|
|
32
|
+
if (v.state === "recorded")
|
|
33
|
+
return fullyVerified(v) ? "done" : "ready";
|
|
34
|
+
const unreachable = v.state;
|
|
35
|
+
throw new Error(`verificationStatus: no rung for verification state '${String(unreachable)}'`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Read the record and, only when there is one, ask whether it still answers
|
|
39
|
+
* this feature. The checklist is derived on demand and never speculatively: it
|
|
40
|
+
* loads the delta into a LikeC4 workspace, and paying that in order to print
|
|
41
|
+
* "no record" is the cost `list` refused for its verification column.
|
|
42
|
+
*
|
|
43
|
+
* An archived feature's record is frozen history — archive merged its
|
|
44
|
+
* operations into the living contract, so a re-derived checklist can only
|
|
45
|
+
* mismatch, and calling it stale would slander every feature that shipped.
|
|
46
|
+
* What it CAN be held to is the checklist archive captured as it merged, and
|
|
47
|
+
* that is `grading.shipped`'s: a record answering an older checklist than the
|
|
48
|
+
* one the feature shipped with is stale, archived or not — the gap `gate
|
|
49
|
+
* --since` used to let through, since archiving a feature whose record had
|
|
50
|
+
* gone stale made it read `verified` again.
|
|
51
|
+
*/
|
|
52
|
+
export async function verificationState(docsDir, feature, grading = {}) {
|
|
53
|
+
const empty = {
|
|
54
|
+
recorded: null,
|
|
55
|
+
verdict: "unverified",
|
|
56
|
+
claims: 0,
|
|
57
|
+
confirmed: 0,
|
|
58
|
+
unconfirmed: 0,
|
|
59
|
+
unanswered: 0,
|
|
60
|
+
attested: 0,
|
|
61
|
+
answered: { runner: 0, "external-runner": 0, agent: 0 },
|
|
62
|
+
};
|
|
63
|
+
const read = await readVerificationState(feature.dir);
|
|
64
|
+
if (read.state === "absent")
|
|
65
|
+
return { state: { state: "absent", ...empty }, notice: null };
|
|
66
|
+
// A record whose summary contradicts its own claims is refused by the reader
|
|
67
|
+
// itself (`verify.record-miscounted`), so this branch reports zeros rather
|
|
68
|
+
// than salvaging counts from a file nobody can say which half of was edited.
|
|
69
|
+
// Where there ARE counts they are `tallyRecord`'s, never the summary's — the
|
|
70
|
+
// block used to be copied out verbatim, and a record `verify --json` calls
|
|
71
|
+
// unverified read here as "11 of 11 confirmed".
|
|
72
|
+
if (read.state === "unreadable")
|
|
73
|
+
return { state: { state: "unreadable", ...empty }, notice: null };
|
|
74
|
+
// The checklist the record is held to: the one asked now for an in-flight
|
|
75
|
+
// feature, the one captured at the merge for an archived one when the caller
|
|
76
|
+
// asks for that, none at all otherwise (frozen history). The files are then
|
|
77
|
+
// added up AGAINST it — the per-service files that answered it are the ones
|
|
78
|
+
// that count (`core/verify/read/union.ts`) — without reading them twice.
|
|
79
|
+
const against = feature.archived
|
|
80
|
+
? (grading.shipped ?? null)
|
|
81
|
+
: (await featureChecklist(docsDir, feature.dir, feature.id, grading.fleet)).digest;
|
|
82
|
+
const v = against === null ? read.verification : (answering(read.files, against) ?? read.verification);
|
|
83
|
+
const stale = against !== null && against !== v.checklist;
|
|
84
|
+
const tally = tallyRecord(v);
|
|
85
|
+
return {
|
|
86
|
+
state: {
|
|
87
|
+
state: stale ? "stale" : "recorded",
|
|
88
|
+
recorded: v.recorded,
|
|
89
|
+
verdict: verificationVerdict(tally, stale),
|
|
90
|
+
claims: tally.claims,
|
|
91
|
+
confirmed: tally.confirmed,
|
|
92
|
+
unconfirmed: tally.unconfirmed,
|
|
93
|
+
unanswered: tally.unanswered,
|
|
94
|
+
attested: tally.attested,
|
|
95
|
+
answered: confirmedProvenance(v.claims),
|
|
96
|
+
},
|
|
97
|
+
notice: attestedNotice(v.claims, feature.id),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export function verifyStep(id, verification, view) {
|
|
101
|
+
const { artifacts = [], services, boundService } = view;
|
|
102
|
+
const record = artifacts.find((a) => a.id === "verification");
|
|
103
|
+
const open = verification.unconfirmed + verification.unanswered;
|
|
104
|
+
// The code is spelled at each call site as a `code:` property rather than
|
|
105
|
+
// passed positionally, and the helper takes the whole pair: test/codes-drift.ts
|
|
106
|
+
// collects the vocabulary by reading the source for that exact shape, so a
|
|
107
|
+
// factory with a `code` PARAMETER would hide every code it emits from the one
|
|
108
|
+
// guard that checks they are documented. Same DRY-ness, visible to the guard.
|
|
109
|
+
const step = (s) => [
|
|
110
|
+
{ ...s, command: `loam verify ${id} --json`, artifact: "verification", path: record.path },
|
|
111
|
+
];
|
|
112
|
+
if (record.status === "blocked") {
|
|
113
|
+
return step({
|
|
114
|
+
code: "next.verify",
|
|
115
|
+
statement: `${id} has nothing to derive a checklist from yet — write the delta and the requirement deltas first.`,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
if (verification.state === "absent") {
|
|
119
|
+
return step({
|
|
120
|
+
code: "next.verify",
|
|
121
|
+
statement: `Nothing has been verified for ${id} — derive the checklist and answer every claim with evidence.`,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (verification.state === "unreadable") {
|
|
125
|
+
return step({
|
|
126
|
+
code: "next.verify",
|
|
127
|
+
// Never "or delete it": the record may be the one-file verification.yaml
|
|
128
|
+
// holding other services' attestations, and the command names the file
|
|
129
|
+
// that actually failed together with the repair that is safe for it.
|
|
130
|
+
statement: `${id}'s record at ${record.path} does not read as a record — the command names the file that failed and its safe repair; never delete a file other services' attestations may be in. Nothing will overwrite it while it is unreadable.`,
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
if (verification.state === "stale") {
|
|
134
|
+
return step({
|
|
135
|
+
code: "next.verify",
|
|
136
|
+
statement: `${id} moved after ${record.path} was written — the record answers a checklist that is no longer the one being asked.`,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
if (open > 0) {
|
|
140
|
+
// The recording form only when this repository is one of the services that
|
|
141
|
+
// owes an answer: `verify --record --service` binds the answers to THIS
|
|
142
|
+
// repo's HEAD and refuses anywhere else, so handing a docs-repo reader that
|
|
143
|
+
// command would name a step it cannot take.
|
|
144
|
+
return boundService !== undefined && services.includes(boundService)
|
|
145
|
+
? [
|
|
146
|
+
{
|
|
147
|
+
code: "next.attest-service",
|
|
148
|
+
statement: `${open} of ${verification.claims} claim(s) on ${id} are open, and this repository is '${boundService}' — ` +
|
|
149
|
+
`answer the ones filed under it, bound to this commit; the rest belong to their own repositories.`,
|
|
150
|
+
command: `loam verify ${id} --record answers.json --service ${boundService}`,
|
|
151
|
+
artifact: "verification",
|
|
152
|
+
service: boundService,
|
|
153
|
+
path: record.path,
|
|
154
|
+
},
|
|
155
|
+
]
|
|
156
|
+
: step({
|
|
157
|
+
code: "next.verify-unconfirmed",
|
|
158
|
+
statement: `${open} of ${verification.claims} claim(s) on ${id} are not confirmed — close them from each affected service's own repository.`,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
if (verification.claims === 0) {
|
|
162
|
+
return step({
|
|
163
|
+
code: "next.verify",
|
|
164
|
+
statement: `${record.path} answers no claims at all — nothing was asked, so nothing was checked; re-derive the checklist and see what this feature actually promises.`,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
if (verification.verdict === "attested") {
|
|
168
|
+
return [
|
|
169
|
+
{
|
|
170
|
+
code: "next.verify-attested",
|
|
171
|
+
statement: `${verification.attested} of ${id}'s scenario claim(s) are confirmed on an agent's word, not on a test run ` +
|
|
172
|
+
`(verify.scenario-attested) — answer them from a test report (a cucumber JSON report, or loam's runner-neutral ` +
|
|
173
|
+
`loamScenarioReport shape for any other runner), and the record stops resting on an assertion.`,
|
|
174
|
+
// The runner-neutral placeholder `verify.scenario-attested` itself
|
|
175
|
+
// suggests: a step that said "cucumber" alone told a fleet whose
|
|
176
|
+
// runner has no cucumber formatter that it had no route to `verified`.
|
|
177
|
+
command: `loam verify ${id} --results <report.json>`,
|
|
178
|
+
artifact: "verification",
|
|
179
|
+
path: record.path,
|
|
180
|
+
},
|
|
181
|
+
];
|
|
182
|
+
}
|
|
183
|
+
return [];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Where a test comes from. `loam gherkin` writes the .feature files whose green
|
|
187
|
+
* run is the only thing that may answer a `scenario.tested` claim, and it runs
|
|
188
|
+
* from the service's own repository — so the step exists wherever there are
|
|
189
|
+
* scenarios to generate from, and names the repository to run it in when that
|
|
190
|
+
* is not this one.
|
|
191
|
+
*/
|
|
192
|
+
export function testStep(id, verification, view) {
|
|
193
|
+
const { services, scans, boundService } = view;
|
|
194
|
+
if (fullyVerified(verification))
|
|
195
|
+
return [];
|
|
196
|
+
const withScenarios = [
|
|
197
|
+
...new Set(scans.filter((s) => s.scenarios > 0 && services.includes(s.service)).map((s) => s.service)),
|
|
198
|
+
];
|
|
199
|
+
if (withScenarios.length === 0)
|
|
200
|
+
return [];
|
|
201
|
+
const svc = boundService !== undefined && withScenarios.includes(boundService) ? boundService : withScenarios[0];
|
|
202
|
+
const here = svc === boundService;
|
|
203
|
+
return [
|
|
204
|
+
{
|
|
205
|
+
code: "next.generate-tests",
|
|
206
|
+
statement: `${id}'s delta for ${svc} carries scenarios that no test run has answered yet — generate the suite, then implement against it` +
|
|
207
|
+
(here
|
|
208
|
+
? "."
|
|
209
|
+
: `. \`loam gherkin\` writes into the service's own repository, so run it from ${svc}'s${withScenarios.length > 1 ? ` (and likewise for ${withScenarios.slice(1).join(", ")})` : ""}.`),
|
|
210
|
+
command: `loam gherkin ${id} --service ${svc}`,
|
|
211
|
+
artifact: "spec",
|
|
212
|
+
service: svc,
|
|
213
|
+
},
|
|
214
|
+
];
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../../src/core/status/verification.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EAGX,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAK7B;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,CAAoB;IAChD,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC;AAClC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,CAAoB;IACrD,IAAI,CAAC,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,CAAC,CAAC,KAAK,KAAK,YAAY,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IACpE,IAAI,CAAC,CAAC,KAAK,KAAK,UAAU;QAAE,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IACvE,MAAM,WAAW,GAAU,CAAC,CAAC,KAAK,CAAC;IACnC,MAAM,IAAI,KAAK,CAAC,uDAAuD,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AACjG,CAAC;AA0BD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAgB,EAChB,OAAqB,EACrB,OAAO,GAAiB,EAAE;IAE1B,MAAM,KAAK,GAAG;QACZ,QAAQ,EAAE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G,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACvG,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1C,MAAM,GAAG,GAAG,YAAY,KAAK,SAAS,IAAI,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAE,CAAC;IAClH,MAAM,IAAI,GAAG,GAAG,KAAK,YAAY,CAAC;IAClC,OAAO;QACL;YACE,IAAI,EAAE,qBAAqB;YAC3B,SAAS,EACP,GAAG,EAAE,gBAAgB,GAAG,sGAAsG;gBAC9H,CAAC,IAAI;oBACH,CAAC,CAAC,GAAG;oBACL,CAAC,CAAC,+EAA+E,GAAG,KAChF,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,sBAAsB,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAC1F,GAAG,CAAC;YACV,OAAO,EAAE,gBAAgB,EAAE,cAAc,GAAG,EAAE;YAC9C,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,GAAG;SACb;KACF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The verification record as `status` reads it: the rung the record stands on,\n * the projection of what it says, and the two `next[]` steps that discharge it\n * — where a test comes from, and what `loam verify` still wants answered.\n * Every verdict here is `core/verify/`'s own, re-read; nothing in this module is\n * a second definition of \"verified\".\n */\nimport type { FeatureEntry } from \"../repo/entries.js\";\nimport type { FleetContext } from \"../fleet-context.js\";\nimport { featureChecklist } from \"../verify/checklist.js\";\nimport { answering, readVerificationState } from \"../verify/read/file.js\";\nimport {\n attestedNotice,\n confirmedProvenance,\n tallyRecord,\n type VerificationVerdict,\n type VerifyNotice,\n verificationVerdict,\n} from \"../verify/record.js\";\nimport type { ArtifactState, ArtifactStatus, NextStep, VerificationState } from \"./report.js\";\nimport type { DeltaScan } from \"./scan.js\";\nimport type { DocsDir } from \"../kernel/ids/dirs.js\";\n\n/**\n * Is the done-check discharged? `verificationVerdict`'s answer and nobody\n * else's — status re-deriving it would be a fourth place the words \"verified\"\n * are defined, and the day one of them changed (a scenario claim on an agent's\n * word stopped counting) the reader's copy would be the one still saying yes.\n * `attested` is deliberately NOT `done` here: it is complete work resting on an\n * assertion, which is what `ready` has always meant — the document is right and\n * the world has not caught up.\n */\nexport function fullyVerified(v: VerificationState): boolean {\n return v.verdict === \"verified\";\n}\n\n/**\n * The record's own rung. `stale` and `unreadable` are `draft` because both mean\n * the file on disk is the thing to fix; unconfirmed claims are `ready` because\n * the file is fine and the answer lives in the code.\n *\n * All four states are spelled, `recorded` included, so the `never` below fails\n * the build rather than the reader: a fifth record state added to\n * {@link VerificationState} would otherwise fall through into the last branch\n * and be graded by `fullyVerified` alone — silently answering `ready` about a\n * record whose new state nobody here has decided a rung for.\n */\nexport function verificationStatus(v: VerificationState): ArtifactStatus {\n if (v.state === \"absent\") return \"missing\";\n if (v.state === \"unreadable\" || v.state === \"stale\") return \"draft\";\n if (v.state === \"recorded\") return fullyVerified(v) ? \"done\" : \"ready\";\n const unreachable: never = v.state;\n throw new Error(`verificationStatus: no rung for verification state '${String(unreachable)}'`);\n}\n\n/**\n * How a caller wants the record graded, beyond reading it.\n */\nexport interface StateGrading {\n /**\n * The invocation's read index, when the caller holds one. It reaches the\n * checklist derivation, whose enumerations and delta parse are memo hits\n * through it — the difference between one fleet walk per invocation and one\n * per feature for a caller grading several (`loam gate`'s check 3).\n */\n fleet?: FleetContext;\n /**\n * For an ARCHIVED feature only: the checklist digest `loam archive` captured\n * just before its merge (`readSnapshotChecklist`) — the question the feature\n * asked as it shipped, which a frozen record can still be graded against\n * without re-deriving anything. Only `loam gate --since` passes it, because\n * only the deploy question asks whether a record answered the feature that\n * SHIPPED; every other reader leaves it out and reads the record as frozen\n * history, as before. Null — an archive that captured none, by an older loam\n * or over a feature with no record then — is the frozen reading too.\n */\n shipped?: string | null;\n}\n\n/**\n * Read the record and, only when there is one, ask whether it still answers\n * this feature. The checklist is derived on demand and never speculatively: it\n * loads the delta into a LikeC4 workspace, and paying that in order to print\n * \"no record\" is the cost `list` refused for its verification column.\n *\n * An archived feature's record is frozen history — archive merged its\n * operations into the living contract, so a re-derived checklist can only\n * mismatch, and calling it stale would slander every feature that shipped.\n * What it CAN be held to is the checklist archive captured as it merged, and\n * that is `grading.shipped`'s: a record answering an older checklist than the\n * one the feature shipped with is stale, archived or not — the gap `gate\n * --since` used to let through, since archiving a feature whose record had\n * gone stale made it read `verified` again.\n */\nexport async function verificationState(\n docsDir: DocsDir,\n feature: FeatureEntry,\n grading: StateGrading = {},\n): Promise<{ state: VerificationState; notice: VerifyNotice | null }> {\n const empty = {\n recorded: null,\n verdict: \"unverified\" as VerificationVerdict,\n claims: 0,\n confirmed: 0,\n unconfirmed: 0,\n unanswered: 0,\n attested: 0,\n answered: { runner: 0, \"external-runner\": 0, agent: 0 },\n };\n const read = await readVerificationState(feature.dir);\n if (read.state === \"absent\") return { state: { state: \"absent\", ...empty }, notice: null };\n // A record whose summary contradicts its own claims is refused by the reader\n // itself (`verify.record-miscounted`), so this branch reports zeros rather\n // than salvaging counts from a file nobody can say which half of was edited.\n // Where there ARE counts they are `tallyRecord`'s, never the summary's — the\n // block used to be copied out verbatim, and a record `verify --json` calls\n // unverified read here as \"11 of 11 confirmed\".\n if (read.state === \"unreadable\") return { state: { state: \"unreadable\", ...empty }, notice: null };\n\n // The checklist the record is held to: the one asked now for an in-flight\n // feature, the one captured at the merge for an archived one when the caller\n // asks for that, none at all otherwise (frozen history). The files are then\n // added up AGAINST it — the per-service files that answered it are the ones\n // that count (`core/verify/read/union.ts`) — without reading them twice.\n const against = feature.archived\n ? (grading.shipped ?? null)\n : (await featureChecklist(docsDir, feature.dir, feature.id, grading.fleet)).digest;\n const v = against === null ? read.verification : (answering(read.files, against) ?? read.verification);\n const stale = against !== null && against !== v.checklist;\n const tally = tallyRecord(v);\n return {\n state: {\n state: stale ? \"stale\" : \"recorded\",\n recorded: v.recorded,\n verdict: verificationVerdict(tally, stale),\n claims: tally.claims,\n confirmed: tally.confirmed,\n unconfirmed: tally.unconfirmed,\n unanswered: tally.unanswered,\n attested: tally.attested,\n answered: confirmedProvenance(v.claims),\n },\n notice: attestedNotice(v.claims, feature.id),\n };\n}\n\n/**\n * The done-check step, or none. Four different situations reach `loam verify`\n * and they are not the same work — nothing recorded, a file that will not read,\n * a record the feature has moved out from under, and claims still open — so the\n * statement says which. The code splits only where the WORK splits: starting a\n * verification and finishing one are different jobs, and an agent that treats a\n * stale record as a finished one ships a feature nobody checked.\n */\n/** The narrowed view a step is written for: what to name, and to whom. */\nexport interface StepView {\n artifacts?: ArtifactState[];\n services: string[];\n /** The service this repository is bound to, when a command is standing in one. */\n boundService: string | undefined;\n}\n\nexport function verifyStep(id: string, verification: VerificationState, view: StepView): NextStep[] {\n const { artifacts = [], services, boundService } = view;\n const record = artifacts.find((a) => a.id === \"verification\")!;\n const open = verification.unconfirmed + verification.unanswered;\n // The code is spelled at each call site as a `code:` property rather than\n // passed positionally, and the helper takes the whole pair: test/codes-drift.ts\n // collects the vocabulary by reading the source for that exact shape, so a\n // factory with a `code` PARAMETER would hide every code it emits from the one\n // guard that checks they are documented. Same DRY-ness, visible to the guard.\n const step = (s: { code: string; statement: string }): NextStep[] => [\n { ...s, command: `loam verify ${id} --json`, artifact: \"verification\", path: record.path },\n ];\n\n if (record.status === \"blocked\") {\n return step({\n code: \"next.verify\",\n statement: `${id} has nothing to derive a checklist from yet — write the delta and the requirement deltas first.`,\n });\n }\n if (verification.state === \"absent\") {\n return step({\n code: \"next.verify\",\n statement: `Nothing has been verified for ${id} — derive the checklist and answer every claim with evidence.`,\n });\n }\n if (verification.state === \"unreadable\") {\n return step({\n code: \"next.verify\",\n // Never \"or delete it\": the record may be the one-file verification.yaml\n // holding other services' attestations, and the command names the file\n // that actually failed together with the repair that is safe for it.\n statement: `${id}'s record at ${record.path} does not read as a record — the command names the file that failed and its safe repair; never delete a file other services' attestations may be in. Nothing will overwrite it while it is unreadable.`,\n });\n }\n if (verification.state === \"stale\") {\n return step({\n code: \"next.verify\",\n statement: `${id} moved after ${record.path} was written — the record answers a checklist that is no longer the one being asked.`,\n });\n }\n if (open > 0) {\n // The recording form only when this repository is one of the services that\n // owes an answer: `verify --record --service` binds the answers to THIS\n // repo's HEAD and refuses anywhere else, so handing a docs-repo reader that\n // command would name a step it cannot take.\n return boundService !== undefined && services.includes(boundService)\n ? [\n {\n code: \"next.attest-service\",\n statement:\n `${open} of ${verification.claims} claim(s) on ${id} are open, and this repository is '${boundService}' — ` +\n `answer the ones filed under it, bound to this commit; the rest belong to their own repositories.`,\n command: `loam verify ${id} --record answers.json --service ${boundService}`,\n artifact: \"verification\",\n service: boundService,\n path: record.path,\n },\n ]\n : step({\n code: \"next.verify-unconfirmed\",\n statement: `${open} of ${verification.claims} claim(s) on ${id} are not confirmed — close them from each affected service's own repository.`,\n });\n }\n if (verification.claims === 0) {\n return step({\n code: \"next.verify\",\n statement: `${record.path} answers no claims at all — nothing was asked, so nothing was checked; re-derive the checklist and see what this feature actually promises.`,\n });\n }\n if (verification.verdict === \"attested\") {\n return [\n {\n code: \"next.verify-attested\",\n statement:\n `${verification.attested} of ${id}'s scenario claim(s) are confirmed on an agent's word, not on a test run ` +\n `(verify.scenario-attested) — answer them from a test report (a cucumber JSON report, or loam's runner-neutral ` +\n `loamScenarioReport shape for any other runner), and the record stops resting on an assertion.`,\n // The runner-neutral placeholder `verify.scenario-attested` itself\n // suggests: a step that said \"cucumber\" alone told a fleet whose\n // runner has no cucumber formatter that it had no route to `verified`.\n command: `loam verify ${id} --results <report.json>`,\n artifact: \"verification\",\n path: record.path,\n },\n ];\n }\n return [];\n}\n\n/**\n * Where a test comes from. `loam gherkin` writes the .feature files whose green\n * run is the only thing that may answer a `scenario.tested` claim, and it runs\n * from the service's own repository — so the step exists wherever there are\n * scenarios to generate from, and names the repository to run it in when that\n * is not this one.\n */\nexport function testStep(\n id: string,\n verification: VerificationState,\n view: { services: string[]; scans: DeltaScan[]; boundService: string | undefined },\n): NextStep[] {\n const { services, scans, boundService } = view;\n if (fullyVerified(verification)) return [];\n const withScenarios = [\n ...new Set(scans.filter((s) => s.scenarios > 0 && services.includes(s.service)).map((s) => s.service)),\n ];\n if (withScenarios.length === 0) return [];\n const svc = boundService !== undefined && withScenarios.includes(boundService) ? boundService : withScenarios[0]!;\n const here = svc === boundService;\n return [\n {\n code: \"next.generate-tests\",\n statement:\n `${id}'s delta for ${svc} carries scenarios that no test run has answered yet — generate the suite, then implement against it` +\n (here\n ? \".\"\n : `. \\`loam gherkin\\` writes into the service's own repository, so run it from ${svc}'s${\n withScenarios.length > 1 ? ` (and likewise for ${withScenarios.slice(1).join(\", \")})` : \"\"\n }.`),\n command: `loam gherkin ${id} --service ${svc}`,\n artifact: \"spec\",\n service: svc,\n },\n ];\n}\n"]}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The work packet: one feature's unit-of-work list, derived and never stored.
|
|
3
|
+
*
|
|
4
|
+
* It is a READ. Nothing here writes, nothing caches, and there is no state
|
|
5
|
+
* anywhere that says a unit is finished — done is "the unit no longer appears",
|
|
6
|
+
* which is what makes the list impossible to falsify by editing a checkbox. The
|
|
7
|
+
* inputs are the same documents `loam verify` derives its questions from
|
|
8
|
+
* (`core/verify/checklist.ts`), the same delta scans `loam status` reads, the
|
|
9
|
+
* record beside the feature, and — only when standing in the bound service repo
|
|
10
|
+
* — the stamps in the generated suite.
|
|
11
|
+
*
|
|
12
|
+
* Everything the packet reports is therefore re-derivable from the tree by
|
|
13
|
+
* anybody holding it, which is the property an agent orchestrating other agents
|
|
14
|
+
* actually needs: it can ask again and compare, rather than trusting a report.
|
|
15
|
+
*/
|
|
16
|
+
import { existsSync } from "node:fs";
|
|
17
|
+
import { readFile } from "node:fs/promises";
|
|
18
|
+
import { stripFrontmatter } from "../document/frontmatter.js";
|
|
19
|
+
import { repoPath } from "../envelope/json.js";
|
|
20
|
+
import { FleetContext } from "../fleet-context.js";
|
|
21
|
+
import { compareIds } from "../repo/entries.js";
|
|
22
|
+
import { featurePaths } from "../repo/paths.js";
|
|
23
|
+
import { featureChecklist } from "../verify/checklist.js";
|
|
24
|
+
import { readRecordView, settledClaims } from "./record.js";
|
|
25
|
+
import { readStamps } from "./stamps.js";
|
|
26
|
+
import { axisSize, describeUnits, readContracts, readDeltaAxes, scenarioSources, } from "./sources.js";
|
|
27
|
+
import { doneCheck, FRONTIER_LIMIT, isOpen, linkDependencies, sortUnits } from "./unit.js";
|
|
28
|
+
/** The step a claim-backed unit is waiting at. */
|
|
29
|
+
function stepFor(claim, stamps) {
|
|
30
|
+
if (claim.kind !== "scenario.tested")
|
|
31
|
+
return "implement";
|
|
32
|
+
// Only this repository's suite may be graded. Another service's tests live in
|
|
33
|
+
// another repository, and reporting `generate` for them would be a claim about
|
|
34
|
+
// a directory this run has never seen.
|
|
35
|
+
if (stamps.state !== "read" || stamps.service !== claim.subject)
|
|
36
|
+
return "implement";
|
|
37
|
+
return claim.digest !== undefined && stamps.digests.has(claim.digest) ? "implement" : "generate";
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The claim-backed units: every claim the record has not closed.
|
|
41
|
+
*
|
|
42
|
+
* The claim's own fields ride through verbatim — the task id IS the claim id,
|
|
43
|
+
* so a unit can be handed straight back to `loam verify` and two runs of
|
|
44
|
+
* `loam tasks` are diffable exactly as two checklists are.
|
|
45
|
+
*/
|
|
46
|
+
function claimUnits(claims, settled, stamps, sources) {
|
|
47
|
+
const out = [];
|
|
48
|
+
for (const claim of claims) {
|
|
49
|
+
if (settled.done.has(claim.id))
|
|
50
|
+
continue;
|
|
51
|
+
const source = sources.get(claim.id);
|
|
52
|
+
out.push({
|
|
53
|
+
id: claim.id,
|
|
54
|
+
kind: claim.kind,
|
|
55
|
+
subject: claim.subject,
|
|
56
|
+
at: settled.attested.has(claim.id) ? "attested" : stepFor(claim, stamps),
|
|
57
|
+
claim: claim.claim,
|
|
58
|
+
...(claim.digest === undefined ? {} : { digest: claim.digest }),
|
|
59
|
+
...(claim.operation === undefined ? {} : { operation: claim.operation }),
|
|
60
|
+
...(claim.token === undefined ? {} : { token: claim.token }),
|
|
61
|
+
dependsOn: [],
|
|
62
|
+
// The digest cross-check is the belt on the id join (`./sources.ts`): a
|
|
63
|
+
// source whose words hash to something else is somebody ELSE's
|
|
64
|
+
// Given/When/Then, and no source at all is the honest answer.
|
|
65
|
+
...(source !== undefined && source.digest === claim.digest ? { source: source.source } : {}),
|
|
66
|
+
done: { check: doneCheck(claim) },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The four standing review instructions, computed with this feature's own ids.
|
|
73
|
+
*
|
|
74
|
+
* They are on the payload rather than in the docs because the reviewer of a
|
|
75
|
+
* packet is usually another agent, and an agent that has to go fetch a protocol
|
|
76
|
+
* to learn how to check the work is an agent that will not. Each one names a
|
|
77
|
+
* failure that has actually happened: trusting a checkmark instead of
|
|
78
|
+
* re-deriving, taking one answer set on faith, hand-editing a generated suite
|
|
79
|
+
* (whose digests are what `--results` matches on), and implementing one half of
|
|
80
|
+
* a contract.
|
|
81
|
+
*/
|
|
82
|
+
function reviewNotes(feature, gherkinDir) {
|
|
83
|
+
return [
|
|
84
|
+
`re-derive, do not trust checkmarks: loam tasks ${feature} --json and compare open units against the implementer's claim`,
|
|
85
|
+
`cross-examine recorded answers: loam verify ${feature} --diff-answers <a.json> <b.json>`,
|
|
86
|
+
`generated suite is read-only: no edits under ${gherkinDir}/loam/, and step definitions must not paraphrase scenarios`,
|
|
87
|
+
"honour the contract in both directions: every expose[] operationId exists under exactly that id; every call[] op is actually called",
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
/** The operations this lens promises to expose, and the ones it promises to call. */
|
|
91
|
+
function contractTokens(claims, lens) {
|
|
92
|
+
const scoped = claims.filter((claim) => lens === null || claim.subject === lens);
|
|
93
|
+
const pick = (kind, field) => [...new Set(scoped.filter((c) => c.kind === kind).map((c) => c[field]).filter((v) => v !== undefined))].sort(compareIds);
|
|
94
|
+
return { expose: pick("api.exposes", "operation"), call: pick("c4.calls", "token") };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The lens the packet is actually cut to.
|
|
98
|
+
*
|
|
99
|
+
* An explicit lens wins. Without one, a run from a service repository is about
|
|
100
|
+
* THAT service whenever the feature touches it, because the stamps that tell
|
|
101
|
+
* `generate` from `implement` are read from this repository's suite alone
|
|
102
|
+
* (`./stamps.ts`): in a whole-feature view from here, every other service's
|
|
103
|
+
* scenario reads `implement` whatever its own suite holds — a verdict about a
|
|
104
|
+
* directory this run has never seen, printed beside one about a directory it
|
|
105
|
+
* has, in the same words. A feature that does not touch the bound service keeps
|
|
106
|
+
* the whole view, because narrowing to a service with nothing in it prints an
|
|
107
|
+
* empty packet, and an agent reads an empty packet as "nothing to do".
|
|
108
|
+
*
|
|
109
|
+
* Decided here rather than by the caller because "touches" is the packet's own
|
|
110
|
+
* service list, which includes a service only the C4 delta names — learning it
|
|
111
|
+
* first would cost the caller a second checklist derivation of the same delta.
|
|
112
|
+
*/
|
|
113
|
+
function lensOf(request, services) {
|
|
114
|
+
if (request.lens !== null)
|
|
115
|
+
return request.lens;
|
|
116
|
+
const bound = request.binding.service;
|
|
117
|
+
return bound !== undefined && services.includes(bound) ? bound : null;
|
|
118
|
+
}
|
|
119
|
+
export async function workPacket(request) {
|
|
120
|
+
const { docsDir, feature, binding } = request;
|
|
121
|
+
// One read index for the whole derivation: the checklist, the delta axes and
|
|
122
|
+
// the architecture parse all reach the same documents, and without a shared
|
|
123
|
+
// context each would be its own fleet walk.
|
|
124
|
+
const context = new FleetContext();
|
|
125
|
+
const checklist = await featureChecklist(docsDir, feature.dir, feature.id, context);
|
|
126
|
+
const view = await readRecordView(feature.dir, checklist);
|
|
127
|
+
const settled = settledClaims(view);
|
|
128
|
+
const axes = await readDeltaAxes(docsDir, feature.dir, feature.services, context);
|
|
129
|
+
const stamps = await readStamps(binding);
|
|
130
|
+
const contracts = await readContracts(docsDir, feature.dir, feature.services, context);
|
|
131
|
+
const all = sortUnits(withDependencies([
|
|
132
|
+
...describeUnits(feature.id, axes),
|
|
133
|
+
...claimUnits(checklist.claims, settled, stamps, scenarioSources(feature.id, axes)),
|
|
134
|
+
]));
|
|
135
|
+
const services = [...new Set([...feature.services, ...checklist.claims.map((c) => c.subject)])].sort(compareIds);
|
|
136
|
+
const lens = lensOf(request, services);
|
|
137
|
+
const units = lens === null ? all : all.filter((unit) => unit.subject === lens);
|
|
138
|
+
const open = units.filter(isOpen);
|
|
139
|
+
const paths = featurePaths(feature.dir);
|
|
140
|
+
const intent = existsSync(paths.intent)
|
|
141
|
+
? stripFrontmatter(await readFile(paths.intent, "utf8")).trim()
|
|
142
|
+
: null;
|
|
143
|
+
return {
|
|
144
|
+
feature: feature.id,
|
|
145
|
+
service: lens,
|
|
146
|
+
services,
|
|
147
|
+
path: repoPath(docsDir, feature.dir),
|
|
148
|
+
checklist: checklist.digest,
|
|
149
|
+
record: view.state,
|
|
150
|
+
stamps: stamps.state,
|
|
151
|
+
intent,
|
|
152
|
+
size: { ...axisSize(axes), operations: contracts.operations, messages: contracts.messages, calls: countCalls(checklist.claims, lens) },
|
|
153
|
+
units,
|
|
154
|
+
counts: {
|
|
155
|
+
open: open.length,
|
|
156
|
+
done: checklist.claims.filter((c) => settled.done.has(c.id) && (lens === null || c.subject === lens)).length,
|
|
157
|
+
attested: units.filter((unit) => unit.at === "attested").length,
|
|
158
|
+
},
|
|
159
|
+
frontier: open.slice(0, FRONTIER_LIMIT).map((unit) => unit.id),
|
|
160
|
+
frontierElided: Math.max(0, open.length - FRONTIER_LIMIT),
|
|
161
|
+
...(lens === null ? {} : { waitingOn: waitingOn(units, all, lens) }),
|
|
162
|
+
contracts: contractTokens(checklist.claims, lens),
|
|
163
|
+
review: reviewNotes(feature.id, binding.gherkinDir ?? "features"),
|
|
164
|
+
unreadable: contracts.unreadable,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/** `linkDependencies` mutates in place; this is the expression form the assembly above reads in. */
|
|
168
|
+
function withDependencies(units) {
|
|
169
|
+
linkDependencies(units);
|
|
170
|
+
return units;
|
|
171
|
+
}
|
|
172
|
+
/** How many call edges this lens carries — the c4.calls claims, answered or not. */
|
|
173
|
+
function countCalls(claims, lens) {
|
|
174
|
+
return claims.filter((claim) => claim.kind === "c4.calls" && (lens === null || claim.subject === lens)).length;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* What this service is waiting on somebody else for.
|
|
178
|
+
*
|
|
179
|
+
* Under a lens the dependency edges point out of the view, and a consumer that
|
|
180
|
+
* could not see where would read `dependsOn` as a dangling id. These are the
|
|
181
|
+
* units on the other end: OPEN, in another service, and named with enough text
|
|
182
|
+
* that the reader knows which repository to go ask. Attested units are left out
|
|
183
|
+
* — they are complete work, and nobody is blocked on somebody else's
|
|
184
|
+
* outstanding cucumber run.
|
|
185
|
+
*/
|
|
186
|
+
function waitingOn(units, all, lens) {
|
|
187
|
+
const byId = new Map(all.map((unit) => [unit.id, unit]));
|
|
188
|
+
const out = new Map();
|
|
189
|
+
for (const unit of units) {
|
|
190
|
+
for (const id of unit.dependsOn) {
|
|
191
|
+
const provider = byId.get(id);
|
|
192
|
+
if (provider === undefined || provider.subject === lens || !isOpen(provider))
|
|
193
|
+
continue;
|
|
194
|
+
out.set(id, { id, subject: provider.subject, kind: provider.kind, claim: provider.claim });
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return [...out.values()].sort((a, b) => compareIds(a.id, b.id));
|
|
198
|
+
}
|
|
199
|
+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OAAO,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClE,CAAC","sourcesContent":["/**\n * The work packet: one feature's unit-of-work list, derived and never stored.\n *\n * It is a READ. Nothing here writes, nothing caches, and there is no state\n * anywhere that says a unit is finished — done is \"the unit no longer appears\",\n * which is what makes the list impossible to falsify by editing a checkbox. The\n * inputs are the same documents `loam verify` derives its questions from\n * (`core/verify/checklist.ts`), the same delta scans `loam status` reads, the\n * record beside the feature, and — only when standing in the bound service repo\n * — the stamps in the generated suite.\n *\n * Everything the packet reports is therefore re-derivable from the tree by\n * anybody holding it, which is the property an agent orchestrating other agents\n * actually needs: it can ask again and compare, rather than trusting a report.\n */\nimport { existsSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { stripFrontmatter } from \"../document/frontmatter.js\";\nimport { repoPath } from \"../envelope/json.js\";\nimport { FleetContext } from \"../fleet-context.js\";\nimport type { DocsDir } from \"../kernel/ids/dirs.js\";\nimport { compareIds, type FeatureEntry } from \"../repo/entries.js\";\nimport { featurePaths } from \"../repo/paths.js\";\nimport { featureChecklist, type Claim } from \"../verify/checklist.js\";\nimport { readRecordView, settledClaims, type RecordState } from \"./record.js\";\nimport { readStamps, type GherkinBinding, type StampReading } from \"./stamps.js\";\nimport {\n axisSize,\n describeUnits,\n readContracts,\n readDeltaAxes,\n scenarioSources,\n type DeltaSize,\n type MintedSource,\n type Unreadable,\n} from \"./sources.js\";\nimport { doneCheck, FRONTIER_LIMIT, isOpen, linkDependencies, sortUnits, type TaskStep, type TaskUnit } from \"./unit.js\";\n\nexport interface PacketRequest {\n docsDir: DocsDir;\n /** Active only — an archived feature is refused by the caller, and why is stated there. */\n feature: FeatureEntry;\n /**\n * The `--service` lens, or null when none was asked for. A lens, never a\n * binding check. Null is not always the whole feature: `lensOf` falls back to\n * the bound service, and the packet's `service` says which lens was applied.\n */\n lens: string | null;\n binding: GherkinBinding;\n}\n\n/** An open unit in another service that one of this lens's units is waiting on. */\nexport interface WaitingOn {\n id: string;\n subject: string;\n kind: string;\n claim: string;\n}\n\nexport interface WorkPacket {\n feature: string;\n /** The lens applied — the flag's, else the bound service's (`lensOf`) — or null for the whole feature. */\n service: string | null;\n services: string[];\n path: string;\n /** The checklist digest — how a consumer detects that the question set itself moved. */\n checklist: string;\n record: RecordState;\n stamps: \"read\" | \"unknown\";\n intent: string | null;\n /**\n * The size of the DELTA, not of the open work: how much this feature says,\n * whatever has been answered. A packet that shrank as work closed would make\n * \"this feature is small\" and \"this feature is nearly done\" the same sentence.\n */\n size: DeltaSize;\n units: TaskUnit[];\n counts: { open: number; done: number; attested: number };\n frontier: string[];\n frontierElided: number;\n waitingOn?: WaitingOn[];\n contracts: { expose: string[]; call: string[] };\n review: string[];\n unreadable: Unreadable;\n}\n\n/** The step a claim-backed unit is waiting at. */\nfunction stepFor(claim: Claim, stamps: StampReading): TaskStep {\n if (claim.kind !== \"scenario.tested\") return \"implement\";\n // Only this repository's suite may be graded. Another service's tests live in\n // another repository, and reporting `generate` for them would be a claim about\n // a directory this run has never seen.\n if (stamps.state !== \"read\" || stamps.service !== claim.subject) return \"implement\";\n return claim.digest !== undefined && stamps.digests.has(claim.digest) ? \"implement\" : \"generate\";\n}\n\n/**\n * The claim-backed units: every claim the record has not closed.\n *\n * The claim's own fields ride through verbatim — the task id IS the claim id,\n * so a unit can be handed straight back to `loam verify` and two runs of\n * `loam tasks` are diffable exactly as two checklists are.\n */\nfunction claimUnits(\n claims: readonly Claim[],\n settled: { done: Set<string>; attested: Set<string> },\n stamps: StampReading,\n sources: ReadonlyMap<string, MintedSource>,\n): TaskUnit[] {\n const out: TaskUnit[] = [];\n for (const claim of claims) {\n if (settled.done.has(claim.id)) continue;\n const source = sources.get(claim.id);\n out.push({\n id: claim.id,\n kind: claim.kind,\n subject: claim.subject,\n at: settled.attested.has(claim.id) ? \"attested\" : stepFor(claim, stamps),\n claim: claim.claim,\n ...(claim.digest === undefined ? {} : { digest: claim.digest }),\n ...(claim.operation === undefined ? {} : { operation: claim.operation }),\n ...(claim.token === undefined ? {} : { token: claim.token }),\n dependsOn: [],\n // The digest cross-check is the belt on the id join (`./sources.ts`): a\n // source whose words hash to something else is somebody ELSE's\n // Given/When/Then, and no source at all is the honest answer.\n ...(source !== undefined && source.digest === claim.digest ? { source: source.source } : {}),\n done: { check: doneCheck(claim) },\n });\n }\n return out;\n}\n\n/**\n * The four standing review instructions, computed with this feature's own ids.\n *\n * They are on the payload rather than in the docs because the reviewer of a\n * packet is usually another agent, and an agent that has to go fetch a protocol\n * to learn how to check the work is an agent that will not. Each one names a\n * failure that has actually happened: trusting a checkmark instead of\n * re-deriving, taking one answer set on faith, hand-editing a generated suite\n * (whose digests are what `--results` matches on), and implementing one half of\n * a contract.\n */\nfunction reviewNotes(feature: string, gherkinDir: string): string[] {\n return [\n `re-derive, do not trust checkmarks: loam tasks ${feature} --json and compare open units against the implementer's claim`,\n `cross-examine recorded answers: loam verify ${feature} --diff-answers <a.json> <b.json>`,\n `generated suite is read-only: no edits under ${gherkinDir}/loam/, and step definitions must not paraphrase scenarios`,\n \"honour the contract in both directions: every expose[] operationId exists under exactly that id; every call[] op is actually called\",\n ];\n}\n\n/** The operations this lens promises to expose, and the ones it promises to call. */\nfunction contractTokens(claims: readonly Claim[], lens: string | null): { expose: string[]; call: string[] } {\n const scoped = claims.filter((claim) => lens === null || claim.subject === lens);\n const pick = (kind: string, field: \"operation\" | \"token\"): string[] =>\n [...new Set(scoped.filter((c) => c.kind === kind).map((c) => c[field]).filter((v): v is string => v !== undefined))].sort(\n compareIds,\n );\n return { expose: pick(\"api.exposes\", \"operation\"), call: pick(\"c4.calls\", \"token\") };\n}\n\n/**\n * The lens the packet is actually cut to.\n *\n * An explicit lens wins. Without one, a run from a service repository is about\n * THAT service whenever the feature touches it, because the stamps that tell\n * `generate` from `implement` are read from this repository's suite alone\n * (`./stamps.ts`): in a whole-feature view from here, every other service's\n * scenario reads `implement` whatever its own suite holds — a verdict about a\n * directory this run has never seen, printed beside one about a directory it\n * has, in the same words. A feature that does not touch the bound service keeps\n * the whole view, because narrowing to a service with nothing in it prints an\n * empty packet, and an agent reads an empty packet as \"nothing to do\".\n *\n * Decided here rather than by the caller because \"touches\" is the packet's own\n * service list, which includes a service only the C4 delta names — learning it\n * first would cost the caller a second checklist derivation of the same delta.\n */\nfunction lensOf(request: PacketRequest, services: readonly string[]): string | null {\n if (request.lens !== null) return request.lens;\n const bound = request.binding.service;\n return bound !== undefined && services.includes(bound) ? bound : null;\n}\n\nexport async function workPacket(request: PacketRequest): Promise<WorkPacket> {\n const { docsDir, feature, binding } = request;\n // One read index for the whole derivation: the checklist, the delta axes and\n // the architecture parse all reach the same documents, and without a shared\n // context each would be its own fleet walk.\n const context = new FleetContext();\n const checklist = await featureChecklist(docsDir, feature.dir, feature.id, context);\n const view = await readRecordView(feature.dir, checklist);\n const settled = settledClaims(view);\n const axes = await readDeltaAxes(docsDir, feature.dir, feature.services, context);\n const stamps = await readStamps(binding);\n const contracts = await readContracts(docsDir, feature.dir, feature.services, context);\n\n const all = sortUnits(withDependencies([\n ...describeUnits(feature.id, axes),\n ...claimUnits(checklist.claims, settled, stamps, scenarioSources(feature.id, axes)),\n ]));\n const services = [...new Set([...feature.services, ...checklist.claims.map((c) => c.subject)])].sort(compareIds);\n const lens = lensOf(request, services);\n const units = lens === null ? all : all.filter((unit) => unit.subject === lens);\n const open = units.filter(isOpen);\n\n const paths = featurePaths(feature.dir);\n const intent = existsSync(paths.intent)\n ? stripFrontmatter(await readFile(paths.intent, \"utf8\")).trim()\n : null;\n\n return {\n feature: feature.id,\n service: lens,\n services,\n path: repoPath(docsDir, feature.dir),\n checklist: checklist.digest,\n record: view.state,\n stamps: stamps.state,\n intent,\n size: { ...axisSize(axes), operations: contracts.operations, messages: contracts.messages, calls: countCalls(checklist.claims, lens) },\n units,\n counts: {\n open: open.length,\n done: checklist.claims.filter((c) => settled.done.has(c.id) && (lens === null || c.subject === lens)).length,\n attested: units.filter((unit) => unit.at === \"attested\").length,\n },\n frontier: open.slice(0, FRONTIER_LIMIT).map((unit) => unit.id),\n frontierElided: Math.max(0, open.length - FRONTIER_LIMIT),\n ...(lens === null ? {} : { waitingOn: waitingOn(units, all, lens) }),\n contracts: contractTokens(checklist.claims, lens),\n review: reviewNotes(feature.id, binding.gherkinDir ?? \"features\"),\n unreadable: contracts.unreadable,\n };\n}\n\n/** `linkDependencies` mutates in place; this is the expression form the assembly above reads in. */\nfunction withDependencies(units: TaskUnit[]): TaskUnit[] {\n linkDependencies(units);\n return units;\n}\n\n/** How many call edges this lens carries — the c4.calls claims, answered or not. */\nfunction countCalls(claims: readonly Claim[], lens: string | null): number {\n return claims.filter((claim) => claim.kind === \"c4.calls\" && (lens === null || claim.subject === lens)).length;\n}\n\n/**\n * What this service is waiting on somebody else for.\n *\n * Under a lens the dependency edges point out of the view, and a consumer that\n * could not see where would read `dependsOn` as a dangling id. These are the\n * units on the other end: OPEN, in another service, and named with enough text\n * that the reader knows which repository to go ask. Attested units are left out\n * — they are complete work, and nobody is blocked on somebody else's\n * outstanding cucumber run.\n */\nfunction waitingOn(units: readonly TaskUnit[], all: readonly TaskUnit[], lens: string): WaitingOn[] {\n const byId = new Map(all.map((unit) => [unit.id, unit]));\n const out = new Map<string, WaitingOn>();\n for (const unit of units) {\n for (const id of unit.dependsOn) {\n const provider = byId.get(id);\n if (provider === undefined || provider.subject === lens || !isOpen(provider)) continue;\n out.set(id, { id, subject: provider.subject, kind: provider.kind, claim: provider.claim });\n }\n }\n return [...out.values()].sort((a, b) => compareIds(a.id, b.id));\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { readVerificationState } from "../verify/read/file.js";
|
|
2
|
+
import { attestedClaims, countedAnswers } from "../verify/record.js";
|
|
3
|
+
/**
|
|
4
|
+
* Read the record beside the feature and say what it answers.
|
|
5
|
+
*
|
|
6
|
+
* Staleness is all-or-nothing and it is the checklist digest that decides: a
|
|
7
|
+
* record that answers a different question set is not an answer to this one,
|
|
8
|
+
* however complete it looks. So a stale, unreadable or absent record confirms
|
|
9
|
+
* NOTHING — every unit stays open, and the `record` key on the payload is what
|
|
10
|
+
* says why the packet looks untouched. Silently crediting a stale record would
|
|
11
|
+
* be the worst failure this command can have: an agent reading a thin packet as
|
|
12
|
+
* "nothing left to do" over answers to questions nobody is asking any more.
|
|
13
|
+
*/
|
|
14
|
+
export async function readRecordView(featureDir, checklist) {
|
|
15
|
+
// The digest rides into the read: a record kept as per-service files counts
|
|
16
|
+
// the files that answered THIS checklist (`core/verify/read/union.ts`), so
|
|
17
|
+
// a same-day file answering an older one cannot make the packet look stale.
|
|
18
|
+
const read = await readVerificationState(featureDir, checklist.digest);
|
|
19
|
+
if (read.state === "absent")
|
|
20
|
+
return { state: "absent", answers: new Map() };
|
|
21
|
+
if (read.state === "unreadable")
|
|
22
|
+
return { state: "unreadable", answers: new Map() };
|
|
23
|
+
if (read.verification.checklist !== checklist.digest)
|
|
24
|
+
return { state: "stale", answers: new Map() };
|
|
25
|
+
return { state: "recorded", answers: countedAnswers(checklist.claims, read.verification) };
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Which claims have stopped being work, and which are complete-but-unrun.
|
|
29
|
+
*
|
|
30
|
+
* `attestedClaims` is the authority for the second set — a confirmed
|
|
31
|
+
* `scenario.tested` whose `answered_by` is not a runner — and it is imported
|
|
32
|
+
* rather than restated because the same predicate decides `verify`'s verdict,
|
|
33
|
+
* `status`'s rung and the `verify.scenario-attested` notice. An attested unit
|
|
34
|
+
* NEVER vanishes: it is somebody's word about a test, and the whole reason loam
|
|
35
|
+
* exists is that a word must not read the same as a run.
|
|
36
|
+
*/
|
|
37
|
+
export function settledClaims(view) {
|
|
38
|
+
const answers = [...view.answers.values()];
|
|
39
|
+
const attested = new Set(attestedClaims(answers));
|
|
40
|
+
const done = new Set(answers.filter((claim) => claim.verdict === "confirmed" && !attested.has(claim.id)).map((claim) => claim.id));
|
|
41
|
+
return { done, attested };
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.js","sourceRoot":"","sources":["../../../src/core/tasks/record.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,qBAAqB,CAAC;AAWzF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,UAAsB,EAAE,SAAoB;IAC/E,4EAA4E;IAC5E,2EAA2E;IAC3E,4EAA4E;IAC5E,MAAM,IAAI,GAAG,MAAM,qBAAqB,CAAC,UAAU,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;IAC5E,IAAI,IAAI,CAAC,KAAK,KAAK,YAAY;QAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;IACpF,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,KAAK,SAAS,CAAC,MAAM;QAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;IACpG,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;AAC7F,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,IAAgB;IAC5C,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,IAAI,GAAG,CAClB,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,WAAW,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAC7G,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC","sourcesContent":["/**\n * What the verification record says about this checklist, for the one\n * question a packet asks of it: which units have stopped being work.\n *\n * Nothing here decides what \"confirmed\" or \"attested\" MEAN — those verdicts are\n * `core/verify/record.ts`'s and nowhere else's, and they are imported rather\n * than re-derived. Nor, now, which recorded row counts as the answer to which\n * claim: that attestation-scoping rule was carried here as \"a deliberate\n * mirror\" of `statuses()` in `src/commands/verify/report.ts`, because core may\n * never import commands, and it moved down into `countedAnswers` in\n * `core/verify/record.ts` so both read one copy. What this module still owns\n * is the rule that a record which answers a different question set answers\n * nothing at all.\n */\nimport type { FeatureDir } from \"../kernel/ids/dirs.js\";\nimport type { Checklist } from \"../verify/checklist.js\";\nimport { readVerificationState } from \"../verify/read/file.js\";\nimport { attestedClaims, countedAnswers, type RecordedClaim } from \"../verify/record.js\";\n\n/** The four states a packet reports, and the four a reader has to tell apart. */\nexport type RecordState = \"absent\" | \"recorded\" | \"stale\" | \"unreadable\";\n\nexport interface RecordView {\n state: RecordState;\n /** Claim id → the answer that counts for it. Empty unless `state` is \"recorded\". */\n answers: ReadonlyMap<string, RecordedClaim>;\n}\n\n/**\n * Read the record beside the feature and say what it answers.\n *\n * Staleness is all-or-nothing and it is the checklist digest that decides: a\n * record that answers a different question set is not an answer to this one,\n * however complete it looks. So a stale, unreadable or absent record confirms\n * NOTHING — every unit stays open, and the `record` key on the payload is what\n * says why the packet looks untouched. Silently crediting a stale record would\n * be the worst failure this command can have: an agent reading a thin packet as\n * \"nothing left to do\" over answers to questions nobody is asking any more.\n */\nexport async function readRecordView(featureDir: FeatureDir, checklist: Checklist): Promise<RecordView> {\n // The digest rides into the read: a record kept as per-service files counts\n // the files that answered THIS checklist (`core/verify/read/union.ts`), so\n // a same-day file answering an older one cannot make the packet look stale.\n const read = await readVerificationState(featureDir, checklist.digest);\n if (read.state === \"absent\") return { state: \"absent\", answers: new Map() };\n if (read.state === \"unreadable\") return { state: \"unreadable\", answers: new Map() };\n if (read.verification.checklist !== checklist.digest) return { state: \"stale\", answers: new Map() };\n return { state: \"recorded\", answers: countedAnswers(checklist.claims, read.verification) };\n}\n\n/**\n * Which claims have stopped being work, and which are complete-but-unrun.\n *\n * `attestedClaims` is the authority for the second set — a confirmed\n * `scenario.tested` whose `answered_by` is not a runner — and it is imported\n * rather than restated because the same predicate decides `verify`'s verdict,\n * `status`'s rung and the `verify.scenario-attested` notice. An attested unit\n * NEVER vanishes: it is somebody's word about a test, and the whole reason loam\n * exists is that a word must not read the same as a run.\n */\nexport function settledClaims(view: RecordView): { done: Set<string>; attested: Set<string> } {\n const answers = [...view.answers.values()];\n const attested = new Set(attestedClaims(answers));\n const done = new Set(\n answers.filter((claim) => claim.verdict === \"confirmed\" && !attested.has(claim.id)).map((claim) => claim.id),\n );\n return { done, attested };\n}\n"]}
|