@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 @@
|
|
|
1
|
+
{"version":3,"file":"adoption.js","sourceRoot":"","sources":["../../../../../src/commands/validate/fleet/scorecard/adoption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,cAAc;IACd,MAAM;IACN,SAAS;IACT,UAAU;IACV,aAAa;IACb,cAAc;CACN,CAAC;AAaX,0EAA0E;AAC1E,MAAM,UAAU,UAAU,CACxB,UAA6F;IAE7F,MAAM,GAAG,GAAa,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;IAC7G,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,IAAI,IAAI,aAAa;YAAE,IAAI,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA4C;IACzE,YAAY,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;IACzD,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,CAAC;IACxD,QAAQ,EAAE,EAAE;IACZ,WAAW,EAAE,CAAC,wBAAwB,CAAC;IACvC,YAAY,EAAE,CAAC,uBAAuB,CAAC;CACxC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAkB;IACjD,MAAM,GAAG,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC5C,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE,CAAC;QACjC,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,SAAS;QACnC,KAAK,MAAM,IAAI,IAAI,kBAAkB,CAAC,IAAI,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * The adoption vocabulary of the fleet scorecard: which contract axes a\n * service PARTICIPATES in, summed to the fleet's per-axis participation\n * counts, and the mechanical rule for which warnings the `--all` text report\n * may fold under a per-axis \"not started\" banner.\n *\n * A leaf on purpose: it imports nothing, so `../report.ts` (the text\n * renderer) and `./contracts.js` (which computes the per-service booleans)\n * can both use it without closing a cycle — `adoptionOf` takes the smallest\n * structural parameter it needs instead of the ContractCounts type,\n * core/vocabulary/maturity.ts's EdgeSource precedent for staying a leaf.\n */\n\n/**\n * The six contract axes a service adopts one at a time, in the order every\n * rendering walks them. Participation is a per-service boolean with one\n * mechanical rule per axis, spelled on `Scorecard.adoption` (./scorecard.js)\n * where the payload key freezes them.\n */\nexport const ADOPTION_AXES = [\n \"requirements\",\n \"arch\",\n \"openapi\",\n \"asyncapi\",\n \"permissions\",\n \"capabilities\",\n] as const;\n\nexport type AdoptionAxis = (typeof ADOPTION_AXES)[number];\n\n/**\n * Participating services per axis. Flat counts — the denominator is\n * `Scorecard.services`, carried once so two copies cannot disagree. An axis\n * at 0 reads \"not started\"; 0 < N < M is \"partially adopted\", and the two\n * must never be conflated: a banner that grouped a partially-adopted axis's\n * warnings would hide the exact services the count says are missing.\n */\nexport type Adoption = Record<AdoptionAxis, number>;\n\n/** Sum the per-service participation booleans into the fleet's counts. */\nexport function adoptionOf(\n perService: ReadonlyArray<{ readonly participates: Readonly<Record<AdoptionAxis, boolean>> }>,\n): Adoption {\n const out: Adoption = { requirements: 0, arch: 0, openapi: 0, asyncapi: 0, permissions: 0, capabilities: 0 };\n for (const svc of perService) {\n for (const axis of ADOPTION_AXES) if (svc.participates[axis]) out[axis] += 1;\n }\n return out;\n}\n\n/**\n * THE QUALIFICATION RULE — this table IS the rule, and it is mechanical and\n * fail-closed. A finding is grouped under an axis's \"not started\" banner iff\n * (1) its severity is `warn`, (2) its code is listed in this table's row for\n * the axis, (3) this run's `adoption[axis] === 0`, and (4) the run could\n * measure that zero at all — a fleet with at least one service and no\n * `service.unreadable` subject (report.ts enforces this half, beside the\n * banner it gates: \"0 of 0\" is no fleet, and an unreadable service's\n * all-false participation must not manufacture the zero). Anything else —\n * every error, every warn code not listed here, every warn on an axis with\n * even one participating service — prints ungrouped, exactly as before. When\n * in doubt a code stays OUT of the table: the cost of a wrongly-ungrouped\n * warning is noise, the cost of a wrongly-grouped one is a hidden defect.\n *\n * A row lists exactly the warn codes whose SOLE cause is the axis not being\n * started fleet-wide — codes whose remedy presupposes starting the axis at\n * all, so with zero participating services the per-target repetition carries\n * no information the one banner does not:\n *\n * - requirements: `service.no-spec` and `spec.no-requirements` fire once per\n * service when nobody in the fleet has written a requirement block.\n * - openapi: `service.no-openapi`'s WARN form (the error form — dangling\n * authored links into the absent file — never groups, by condition 1), and\n * `spine.op-link-missing`, which never reads the contract (service/spine.ts\n * documents exactly that) and so fires per titled Calls-edge even with zero\n * contracts fleet-wide.\n * - permissions: `permissions.unenforced` — one finding whose whole content\n * is \"the vocabulary exists and nothing cites it yet\".\n * - capabilities: `capability.unrealized` — deliberately one warn PER\n * declared capability (core/capabilities/findings.ts), so a freshly landed\n * vocabulary warns M times before the first requirement names any of them.\n * - arch and asyncapi have NO code whose sole cause is fleet-wide absence\n * (an absent arch.spec.md is silent; an absent asyncapi.yaml is silent or\n * an error when authored links strand on it), so their rows are empty and\n * those axes surface only in the scorecard's not-started one-liner.\n *\n * Rows are disjoint — a code belongs to exactly one axis — which is what lets\n * `groupedWarnCodes` invert the table into a Map. Not prose alone:\n * test/adoption-rollup.test.ts asserts the flattened rows hold no duplicate,\n * because a code filed under two axes would be grouped under whichever\n * happens to sit at zero — possibly hiding it behind a fully adopted axis.\n */\nexport const AXIS_GROUPED_WARNS: Record<AdoptionAxis, readonly string[]> = {\n requirements: [\"service.no-spec\", \"spec.no-requirements\"],\n arch: [],\n openapi: [\"service.no-openapi\", \"spine.op-link-missing\"],\n asyncapi: [],\n permissions: [\"permissions.unenforced\"],\n capabilities: [\"capability.unrealized\"],\n};\n\n/**\n * The table inverted for this run: warn code → its axis, for exactly the axes\n * this run's adoption counts put at zero. Insertion order is ADOPTION_AXES\n * order then row order, so every walk over the Map renders deterministically.\n */\nexport function groupedWarnCodes(adoption: Adoption): Map<string, AdoptionAxis> {\n const out = new Map<string, AdoptionAxis>();\n for (const axis of ADOPTION_AXES) {\n if (adoption[axis] !== 0) continue;\n for (const code of AXIS_GROUPED_WARNS[axis]) out.set(code, axis);\n }\n return out;\n}\n"]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One service's contract-axis contributions to the fleet scorecard: the HTTP
|
|
3
|
+
* and event counts off its living documents, its arch `Covers:` entries for
|
|
4
|
+
* the C4 census, and the per-axis adoption booleans (`participates`).
|
|
5
|
+
* `./scorecard.js` sums these across the fleet; this module owns the
|
|
6
|
+
* per-service reads and their containment, and never prints.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import { readAsyncapi } from "../../../../core/asyncapi/read.js";
|
|
10
|
+
import {} from "../../../../core/c4/arch.js";
|
|
11
|
+
import {} from "../../../../core/fleet-context.js";
|
|
12
|
+
import { readOpenapi } from "../../../../core/openapi/doc.js";
|
|
13
|
+
import {} from "../../../../core/repo/entries.js";
|
|
14
|
+
import { servicePathsAt } from "../../../../core/repo/paths.js";
|
|
15
|
+
import { coversEntries } from "../../checks/requirements.js";
|
|
16
|
+
import {} from "./adoption.js";
|
|
17
|
+
export async function contractCounts(svc, fleet, inbound) {
|
|
18
|
+
try {
|
|
19
|
+
return await readContracts(svc, fleet, inbound);
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// `guarded`'s doctrine, one rollup down: these are the same memoized reads
|
|
23
|
+
// this service's own target already failed on, and a memoized REJECTION
|
|
24
|
+
// rejects again on every await — so a spec.md that is not UTF-8, or an
|
|
25
|
+
// openapi.yaml that is a directory, deleted the whole fleet's card from
|
|
26
|
+
// inside Promise.all. The service's `service.unreadable` finding names the
|
|
27
|
+
// cause; here the one unreadable service contributes zeros and the
|
|
28
|
+
// fleet's rollup survives. Participation is all-false the way the counts
|
|
29
|
+
// are zero — NOT because the service started nothing (an unreadable
|
|
30
|
+
// service proves nothing, least of all that), but because no claim can be
|
|
31
|
+
// made; the text renderer therefore refuses to group warnings on any run
|
|
32
|
+
// with an unreadable service (report.ts), since a false `false` here
|
|
33
|
+
// could manufacture the fleet-wide N=0 that licenses suppression.
|
|
34
|
+
return {
|
|
35
|
+
operations: { defined: 0, governed: 0, deprecated: 0, deprecatedStillConsumed: 0 },
|
|
36
|
+
messages: { defined: 0, linked: 0 },
|
|
37
|
+
covers: [],
|
|
38
|
+
participates: { requirements: false, arch: false, openapi: false, asyncapi: false, permissions: false, capabilities: false },
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
async function readContracts(svc, fleet, inbound) {
|
|
43
|
+
const paths = servicePathsAt(svc.dir);
|
|
44
|
+
const reqs = existsSync(paths.spec) ? await fleet.readRequirements(paths.spec) : [];
|
|
45
|
+
const archReqs = existsSync(paths.archSpec) ? await fleet.readRequirements(paths.archSpec) : [];
|
|
46
|
+
// The living rule the service target applies (service/specs.ts): a REMOVED
|
|
47
|
+
// requirement is on its way out and governs nothing. Hoisted for BOTH
|
|
48
|
+
// documents because the `linked` join and the participation booleans below
|
|
49
|
+
// read the same non-REMOVED sets.
|
|
50
|
+
const living = reqs.filter((r) => r.kind !== "REMOVED");
|
|
51
|
+
const archLiving = archReqs.filter((r) => r.kind !== "REMOVED");
|
|
52
|
+
const api = await readOpenapi(paths.openapi, fleet);
|
|
53
|
+
// Removal markers are never callable operations (service/api.ts's liveOps
|
|
54
|
+
// rule), and an unreadable contract defines nothing this census may count —
|
|
55
|
+
// swallowing it into its parsed subset would grade a broken file as a thin one.
|
|
56
|
+
const ops = api.unreadable ? [] : api.ops.filter((o) => !o.remove);
|
|
57
|
+
const governed = new Set(living.flatMap((r) => r.operations));
|
|
58
|
+
const deprecated = new Set(ops.filter((o) => o.deprecated).map((o) => o.id));
|
|
59
|
+
const events = await readAsyncapi(paths.asyncapi, fleet);
|
|
60
|
+
// Distinct names — every join on the event spine is by NAME, so a duplicate
|
|
61
|
+
// slot is one message — and the governance join is requirement lines from
|
|
62
|
+
// BOTH documents, never landscape edges: an edge is a claim about traffic,
|
|
63
|
+
// a requirement is governance (service/events/events.ts).
|
|
64
|
+
const declared = events.unreadable
|
|
65
|
+
? []
|
|
66
|
+
: [...new Set(events.messages.filter((m) => m.remove !== true).map((m) => m.name))];
|
|
67
|
+
const linked = new Set([...living, ...archLiving].flatMap((r) => [...r.publishes, ...r.consumes]));
|
|
68
|
+
// The per-axis participation booleans, each the one-line rule the Scorecard
|
|
69
|
+
// doc comment pins. Requirements/arch count ANY parsed block (REMOVED
|
|
70
|
+
// included — a spec retiring its last requirement still started the axis),
|
|
71
|
+
// while permissions/capabilities apply the non-REMOVED rule their fleet
|
|
72
|
+
// checks apply (fleet-shape.ts's used sets), so "participates" and "cites"
|
|
73
|
+
// cannot disagree about the same line.
|
|
74
|
+
const participates = {
|
|
75
|
+
requirements: reqs.length > 0,
|
|
76
|
+
arch: archReqs.length > 0,
|
|
77
|
+
openapi: existsSync(paths.openapi),
|
|
78
|
+
asyncapi: existsSync(paths.asyncapi),
|
|
79
|
+
permissions: [...living, ...archLiving].some((r) => r.requires.length > 0),
|
|
80
|
+
capabilities: [...living, ...archLiving].some((r) => r.capabilities.length > 0),
|
|
81
|
+
};
|
|
82
|
+
return {
|
|
83
|
+
operations: {
|
|
84
|
+
defined: ops.length,
|
|
85
|
+
governed: ops.filter((o) => governed.has(o.id)).length,
|
|
86
|
+
deprecated: deprecated.size,
|
|
87
|
+
deprecatedStillConsumed: [...deprecated].filter((id) => governed.has(id) || inbound.has(id)).length,
|
|
88
|
+
},
|
|
89
|
+
messages: {
|
|
90
|
+
defined: declared.length,
|
|
91
|
+
linked: declared.filter((name) => linked.has(name)).length,
|
|
92
|
+
},
|
|
93
|
+
// coversEntries already drops REMOVED requirements.
|
|
94
|
+
covers: coversEntries(archReqs),
|
|
95
|
+
participates,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../../../src/commands/validate/fleet/scorecard/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE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CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC1E,YAAY,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;KAChF,CAAC;IAEF,OAAO;QACL,UAAU,EAAE;YACV,OAAO,EAAE,GAAG,CAAC,MAAM;YACnB,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;YACtD,UAAU,EAAE,UAAU,CAAC,IAAI;YAC3B,uBAAuB,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;SACpG;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,QAAQ,CAAC,MAAM;YACxB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM;SAC3D;QACD,oDAAoD;QACpD,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC;QAC/B,YAAY;KACb,CAAC;AACJ,CAAC","sourcesContent":["/**\n * One service's contract-axis contributions to the fleet scorecard: the HTTP\n * and event counts off its living documents, its arch `Covers:` entries for\n * the C4 census, and the per-axis adoption booleans (`participates`).\n * `./scorecard.js` sums these across the fleet; this module owns the\n * per-service reads and their containment, and never prints.\n */\nimport { existsSync } from \"node:fs\";\nimport { readAsyncapi } from \"../../../../core/asyncapi/read.js\";\nimport { type CoversEntry } from \"../../../../core/c4/arch.js\";\nimport { type FleetContext } from \"../../../../core/fleet-context.js\";\nimport { readOpenapi } from \"../../../../core/openapi/doc.js\";\nimport { type ServiceEntry } from \"../../../../core/repo/entries.js\";\nimport { servicePathsAt } from \"../../../../core/repo/paths.js\";\nimport { coversEntries } from \"../../checks/requirements.js\";\nimport { type AdoptionAxis } from \"./adoption.js\";\n\n/**\n * One service's contributions. Structurally identical to the `operations` and\n * `messages` sections of the Scorecard payload — spelled here rather than\n * imported from `./scorecard.js`, because that import would close a file\n * cycle with the module that sums these.\n */\nexport interface ContractCounts {\n operations: { defined: number; governed: number; deprecated: number; deprecatedStillConsumed: number };\n messages: { defined: number; linked: number };\n covers: CoversEntry[];\n /**\n * Whether THIS service has started each adoption axis — the per-service\n * booleans `adoptionOf` (./adoption.js) sums into the fleet's participation\n * counts. The six rules are spelled on `Scorecard.adoption` (./scorecard.js),\n * where the payload key freezes them; every input is a read this function\n * already pays for.\n */\n participates: Record<AdoptionAxis, boolean>;\n}\n\nexport async function contractCounts(\n svc: ServiceEntry,\n fleet: FleetContext,\n inbound: ReadonlySet<string>,\n): Promise<ContractCounts> {\n try {\n return await readContracts(svc, fleet, inbound);\n } catch {\n // `guarded`'s doctrine, one rollup down: these are the same memoized reads\n // this service's own target already failed on, and a memoized REJECTION\n // rejects again on every await — so a spec.md that is not UTF-8, or an\n // openapi.yaml that is a directory, deleted the whole fleet's card from\n // inside Promise.all. The service's `service.unreadable` finding names the\n // cause; here the one unreadable service contributes zeros and the\n // fleet's rollup survives. Participation is all-false the way the counts\n // are zero — NOT because the service started nothing (an unreadable\n // service proves nothing, least of all that), but because no claim can be\n // made; the text renderer therefore refuses to group warnings on any run\n // with an unreadable service (report.ts), since a false `false` here\n // could manufacture the fleet-wide N=0 that licenses suppression.\n return {\n operations: { defined: 0, governed: 0, deprecated: 0, deprecatedStillConsumed: 0 },\n messages: { defined: 0, linked: 0 },\n covers: [],\n participates: { requirements: false, arch: false, openapi: false, asyncapi: false, permissions: false, capabilities: false },\n };\n }\n}\n\nasync function readContracts(\n svc: ServiceEntry,\n fleet: FleetContext,\n inbound: ReadonlySet<string>,\n): Promise<ContractCounts> {\n const paths = servicePathsAt(svc.dir);\n const reqs = existsSync(paths.spec) ? await fleet.readRequirements(paths.spec) : [];\n const archReqs = existsSync(paths.archSpec) ? await fleet.readRequirements(paths.archSpec) : [];\n // The living rule the service target applies (service/specs.ts): a REMOVED\n // requirement is on its way out and governs nothing. Hoisted for BOTH\n // documents because the `linked` join and the participation booleans below\n // read the same non-REMOVED sets.\n const living = reqs.filter((r) => r.kind !== \"REMOVED\");\n const archLiving = archReqs.filter((r) => r.kind !== \"REMOVED\");\n\n const api = await readOpenapi(paths.openapi, fleet);\n // Removal markers are never callable operations (service/api.ts's liveOps\n // rule), and an unreadable contract defines nothing this census may count —\n // swallowing it into its parsed subset would grade a broken file as a thin one.\n const ops = api.unreadable ? [] : api.ops.filter((o) => !o.remove);\n const governed = new Set(living.flatMap((r) => r.operations));\n const deprecated = new Set(ops.filter((o) => o.deprecated).map((o) => o.id));\n\n const events = await readAsyncapi(paths.asyncapi, fleet);\n // Distinct names — every join on the event spine is by NAME, so a duplicate\n // slot is one message — and the governance join is requirement lines from\n // BOTH documents, never landscape edges: an edge is a claim about traffic,\n // a requirement is governance (service/events/events.ts).\n const declared = events.unreadable\n ? []\n : [...new Set(events.messages.filter((m) => m.remove !== true).map((m) => m.name))];\n const linked = new Set(\n [...living, ...archLiving].flatMap((r) => [...r.publishes, ...r.consumes]),\n );\n\n // The per-axis participation booleans, each the one-line rule the Scorecard\n // doc comment pins. Requirements/arch count ANY parsed block (REMOVED\n // included — a spec retiring its last requirement still started the axis),\n // while permissions/capabilities apply the non-REMOVED rule their fleet\n // checks apply (fleet-shape.ts's used sets), so \"participates\" and \"cites\"\n // cannot disagree about the same line.\n const participates: Record<AdoptionAxis, boolean> = {\n requirements: reqs.length > 0,\n arch: archReqs.length > 0,\n openapi: existsSync(paths.openapi),\n asyncapi: existsSync(paths.asyncapi),\n permissions: [...living, ...archLiving].some((r) => r.requires.length > 0),\n capabilities: [...living, ...archLiving].some((r) => r.capabilities.length > 0),\n };\n\n return {\n operations: {\n defined: ops.length,\n governed: ops.filter((o) => governed.has(o.id)).length,\n deprecated: deprecated.size,\n deprecatedStillConsumed: [...deprecated].filter((id) => governed.has(id) || inbound.has(id)).length,\n },\n messages: {\n defined: declared.length,\n linked: declared.filter((name) => linked.has(name)).length,\n },\n // coversEntries already drops REMOVED requirements.\n covers: coversEntries(archReqs),\n participates,\n };\n}\n"]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fleet scorecard's one table — how the `--all` text report renders what
|
|
3
|
+
* `./scorecard.js` derived. A module of its own for validate's own discipline
|
|
4
|
+
* (validate.ts's header: the checks produce findings and none of them print;
|
|
5
|
+
* printing happens after the last target is graded), and so the derivation
|
|
6
|
+
* and the formatting do not share a file whose one seam is exactly that.
|
|
7
|
+
*
|
|
8
|
+
* One line per axis, ceiling before actual, read left to right the way the
|
|
9
|
+
* numbers are read in a CI log — except the adoption row, which states
|
|
10
|
+
* participation over the denominator (`requirements 3/40`): adoption is an
|
|
11
|
+
* N-of-M spread, not a ceiling chased by an actual, and forcing it into the
|
|
12
|
+
* arrow idiom would read as one. It prints under `--errors-only` too, on
|
|
13
|
+
* purpose: like the summary footer it is a rollup, not a finding, and
|
|
14
|
+
* `--errors-only` is a findings-rendering lever (report.ts).
|
|
15
|
+
*/
|
|
16
|
+
import { ARTIFACT_STATUSES } from "../../../../core/status/report.js";
|
|
17
|
+
import { ANSWERED_BY } from "../../../../core/verify/answers.js";
|
|
18
|
+
import { VERIFICATION_VERDICTS } from "../../../../core/verify/record.js";
|
|
19
|
+
import { MATURITY_LADDER } from "../../../../core/vocabulary/maturity.js";
|
|
20
|
+
import { ADOPTION_AXES } from "./adoption.js";
|
|
21
|
+
import {} from "./scorecard.js";
|
|
22
|
+
export function printScorecard(card) {
|
|
23
|
+
const { maturity, provenance: p, verification: v, operations: o, messages: m, c4, features: f } = card;
|
|
24
|
+
console.log("\nfleet scorecard (ceiling → actual)");
|
|
25
|
+
console.log(` services ${card.services} — ` +
|
|
26
|
+
MATURITY_LADDER.map((rung) => `${maturity[rung]} ${rung}`).join(" · "));
|
|
27
|
+
console.log(
|
|
28
|
+
// The sampled count rides INSIDE the vouched number rather than after it,
|
|
29
|
+
// because that is where it changes the reading: "120 vouched" and "120
|
|
30
|
+
// vouched (100 sampled)" are different fleets, and a reader who stops at
|
|
31
|
+
// the first number must not have been told the stronger of the two.
|
|
32
|
+
// The content count rides beside the digest count rather than inside the
|
|
33
|
+
// vouched one: both are staleness, of the words and of the code, and
|
|
34
|
+
// "0 stale digest(s)" alone read as "nothing is stale" in a run that had
|
|
35
|
+
// just warned `content.stale`.
|
|
36
|
+
` provenance ${p.vouched} vouched${p.sampledVouched > 0 ? ` (${p.sampledVouched} sampled)` : ""} — ` +
|
|
37
|
+
`${p.contentStale} stale content · ${p.staleDigests} stale digest(s) · ${p.unverifiableFromHere} unverifiable from here`);
|
|
38
|
+
// The ceiling is the features axis's `active` — the payload deliberately
|
|
39
|
+
// carries that denominator once, so this line reads it from there.
|
|
40
|
+
console.log(` verification ${f.active} feature(s) → ${v.recorded} recorded — ` +
|
|
41
|
+
VERIFICATION_VERDICTS.map((verdict) => `${v.verdicts[verdict]} ${verdict}`).join(" · ") +
|
|
42
|
+
` — claims ${v.claims.confirmed}/${v.claims.total} confirmed ` +
|
|
43
|
+
// Every provenance, under its own `answered_by` spelling and always all
|
|
44
|
+
// three — the same stable-shape rendering as the verdicts before it. Two
|
|
45
|
+
// buckets could not name what they held: the line said "runner" over
|
|
46
|
+
// claims no runner answered, and no label short of the real one fixes
|
|
47
|
+
// that, because `external-runner` is neither of the other two.
|
|
48
|
+
`(${ANSWERED_BY.map((who) => `${v.claims.answered[who]} ${who}`).join(" · ")})`);
|
|
49
|
+
console.log(` operations ${o.defined} defined → ${o.governed} governed · ` +
|
|
50
|
+
`${o.deprecated} deprecated (${o.deprecatedStillConsumed} still consumed)`);
|
|
51
|
+
console.log(` messages ${m.defined} defined → ${m.linked} linked`);
|
|
52
|
+
console.log(` c4 ${c4.elements} elements → ${c4.covered} covered`);
|
|
53
|
+
// Participation per axis over the one denominator, then the same facts as
|
|
54
|
+
// the sentence a standup reads out: which axes the fleet has started at
|
|
55
|
+
// all. "adopted" here means at least one participating service — the
|
|
56
|
+
// per-axis counts on the line above say how many.
|
|
57
|
+
const a = card.adoption;
|
|
58
|
+
console.log(` adoption ` +
|
|
59
|
+
ADOPTION_AXES.map((axis) => `${axis} ${a[axis]}/${card.services}`).join(" · "));
|
|
60
|
+
const adopted = ADOPTION_AXES.filter((axis) => a[axis] > 0);
|
|
61
|
+
const notStarted = ADOPTION_AXES.filter((axis) => a[axis] === 0);
|
|
62
|
+
console.log(` axes adopted: ${adopted.length === 0 ? "none" : adopted.join(", ")}` +
|
|
63
|
+
(notStarted.length === 0 ? "" : ` · not started: ${notStarted.join(", ")}`));
|
|
64
|
+
// The stage values are `loam status`'s branching vocabulary, and `ready` read
|
|
65
|
+
// alone as "ready to ship" — so the two that mislead are glossed in place
|
|
66
|
+
// (`loam explain ready` has the long form).
|
|
67
|
+
console.log(` features ${f.active} active — ` +
|
|
68
|
+
ARTIFACT_STATUSES.map((stage) => `${f.stages[stage]} ${stage}`).join(" · ") +
|
|
69
|
+
(f.active > 0 ? " (ready = docs written, not yet verified; done = verified)" : ""));
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=print.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../../../../src/commands/validate/fleet/scorecard/print.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,M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AG,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CACT,4BAA4B,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC9E,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAC9E,CAAC;IACF,8EAA8E;IAC9E,0EAA0E;IAC1E,4CAA4C;IAC5C,OAAO,CAAC,GAAG,CACT,mBAAmB,CAAC,CAAC,MAAM,YAAY;QACrC,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3E,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,6DAA6D,CAAC,CAAC,CAAC,EAAE,CAAC,CACtF,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The fleet scorecard's one table — how the `--all` text report renders what\n * `./scorecard.js` derived. A module of its own for validate's own discipline\n * (validate.ts's header: the checks produce findings and none of them print;\n * printing happens after the last target is graded), and so the derivation\n * and the formatting do not share a file whose one seam is exactly that.\n *\n * One line per axis, ceiling before actual, read left to right the way the\n * numbers are read in a CI log — except the adoption row, which states\n * participation over the denominator (`requirements 3/40`): adoption is an\n * N-of-M spread, not a ceiling chased by an actual, and forcing it into the\n * arrow idiom would read as one. It prints under `--errors-only` too, on\n * purpose: like the summary footer it is a rollup, not a finding, and\n * `--errors-only` is a findings-rendering lever (report.ts).\n */\nimport { ARTIFACT_STATUSES } from \"../../../../core/status/report.js\";\nimport { ANSWERED_BY } from \"../../../../core/verify/answers.js\";\nimport { VERIFICATION_VERDICTS } from \"../../../../core/verify/record.js\";\nimport { MATURITY_LADDER } from \"../../../../core/vocabulary/maturity.js\";\nimport { ADOPTION_AXES } from \"./adoption.js\";\nimport { type Scorecard } from \"./scorecard.js\";\n\nexport function printScorecard(card: Scorecard): void {\n const { maturity, provenance: p, verification: v, operations: o, messages: m, c4, features: f } =\n card;\n console.log(\"\\nfleet scorecard (ceiling → actual)\");\n console.log(\n ` services ${card.services} — ` +\n MATURITY_LADDER.map((rung) => `${maturity[rung]} ${rung}`).join(\" · \"),\n );\n console.log(\n // The sampled count rides INSIDE the vouched number rather than after it,\n // because that is where it changes the reading: \"120 vouched\" and \"120\n // vouched (100 sampled)\" are different fleets, and a reader who stops at\n // the first number must not have been told the stronger of the two.\n // The content count rides beside the digest count rather than inside the\n // vouched one: both are staleness, of the words and of the code, and\n // \"0 stale digest(s)\" alone read as \"nothing is stale\" in a run that had\n // just warned `content.stale`.\n ` provenance ${p.vouched} vouched${p.sampledVouched > 0 ? ` (${p.sampledVouched} sampled)` : \"\"} — ` +\n `${p.contentStale} stale content · ${p.staleDigests} stale digest(s) · ${p.unverifiableFromHere} unverifiable from here`,\n );\n // The ceiling is the features axis's `active` — the payload deliberately\n // carries that denominator once, so this line reads it from there.\n console.log(\n ` verification ${f.active} feature(s) → ${v.recorded} recorded — ` +\n VERIFICATION_VERDICTS.map((verdict) => `${v.verdicts[verdict]} ${verdict}`).join(\" · \") +\n ` — claims ${v.claims.confirmed}/${v.claims.total} confirmed ` +\n // Every provenance, under its own `answered_by` spelling and always all\n // three — the same stable-shape rendering as the verdicts before it. Two\n // buckets could not name what they held: the line said \"runner\" over\n // claims no runner answered, and no label short of the real one fixes\n // that, because `external-runner` is neither of the other two.\n `(${ANSWERED_BY.map((who) => `${v.claims.answered[who]} ${who}`).join(\" · \")})`,\n );\n console.log(\n ` operations ${o.defined} defined → ${o.governed} governed · ` +\n `${o.deprecated} deprecated (${o.deprecatedStillConsumed} still consumed)`,\n );\n console.log(` messages ${m.defined} defined → ${m.linked} linked`);\n console.log(` c4 ${c4.elements} elements → ${c4.covered} covered`);\n // Participation per axis over the one denominator, then the same facts as\n // the sentence a standup reads out: which axes the fleet has started at\n // all. \"adopted\" here means at least one participating service — the\n // per-axis counts on the line above say how many.\n const a = card.adoption;\n console.log(\n ` adoption ` +\n ADOPTION_AXES.map((axis) => `${axis} ${a[axis]}/${card.services}`).join(\" · \"),\n );\n const adopted = ADOPTION_AXES.filter((axis) => a[axis] > 0);\n const notStarted = ADOPTION_AXES.filter((axis) => a[axis] === 0);\n console.log(\n ` axes adopted: ${adopted.length === 0 ? \"none\" : adopted.join(\", \")}` +\n (notStarted.length === 0 ? \"\" : ` · not started: ${notStarted.join(\", \")}`),\n );\n // The stage values are `loam status`'s branching vocabulary, and `ready` read\n // alone as \"ready to ship\" — so the two that mislead are glossed in place\n // (`loam explain ready` has the long form).\n console.log(\n ` features ${f.active} active — ` +\n ARTIFACT_STATUSES.map((stage) => `${f.stages[stage]} ${stage}`).join(\" · \") +\n (f.active > 0 ? \" (ready = docs written, not yet verified; done = verified)\" : \"\"),\n );\n}\n"]}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fleet scorecard: ceiling-vs-actual aggregates for `validate --all`,
|
|
3
|
+
* recomputed per invocation from the same memoized FleetContext reads the run
|
|
4
|
+
* already paid for. loam stores no history — week-over-week tracking is the
|
|
5
|
+
* caller's pipeline's job: capture the `scorecard` payload key per run into a
|
|
6
|
+
* metrics store. Each axis is a pair of domain-named counts (`defined` vs
|
|
7
|
+
* `governed`) rather than abstract ceiling/actual keys, because payload keys
|
|
8
|
+
* freeze the moment they ship and the domain nouns survive axis nuance.
|
|
9
|
+
*
|
|
10
|
+
* This module derives and never prints; `./print.js` renders the one table
|
|
11
|
+
* the `--all` text report appends, and `./contracts.js` owns the per-service
|
|
12
|
+
* contract reads it sums.
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync } from "node:fs";
|
|
15
|
+
import { inOrder } from "../../../../core/kernel/concurrency.js";
|
|
16
|
+
import { coversElement } from "../../../../core/c4/arch.js";
|
|
17
|
+
import { serviceResolver } from "../../../../core/c4/resolve/service.js";
|
|
18
|
+
import {} from "../../../../core/fleet-context.js";
|
|
19
|
+
import {} from "../../../../core/kernel/ids/dirs.js";
|
|
20
|
+
import { landscapePath } from "../../../../core/repo/paths.js";
|
|
21
|
+
import { fleetStatus } from "../../../../core/status/fleet/fleet.js";
|
|
22
|
+
import { ARTIFACT_STATUSES } from "../../../../core/status/report.js";
|
|
23
|
+
import { ANSWERED_BY } from "../../../../core/verify/answers.js";
|
|
24
|
+
import { VERIFICATION_VERDICTS } from "../../../../core/verify/record.js";
|
|
25
|
+
import { maturityRollup } from "../../../../core/vocabulary/maturity.js";
|
|
26
|
+
import { subjectsWith } from "../../../../core/vocabulary/report.js";
|
|
27
|
+
import { featureVerification, serviceViews } from "../../../list/views.js";
|
|
28
|
+
import { drawnSystems } from "../census.js";
|
|
29
|
+
import { readLandscape } from "../load.js";
|
|
30
|
+
import { adoptionOf } from "./adoption.js";
|
|
31
|
+
import { contractCounts } from "./contracts.js";
|
|
32
|
+
/**
|
|
33
|
+
* Derive the scorecard, or decline. The failure story, per axis: a memoized
|
|
34
|
+
* read that FAILED rejects again on every await, so the per-service fan-out
|
|
35
|
+
* contains those per subject — an unreadable service contributes zeros while
|
|
36
|
+
* its own `service.unreadable` finding names the cause — and every landscape
|
|
37
|
+
* read goes through `../load.ts`'s containment, so an unreadable fleet map
|
|
38
|
+
* zeroes the map-derived axes on every platform instead of deleting the card.
|
|
39
|
+
* The catch is the last line of defence for the fleet-wide reads this module
|
|
40
|
+
* does not own (the verification cells, the fleet status): a rollup that can
|
|
41
|
+
* die must not take the graded report with it. No number rather than a wrong
|
|
42
|
+
* number.
|
|
43
|
+
*/
|
|
44
|
+
export async function buildScorecard(input) {
|
|
45
|
+
try {
|
|
46
|
+
return await derive(input);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// Unreadable is not zero: the axes cannot be counted, so no claim is made.
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
async function derive(input) {
|
|
54
|
+
const { docsDir, targets, fleet, boundService } = input;
|
|
55
|
+
const services = await fleet.listServices(docsDir);
|
|
56
|
+
// The landscape, through the run's memo and the fleet target's containment:
|
|
57
|
+
// an unreadable file grades as one that did not parse, and a landscape that
|
|
58
|
+
// proves nothing contributes no inbound edges and no element census —
|
|
59
|
+
// fail-closed, exactly as the no-openapi grace reads the same absence.
|
|
60
|
+
// Loaded FIRST and handed to serviceViews below, so the maturity rollup
|
|
61
|
+
// costs no second parse of a document this run already holds.
|
|
62
|
+
const lp = landscapePath(docsDir);
|
|
63
|
+
const land = existsSync(lp) ? await readLandscape(() => fleet.loadLikeC4(lp)) : null;
|
|
64
|
+
const proven = land !== null && land.errors.length === 0;
|
|
65
|
+
const views = await serviceViews(docsDir, services, boundService, land);
|
|
66
|
+
const maturity = maturityRollup(views);
|
|
67
|
+
// Inbound op-linked edges per service, resolved exactly as the API axis
|
|
68
|
+
// resolves them (service/api.ts): the container-aware resolver, so an edge
|
|
69
|
+
// drawn into `paymentService.api` counts for the service that owns it.
|
|
70
|
+
const known = new Set(services.map((s) => s.id));
|
|
71
|
+
const inbound = new Map();
|
|
72
|
+
if (proven) {
|
|
73
|
+
const svcOf = serviceResolver(land.elements, known);
|
|
74
|
+
for (const r of land.relationships) {
|
|
75
|
+
if (r.op === undefined)
|
|
76
|
+
continue;
|
|
77
|
+
const owner = svcOf(r.target);
|
|
78
|
+
const ops = inbound.get(owner) ?? new Set();
|
|
79
|
+
ops.add(r.op);
|
|
80
|
+
inbound.set(owner, ops);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Every read in THIS fan-out is a memo hit — the service targets already
|
|
84
|
+
// parsed both requirement documents and both contracts — so it spawns no new
|
|
85
|
+
// filesystem work and needs no pool (unlike the verification fan-out below).
|
|
86
|
+
const perService = await Promise.all(services.map((svc) => contractCounts(svc, fleet, inbound.get(svc.id) ?? new Set())));
|
|
87
|
+
const sum = (pick) => perService.reduce((n, c) => n + pick(c), 0);
|
|
88
|
+
const operations = {
|
|
89
|
+
defined: sum((c) => c.operations.defined),
|
|
90
|
+
governed: sum((c) => c.operations.governed),
|
|
91
|
+
deprecated: sum((c) => c.operations.deprecated),
|
|
92
|
+
deprecatedStillConsumed: sum((c) => c.operations.deprecatedStillConsumed),
|
|
93
|
+
};
|
|
94
|
+
const messages = { defined: sum((c) => c.messages.defined), linked: sum((c) => c.messages.linked) };
|
|
95
|
+
const adoption = adoptionOf(perService);
|
|
96
|
+
// C4 coverage: the fleet map's own system census (`drawnSystems` — the set
|
|
97
|
+
// the undocumented pass walks) against every living arch.spec.md's `Covers:`
|
|
98
|
+
// entries. Element entries only — an edge entry names no element.
|
|
99
|
+
const covers = perService.flatMap((c) => c.covers);
|
|
100
|
+
const eligible = proven ? drawnSystems(land.elements, known) : [];
|
|
101
|
+
const covered = eligible.filter((e) => covers.some((c) => coversElement(c, e))).length;
|
|
102
|
+
// Verification: `list`'s own cells, so the two commands cannot disagree
|
|
103
|
+
// about a record's verdict. Active features only — an archived record is
|
|
104
|
+
// frozen history, not fleet debt. This fan-out is NOT memo hits: reading a
|
|
105
|
+
// feature's record is a directory listing plus a small read per record file
|
|
106
|
+
// (the one-file `verification.yaml` and one `verification/<svc>.yaml` per
|
|
107
|
+
// attesting service), and a recorded cell additionally derives its checklist
|
|
108
|
+
// (the same cost `list` pays for the same column; only its enumerations and
|
|
109
|
+
// delta parse are memo hits through `fleet`) — real filesystem work, so it
|
|
110
|
+
// runs through the bounded pool.
|
|
111
|
+
const features = await fleet.listFeatures(docsDir);
|
|
112
|
+
const cells = await inOrder(features, (f) => featureVerification(docsDir, f, fleet));
|
|
113
|
+
const recorded = cells.filter((c) => c !== null);
|
|
114
|
+
const verdicts = Object.fromEntries(VERIFICATION_VERDICTS.map((v) => [v, 0]));
|
|
115
|
+
for (const cell of recorded)
|
|
116
|
+
verdicts[cell.verdict] += 1;
|
|
117
|
+
const confirmed = recorded.reduce((n, c) => n + c.confirmed, 0);
|
|
118
|
+
const answered = Object.fromEntries(ANSWERED_BY.map((who) => [who, recorded.reduce((n, c) => n + c.answered[who], 0)]));
|
|
119
|
+
// The fleet form of `status`, on this run's own snapshot: presence and
|
|
120
|
+
// dependency order, nothing graded — the stages an agent already branches on.
|
|
121
|
+
const status = await fleetStatus(docsDir, { context: fleet });
|
|
122
|
+
const stages = Object.fromEntries(ARTIFACT_STATUSES.map((s) => [s, 0]));
|
|
123
|
+
for (const f of status.features)
|
|
124
|
+
stages[f.stage] += 1;
|
|
125
|
+
return {
|
|
126
|
+
services: services.length,
|
|
127
|
+
maturity,
|
|
128
|
+
provenance: {
|
|
129
|
+
vouched: maturity.vouched,
|
|
130
|
+
// Every count joins through `subjectsWith` on the run's OWN findings, so
|
|
131
|
+
// each is structurally the same number as the report beside it — the
|
|
132
|
+
// unverifiable count is the footer's (unverifiableSubjects is the same
|
|
133
|
+
// call on the same code; this package cannot import the parent back).
|
|
134
|
+
// Every code is a LITERAL — the emitter's own spelling — because the
|
|
135
|
+
// stable-code collector reads counting sites and refuses a slot it
|
|
136
|
+
// cannot read; the collector is also what convicts a typo here.
|
|
137
|
+
staleDigests: subjectsWith(targets, "sources.stale"),
|
|
138
|
+
unverifiableFromHere: subjectsWith(targets, "sources.unverifiable-from-here"),
|
|
139
|
+
// Doc-side, so unlike `staleDigests` these two are complete even from
|
|
140
|
+
// the docs repo: neither `sources.sampled-vouch` nor `content.stale`
|
|
141
|
+
// needs a service repo to fire. `content.stale` names no subject, and
|
|
142
|
+
// `subjectsWith` falls back to the target id — the service, here.
|
|
143
|
+
sampledVouched: subjectsWith(targets, "sources.sampled-vouch"),
|
|
144
|
+
contentStale: subjectsWith(targets, "content.stale"),
|
|
145
|
+
},
|
|
146
|
+
verification: {
|
|
147
|
+
recorded: recorded.length,
|
|
148
|
+
verdicts,
|
|
149
|
+
claims: {
|
|
150
|
+
total: recorded.reduce((n, c) => n + c.claims, 0),
|
|
151
|
+
confirmed,
|
|
152
|
+
answered,
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
operations,
|
|
156
|
+
messages,
|
|
157
|
+
c4: { elements: eligible.length, covered },
|
|
158
|
+
adoption,
|
|
159
|
+
features: { active: status.features.length, stages },
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=scorecard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scorecard.js","sourceRoot":"","sources":["../../../../../src/commands/validate/fleet/scorecard/scorecard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAqB,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAgB,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,mCAAmC,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAmB,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAA4B,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAE,cAAc,EAAiB,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,YAAY,EAAqB,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAyB,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAAE,YAAY,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actual aggregates for `validate --all`,\n * recomputed per invocation from the same memoized FleetContext reads the run\n * already paid for. loam stores no history — week-over-week tracking is the\n * caller's pipeline's job: capture the `scorecard` payload key per run into a\n * metrics store. Each axis is a pair of domain-named counts (`defined` vs\n * `governed`) rather than abstract ceiling/actual keys, because payload keys\n * freeze the moment they ship and the domain nouns survive axis nuance.\n *\n * This module derives and never prints; `./print.js` renders the one table\n * the `--all` text report appends, and `./contracts.js` owns the per-service\n * contract reads it sums.\n */\nimport { existsSync } from \"node:fs\";\nimport { inOrder } from \"../../../../core/kernel/concurrency.js\";\nimport { coversElement } from \"../../../../core/c4/arch.js\";\nimport { serviceResolver } from \"../../../../core/c4/resolve/service.js\";\nimport { type FleetContext } from \"../../../../core/fleet-context.js\";\nimport { type DocsDir } from \"../../../../core/kernel/ids/dirs.js\";\nimport { landscapePath } from \"../../../../core/repo/paths.js\";\nimport { fleetStatus } from \"../../../../core/status/fleet/fleet.js\";\nimport { ARTIFACT_STATUSES, type ArtifactStatus } from \"../../../../core/status/report.js\";\nimport { ANSWERED_BY, type AnsweredBy } from \"../../../../core/verify/answers.js\";\nimport { VERIFICATION_VERDICTS, type VerificationVerdict } from \"../../../../core/verify/record.js\";\nimport { maturityRollup, type Maturity } from \"../../../../core/vocabulary/maturity.js\";\nimport { subjectsWith, type TargetReport } from \"../../../../core/vocabulary/report.js\";\nimport { featureVerification, serviceViews, type VerificationCell } from \"../../../list/views.js\";\nimport { drawnSystems } from \"../census.js\";\nimport { readLandscape } from \"../load.js\";\nimport { adoptionOf, type Adoption } from \"./adoption.js\";\nimport { contractCounts, type ContractCounts } from \"./contracts.js\";\n\n/** What `buildScorecard` needs of the run that is already in hand. */\nexport interface ScorecardInput {\n docsDir: DocsDir;\n /** The run's graded targets — the source for the one count only a repo-bound check can make (`sources.stale` walks the service's own repository, and must not run twice). */\n targets: TargetReport[];\n /** The run's memoized snapshot: every read below is a hit on it. */\n fleet: FleetContext;\n /** loam.json's `service` — the one repo whose `sources` are checkable from here (serviceViews' rule). */\n boundService: string | undefined;\n}\n\n/**\n * The additive `scorecard` payload key of `validate --all --json`, and the\n * `--all` text table. Shape frozen on ship, like every payload key: fields\n * may be added, never changed or removed.\n */\nexport interface Scorecard {\n /** Every `services/` directory the enumeration lists — the maturity rollup's denominator. */\n services: number;\n /** Counts per adoption-maturity rung, every rung present (core/vocabulary/maturity.ts). */\n maturity: Record<Maturity, number>;\n provenance: {\n /** Services at the `vouched` rung — a person stamped them. */\n vouched: number;\n /**\n * Of those, the ones where the person read a recorded SAMPLE of the\n * document rather than all of it, by subject off this run's\n * `sources.sampled-vouch` findings.\n *\n * Additive beside `vouched` rather than subtracted from it, because the\n * rung is real — a person did stamp it — but a dial reading\n * `vouched: 120` where 100 of them are sampled is exactly the\n * partial-trust-as-full-trust misreading the scope exists to prevent. A\n * dashboard that wants the stricter number subtracts this one knowingly.\n */\n sampledVouched: number;\n /**\n * Services whose stamped sources digest no longer matches the code, by\n * subject off this run's `sources.stale` findings — only what THIS run\n * could verify, so read it beside the count below, never alone.\n */\n staleDigests: number;\n /** Services whose declared `sources` only their own repos can check. */\n unverifiableFromHere: number;\n /**\n * Services with a stamped document whose WORDS moved after the vouch, by\n * subject off this run's `content.stale` findings. The doc-side half of\n * staleness, so unlike `staleDigests` it is complete from the docs repo —\n * and its absence was the scorecard saying \"1 vouched — 0 stale\" in the\n * same run that warned `content.stale` one line above it. Additive beside\n * `vouched` for `sampledVouched`'s reason.\n */\n contentStale: number;\n };\n verification: {\n /**\n * Active features with a verification record beside them. Its ceiling is\n * `features.active` — deliberately not repeated here: one denominator,\n * derived once, so the two axes cannot disagree about how many features\n * are in flight.\n */\n recorded: number;\n /** The recorded features' three-valued verdicts (core/verify/record.ts), every key present. */\n verdicts: Record<VerificationVerdict, number>;\n claims: {\n /** Questions asked across every recorded feature, `tallyRecord`'s counting. */\n total: number;\n confirmed: number;\n /**\n * Of the confirmed, one count per `answered_by` value (`ANSWERED_BY`),\n * every key present — the stable-shape rule `verdicts` and `stages`\n * follow, so a fourth provenance would appear rather than be absorbed.\n *\n * Read off the answers' own provenance, never by subtracting the\n * attested share: `attestedClaims` counts `scenario.tested` alone, so\n * `confirmed - attested` filed every OTHER kind an agent confirmed — a\n * permission, a capability, an exposed operation — under a test runner\n * that had not run. A record with four agent answers printed as three\n * runner and one agent, which is the reading this axis exists to give.\n */\n answered: Record<AnsweredBy, number>;\n };\n };\n /**\n * The HTTP axis, with a deliberate UNIT split: `defined`/`governed` count\n * contract SLOTS, exactly as the API axis's own findings count operations,\n * while `deprecated`/`deprecatedStillConsumed` count DISTINCT operationIds —\n * a duplicate-id slot pair (already its own warning) retires as ONE\n * operation, one migration owed.\n */\n operations: {\n /** Slots the living contracts define (removal markers are never operations). */\n defined: number;\n /** Slots (like `defined`) whose id a living requirement's `Operations:` line governs. */\n governed: number;\n /** Distinct deprecated operationIds. */\n deprecated: number;\n /** Distinct deprecated ids something still joins to — a living `Operations:` line, or an op-linked inbound landscape edge. */\n deprecatedStillConsumed: number;\n };\n messages: {\n /** Distinct message names the living async contracts declare. */\n defined: number;\n /** Of them, the ones a requirement's `Publishes:`/`Consumes:` line governs. */\n linked: number;\n };\n c4: {\n /** The drawn SYSTEMS — `drawnSystems`, the fleet map's own census, so the map's exemptions (actors, INFRA kinds the fleet runs rather than adopts, `#external`, groupings, containers) and this count cannot drift. An INFRA-kind element that DOES stand for a `services/<id>/` stays in, so adopting a store never shrinks the denominator. */\n elements: number;\n /** Of them, the ones some living arch requirement's `Covers:` entry names. */\n covered: number;\n };\n /**\n * Services PARTICIPATING in each contract axis — how far the staged\n * adoption has spread, axis by axis. The denominator is `services`, carried\n * once above like every other denominator here. One mechanical rule per\n * axis, per service: `requirements` — spec.md holds at least one\n * `### Requirement:` block (content, not file presence, so a fleet of empty\n * adopt scaffolds honestly reads \"not started\"); `arch` — the same for\n * arch.spec.md; `openapi` / `asyncapi` — the contract file exists;\n * `permissions` / `capabilities` — at least one non-REMOVED requirement in\n * either spec document carries a `Requires:` / `Capability:` entry (the\n * used-set rule the fleet vocabulary checks apply). An axis at 0 is \"not\n * started\" — distinct from partially adopted — and is what licenses the\n * text report's per-axis warning banner (./adoption.js). An unreadable\n * service counts as participating in nothing, the same zeros doctrine as\n * every count here — read these beside the run's `service.unreadable`\n * findings, and note the text renderer refuses to group warnings on a run\n * that has any (report.ts).\n */\n adoption: Adoption;\n features: {\n active: number;\n /**\n * The fleet form's stage per active feature — all five ARTIFACT_STATUSES\n * keys even though that form never grades `draft` (the maturityRollup\n * rule: a stable shape a dashboard can diff).\n */\n stages: Record<ArtifactStatus, number>;\n };\n}\n\n/**\n * Derive the scorecard, or decline. The failure story, per axis: a memoized\n * read that FAILED rejects again on every await, so the per-service fan-out\n * contains those per subject — an unreadable service contributes zeros while\n * its own `service.unreadable` finding names the cause — and every landscape\n * read goes through `../load.ts`'s containment, so an unreadable fleet map\n * zeroes the map-derived axes on every platform instead of deleting the card.\n * The catch is the last line of defence for the fleet-wide reads this module\n * does not own (the verification cells, the fleet status): a rollup that can\n * die must not take the graded report with it. No number rather than a wrong\n * number.\n */\nexport async function buildScorecard(input: ScorecardInput): Promise<Scorecard | null> {\n try {\n return await derive(input);\n } catch {\n // Unreadable is not zero: the axes cannot be counted, so no claim is made.\n return null;\n }\n}\n\nasync function derive(input: ScorecardInput): Promise<Scorecard> {\n const { docsDir, targets, fleet, boundService } = input;\n const services = await fleet.listServices(docsDir);\n\n // The landscape, through the run's memo and the fleet target's containment:\n // an unreadable file grades as one that did not parse, and a landscape that\n // proves nothing contributes no inbound edges and no element census —\n // fail-closed, exactly as the no-openapi grace reads the same absence.\n // Loaded FIRST and handed to serviceViews below, so the maturity rollup\n // costs no second parse of a document this run already holds.\n const lp = landscapePath(docsDir);\n const land = existsSync(lp) ? await readLandscape(() => fleet.loadLikeC4(lp)) : null;\n const proven = land !== null && land.errors.length === 0;\n\n const views = await serviceViews(docsDir, services, boundService, land);\n const maturity = maturityRollup(views);\n\n // Inbound op-linked edges per service, resolved exactly as the API axis\n // resolves them (service/api.ts): the container-aware resolver, so an edge\n // drawn into `paymentService.api` counts for the service that owns it.\n const known: ReadonlySet<string> = new Set(services.map((s) => s.id));\n const inbound = new Map<string, Set<string>>();\n if (proven) {\n const svcOf = serviceResolver(land.elements, known);\n for (const r of land.relationships) {\n if (r.op === undefined) continue;\n const owner: string = svcOf(r.target);\n const ops = inbound.get(owner) ?? new Set<string>();\n ops.add(r.op);\n inbound.set(owner, ops);\n }\n }\n\n // Every read in THIS fan-out is a memo hit — the service targets already\n // parsed both requirement documents and both contracts — so it spawns no new\n // filesystem work and needs no pool (unlike the verification fan-out below).\n const perService = await Promise.all(\n services.map((svc) => contractCounts(svc, fleet, inbound.get(svc.id) ?? new Set<string>())),\n );\n const sum = (pick: (c: ContractCounts) => number): number =>\n perService.reduce((n, c) => n + pick(c), 0);\n const operations = {\n defined: sum((c) => c.operations.defined),\n governed: sum((c) => c.operations.governed),\n deprecated: sum((c) => c.operations.deprecated),\n deprecatedStillConsumed: sum((c) => c.operations.deprecatedStillConsumed),\n };\n const messages = { defined: sum((c) => c.messages.defined), linked: sum((c) => c.messages.linked) };\n const adoption = adoptionOf(perService);\n\n // C4 coverage: the fleet map's own system census (`drawnSystems` — the set\n // the undocumented pass walks) against every living arch.spec.md's `Covers:`\n // entries. Element entries only — an edge entry names no element.\n const covers = perService.flatMap((c) => c.covers);\n const eligible = proven ? drawnSystems(land.elements, known) : [];\n const covered = eligible.filter((e) => covers.some((c) => coversElement(c, e))).length;\n\n // Verification: `list`'s own cells, so the two commands cannot disagree\n // about a record's verdict. Active features only — an archived record is\n // frozen history, not fleet debt. This fan-out is NOT memo hits: reading a\n // feature's record is a directory listing plus a small read per record file\n // (the one-file `verification.yaml` and one `verification/<svc>.yaml` per\n // attesting service), and a recorded cell additionally derives its checklist\n // (the same cost `list` pays for the same column; only its enumerations and\n // delta parse are memo hits through `fleet`) — real filesystem work, so it\n // runs through the bounded pool.\n const features = await fleet.listFeatures(docsDir);\n const cells = await inOrder(features, (f) => featureVerification(docsDir, f, fleet));\n const recorded = cells.filter((c): c is VerificationCell => c !== null);\n const verdicts = Object.fromEntries(VERIFICATION_VERDICTS.map((v) => [v, 0])) as Record<VerificationVerdict, number>;\n for (const cell of recorded) verdicts[cell.verdict] += 1;\n const confirmed = recorded.reduce((n, c) => n + c.confirmed, 0);\n const answered = Object.fromEntries(\n ANSWERED_BY.map((who) => [who, recorded.reduce((n, c) => n + c.answered[who], 0)]),\n ) as Record<AnsweredBy, number>;\n\n // The fleet form of `status`, on this run's own snapshot: presence and\n // dependency order, nothing graded — the stages an agent already branches on.\n const status = await fleetStatus(docsDir, { context: fleet });\n const stages = Object.fromEntries(ARTIFACT_STATUSES.map((s) => [s, 0])) as Record<ArtifactStatus, number>;\n for (const f of status.features) stages[f.stage] += 1;\n\n return {\n services: services.length,\n maturity,\n provenance: {\n vouched: maturity.vouched,\n // Every count joins through `subjectsWith` on the run's OWN findings, so\n // each is structurally the same number as the report beside it — the\n // unverifiable count is the footer's (unverifiableSubjects is the same\n // call on the same code; this package cannot import the parent back).\n // Every code is a LITERAL — the emitter's own spelling — because the\n // stable-code collector reads counting sites and refuses a slot it\n // cannot read; the collector is also what convicts a typo here.\n staleDigests: subjectsWith(targets, \"sources.stale\"),\n unverifiableFromHere: subjectsWith(targets, \"sources.unverifiable-from-here\"),\n // Doc-side, so unlike `staleDigests` these two are complete even from\n // the docs repo: neither `sources.sampled-vouch` nor `content.stale`\n // needs a service repo to fire. `content.stale` names no subject, and\n // `subjectsWith` falls back to the target id — the service, here.\n sampledVouched: subjectsWith(targets, \"sources.sampled-vouch\"),\n contentStale: subjectsWith(targets, \"content.stale\"),\n },\n verification: {\n recorded: recorded.length,\n verdicts,\n claims: {\n total: recorded.reduce((n, c) => n + c.claims, 0),\n confirmed,\n answered,\n },\n },\n operations,\n messages,\n c4: { elements: eligible.length, covered },\n adoption,\n features: { active: status.features.length, stages },\n };\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { viewFile } from "../../../../core/usecases/place.js";
|
|
2
|
+
/**
|
|
3
|
+
* The opening of every finding in this family:
|
|
4
|
+
* `landscape: architecture/usecases/checkout.likec4 — dynamic view 'uc_checkout'`.
|
|
5
|
+
*
|
|
6
|
+
* The `landscape:` prefix is the TARGET's name, not a file reference — every
|
|
7
|
+
* finding filed on the fleet target carries it, and `landscape.invalid` already
|
|
8
|
+
* sets the precedent of naming another document right after it.
|
|
9
|
+
*/
|
|
10
|
+
export function viewPlace(view) {
|
|
11
|
+
return `landscape: ${viewFile(view)} — dynamic view '${view.id}'`;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=place.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"place.js","sourceRoot":"","sources":["../../../../../src/commands/validate/fleet/usecases/place.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAgB;IACxC,OAAO,cAAc,QAAQ,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,EAAE,GAAG,CAAC;AACpE,CAAC","sourcesContent":["/**\n * Where a use-case FINDING points: the validate target it is filed against, the\n * document the view was written in, and the view itself.\n *\n * The fleet target's `landscape:` prefix, kept as command vocabulary when the\n * graders moved to `core/usecases/grade/` (`core/usecases/place.ts` says why):\n * every grader there takes the place as an argument, and\n * `../map/usecases.ts` hands them this one. It began as a leaf module beside\n * the graders it served, for the leaf-helper-stranded-in-a-heavier-module\n * reason docs/CODE-STYLE.md names as the cause of every import cycle this\n * repository has carried.\n *\n * NAMING THE FILE IS THE WHOLE SUBJECT. `validate --all` reads `architecture/`\n * as ONE LikeC4 project, so a `dynamic view` may have been written in\n * `architecture/landscape.likec4` or in any `architecture/usecases/*.likec4`,\n * and the project is what merges them. A message that named the landscape by\n * default would send its author to a file that does not contain the view — the\n * same defect `landscape.invalid`'s message was corrected for when the project\n * loader landed, arriving again one axis later.\n *\n * `viewFile` and `stepPlace` themselves moved to `core/usecases/place.ts` once\n * `loam diff`, `loam delta` and `loam context` became readers too; that module's\n * banner records why, and why the `landscape:` prefix below stayed here.\n */\nimport type { ParsedView } from \"../../../../core/c4/parsed/dynamic-views.js\";\nimport { viewFile } from \"../../../../core/usecases/place.js\";\n\n/**\n * The opening of every finding in this family:\n * `landscape: architecture/usecases/checkout.likec4 — dynamic view 'uc_checkout'`.\n *\n * The `landscape:` prefix is the TARGET's name, not a file reference — every\n * finding filed on the fleet target carries it, and `landscape.invalid` already\n * sets the precedent of naming another document right after it.\n */\nexport function viewPlace(view: ParsedView): string {\n return `landscape: ${viewFile(view)} — dynamic view '${view.id}'`;\n}\n"]}
|