@ybotok/loam 0.1.0-beta.3 → 0.2.0-alpha.2
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 +2635 -86
- package/COMPARISON.md +80 -63
- package/CONTRIBUTING.md +84 -0
- package/MIGRATING-from-OpenSpec.md +213 -54
- package/QUICKSTART.md +125 -0
- package/README.md +450 -150
- package/ROADMAP.md +599 -0
- package/SCHEMA.md +2355 -256
- package/SECURITY.md +21 -3
- package/WORKFLOW.md +701 -0
- package/dist/cli.js +113 -19
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt/adopt.js +209 -0
- package/dist/commands/adopt/adopt.js.map +1 -0
- package/dist/commands/adopt/render.js +268 -0
- package/dist/commands/adopt/render.js.map +1 -0
- package/dist/commands/archive/archive.js +77 -0
- package/dist/commands/archive/archive.js.map +1 -0
- package/dist/commands/archive/plan/contracts/asyncapi.js +178 -0
- package/dist/commands/archive/plan/contracts/asyncapi.js.map +1 -0
- package/dist/commands/archive/plan/contracts/openapi.js +159 -0
- package/dist/commands/archive/plan/contracts/openapi.js.map +1 -0
- package/dist/commands/archive/plan/gate.js +323 -0
- package/dist/commands/archive/plan/gate.js.map +1 -0
- package/dist/commands/archive/plan/landscape.js +180 -0
- package/dist/commands/archive/plan/landscape.js.map +1 -0
- package/dist/commands/archive/plan/refusal.js +111 -0
- package/dist/commands/archive/plan/refusal.js.map +1 -0
- package/dist/commands/archive/plan/specs.js +237 -0
- package/dist/commands/archive/plan/specs.js.map +1 -0
- package/dist/commands/archive/plan/state.js +27 -0
- package/dist/commands/archive/plan/state.js.map +1 -0
- package/dist/commands/archive/run.js +252 -0
- package/dist/commands/archive/run.js.map +1 -0
- package/dist/commands/context/context.js +99 -0
- package/dist/commands/context/context.js.map +1 -0
- package/dist/commands/context/print.js +283 -0
- package/dist/commands/context/print.js.map +1 -0
- package/dist/commands/delta/delta.js +279 -0
- package/dist/commands/delta/delta.js.map +1 -0
- package/dist/commands/delta/print.js +205 -0
- package/dist/commands/delta/print.js.map +1 -0
- package/dist/commands/dependencies.js +9 -7
- package/dist/commands/dependencies.js.map +1 -1
- package/dist/commands/diff/diff.js +93 -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 +5 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/explain/explain.js +151 -0
- package/dist/commands/explain/explain.js.map +1 -0
- package/dist/commands/explore.js +29 -24
- package/dist/commands/explore.js.map +1 -1
- package/dist/commands/gate/gate.js +115 -0
- package/dist/commands/gate/gate.js.map +1 -0
- package/dist/commands/gate/print.js +54 -0
- package/dist/commands/gate/print.js.map +1 -0
- package/dist/commands/gherkin/commit.js +146 -0
- package/dist/commands/gherkin/commit.js.map +1 -0
- package/dist/commands/gherkin/gherkin.js +246 -0
- package/dist/commands/gherkin/gherkin.js.map +1 -0
- package/dist/commands/gherkin/reconcile.js +149 -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 +28 -0
- package/dist/commands/init/first-hour.js.map +1 -0
- package/dist/commands/{init.js → init/init.js} +146 -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 +65 -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 +157 -0
- package/dist/commands/list/json.js.map +1 -0
- package/dist/commands/list/list.js +343 -0
- package/dist/commands/list/list.js.map +1 -0
- package/dist/commands/list/print.js +301 -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/views.js +105 -0
- package/dist/commands/list/views.js.map +1 -0
- package/dist/commands/mcp/dispatch.js +183 -0
- package/dist/commands/mcp/dispatch.js.map +1 -0
- package/dist/commands/mcp/mcp.js +34 -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 +170 -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 +142 -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 +91 -0
- package/dist/commands/migrate-openspec/openspec/decisions.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/error.js +19 -0
- package/dist/commands/migrate-openspec/openspec/error.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/mapping.js +170 -0
- package/dist/commands/migrate-openspec/openspec/mapping.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/paths.js +43 -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/commit.js +76 -0
- package/dist/commands/new/commit.js.map +1 -0
- package/dist/commands/new/new.js +283 -0
- package/dist/commands/new/new.js.map +1 -0
- package/dist/commands/new/templates.js +355 -0
- package/dist/commands/new/templates.js.map +1 -0
- package/dist/commands/open.js +203 -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} +11 -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 +275 -0
- package/dist/commands/rebase/rebase.js.map +1 -0
- package/dist/commands/seed/commit.js +192 -0
- package/dist/commands/seed/commit.js.map +1 -0
- package/dist/commands/seed/plan.js +133 -0
- package/dist/commands/seed/plan.js.map +1 -0
- package/dist/commands/seed/seed.js +172 -0
- package/dist/commands/seed/seed.js.map +1 -0
- package/dist/commands/show/feature.js +178 -0
- package/dist/commands/show/feature.js.map +1 -0
- package/dist/commands/show/marks.js +24 -0
- package/dist/commands/show/marks.js.map +1 -0
- package/dist/commands/{show.js → show/service.js} +63 -152
- package/dist/commands/show/service.js.map +1 -0
- package/dist/commands/show/show.js +77 -0
- package/dist/commands/show/show.js.map +1 -0
- package/dist/commands/status/json.js +45 -0
- package/dist/commands/status/json.js.map +1 -0
- package/dist/commands/status/print.js +157 -0
- package/dist/commands/status/print.js.map +1 -0
- package/dist/commands/status/status.js +119 -0
- package/dist/commands/status/status.js.map +1 -0
- package/dist/commands/steps/steps.js +189 -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 +265 -0
- package/dist/commands/subsystem/move.js.map +1 -0
- package/dist/commands/subsystem/query.js +115 -0
- package/dist/commands/subsystem/query.js.map +1 -0
- package/dist/commands/subsystem/subsystem.js +101 -0
- package/dist/commands/subsystem/subsystem.js.map +1 -0
- package/dist/commands/subsystem/sync.js +103 -0
- package/dist/commands/subsystem/sync.js.map +1 -0
- package/dist/commands/subsystem/txn/txn.js +94 -0
- package/dist/commands/subsystem/txn/txn.js.map +1 -0
- package/dist/commands/subsystem/txn/views.js +70 -0
- package/dist/commands/subsystem/txn/views.js.map +1 -0
- package/dist/commands/unarchive/manifest.js +160 -0
- package/dist/commands/unarchive/manifest.js.map +1 -0
- package/dist/commands/{unarchive.js → unarchive/restore.js} +47 -160
- package/dist/commands/unarchive/restore.js.map +1 -0
- package/dist/commands/unarchive/unarchive.js +67 -0
- package/dist/commands/unarchive/unarchive.js.map +1 -0
- package/dist/commands/validate/arch-coverage.js +204 -0
- package/dist/commands/validate/arch-coverage.js.map +1 -0
- package/dist/commands/validate/checks/fleet-shape.js +296 -0
- package/dist/commands/validate/checks/fleet-shape.js.map +1 -0
- package/dist/commands/validate/checks/health-deps.js +55 -0
- package/dist/commands/validate/checks/health-deps.js.map +1 -0
- package/dist/commands/validate/checks/requirements.js +254 -0
- package/dist/commands/validate/checks/requirements.js.map +1 -0
- package/dist/commands/validate/checks/sources.js +76 -0
- package/dist/commands/validate/checks/sources.js.map +1 -0
- package/dist/commands/validate/checks/vocabulary.js +31 -0
- package/dist/commands/validate/checks/vocabulary.js.map +1 -0
- package/dist/commands/validate/feature.js +216 -0
- package/dist/commands/validate/feature.js.map +1 -0
- package/dist/commands/validate/fleet/census.js +69 -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 +353 -0
- package/dist/commands/validate/fleet/landscape.js.map +1 -0
- package/dist/commands/validate/fleet/load.js +52 -0
- package/dist/commands/validate/fleet/load.js.map +1 -0
- package/dist/commands/validate/fleet/obligations.js +270 -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 +63 -0
- package/dist/commands/validate/fleet/scorecard/print.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/scorecard.js +156 -0
- package/dist/commands/validate/fleet/scorecard/scorecard.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/capability-tag.js +94 -0
- package/dist/commands/validate/fleet/usecases/capability-tag.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/usecases/requirement-tag.js +95 -0
- package/dist/commands/validate/fleet/usecases/requirement-tag.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/steps.js +197 -0
- package/dist/commands/validate/fleet/usecases/steps.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/usecases.js +99 -0
- package/dist/commands/validate/fleet/usecases/usecases.js.map +1 -0
- package/dist/commands/validate/fleet/views/ids.js +40 -0
- package/dist/commands/validate/fleet/views/ids.js.map +1 -0
- package/dist/commands/validate/fleet/views/stale.js +59 -0
- package/dist/commands/validate/fleet/views/stale.js.map +1 -0
- package/dist/commands/validate/links/corpus.js +92 -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/report.js +269 -0
- package/dist/commands/validate/report.js.map +1 -0
- package/dist/commands/validate/service/api.js +338 -0
- package/dist/commands/validate/service/api.js.map +1 -0
- package/dist/commands/validate/service/events/events.js +219 -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 +131 -0
- package/dist/commands/validate/service/evidence-pins.js.map +1 -0
- package/dist/commands/validate/service/service.js +251 -0
- package/dist/commands/validate/service/service.js.map +1 -0
- package/dist/commands/validate/service/specs.js +251 -0
- package/dist/commands/validate/service/specs.js.map +1 -0
- package/dist/commands/validate/service/spine.js +113 -0
- package/dist/commands/validate/service/spine.js.map +1 -0
- package/dist/commands/validate/validate.js +338 -0
- package/dist/commands/validate/validate.js.map +1 -0
- package/dist/commands/verify/cross/diff.js +182 -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 +72 -0
- package/dist/commands/verify/evidence/read.js.map +1 -0
- package/dist/commands/verify/frozen.js +241 -0
- package/dist/commands/verify/frozen.js.map +1 -0
- package/dist/commands/verify/record.js +226 -0
- package/dist/commands/verify/record.js.map +1 -0
- package/dist/commands/verify/report.js +223 -0
- package/dist/commands/verify/report.js.map +1 -0
- package/dist/commands/verify/results.js +246 -0
- package/dist/commands/verify/results.js.map +1 -0
- package/dist/commands/verify/verify.js +217 -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 +271 -0
- package/dist/commands/vouch/pack/print.js.map +1 -0
- package/dist/commands/vouch/pack/sections.js +142 -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 +285 -0
- package/dist/commands/vouch/run.js.map +1 -0
- package/dist/commands/vouch/sample/plan.js +125 -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 +123 -0
- package/dist/commands/vouch/vet/verify.js.map +1 -0
- package/dist/commands/vouch/vouch.js +176 -0
- package/dist/commands/vouch/vouch.js.map +1 -0
- package/dist/core/agent/agents-md/artifacts.js +220 -0
- package/dist/core/agent/agents-md/artifacts.js.map +1 -0
- package/dist/core/agent/agents-md/command-map.js +324 -0
- package/dist/core/agent/agents-md/command-map.js.map +1 -0
- package/dist/core/agent/agents-md/cycle.js +165 -0
- package/dist/core/agent/agents-md/cycle.js.map +1 -0
- package/dist/core/agent/agents-md/map/explain.js +34 -0
- package/dist/core/agent/agents-md/map/explain.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/context.js +41 -0
- package/dist/core/agent/agents-md/map/lenses/context.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/diff.js +46 -0
- package/dist/core/agent/agents-md/map/lenses/diff.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/gate.js +57 -0
- package/dist/core/agent/agents-md/map/lenses/gate.js.map +1 -0
- package/dist/core/agent/agents-md/map/mcp.js +41 -0
- package/dist/core/agent/agents-md/map/mcp.js.map +1 -0
- package/dist/core/agent/agents-md/map/status.js +62 -0
- package/dist/core/agent/agents-md/map/status.js.map +1 -0
- package/dist/core/agent/agents-md/map/subsystem.js +32 -0
- package/dist/core/agent/agents-md/map/subsystem.js.map +1 -0
- package/dist/core/agent/agents-md/map/usecases.js +60 -0
- package/dist/core/agent/agents-md/map/usecases.js.map +1 -0
- package/dist/core/agent/agents-md/refusals.js +246 -0
- package/dist/core/agent/agents-md/refusals.js.map +1 -0
- package/dist/core/agent/agents-md/shipped/archive-gate.js +98 -0
- package/dist/core/agent/agents-md/shipped/archive-gate.js.map +1 -0
- package/dist/core/agent/agents-md/spine.js +40 -0
- package/dist/core/agent/agents-md/spine.js.map +1 -0
- package/dist/core/agent/agents-md.js +170 -0
- package/dist/core/agent/agents-md.js.map +1 -0
- package/dist/core/{agents-stamp.js → agent/agents-stamp.js} +50 -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 +259 -0
- package/dist/core/agent/scaffold.js.map +1 -0
- package/dist/core/agent/support/report.js +103 -0
- package/dist/core/agent/support/report.js.map +1 -0
- package/dist/core/agent/tools/dialects.js +150 -0
- package/dist/core/agent/tools/dialects.js.map +1 -0
- package/dist/core/agent/tools/registry.js +228 -0
- package/dist/core/agent/tools/registry.js.map +1 -0
- package/dist/core/agent/workflows/adopt.js +133 -0
- package/dist/core/agent/workflows/adopt.js.map +1 -0
- package/dist/core/agent/workflows/check.js +337 -0
- package/dist/core/agent/workflows/check.js.map +1 -0
- package/dist/core/agent/workflows/closing.js +262 -0
- package/dist/core/agent/workflows/closing.js.map +1 -0
- package/dist/core/agent/workflows/feature.js +105 -0
- package/dist/core/agent/workflows/feature.js.map +1 -0
- package/dist/core/agent/workflows/implement.js +105 -0
- package/dist/core/agent/workflows/implement.js.map +1 -0
- package/dist/core/agent/workflows/reference/authoring.js +209 -0
- package/dist/core/agent/workflows/reference/authoring.js.map +1 -0
- package/dist/core/agent/workflows/reference/codes.js +65 -0
- package/dist/core/agent/workflows/reference/codes.js.map +1 -0
- package/dist/core/agent/workflows/reference/done-check.js +188 -0
- package/dist/core/agent/workflows/reference/done-check.js.map +1 -0
- package/dist/core/agent/workflows/reference/reference.js +16 -0
- package/dist/core/agent/workflows/reference/reference.js.map +1 -0
- package/dist/core/agent/workflows/reference/spine.js +297 -0
- package/dist/core/agent/workflows/reference/spine.js.map +1 -0
- package/dist/core/asyncapi/baseline/plan.js +110 -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 +141 -0
- package/dist/core/asyncapi/digest.js.map +1 -0
- package/dist/core/asyncapi/merge/components.js +91 -0
- package/dist/core/asyncapi/merge/components.js.map +1 -0
- package/dist/core/asyncapi/merge/error.js +33 -0
- package/dist/core/asyncapi/merge/error.js.map +1 -0
- package/dist/core/asyncapi/merge/markers.js +308 -0
- package/dist/core/asyncapi/merge/markers.js.map +1 -0
- package/dist/core/asyncapi/merge/merge.js +215 -0
- package/dist/core/asyncapi/merge/merge.js.map +1 -0
- package/dist/core/asyncapi/merge/pin.js +107 -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.js → asyncapi/read.js} +95 -109
- package/dist/core/asyncapi/read.js.map +1 -0
- package/dist/core/brief/brief.js +225 -0
- package/dist/core/brief/brief.js.map +1 -0
- package/dist/core/brief/checks.js +250 -0
- package/dist/core/brief/checks.js.map +1 -0
- package/dist/core/brief/landscape.js +194 -0
- package/dist/core/brief/landscape.js.map +1 -0
- package/dist/core/brief/targets.js +226 -0
- package/dist/core/brief/targets.js.map +1 -0
- package/dist/core/brief/unchecked.js +48 -0
- package/dist/core/brief/unchecked.js.map +1 -0
- package/dist/core/c4/arch.js +174 -0
- package/dist/core/c4/arch.js.map +1 -0
- package/dist/core/c4/likec4.js +90 -0
- package/dist/core/c4/likec4.js.map +1 -0
- package/dist/core/c4/parsed/deployment.js +158 -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 +57 -0
- package/dist/core/c4/parsed/values.js.map +1 -0
- package/dist/core/c4/parsed/view-ids.js +75 -0
- package/dist/core/c4/parsed/view-ids.js.map +1 -0
- package/dist/core/c4/project/architecture.js +45 -0
- package/dist/core/c4/project/architecture.js.map +1 -0
- package/dist/core/c4/project/documents.js +58 -0
- package/dist/core/c4/project/documents.js.map +1 -0
- package/dist/core/c4/project/load.js +187 -0
- package/dist/core/c4/project/load.js.map +1 -0
- package/dist/core/c4/project/staged.js +220 -0
- package/dist/core/c4/project/staged.js.map +1 -0
- package/dist/core/c4/resolve/service.js +159 -0
- package/dist/core/c4/resolve/service.js.map +1 -0
- package/dist/core/c4/resolve/steps.js +144 -0
- package/dist/core/c4/resolve/steps.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 +109 -0
- package/dist/core/c4/seed/template.js.map +1 -0
- package/dist/core/c4/source-mask.js +82 -0
- package/dist/core/c4/source-mask.js.map +1 -0
- package/dist/core/c4/source-scan.js +227 -0
- package/dist/core/c4/source-scan.js.map +1 -0
- package/dist/core/c4/splice/authored-source.js +101 -0
- package/dist/core/c4/splice/authored-source.js.map +1 -0
- package/dist/core/c4/splice/contract.js +10 -0
- package/dist/core/c4/splice/contract.js.map +1 -0
- package/dist/core/c4/splice/delta-blocks.js +139 -0
- package/dist/core/c4/splice/delta-blocks.js.map +1 -0
- package/dist/core/c4/splice/identity/edges.js +36 -0
- package/dist/core/c4/splice/identity/edges.js.map +1 -0
- package/dist/core/c4/splice/landscape-merge.js +269 -0
- package/dist/core/c4/splice/landscape-merge.js.map +1 -0
- package/dist/core/c4/splice/placement.js +194 -0
- package/dist/core/c4/splice/placement.js.map +1 -0
- package/dist/core/c4/workspace.js +174 -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 +50 -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 +342 -0
- package/dist/core/capabilities/findings.js.map +1 -0
- package/dist/core/capabilities/realizes/findings.js +181 -0
- package/dist/core/capabilities/realizes/findings.js.map +1 -0
- package/dist/core/capabilities/realizes/join.js +143 -0
- package/dist/core/capabilities/realizes/join.js.map +1 -0
- package/dist/core/capabilities/rollup.js +199 -0
- package/dist/core/capabilities/rollup.js.map +1 -0
- package/dist/core/capabilities/tree.js +126 -0
- package/dist/core/capabilities/tree.js.map +1 -0
- package/dist/core/capabilities/usecase-join.js +277 -0
- package/dist/core/capabilities/usecase-join.js.map +1 -0
- package/dist/core/coherence/authoring/scaffold.js +177 -0
- package/dist/core/coherence/authoring/scaffold.js.map +1 -0
- package/dist/core/coherence/authoring/sentinels.js +74 -0
- package/dist/core/coherence/authoring/sentinels.js.map +1 -0
- package/dist/core/coherence/coherence.js +287 -0
- package/dist/core/coherence/coherence.js.map +1 -0
- package/dist/core/coherence/declared.js +269 -0
- package/dist/core/coherence/declared.js.map +1 -0
- package/dist/core/coherence/events/declared.js +206 -0
- package/dist/core/coherence/events/declared.js.map +1 -0
- package/dist/core/coherence/events/events.js +204 -0
- package/dist/core/coherence/events/events.js.map +1 -0
- package/dist/core/coherence/events/grades.js +166 -0
- package/dist/core/coherence/events/grades.js.map +1 -0
- package/dist/core/coherence/events/lookups.js +122 -0
- package/dist/core/coherence/events/lookups.js.map +1 -0
- package/dist/core/coherence/events/merged.js +40 -0
- package/dist/core/coherence/events/merged.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 +155 -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/conflict-markers.js +60 -0
- package/dist/core/conflict-markers.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 +296 -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 +188 -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 +148 -0
- package/dist/core/diff/base-git.js.map +1 -0
- package/dist/core/diff/base-state.js +209 -0
- package/dist/core/diff/base-state.js.map +1 -0
- package/dist/core/diff/current-state.js +96 -0
- package/dist/core/diff/current-state.js.map +1 -0
- package/dist/core/diff/scope/changed-paths.js +188 -0
- package/dist/core/diff/scope/changed-paths.js.map +1 -0
- package/dist/core/diff/semantic.js +243 -0
- package/dist/core/diff/semantic.js.map +1 -0
- package/dist/core/diff/victims.js +247 -0
- package/dist/core/diff/victims.js.map +1 -0
- package/dist/core/docs.js +7 -64
- package/dist/core/docs.js.map +1 -1
- package/dist/core/doctor/agents.js +222 -0
- package/dist/core/doctor/agents.js.map +1 -0
- package/dist/core/doctor/config.js +135 -0
- package/dist/core/doctor/config.js.map +1 -0
- package/dist/core/doctor/doctor.js +275 -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/residue.js +110 -0
- package/dist/core/doctor/residue.js.map +1 -0
- package/dist/core/document/apply.js +77 -0
- package/dist/core/document/apply.js.map +1 -0
- package/dist/core/{frontmatter.js → document/frontmatter.js} +48 -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 +263 -0
- package/dist/core/document/parse.js.map +1 -0
- package/dist/core/document/scenarios.js +221 -0
- package/dist/core/document/scenarios.js.map +1 -0
- package/dist/core/document/spec.js +241 -0
- package/dist/core/document/spec.js.map +1 -0
- package/dist/core/{config.js → envelope/config.js} +79 -18
- package/dist/core/envelope/config.js.map +1 -0
- package/dist/core/envelope/json.js +175 -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 +175 -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 +181 -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.js +144 -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.js → explore/explore.js} +50 -101
- package/dist/core/explore/explore.js.map +1 -0
- package/dist/core/fleet-context.js +120 -78
- package/dist/core/fleet-context.js.map +1 -1
- package/dist/core/gate/checks.js +201 -0
- package/dist/core/gate/checks.js.map +1 -0
- package/dist/core/gate/partners.js +205 -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 +113 -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 +234 -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 +106 -0
- package/dist/core/glossary/delta.js.map +1 -0
- package/dist/core/glossary/tree.js +86 -0
- package/dist/core/glossary/tree.js.map +1 -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/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} +18 -4
- package/dist/core/kernel/path-safety.js.map +1 -0
- package/dist/core/kernel/records.js.map +1 -0
- package/dist/core/links/backlinks.js +68 -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 +104 -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 +236 -0
- package/dist/core/links/parse.js.map +1 -0
- package/dist/core/mcp/argv.js +111 -0
- package/dist/core/mcp/argv.js.map +1 -0
- package/dist/core/mcp/author-tools.js +72 -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 +314 -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 +166 -0
- package/dist/core/openapi/baseline/gate.js.map +1 -0
- package/dist/core/openapi/baseline/plan.js +112 -0
- package/dist/core/openapi/baseline/plan.js.map +1 -0
- package/dist/core/openapi/baseline/record.js +175 -0
- package/dist/core/openapi/baseline/record.js.map +1 -0
- package/dist/core/openapi/depth.js +122 -0
- package/dist/core/openapi/depth.js.map +1 -0
- package/dist/core/openapi/digest.js +189 -0
- package/dist/core/openapi/digest.js.map +1 -0
- package/dist/core/{openapi.js → openapi/doc.js} +44 -106
- package/dist/core/openapi/doc.js.map +1 -0
- package/dist/core/openapi/merge/components.js +234 -0
- package/dist/core/openapi/merge/components.js.map +1 -0
- package/dist/core/openapi/merge/error.js +26 -0
- package/dist/core/openapi/merge/error.js.map +1 -0
- package/dist/core/openapi/merge/markers.js +208 -0
- package/dist/core/openapi/merge/markers.js.map +1 -0
- package/dist/core/openapi/merge/merge.js +256 -0
- package/dist/core/openapi/merge/merge.js.map +1 -0
- package/dist/core/openapi/merge/pin.js +128 -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 +221 -0
- package/dist/core/openspec/inventory.js.map +1 -0
- package/dist/core/openspec/model/mapping.js +76 -0
- package/dist/core/openspec/model/mapping.js.map +1 -0
- package/dist/core/openspec/model/model.js +65 -0
- package/dist/core/openspec/model/model.js.map +1 -0
- package/dist/core/openspec/scan/changes.js +235 -0
- package/dist/core/openspec/scan/changes.js.map +1 -0
- package/dist/core/openspec/scan/config.js +200 -0
- package/dist/core/openspec/scan/config.js.map +1 -0
- package/dist/core/openspec/scan/shape.js +260 -0
- package/dist/core/openspec/scan/shape.js.map +1 -0
- package/dist/core/openspec/scan/walk.js +133 -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 +137 -0
- package/dist/core/pack/living.js.map +1 -0
- package/dist/core/pack/pack.js +76 -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/provenance/findings.js +208 -0
- package/dist/core/provenance/findings.js.map +1 -0
- package/dist/core/provenance/git.js +225 -0
- package/dist/core/provenance/git.js.map +1 -0
- package/dist/core/provenance/gitq/moves.js +182 -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 +263 -0
- package/dist/core/provenance/sources.js.map +1 -0
- package/dist/core/provenance/stamp.js +232 -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 +277 -0
- package/dist/core/repo/paths.js.map +1 -0
- package/dist/core/repo/repo.js +248 -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 +52 -0
- package/dist/core/repo/tree/find.js.map +1 -0
- package/dist/core/repo/tree/fs.js +64 -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/views.js +172 -0
- package/dist/core/repo/tree/views.js.map +1 -0
- package/dist/core/repo/tree/walk.js +234 -0
- package/dist/core/repo/tree/walk.js.map +1 -0
- package/dist/core/results.js +99 -2
- package/dist/core/results.js.map +1 -1
- package/dist/core/scaffold/landscape.js +131 -0
- package/dist/core/scaffold/landscape.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 +241 -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 +206 -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 +98 -0
- package/dist/core/staging/recovery/intent.js.map +1 -0
- package/dist/core/staging/recovery/recover.js +126 -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.js +202 -0
- package/dist/core/staging/snapshot.js.map +1 -0
- package/dist/core/staging/txn/forward.js +171 -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 +49 -0
- package/dist/core/status/actions/execution.js.map +1 -0
- package/dist/core/status/contracts.js +102 -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 +207 -0
- package/dist/core/status/feature/feature.js.map +1 -0
- package/dist/core/status/feature/next.js +150 -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/fleet/fleet.js +197 -0
- package/dist/core/status/fleet/fleet.js.map +1 -0
- package/dist/core/status/fleet/next.js +207 -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 +201 -0
- package/dist/core/status/verification.js.map +1 -0
- package/dist/core/usecases/capability.js +169 -0
- package/dist/core/usecases/capability.js.map +1 -0
- package/dist/core/usecases/delta/claims.js +116 -0
- package/dist/core/usecases/delta/claims.js.map +1 -0
- package/dist/core/usecases/delta/flows.js +103 -0
- package/dist/core/usecases/delta/flows.js.map +1 -0
- package/dist/core/usecases/delta/overlay.js +72 -0
- package/dist/core/usecases/delta/overlay.js.map +1 -0
- package/dist/core/usecases/fleet.js +137 -0
- package/dist/core/usecases/fleet.js.map +1 -0
- package/dist/core/usecases/operations.js +111 -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/touch.js +101 -0
- package/dist/core/usecases/touch.js.map +1 -0
- package/dist/core/verify/answers.js +173 -0
- package/dist/core/verify/answers.js.map +1 -0
- package/dist/core/verify/build.js +150 -0
- package/dist/core/verify/build.js.map +1 -0
- package/dist/core/verify/checklist.js +201 -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/file.js +257 -0
- package/dist/core/verify/file.js.map +1 -0
- package/dist/core/verify/pins/lint.js +157 -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/record.js +142 -0
- package/dist/core/verify/record.js.map +1 -0
- package/dist/core/verify/store/commit.js +89 -0
- package/dist/core/verify/store/commit.js.map +1 -0
- package/dist/core/verify/store/render.js +57 -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 +58 -0
- package/dist/core/vocabulary/issue.js.map +1 -0
- package/dist/core/vocabulary/maturity.js +145 -0
- package/dist/core/vocabulary/maturity.js.map +1 -0
- package/dist/core/{report.js → vocabulary/report.js} +30 -2
- 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 +189 -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 +280 -0
- package/examples/docs/architecture/obligations.yaml +23 -0
- package/examples/docs/architecture/permissions.yaml +50 -0
- package/examples/docs/architecture/subsystems.likec4 +11 -0
- package/examples/docs/architecture/usecases/order-notification.likec4 +65 -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 +129 -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 +28 -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 +70 -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 +9 -0
- package/examples/docs/loam.json +3 -0
- package/examples/docs/services/checkout-web/model.likec4 +109 -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 +127 -0
- package/examples/docs/services/order-service/asyncapi.yaml +108 -0
- package/examples/docs/services/order-service/health.yaml +57 -0
- package/examples/docs/services/order-service/model.likec4 +138 -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 +73 -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 +67 -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 +117 -0
- package/examples/docs/services/platform/identity-service/health.yaml +70 -0
- package/examples/docs/services/platform/identity-service/model.likec4 +83 -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 +199 -0
- package/examples/docs/services/platform/notification-service/health.yaml +35 -0
- package/examples/docs/services/platform/notification-service/model.likec4 +118 -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.map +0 -1
- package/dist/commands/status.js +0 -262
- package/dist/commands/status.js.map +0 -1
- 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.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.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.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
- /package/dist/core/{concurrency.js → kernel/concurrency.js} +0 -0
- /package/dist/core/{records.js → kernel/records.js} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/** Starting a feature: explore, scaffold, author the three axes, rebase, validate. */
|
|
2
|
+
export const LOAM_FEATURE = {
|
|
3
|
+
name: "loam-feature",
|
|
4
|
+
description: "Start a new loam feature — scaffold it, then author the C4 delta and requirement deltas",
|
|
5
|
+
argumentHint: `<FEAT-id> "<title>"`,
|
|
6
|
+
purpose: "Start a feature in the docs repo: decide which services it touches, scaffold it, then author the C4 delta and one requirement delta per service. The `--touches` list is the hardest call in the cycle and nothing downstream catches one that is short by a service.",
|
|
7
|
+
invocation: 'loam instructions loam-feature $1 "$2"',
|
|
8
|
+
// $2 is the feature's human title: any string is a legal one.
|
|
9
|
+
placeholders: ["feature", "free"],
|
|
10
|
+
spine: [
|
|
11
|
+
"read `AGENTS.md` at the docs repo root — it defines the ID spine everything else depends on",
|
|
12
|
+
"`loam explore` around the services you think are involved: the ring one hop out, and what is already in flight over the same ground",
|
|
13
|
+
"`loam status` / `loam list` / `loam show` — what exists and what is already owed",
|
|
14
|
+
"`loam new` with a `--touches` per service it changes and a `--new-service` per service it introduces",
|
|
15
|
+
"author what the templates left as TODO: intent, the C4 delta, the per-service spec / arch spec / openapi",
|
|
16
|
+
"`loam rebase` — pin every MODIFIED requirement and every operation to the living version you wrote against",
|
|
17
|
+
"validate the feature, then read `loam dependencies` before anyone starts building",
|
|
18
|
+
],
|
|
19
|
+
body: `Start a new feature in the loam docs repo (its path is \`docsDir\` in ./loam.json).
|
|
20
|
+
|
|
21
|
+
1. Read \`AGENTS.md\` at the root of the docs repo first — it defines the ID spine
|
|
22
|
+
everything here depends on.
|
|
23
|
+
2. Understand the current state before proposing a change:
|
|
24
|
+
- \`loam status --json\` — what is already in flight and what it is waiting on.
|
|
25
|
+
Run this FIRST if you joined this repository halfway or lost the session:
|
|
26
|
+
\`next[]\` is ordered and each entry carries the literal command to run, so it
|
|
27
|
+
tells you whether the work is to start $1 at all. \`loam status $1 --json\`
|
|
28
|
+
narrows it to one feature once $1 exists
|
|
29
|
+
- \`loam list --json\` — what services exist, and what documentation they are missing
|
|
30
|
+
- \`loam show <service> --json\` — what a service owns, exposes, and who already calls it
|
|
31
|
+
2b. \`loam explore <service> --json --as $1\` around every service you believe this
|
|
32
|
+
feature touches. This is the step that decides step 3's \`--touches\` list, and it
|
|
33
|
+
is the only decision in the cycle nothing downstream catches — a list short by one
|
|
34
|
+
service produces a feature that validates, archives and ships with a consumer
|
|
35
|
+
nobody updated. Read four fields:
|
|
36
|
+
- \`neighbours\` — the services one hop out in the fleet map. Weigh each one. loam
|
|
37
|
+
knows they are connected, not whether you change them, and it deliberately
|
|
38
|
+
leaves them OUT of the suggested command line rather than guessing for you
|
|
39
|
+
- \`services[].maturity\` — a service at \`empty\` or \`partial\` has no baseline to
|
|
40
|
+
write a delta against, so the work starts with \`loam adopt --service <id>\`, not
|
|
41
|
+
with this feature
|
|
42
|
+
- \`services[].operations\` — what each already exposes, so an operation you are
|
|
43
|
+
about to "add" that is already there becomes a MODIFIED requirement instead
|
|
44
|
+
- \`overlaps\` — active features already carrying a delta for these services.
|
|
45
|
+
\`loam dependencies --json\` (step 7) then says which must archive first
|
|
46
|
+
\`--op <operationId>\` seeds from an operation when you know the call but not who
|
|
47
|
+
owns it. A seed naming no \`services/<id>/\` is reported in \`unknown\` with the
|
|
48
|
+
closest real ids rather than refused — the feature may be introducing it, and a
|
|
49
|
+
typo looks identical until you read that list. \`scaffold\` is the literal step-3
|
|
50
|
+
command line the seeds imply, with \`--new-service\` where the service does not
|
|
51
|
+
exist yet.
|
|
52
|
+
3. Scaffold it: \`loam new $1 --title "$2"\`, adding \`--touches <id>\` for every service the
|
|
53
|
+
feature touches and \`--new-service <id>\` for every one it introduces. Every id goes
|
|
54
|
+
through the \`services/<id>/\` grammar, so a typo is refused (\`invalid-option\`)
|
|
55
|
+
rather than scaffolded; a \`--touches\` that matches nothing existing comes back as
|
|
56
|
+
a \`note\` with the close ids, not as a failure — read it, because a \`--touches\`
|
|
57
|
+
naming a service that does not exist is \`delta.service-unknown\` at validate time
|
|
58
|
+
and a phantom \`services/<typo>/\` directory if it ever archives.
|
|
59
|
+
4. Author what the templates left as TODO. This step is gated, not advisory:
|
|
60
|
+
\`loam archive\` refuses a scaffold nobody edited (\`scaffold.placeholder\`,
|
|
61
|
+
\`intent.empty\`), so the placeholder text cannot reach the living docs.
|
|
62
|
+
- \`intent.md\` — the problem in business terms, in prose; the scaffold's
|
|
63
|
+
comment-only Why/Scope count as unwritten
|
|
64
|
+
- \`delta.likec4\` — new elements and edges, each tagged \`#$1\`; every call edge carries
|
|
65
|
+
\`metadata { op '<operationId>' }\`; replace the scaffolded TODO description on each
|
|
66
|
+
new service. For a requirements-only feature DELETE this
|
|
67
|
+
file: an empty delta is legal, but a scaffold left half-filled is not
|
|
68
|
+
- \`specs/<svc>/spec.md\` — the example requirement ships INSIDE the template's
|
|
69
|
+
comment: copy it out, unindent, one behaviour per requirement, SHALL, at
|
|
70
|
+
least one Given/When/Then scenario; add \`Operations:\` once the operation exists
|
|
71
|
+
- \`specs/<svc>/arch.spec.md\` — the architectural obligations (outbox, retries,
|
|
72
|
+
idempotency, alerts), same grammar; a \`Covers:\` line per requirement naming the
|
|
73
|
+
tagged elements/edges it accounts for, or \`c4.uncovered\` says nothing does
|
|
74
|
+
- \`specs/<svc>/openapi.yaml\` — define every operationId the edges reference
|
|
75
|
+
- \`specs/<svc>/asyncapi.yaml\` — the event axis, only when the feature changes
|
|
76
|
+
what a service puts on or takes off the bus: a complete AsyncAPI 3.0
|
|
77
|
+
document restating the living contract around the slots you change, new
|
|
78
|
+
messages under \`components.messages\`, and a \`Publishes:\`/\`Consumes:\` line
|
|
79
|
+
on each requirement that names them. \`loam new\` scaffolds none — an event
|
|
80
|
+
contract is genuinely optional
|
|
81
|
+
5. **\`loam rebase $1\`** — the step between authoring and checking, and the one that
|
|
82
|
+
stops two features in flight from silently deleting each other's work. It pins
|
|
83
|
+
every MODIFIED/REMOVED requirement (\`Based-On:\`), every operation in the
|
|
84
|
+
contract delta and every asyncapi channel/operation/message slot
|
|
85
|
+
(\`x-loam-based-on\`) to the living version you wrote against.
|
|
86
|
+
Run it on the contract axes even if you changed exactly one endpoint: that is
|
|
87
|
+
what marks the REST of the document as quotation the merge must not write back.
|
|
88
|
+
Without the pins, \`delta.baseline-missing\` / \`openapi.baseline-missing\` /
|
|
89
|
+
\`asyncapi.baseline-missing\` GATE
|
|
90
|
+
the archive: before they did, the second feature to archive reverted the
|
|
91
|
+
first — with \`+0 ~1 -0\`, exit 0, and nobody told. Rebase clears them; a
|
|
92
|
+
human's \`--approve\` is the only other way past.
|
|
93
|
+
Restamping is not resolving: if rebase reports a requirement as MOVED, re-read
|
|
94
|
+
the living text and fold in what you still mean BEFORE you ship.
|
|
95
|
+
6. \`loam validate --feature $1 --json\`. Do not stop while \`valid\` is false.
|
|
96
|
+
7. \`loam dependencies $1 --json\` before anyone starts building: it says which
|
|
97
|
+
features in flight have to archive first (\`order\`) and which collisions no
|
|
98
|
+
ordering fixes (\`conflicts\`, \`cycles\`). Every conflict it names is one \`loam rebase\`
|
|
99
|
+
cannot fix for you — two intentions have to be merged by people.
|
|
100
|
+
|
|
101
|
+
The operation's three spellings — the edge's \`op\`, the requirement's \`Operations:\`
|
|
102
|
+
line, and the OpenAPI \`operationId\` — must match exactly.
|
|
103
|
+
`,
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/core/agent/workflows/feature.ts"],"names":[],"mappings":"AAEA,sFAAsF;AACtF,MAAM,CAAC,MAAM,YAAY,GAAmB;IAC1C,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,yFAAyF;IAC3F,YAAY,EAAE,qBAAqB;IACnC,OAAO,EACL,uQAAuQ;IACzQ,UAAU,EAAE,wCAAwC;IACpD,8DAA8D;IAC9D,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IACjC,KAAK,EAAE;QACL,6FAA6F;QAC7F,qIAAqI;QACrI,kFAAkF;QAClF,sGAAsG;QACtG,0GAA0G;QAC1G,4GAA4G;QAC5G,mFAAmF;KACpF;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFP;CACA,CAAC","sourcesContent":["import type { CommandContent } from \"../contract.js\";\n\n/** Starting a feature: explore, scaffold, author the three axes, rebase, validate. */\nexport const LOAM_FEATURE: CommandContent = {\n name: \"loam-feature\",\n description:\n \"Start a new loam feature — scaffold it, then author the C4 delta and requirement deltas\",\n argumentHint: `<FEAT-id> \"<title>\"`,\n purpose:\n \"Start a feature in the docs repo: decide which services it touches, scaffold it, then author the C4 delta and one requirement delta per service. The `--touches` list is the hardest call in the cycle and nothing downstream catches one that is short by a service.\",\n invocation: 'loam instructions loam-feature $1 \"$2\"',\n // $2 is the feature's human title: any string is a legal one.\n placeholders: [\"feature\", \"free\"],\n spine: [\n \"read `AGENTS.md` at the docs repo root — it defines the ID spine everything else depends on\",\n \"`loam explore` around the services you think are involved: the ring one hop out, and what is already in flight over the same ground\",\n \"`loam status` / `loam list` / `loam show` — what exists and what is already owed\",\n \"`loam new` with a `--touches` per service it changes and a `--new-service` per service it introduces\",\n \"author what the templates left as TODO: intent, the C4 delta, the per-service spec / arch spec / openapi\",\n \"`loam rebase` — pin every MODIFIED requirement and every operation to the living version you wrote against\",\n \"validate the feature, then read `loam dependencies` before anyone starts building\",\n ],\n body: `Start a new feature in the loam docs repo (its path is \\`docsDir\\` in ./loam.json).\n\n1. Read \\`AGENTS.md\\` at the root of the docs repo first — it defines the ID spine\n everything here depends on.\n2. Understand the current state before proposing a change:\n - \\`loam status --json\\` — what is already in flight and what it is waiting on.\n Run this FIRST if you joined this repository halfway or lost the session:\n \\`next[]\\` is ordered and each entry carries the literal command to run, so it\n tells you whether the work is to start $1 at all. \\`loam status $1 --json\\`\n narrows it to one feature once $1 exists\n - \\`loam list --json\\` — what services exist, and what documentation they are missing\n - \\`loam show <service> --json\\` — what a service owns, exposes, and who already calls it\n2b. \\`loam explore <service> --json --as $1\\` around every service you believe this\n feature touches. This is the step that decides step 3's \\`--touches\\` list, and it\n is the only decision in the cycle nothing downstream catches — a list short by one\n service produces a feature that validates, archives and ships with a consumer\n nobody updated. Read four fields:\n - \\`neighbours\\` — the services one hop out in the fleet map. Weigh each one. loam\n knows they are connected, not whether you change them, and it deliberately\n leaves them OUT of the suggested command line rather than guessing for you\n - \\`services[].maturity\\` — a service at \\`empty\\` or \\`partial\\` has no baseline to\n write a delta against, so the work starts with \\`loam adopt --service <id>\\`, not\n with this feature\n - \\`services[].operations\\` — what each already exposes, so an operation you are\n about to \"add\" that is already there becomes a MODIFIED requirement instead\n - \\`overlaps\\` — active features already carrying a delta for these services.\n \\`loam dependencies --json\\` (step 7) then says which must archive first\n \\`--op <operationId>\\` seeds from an operation when you know the call but not who\n owns it. A seed naming no \\`services/<id>/\\` is reported in \\`unknown\\` with the\n closest real ids rather than refused — the feature may be introducing it, and a\n typo looks identical until you read that list. \\`scaffold\\` is the literal step-3\n command line the seeds imply, with \\`--new-service\\` where the service does not\n exist yet.\n3. Scaffold it: \\`loam new $1 --title \"$2\"\\`, adding \\`--touches <id>\\` for every service the\n feature touches and \\`--new-service <id>\\` for every one it introduces. Every id goes\n through the \\`services/<id>/\\` grammar, so a typo is refused (\\`invalid-option\\`)\n rather than scaffolded; a \\`--touches\\` that matches nothing existing comes back as\n a \\`note\\` with the close ids, not as a failure — read it, because a \\`--touches\\`\n naming a service that does not exist is \\`delta.service-unknown\\` at validate time\n and a phantom \\`services/<typo>/\\` directory if it ever archives.\n4. Author what the templates left as TODO. This step is gated, not advisory:\n \\`loam archive\\` refuses a scaffold nobody edited (\\`scaffold.placeholder\\`,\n \\`intent.empty\\`), so the placeholder text cannot reach the living docs.\n - \\`intent.md\\` — the problem in business terms, in prose; the scaffold's\n comment-only Why/Scope count as unwritten\n - \\`delta.likec4\\` — new elements and edges, each tagged \\`#$1\\`; every call edge carries\n \\`metadata { op '<operationId>' }\\`; replace the scaffolded TODO description on each\n new service. For a requirements-only feature DELETE this\n file: an empty delta is legal, but a scaffold left half-filled is not\n - \\`specs/<svc>/spec.md\\` — the example requirement ships INSIDE the template's\n comment: copy it out, unindent, one behaviour per requirement, SHALL, at\n least one Given/When/Then scenario; add \\`Operations:\\` once the operation exists\n - \\`specs/<svc>/arch.spec.md\\` — the architectural obligations (outbox, retries,\n idempotency, alerts), same grammar; a \\`Covers:\\` line per requirement naming the\n tagged elements/edges it accounts for, or \\`c4.uncovered\\` says nothing does\n - \\`specs/<svc>/openapi.yaml\\` — define every operationId the edges reference\n - \\`specs/<svc>/asyncapi.yaml\\` — the event axis, only when the feature changes\n what a service puts on or takes off the bus: a complete AsyncAPI 3.0\n document restating the living contract around the slots you change, new\n messages under \\`components.messages\\`, and a \\`Publishes:\\`/\\`Consumes:\\` line\n on each requirement that names them. \\`loam new\\` scaffolds none — an event\n contract is genuinely optional\n5. **\\`loam rebase $1\\`** — the step between authoring and checking, and the one that\n stops two features in flight from silently deleting each other's work. It pins\n every MODIFIED/REMOVED requirement (\\`Based-On:\\`), every operation in the\n contract delta and every asyncapi channel/operation/message slot\n (\\`x-loam-based-on\\`) to the living version you wrote against.\n Run it on the contract axes even if you changed exactly one endpoint: that is\n what marks the REST of the document as quotation the merge must not write back.\n Without the pins, \\`delta.baseline-missing\\` / \\`openapi.baseline-missing\\` /\n \\`asyncapi.baseline-missing\\` GATE\n the archive: before they did, the second feature to archive reverted the\n first — with \\`+0 ~1 -0\\`, exit 0, and nobody told. Rebase clears them; a\n human's \\`--approve\\` is the only other way past.\n Restamping is not resolving: if rebase reports a requirement as MOVED, re-read\n the living text and fold in what you still mean BEFORE you ship.\n6. \\`loam validate --feature $1 --json\\`. Do not stop while \\`valid\\` is false.\n7. \\`loam dependencies $1 --json\\` before anyone starts building: it says which\n features in flight have to archive first (\\`order\\`) and which collisions no\n ordering fixes (\\`conflicts\\`, \\`cycles\\`). Every conflict it names is one \\`loam rebase\\`\n cannot fix for you — two intentions have to be merged by people.\n\nThe operation's three spellings — the edge's \\`op\\`, the requirement's \\`Operations:\\`\nline, and the OpenAPI \\`operationId\\` — must match exactly.\n`,\n};\n"]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/** Building one service's slice: the delta brief, generated gherkin, steps, code, verify. */
|
|
2
|
+
export const LOAM_IMPLEMENT = {
|
|
3
|
+
name: "loam-implement",
|
|
4
|
+
description: "Implement a loam feature's slice for one service — generated gherkin first, tests from it, then code",
|
|
5
|
+
argumentHint: "<FEAT-id> [service]",
|
|
6
|
+
purpose: "Build one service's part of a feature, in that service's own repository. The generated Gherkin is the acceptance criterion — it comes before the step definitions, and those come before the code.",
|
|
7
|
+
invocation: "loam instructions loam-implement $1 $2",
|
|
8
|
+
placeholders: ["feature", "service"],
|
|
9
|
+
spine: [
|
|
10
|
+
"`loam status` — where this feature actually is, and what is owed before you start",
|
|
11
|
+
"`loam context` — the briefing: the service's living slice, and every delta in flight over it",
|
|
12
|
+
"`loam delta` — the task: the intent, every requirement verbatim, the endpoints, and the calls in and out",
|
|
13
|
+
"`loam gherkin` in the service's repo — the digest-stamped `.feature` files. Never edit them",
|
|
14
|
+
"write step definitions for the generated scenarios first, outside the generated directory",
|
|
15
|
+
"implement until the suite passes, running it with a JSON report",
|
|
16
|
+
"honour the contract in both directions: expose every inbound operation, call every outbound one",
|
|
17
|
+
"`loam rebase` if building made you change the feature's documents at all, then validate the feature",
|
|
18
|
+
],
|
|
19
|
+
body: `Implement one service's part of a feature. Every step runs in the SERVICE'S own
|
|
20
|
+
repository, which needs its own committed ./loam.json — if there is none,
|
|
21
|
+
\`loam init --docs <path-to-docs-repo> --service $2\` then \`loam doctor\` first.
|
|
22
|
+
|
|
23
|
+
0. \`loam status $1 --json\` — where this feature actually is. Run it before
|
|
24
|
+
anything else if you joined halfway or lost the session: it says which
|
|
25
|
+
artifacts are still owed, whether another feature has to archive first, and
|
|
26
|
+
what the next step is, each \`next[]\` entry carrying the literal command. It
|
|
27
|
+
writes nothing, so it is always safe to re-run.
|
|
28
|
+
1. \`loam context $2 --feature $1 --json\` — the briefing to load before touching
|
|
29
|
+
code: the service's living requirements and arch requirements verbatim, its
|
|
30
|
+
operations and messages as they stand today, the permissions and capabilities
|
|
31
|
+
its requirements join to, the fleet edges around it, and this feature's delta
|
|
32
|
+
over it (\`--feature $1\` narrows the in-flight section; drop it to see every
|
|
33
|
+
feature working over this service). The delta below is WHAT CHANGES; the pack
|
|
34
|
+
is what it changes INTO — read it first so a MODIFIED requirement lands as an
|
|
35
|
+
edit rather than a rewrite, and an operation you are about to add is caught
|
|
36
|
+
when the living contract already defines it. Exit 1 with \`ok: true\` means a
|
|
37
|
+
document behind the pack did not parse; the empty section beside the flag is
|
|
38
|
+
the parse failure, not "nothing here".
|
|
39
|
+
2. \`loam delta $1 --service $2 --json\` (drop \`--service\` to use the service configured
|
|
40
|
+
in ./loam.json). That output IS the task:
|
|
41
|
+
- \`intent\` — why this exists
|
|
42
|
+
- \`requirements[]\` — what to build, with \`scenarios[].lines\` verbatim
|
|
43
|
+
- \`archRequirements[]\` — the architectural obligations (outbox, retries, alerts),
|
|
44
|
+
same shape; their scenarios become integration/ops tests, and \`covers\` names
|
|
45
|
+
the model objects each exercises
|
|
46
|
+
- \`architecture\` — whether this service is new, and the calls in and out of it
|
|
47
|
+
- \`api\` — the endpoints this feature adds or retires for this service: path,
|
|
48
|
+
method, operationId and summary, with removals spelled \`REMOVE <METHOD> <path>\`
|
|
49
|
+
- \`openapi\` — whether that contract could be read at all: \`unreadable\`, plus an
|
|
50
|
+
\`error\` when the parser gave a message. It rides beside \`api\` rather than
|
|
51
|
+
inside it because \`api\` stays the operations array it has always been, and it
|
|
52
|
+
is what tells an empty \`api\` apart from a contract delta that did not parse
|
|
53
|
+
- \`services\` — every service this feature projects onto, so a run without
|
|
54
|
+
\`--service\` tells you which ones to ask for rather than guessing
|
|
55
|
+
Exit 1 with \`ok: true\` means one of the two authored documents behind this brief
|
|
56
|
+
did not parse: \`architecture.errors\` non-empty (delta.likec4), or
|
|
57
|
+
\`openapi.unreadable\` true (the feature's openapi.yaml for this service). The empty
|
|
58
|
+
slice is the parse failure itself, not "nothing changes there". Stop and fix that
|
|
59
|
+
document before building anything — for the delta, \`loam validate $1 --json\` names
|
|
60
|
+
the error; the contract delta is not graded by validate, so read the parser message
|
|
61
|
+
the payload carries.
|
|
62
|
+
3. In the service's repo, \`loam gherkin $1 --json\` — one \`.feature\` file per changed
|
|
63
|
+
requirement lands under \`<gherkinDir>/loam/\` (default \`features/loam/\`), scenarios
|
|
64
|
+
digest-stamped, arch requirements tagged \`@architecture\`. Those files ARE the
|
|
65
|
+
acceptance criteria. Never edit them: regeneration rewrites the directory, and
|
|
66
|
+
\`loam validate\` reports the suite stale by digest, not by your intentions.
|
|
67
|
+
4. Write step definitions for the generated scenarios FIRST — outside \`loam/\`.
|
|
68
|
+
Do not paraphrase a scenario into something easier to pass; it is the acceptance
|
|
69
|
+
criterion someone else reviews against.
|
|
70
|
+
Run \`loam steps --service $2 --json\` before you write any: it collapses every
|
|
71
|
+
written step onto the phrase a definition actually matches, so you see the size
|
|
72
|
+
of the registry you owe and which phrases already exist. Write ONE definition per
|
|
73
|
+
phrase row. If \`nearDuplicates\` is non-empty, two rows differ by an article or a
|
|
74
|
+
trailing \`because …\` clause and one definition was meant — fix the SPEC's wording
|
|
75
|
+
and regenerate, rather than writing the second definition.
|
|
76
|
+
A step's argument arrives as an argument: a \`"""\` docstring is the payload, an
|
|
77
|
+
indented table is a DataTable. Assert against them; do not re-parse the step text.
|
|
78
|
+
5. Implement until the suite passes — run it with a JSON report
|
|
79
|
+
(\`cucumber-js --format json:report.json\`):
|
|
80
|
+
\`loam verify $1 --service $2 --results report.json\` consumes that report as the
|
|
81
|
+
done-check's answer sheet. Record from THIS repo, with \`--service\` — the
|
|
82
|
+
\`--service\`-less \`--record\` form writes the whole record from one place and is
|
|
83
|
+
refused (\`record-federated\`) once another service has attested.
|
|
84
|
+
6. Honour the contract: every operation in \`architecture.inbound\` must exist under
|
|
85
|
+
exactly that operationId, and every one in \`architecture.outbound\` must be called.
|
|
86
|
+
7. If building made you change the feature's documents at all — a requirement's
|
|
87
|
+
wording, an operation in its openapi.yaml — **\`loam rebase $1\`** before you
|
|
88
|
+
validate. Every edit you make in the docs repo while other features are in
|
|
89
|
+
flight is written against a living document that may have moved since the
|
|
90
|
+
feature directory was created, and the pins are the only thing that lets the
|
|
91
|
+
merge tell an EDIT from a QUOTE — for operations, path-level keys and
|
|
92
|
+
components alike. \`delta.baseline-missing\` and
|
|
93
|
+
\`openapi.baseline-missing\` are the warnings that say you skipped it — archive
|
|
94
|
+
refuses on them until you rebase (or a human \`--approve\`s the unpinned merge);
|
|
95
|
+
\`delta.baseline-stale\` / \`openapi.baseline-stale\` are archive refusing because
|
|
96
|
+
somebody landed a change underneath you — re-read theirs, fold in what you
|
|
97
|
+
still mean, then rebase again. Re-pinning without re-reading is how you
|
|
98
|
+
overwrite someone else's requirement with loam's blessing.
|
|
99
|
+
8. \`loam validate --feature $1 --json\` before handing back.
|
|
100
|
+
|
|
101
|
+
If the requirement is ambiguous, say so and stop — do not invent behaviour and
|
|
102
|
+
leave the spec disagreeing with the code.
|
|
103
|
+
`,
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=implement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implement.js","sourceRoot":"","sources":["../../../../src/core/agent/workflows/implement.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,sGAAsG;IACxG,YAAY,EAAE,qBAAqB;IACnC,OAAO,EACL,oMAAoM;IACtM,UAAU,EAAE,wCAAwC;IACpD,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACpC,KAAK,EAAE;QACL,mFAAmF;QACnF,8FAA8F;QAC9F,0GAA0G;QAC1G,6FAA6F;QAC7F,2FAA2F;QAC3F,iEAAiE;QACjE,iGAAiG;QACjG,qGAAqG;KACtG;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFP;CACA,CAAC","sourcesContent":["import type { CommandContent } from \"../contract.js\";\n\n/** Building one service's slice: the delta brief, generated gherkin, steps, code, verify. */\nexport const LOAM_IMPLEMENT: CommandContent = {\n name: \"loam-implement\",\n description:\n \"Implement a loam feature's slice for one service — generated gherkin first, tests from it, then code\",\n argumentHint: \"<FEAT-id> [service]\",\n purpose:\n \"Build one service's part of a feature, in that service's own repository. The generated Gherkin is the acceptance criterion — it comes before the step definitions, and those come before the code.\",\n invocation: \"loam instructions loam-implement $1 $2\",\n placeholders: [\"feature\", \"service\"],\n spine: [\n \"`loam status` — where this feature actually is, and what is owed before you start\",\n \"`loam context` — the briefing: the service's living slice, and every delta in flight over it\",\n \"`loam delta` — the task: the intent, every requirement verbatim, the endpoints, and the calls in and out\",\n \"`loam gherkin` in the service's repo — the digest-stamped `.feature` files. Never edit them\",\n \"write step definitions for the generated scenarios first, outside the generated directory\",\n \"implement until the suite passes, running it with a JSON report\",\n \"honour the contract in both directions: expose every inbound operation, call every outbound one\",\n \"`loam rebase` if building made you change the feature's documents at all, then validate the feature\",\n ],\n body: `Implement one service's part of a feature. Every step runs in the SERVICE'S own\nrepository, which needs its own committed ./loam.json — if there is none,\n\\`loam init --docs <path-to-docs-repo> --service $2\\` then \\`loam doctor\\` first.\n\n0. \\`loam status $1 --json\\` — where this feature actually is. Run it before\n anything else if you joined halfway or lost the session: it says which\n artifacts are still owed, whether another feature has to archive first, and\n what the next step is, each \\`next[]\\` entry carrying the literal command. It\n writes nothing, so it is always safe to re-run.\n1. \\`loam context $2 --feature $1 --json\\` — the briefing to load before touching\n code: the service's living requirements and arch requirements verbatim, its\n operations and messages as they stand today, the permissions and capabilities\n its requirements join to, the fleet edges around it, and this feature's delta\n over it (\\`--feature $1\\` narrows the in-flight section; drop it to see every\n feature working over this service). The delta below is WHAT CHANGES; the pack\n is what it changes INTO — read it first so a MODIFIED requirement lands as an\n edit rather than a rewrite, and an operation you are about to add is caught\n when the living contract already defines it. Exit 1 with \\`ok: true\\` means a\n document behind the pack did not parse; the empty section beside the flag is\n the parse failure, not \"nothing here\".\n2. \\`loam delta $1 --service $2 --json\\` (drop \\`--service\\` to use the service configured\n in ./loam.json). That output IS the task:\n - \\`intent\\` — why this exists\n - \\`requirements[]\\` — what to build, with \\`scenarios[].lines\\` verbatim\n - \\`archRequirements[]\\` — the architectural obligations (outbox, retries, alerts),\n same shape; their scenarios become integration/ops tests, and \\`covers\\` names\n the model objects each exercises\n - \\`architecture\\` — whether this service is new, and the calls in and out of it\n - \\`api\\` — the endpoints this feature adds or retires for this service: path,\n method, operationId and summary, with removals spelled \\`REMOVE <METHOD> <path>\\`\n - \\`openapi\\` — whether that contract could be read at all: \\`unreadable\\`, plus an\n \\`error\\` when the parser gave a message. It rides beside \\`api\\` rather than\n inside it because \\`api\\` stays the operations array it has always been, and it\n is what tells an empty \\`api\\` apart from a contract delta that did not parse\n - \\`services\\` — every service this feature projects onto, so a run without\n \\`--service\\` tells you which ones to ask for rather than guessing\n Exit 1 with \\`ok: true\\` means one of the two authored documents behind this brief\n did not parse: \\`architecture.errors\\` non-empty (delta.likec4), or\n \\`openapi.unreadable\\` true (the feature's openapi.yaml for this service). The empty\n slice is the parse failure itself, not \"nothing changes there\". Stop and fix that\n document before building anything — for the delta, \\`loam validate $1 --json\\` names\n the error; the contract delta is not graded by validate, so read the parser message\n the payload carries.\n3. In the service's repo, \\`loam gherkin $1 --json\\` — one \\`.feature\\` file per changed\n requirement lands under \\`<gherkinDir>/loam/\\` (default \\`features/loam/\\`), scenarios\n digest-stamped, arch requirements tagged \\`@architecture\\`. Those files ARE the\n acceptance criteria. Never edit them: regeneration rewrites the directory, and\n \\`loam validate\\` reports the suite stale by digest, not by your intentions.\n4. Write step definitions for the generated scenarios FIRST — outside \\`loam/\\`.\n Do not paraphrase a scenario into something easier to pass; it is the acceptance\n criterion someone else reviews against.\n Run \\`loam steps --service $2 --json\\` before you write any: it collapses every\n written step onto the phrase a definition actually matches, so you see the size\n of the registry you owe and which phrases already exist. Write ONE definition per\n phrase row. If \\`nearDuplicates\\` is non-empty, two rows differ by an article or a\n trailing \\`because …\\` clause and one definition was meant — fix the SPEC's wording\n and regenerate, rather than writing the second definition.\n A step's argument arrives as an argument: a \\`\"\"\"\\` docstring is the payload, an\n indented table is a DataTable. Assert against them; do not re-parse the step text.\n5. Implement until the suite passes — run it with a JSON report\n (\\`cucumber-js --format json:report.json\\`):\n \\`loam verify $1 --service $2 --results report.json\\` consumes that report as the\n done-check's answer sheet. Record from THIS repo, with \\`--service\\` — the\n \\`--service\\`-less \\`--record\\` form writes the whole record from one place and is\n refused (\\`record-federated\\`) once another service has attested.\n6. Honour the contract: every operation in \\`architecture.inbound\\` must exist under\n exactly that operationId, and every one in \\`architecture.outbound\\` must be called.\n7. If building made you change the feature's documents at all — a requirement's\n wording, an operation in its openapi.yaml — **\\`loam rebase $1\\`** before you\n validate. Every edit you make in the docs repo while other features are in\n flight is written against a living document that may have moved since the\n feature directory was created, and the pins are the only thing that lets the\n merge tell an EDIT from a QUOTE — for operations, path-level keys and\n components alike. \\`delta.baseline-missing\\` and\n \\`openapi.baseline-missing\\` are the warnings that say you skipped it — archive\n refuses on them until you rebase (or a human \\`--approve\\`s the unpinned merge);\n \\`delta.baseline-stale\\` / \\`openapi.baseline-stale\\` are archive refusing because\n somebody landed a change underneath you — re-read theirs, fold in what you\n still mean, then rebase again. Re-pinning without re-reading is how you\n overwrite someone else's requirement with loam's blessing.\n8. \\`loam validate --feature $1 --json\\` before handing back.\n\nIf the requirement is ambiguous, say so and stop — do not invent behaviour and\nleave the spec disagreeing with the code.\n`,\n};\n"]}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
export const LOAM_AUTHORING = {
|
|
2
|
+
name: "loam-authoring",
|
|
3
|
+
description: "Reference: the grammars you author against — arch.spec.md, the generated Gherkin suite, frontmatter",
|
|
4
|
+
// No arguments: one document, printed whole. See ./spine.ts for why the hint
|
|
5
|
+
// is empty rather than a spelled-out "<none>".
|
|
6
|
+
argumentHint: "",
|
|
7
|
+
purpose: "What each document you author by hand must contain: the architecture requirements axis and its `Covers:` line, how scenarios become an executable suite, and the frontmatter fields `loam vouch` stamps.",
|
|
8
|
+
invocation: "loam instructions loam-authoring",
|
|
9
|
+
placeholders: [],
|
|
10
|
+
spine: [
|
|
11
|
+
"The architecture spec axis",
|
|
12
|
+
"The generated Gherkin suite",
|
|
13
|
+
"Frontmatter — who vouched for this, and from what",
|
|
14
|
+
],
|
|
15
|
+
body: `The grammars you author against: the architecture spec axis, the generated Gherkin suite, and frontmatter.
|
|
16
|
+
|
|
17
|
+
## The architecture spec axis
|
|
18
|
+
|
|
19
|
+
The business spec will never mention the transactional outbox — that is
|
|
20
|
+
architecture. Retries, idempotency, metrics, alerts: real obligations no business
|
|
21
|
+
scenario states, and exactly where generated code cuts corners unless the
|
|
22
|
+
obligations are derived mechanically. They live in \`arch.spec.md\` — living and
|
|
23
|
+
delta, same grammar, same delta algebra, merged by \`loam archive\` through the
|
|
24
|
+
same code path (the two files are separate requirement namespaces).
|
|
25
|
+
|
|
26
|
+
Where a business requirement carries \`Operations:\`, an arch requirement carries
|
|
27
|
+
\`Covers:\` — the model objects its scenarios exercise, comma-separated:
|
|
28
|
+
|
|
29
|
+
\`\`\`
|
|
30
|
+
Covers: paymentService.db, paymentService -> kafka, alert:payment_5xx, sli:availability
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
a C4 element (id, or the service a bound element stands for), an edge
|
|
34
|
+
(\`source -> target\`), or a health signal the service's health.yaml declares.
|
|
35
|
+
Every entry must resolve — \`covers.unknown\` (warn) is the typo guard, because a
|
|
36
|
+
mistyped entry silently costs the coverage it was written for.
|
|
37
|
+
|
|
38
|
+
Coverage is then derived, never trusted, as two warnings: a feature's NEW tagged
|
|
39
|
+
elements and edges want a covering requirement in its arch.spec.md deltas
|
|
40
|
+
(\`c4.uncovered\`), and every alert/SLI health.yaml declares wants one in the
|
|
41
|
+
living arch spec (\`health.uncovered\`). None of this gates \`loam archive\`;
|
|
42
|
+
\`--strict\` is the CI escalation. An absent arch.spec.md is not a finding —
|
|
43
|
+
partial adoption is supported — but write one for any service with real
|
|
44
|
+
architecture, or its obligations ship unchecked.
|
|
45
|
+
|
|
46
|
+
**Effective configuration and dependency semantics live here too, by
|
|
47
|
+
convention.** Facts about the service that no artifact structurally holds —
|
|
48
|
+
the value a deploy chart actually sets, the retry budget a client library
|
|
49
|
+
hardcodes ("retries: -1 is unbounded"), the delivery or idempotency guarantee
|
|
50
|
+
a driver decides — are ARCH REQUIREMENTS: prose with a \`Covers:\` line naming
|
|
51
|
+
the element or edge whose behaviour the fact decides. loam will never verify
|
|
52
|
+
the values; naming the home is the point. A service whose timeout comes from
|
|
53
|
+
an env var in a chart in another repository is otherwise described by no file
|
|
54
|
+
in this repo, and two adoptions will file the same fact two different ways.
|
|
55
|
+
|
|
56
|
+
**Test levels, mapped once.** A business scenario is an acceptance test. An arch
|
|
57
|
+
scenario is an integration/ops test — the outbox relay under a dead broker, the
|
|
58
|
+
retry that stays idempotent, the alert rule that actually fires. \`api.exposes\`
|
|
59
|
+
is a contract test. Unit tests sit below spec granularity and are your TDD
|
|
60
|
+
concern, not the specs'.
|
|
61
|
+
|
|
62
|
+
## The generated Gherkin suite
|
|
63
|
+
|
|
64
|
+
Scenarios are the acceptance criteria, and \`loam gherkin\` makes them
|
|
65
|
+
executable: real \`.feature\` files, written into the SERVICE'S repo — the one
|
|
66
|
+
loam command that writes there, because tests live with the code they gate.
|
|
67
|
+
Output lands in \`<gherkinDir>/loam/\` (\`gherkinDir\` is an optional loam.json
|
|
68
|
+
fact, default \`features\`), and that \`loam/\` subdirectory is loam's own
|
|
69
|
+
derived space — and a committed one: an emission lands through the same lock
|
|
70
|
+
and journal the docs repo's writers use, as \`loam/.loam-lock\` and
|
|
71
|
+
\`loam/.loam-commit\` dotfiles that exist only while a run is in flight (or
|
|
72
|
+
after a kill, where the journal is what lets the next run finish the job).
|
|
73
|
+
Regeneration rewrites its scope and deletes its orphans, so
|
|
74
|
+
never hand-edit inside it — step definitions and hand-written features belong
|
|
75
|
+
outside it, and loam never touches a byte outside \`loam/\`.
|
|
76
|
+
|
|
77
|
+
- \`loam gherkin FEAT-101\` — the feature's ADDED/MODIFIED requirements for this
|
|
78
|
+
service, both spec axes. Files carry \`@FEAT-101\`; arch-axis files add
|
|
79
|
+
\`@architecture\` and are named \`arch--<slug>.feature\` — their scenarios are
|
|
80
|
+
integration/ops tests, not acceptance tests.
|
|
81
|
+
- \`loam gherkin --service <id>\` (no feature) — the full living suite from
|
|
82
|
+
spec.md + arch.spec.md: the regression skeleton a legacy service gets at
|
|
83
|
+
adoption.
|
|
84
|
+
|
|
85
|
+
One file per requirement (\`Feature:\` is the requirement name). Bullet lines
|
|
86
|
+
opening with Given/When/Then/And/But — the \`- **WHEN** ...\` convention
|
|
87
|
+
included — become steps; every other body line is kept as scenario
|
|
88
|
+
description. A valid Markdown table AT THE MARGIN becomes the \`Examples:\` of
|
|
89
|
+
a \`Scenario Outline\`; a malformed table stays in the description and is
|
|
90
|
+
reported, because it will run once rather than once per row.
|
|
91
|
+
|
|
92
|
+
A step takes an ARGUMENT by carrying it INDENTED underneath: an indented table
|
|
93
|
+
becomes that step's data table (the rows an outbox or a DB table must hold after
|
|
94
|
+
the pass), a fenced block becomes its docstring, indentation intact (the request
|
|
95
|
+
payload). Indented under a step means this step's rows; at the margin means the
|
|
96
|
+
scenario's cases. A block no step precedes stays description and is reported as
|
|
97
|
+
\`strandedBlocks\` — the document reads, and the TEST lost its argument. Each scenario is
|
|
98
|
+
tagged \`@loam-digest-<16hex>\`: the same body
|
|
99
|
+
hash \`loam verify\` folds into its claim ids, riding into cucumber's JSON
|
|
100
|
+
report as a tag, so the suite, the claim and the report cannot quietly
|
|
101
|
+
disagree about what a scenario says. \`loam validate
|
|
102
|
+
--service <id>\`, run in the service repo, grades the suite by those digests
|
|
103
|
+
(\`gherkin.missing\` / \`gherkin.stale\` / \`gherkin.orphaned\`, all warn) — the
|
|
104
|
+
fix is always regeneration, never editing a generated file.
|
|
105
|
+
|
|
106
|
+
The flow, closed end to end: \`loam gherkin FEAT-101\` → \`loam steps --service
|
|
107
|
+
<id>\` (the phrase inventory: how many step definitions this suite needs, one
|
|
108
|
+
per phrase row, and which phrases differ only by an article or a trailing
|
|
109
|
+
clause) → write step definitions (outside \`loam/\`) → run the suite with a JSON report
|
|
110
|
+
(\`cucumber-js --format json:report.json\`) → implement until green →
|
|
111
|
+
\`loam verify FEAT-101 --service <id> --results report.json [--contract-results contract.json] [--record rest.json]\`,
|
|
112
|
+
run in that same service repo. The digest
|
|
113
|
+
tags ride through the runner into the report, so the \`scenario.tested\` claims
|
|
114
|
+
are answered mechanically from the passing report rather than anybody's word.
|
|
115
|
+
This proves which digest-matched report bytes loam accepted; it does not prove
|
|
116
|
+
the report was produced by executing the attested commit. See
|
|
117
|
+
\`loam instructions loam-done-check\` for what \`--record\` still covers.
|
|
118
|
+
|
|
119
|
+
## Frontmatter — who vouched for this, and from what
|
|
120
|
+
|
|
121
|
+
Every markdown artifact opens with a YAML block:
|
|
122
|
+
|
|
123
|
+
\`\`\`yaml
|
|
124
|
+
---
|
|
125
|
+
service: payment-service # or feature: FEAT-101
|
|
126
|
+
status: verified # services: draft -> verified
|
|
127
|
+
# features: proposed -> in_progress -> built -> done
|
|
128
|
+
owner: payments-team
|
|
129
|
+
last_verified: 2026-07-31 # written by \`loam vouch\` — do not hand-edit
|
|
130
|
+
sources: # files/directories in the SERVICE'S repo this was written from — no globs
|
|
131
|
+
- src/main/java/com/shop/payment/
|
|
132
|
+
sources_digest: 6f1c0a… # written by \`loam vouch\` — do not hand-edit
|
|
133
|
+
content_digest: 9b2f41… # written by \`loam vouch\` — do not hand-edit
|
|
134
|
+
sources_files: | # written by \`loam vouch\` — do not hand-edit
|
|
135
|
+
9b2f41… src/main/java/com/shop/payment/Api.java
|
|
136
|
+
vouch_scope: sampled 2/9 seed=1a2b3c4d5e6f7089 # only when the vouch read a SAMPLE
|
|
137
|
+
---
|
|
138
|
+
\`\`\`
|
|
139
|
+
|
|
140
|
+
\`sources\` matters more than it looks. Everything else loam checks is internal
|
|
141
|
+
consistency — and a corpus can agree with itself perfectly while describing nothing
|
|
142
|
+
that exists. \`sources\` is the one thing tying a document to code: \`loam validate\`,
|
|
143
|
+
run inside that service's repository, checks every listed path is still there.
|
|
144
|
+
Entries are literal files and directories only — a directory covers everything
|
|
145
|
+
beneath it. Glob patterns are refused loudly (\`loam vouch\` will not stamp them,
|
|
146
|
+
\`loam validate\` errors on them): a pattern dialect nobody can be sure of digests
|
|
147
|
+
a different file set than intended, corrupting the staleness signal silently.
|
|
148
|
+
|
|
149
|
+
\`sources_digest\` is what makes that tie say something over time: a hash of the
|
|
150
|
+
CONTENT of those files, taken when a human last vouched for the document. Every
|
|
151
|
+
later \`loam validate\` re-computes it, so it can tell a document nobody has checked
|
|
152
|
+
(\`sources.unvouched\`) from one that still matches the code (\`sources.current\`) from
|
|
153
|
+
one the code has moved out from under (\`sources.stale\`). On \`sources.stale\` or
|
|
154
|
+
\`content.stale\`, \`loam vouch --pack --service <id>\` (read-only, stamps nothing)
|
|
155
|
+
prints exactly what to re-read before the human re-vouches — the body's diff since
|
|
156
|
+
the last vouch, the source files that moved, and the sections already covered.
|
|
157
|
+
|
|
158
|
+
\`content_digest\` is the same promise about the document itself: a hash of the
|
|
159
|
+
body below the frontmatter, stamped by the same vouch. It closes the other half of
|
|
160
|
+
the forgery — editing a spec after it was vouched used to leave \`status: verified\`
|
|
161
|
+
standing over words nobody read. \`loam validate\` recomputes it wherever it can
|
|
162
|
+
read the doc (no service repo needed, so it fires from the docs repo too) and
|
|
163
|
+
reports \`content.stale\` (warn): only a person can say whether verified still
|
|
164
|
+
holds of the new words.
|
|
165
|
+
|
|
166
|
+
\`vouch_scope\` appears only when the person vouched after reading a SAMPLE of the
|
|
167
|
+
document — \`loam vouch --sample <n>\`, whose whole purpose is that a partial read
|
|
168
|
+
is recorded as a partial read. Its value is one flat string,
|
|
169
|
+
\`sampled <k>/<n> seed=<16 hex>\`: k sections read of n, and the seed those k were
|
|
170
|
+
chosen with. The seed is \`sha256(<service> NUL <content_digest> NUL <sources_digest>)\`
|
|
171
|
+
truncated to 16 hex characters, and the sections are ranked by
|
|
172
|
+
\`sha256(<seed> NUL <index> NUL <heading>)\` with the lowest k taken, over every H2
|
|
173
|
+
and H3 heading of the body outside code fences — so anybody holding the document
|
|
174
|
+
can recompute exactly which sections that person was shown, and an agent cannot
|
|
175
|
+
steer the pick without rewriting the document (which changes the seed and voids the
|
|
176
|
+
stamp). \`status\` stays \`verified\` and the maturity rung stays \`vouched\`: the scope
|
|
177
|
+
qualifies that claim, it is not a fourth status. \`loam validate\` reports
|
|
178
|
+
\`sources.sampled-vouch\` (warn) while it is there, \`loam list\` shows
|
|
179
|
+
\`vouched (sampled)\`, and a later FULL \`loam vouch\` deletes the field. Never write
|
|
180
|
+
or delete it by hand: removing it turns a partial read into a full one on every
|
|
181
|
+
surface at once, which is the one forgery this field exists to make impossible.
|
|
182
|
+
|
|
183
|
+
Write \`sources\` for anything you author from reading code, and leave \`status: draft\`
|
|
184
|
+
until a human has read it. Promoting draft to verified is their call, not yours, and
|
|
185
|
+
it has its own command — \`loam vouch --service <id>\`, run inside that service's repo,
|
|
186
|
+
which stamps the status, the date, the identity (\`vouched_by\`, from git), both digests
|
|
187
|
+
and the per-file index
|
|
188
|
+
(\`sources_files\`, which is what lets a later \`sources.stale\` name the paths that
|
|
189
|
+
moved) together — into the living spec.md
|
|
190
|
+
and, when the service has one, arch.spec.md, in one all-or-nothing run: a file whose
|
|
191
|
+
sources cannot be verified refuses the whole vouch. Never write those six fields by
|
|
192
|
+
hand: a status with no digest behind it is a claim with nothing behind it. If the
|
|
193
|
+
document changed under vouch between the read and the write, it refuses with
|
|
194
|
+
\`vouch-raced\` and stamps nothing — re-read and re-run.
|
|
195
|
+
|
|
196
|
+
**\`loam vouch\` is not yours to run**, and it is built so that it cannot be. It is
|
|
197
|
+
the one command whose output is a claim about a HUMAN act — everything else loam
|
|
198
|
+
checks is internal consistency, which fluent prose satisfies on its own — so it
|
|
199
|
+
refuses \`vouch-unattended\` when stdin is not a terminal (and in \`--json\` mode,
|
|
200
|
+
where a question cannot be asked), answers \`vouch-declined\` when the person says
|
|
201
|
+
no, and refuses \`vouch-unattributable\` when git can name nobody, because a stamp
|
|
202
|
+
with no \`vouched_by\` behind it records only that the word was written. \`--yes\`
|
|
203
|
+
exists for a person's own scripted run; typing it on someone's behalf is
|
|
204
|
+
writing their name. The generated command and skill files pre-approve loam's
|
|
205
|
+
read-only and authoring verbs one by one and deliberately not this one: when
|
|
206
|
+
the work is done, hand back and say a vouch is owed.
|
|
207
|
+
`,
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=authoring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authoring.js","sourceRoot":"","sources":["../../../../../src/core/agent/workflows/reference/authoring.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,qGAAqG;IACvG,6EAA6E;IAC7E,+CAA+C;IAC/C,YAAY,EAAE,EAAE;IAChB,OAAO,EACL,0MAA0M;IAC5M,UAAU,EAAE,kCAAkC;IAC9C,YAAY,EAAE,EAAE;IAChB,KAAK,EAAE;QACL,4BAA4B;QAC5B,6BAA6B;QAC7B,mDAAmD;KACpD;IACD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgMP;CACA,CAAC","sourcesContent":["/**\n * The `loam-authoring` reference page: the grammars of the documents you write.\n *\n * The architecture spec axis (`arch.spec.md` and its `Covers:` line), the\n * generated Gherkin suite, and the frontmatter/vouch chain that ties a\n * document to the code it was written from.\n *\n * All three are consulted at a moment you can name — while authoring one file\n * — and none of them is needed to form the question. That is the split this\n * page exists to make; ./reference.ts records why it had to be made at all.\n *\n * The text is the three AGENTS.md sections verbatim, in their original order,\n * so a cross-reference elsewhere in the corpus still names the same headings.\n */\nimport type { CommandContent } from \"../../contract.js\";\n\nexport const LOAM_AUTHORING: CommandContent = {\n name: \"loam-authoring\",\n description:\n \"Reference: the grammars you author against — arch.spec.md, the generated Gherkin suite, frontmatter\",\n // No arguments: one document, printed whole. See ./spine.ts for why the hint\n // is empty rather than a spelled-out \"<none>\".\n argumentHint: \"\",\n purpose:\n \"What each document you author by hand must contain: the architecture requirements axis and its `Covers:` line, how scenarios become an executable suite, and the frontmatter fields `loam vouch` stamps.\",\n invocation: \"loam instructions loam-authoring\",\n placeholders: [],\n spine: [\n \"The architecture spec axis\",\n \"The generated Gherkin suite\",\n \"Frontmatter — who vouched for this, and from what\",\n ],\n body: `The grammars you author against: the architecture spec axis, the generated Gherkin suite, and frontmatter.\n\n## The architecture spec axis\n\nThe business spec will never mention the transactional outbox — that is\narchitecture. Retries, idempotency, metrics, alerts: real obligations no business\nscenario states, and exactly where generated code cuts corners unless the\nobligations are derived mechanically. They live in \\`arch.spec.md\\` — living and\ndelta, same grammar, same delta algebra, merged by \\`loam archive\\` through the\nsame code path (the two files are separate requirement namespaces).\n\nWhere a business requirement carries \\`Operations:\\`, an arch requirement carries\n\\`Covers:\\` — the model objects its scenarios exercise, comma-separated:\n\n\\`\\`\\`\nCovers: paymentService.db, paymentService -> kafka, alert:payment_5xx, sli:availability\n\\`\\`\\`\n\na C4 element (id, or the service a bound element stands for), an edge\n(\\`source -> target\\`), or a health signal the service's health.yaml declares.\nEvery entry must resolve — \\`covers.unknown\\` (warn) is the typo guard, because a\nmistyped entry silently costs the coverage it was written for.\n\nCoverage is then derived, never trusted, as two warnings: a feature's NEW tagged\nelements and edges want a covering requirement in its arch.spec.md deltas\n(\\`c4.uncovered\\`), and every alert/SLI health.yaml declares wants one in the\nliving arch spec (\\`health.uncovered\\`). None of this gates \\`loam archive\\`;\n\\`--strict\\` is the CI escalation. An absent arch.spec.md is not a finding —\npartial adoption is supported — but write one for any service with real\narchitecture, or its obligations ship unchecked.\n\n**Effective configuration and dependency semantics live here too, by\nconvention.** Facts about the service that no artifact structurally holds —\nthe value a deploy chart actually sets, the retry budget a client library\nhardcodes (\"retries: -1 is unbounded\"), the delivery or idempotency guarantee\na driver decides — are ARCH REQUIREMENTS: prose with a \\`Covers:\\` line naming\nthe element or edge whose behaviour the fact decides. loam will never verify\nthe values; naming the home is the point. A service whose timeout comes from\nan env var in a chart in another repository is otherwise described by no file\nin this repo, and two adoptions will file the same fact two different ways.\n\n**Test levels, mapped once.** A business scenario is an acceptance test. An arch\nscenario is an integration/ops test — the outbox relay under a dead broker, the\nretry that stays idempotent, the alert rule that actually fires. \\`api.exposes\\`\nis a contract test. Unit tests sit below spec granularity and are your TDD\nconcern, not the specs'.\n\n## The generated Gherkin suite\n\nScenarios are the acceptance criteria, and \\`loam gherkin\\` makes them\nexecutable: real \\`.feature\\` files, written into the SERVICE'S repo — the one\nloam command that writes there, because tests live with the code they gate.\nOutput lands in \\`<gherkinDir>/loam/\\` (\\`gherkinDir\\` is an optional loam.json\nfact, default \\`features\\`), and that \\`loam/\\` subdirectory is loam's own\nderived space — and a committed one: an emission lands through the same lock\nand journal the docs repo's writers use, as \\`loam/.loam-lock\\` and\n\\`loam/.loam-commit\\` dotfiles that exist only while a run is in flight (or\nafter a kill, where the journal is what lets the next run finish the job).\nRegeneration rewrites its scope and deletes its orphans, so\nnever hand-edit inside it — step definitions and hand-written features belong\noutside it, and loam never touches a byte outside \\`loam/\\`.\n\n- \\`loam gherkin FEAT-101\\` — the feature's ADDED/MODIFIED requirements for this\n service, both spec axes. Files carry \\`@FEAT-101\\`; arch-axis files add\n \\`@architecture\\` and are named \\`arch--<slug>.feature\\` — their scenarios are\n integration/ops tests, not acceptance tests.\n- \\`loam gherkin --service <id>\\` (no feature) — the full living suite from\n spec.md + arch.spec.md: the regression skeleton a legacy service gets at\n adoption.\n\nOne file per requirement (\\`Feature:\\` is the requirement name). Bullet lines\nopening with Given/When/Then/And/But — the \\`- **WHEN** ...\\` convention\nincluded — become steps; every other body line is kept as scenario\ndescription. A valid Markdown table AT THE MARGIN becomes the \\`Examples:\\` of\na \\`Scenario Outline\\`; a malformed table stays in the description and is\nreported, because it will run once rather than once per row.\n\nA step takes an ARGUMENT by carrying it INDENTED underneath: an indented table\nbecomes that step's data table (the rows an outbox or a DB table must hold after\nthe pass), a fenced block becomes its docstring, indentation intact (the request\npayload). Indented under a step means this step's rows; at the margin means the\nscenario's cases. A block no step precedes stays description and is reported as\n\\`strandedBlocks\\` — the document reads, and the TEST lost its argument. Each scenario is\ntagged \\`@loam-digest-<16hex>\\`: the same body\nhash \\`loam verify\\` folds into its claim ids, riding into cucumber's JSON\nreport as a tag, so the suite, the claim and the report cannot quietly\ndisagree about what a scenario says. \\`loam validate\n--service <id>\\`, run in the service repo, grades the suite by those digests\n(\\`gherkin.missing\\` / \\`gherkin.stale\\` / \\`gherkin.orphaned\\`, all warn) — the\nfix is always regeneration, never editing a generated file.\n\nThe flow, closed end to end: \\`loam gherkin FEAT-101\\` → \\`loam steps --service\n<id>\\` (the phrase inventory: how many step definitions this suite needs, one\nper phrase row, and which phrases differ only by an article or a trailing\nclause) → write step definitions (outside \\`loam/\\`) → run the suite with a JSON report\n(\\`cucumber-js --format json:report.json\\`) → implement until green →\n\\`loam verify FEAT-101 --service <id> --results report.json [--contract-results contract.json] [--record rest.json]\\`,\nrun in that same service repo. The digest\ntags ride through the runner into the report, so the \\`scenario.tested\\` claims\nare answered mechanically from the passing report rather than anybody's word.\nThis proves which digest-matched report bytes loam accepted; it does not prove\nthe report was produced by executing the attested commit. See\n\\`loam instructions loam-done-check\\` for what \\`--record\\` still covers.\n\n## Frontmatter — who vouched for this, and from what\n\nEvery markdown artifact opens with a YAML block:\n\n\\`\\`\\`yaml\n---\nservice: payment-service # or feature: FEAT-101\nstatus: verified # services: draft -> verified\n # features: proposed -> in_progress -> built -> done\nowner: payments-team\nlast_verified: 2026-07-31 # written by \\`loam vouch\\` — do not hand-edit\nsources: # files/directories in the SERVICE'S repo this was written from — no globs\n - src/main/java/com/shop/payment/\nsources_digest: 6f1c0a… # written by \\`loam vouch\\` — do not hand-edit\ncontent_digest: 9b2f41… # written by \\`loam vouch\\` — do not hand-edit\nsources_files: | # written by \\`loam vouch\\` — do not hand-edit\n 9b2f41… src/main/java/com/shop/payment/Api.java\nvouch_scope: sampled 2/9 seed=1a2b3c4d5e6f7089 # only when the vouch read a SAMPLE\n---\n\\`\\`\\`\n\n\\`sources\\` matters more than it looks. Everything else loam checks is internal\nconsistency — and a corpus can agree with itself perfectly while describing nothing\nthat exists. \\`sources\\` is the one thing tying a document to code: \\`loam validate\\`,\nrun inside that service's repository, checks every listed path is still there.\nEntries are literal files and directories only — a directory covers everything\nbeneath it. Glob patterns are refused loudly (\\`loam vouch\\` will not stamp them,\n\\`loam validate\\` errors on them): a pattern dialect nobody can be sure of digests\na different file set than intended, corrupting the staleness signal silently.\n\n\\`sources_digest\\` is what makes that tie say something over time: a hash of the\nCONTENT of those files, taken when a human last vouched for the document. Every\nlater \\`loam validate\\` re-computes it, so it can tell a document nobody has checked\n(\\`sources.unvouched\\`) from one that still matches the code (\\`sources.current\\`) from\none the code has moved out from under (\\`sources.stale\\`). On \\`sources.stale\\` or\n\\`content.stale\\`, \\`loam vouch --pack --service <id>\\` (read-only, stamps nothing)\nprints exactly what to re-read before the human re-vouches — the body's diff since\nthe last vouch, the source files that moved, and the sections already covered.\n\n\\`content_digest\\` is the same promise about the document itself: a hash of the\nbody below the frontmatter, stamped by the same vouch. It closes the other half of\nthe forgery — editing a spec after it was vouched used to leave \\`status: verified\\`\nstanding over words nobody read. \\`loam validate\\` recomputes it wherever it can\nread the doc (no service repo needed, so it fires from the docs repo too) and\nreports \\`content.stale\\` (warn): only a person can say whether verified still\nholds of the new words.\n\n\\`vouch_scope\\` appears only when the person vouched after reading a SAMPLE of the\ndocument — \\`loam vouch --sample <n>\\`, whose whole purpose is that a partial read\nis recorded as a partial read. Its value is one flat string,\n\\`sampled <k>/<n> seed=<16 hex>\\`: k sections read of n, and the seed those k were\nchosen with. The seed is \\`sha256(<service> NUL <content_digest> NUL <sources_digest>)\\`\ntruncated to 16 hex characters, and the sections are ranked by\n\\`sha256(<seed> NUL <index> NUL <heading>)\\` with the lowest k taken, over every H2\nand H3 heading of the body outside code fences — so anybody holding the document\ncan recompute exactly which sections that person was shown, and an agent cannot\nsteer the pick without rewriting the document (which changes the seed and voids the\nstamp). \\`status\\` stays \\`verified\\` and the maturity rung stays \\`vouched\\`: the scope\nqualifies that claim, it is not a fourth status. \\`loam validate\\` reports\n\\`sources.sampled-vouch\\` (warn) while it is there, \\`loam list\\` shows\n\\`vouched (sampled)\\`, and a later FULL \\`loam vouch\\` deletes the field. Never write\nor delete it by hand: removing it turns a partial read into a full one on every\nsurface at once, which is the one forgery this field exists to make impossible.\n\nWrite \\`sources\\` for anything you author from reading code, and leave \\`status: draft\\`\nuntil a human has read it. Promoting draft to verified is their call, not yours, and\nit has its own command — \\`loam vouch --service <id>\\`, run inside that service's repo,\nwhich stamps the status, the date, the identity (\\`vouched_by\\`, from git), both digests\nand the per-file index\n(\\`sources_files\\`, which is what lets a later \\`sources.stale\\` name the paths that\nmoved) together — into the living spec.md\nand, when the service has one, arch.spec.md, in one all-or-nothing run: a file whose\nsources cannot be verified refuses the whole vouch. Never write those six fields by\nhand: a status with no digest behind it is a claim with nothing behind it. If the\ndocument changed under vouch between the read and the write, it refuses with\n\\`vouch-raced\\` and stamps nothing — re-read and re-run.\n\n**\\`loam vouch\\` is not yours to run**, and it is built so that it cannot be. It is\nthe one command whose output is a claim about a HUMAN act — everything else loam\nchecks is internal consistency, which fluent prose satisfies on its own — so it\nrefuses \\`vouch-unattended\\` when stdin is not a terminal (and in \\`--json\\` mode,\nwhere a question cannot be asked), answers \\`vouch-declined\\` when the person says\nno, and refuses \\`vouch-unattributable\\` when git can name nobody, because a stamp\nwith no \\`vouched_by\\` behind it records only that the word was written. \\`--yes\\`\nexists for a person's own scripted run; typing it on someone's behalf is\nwriting their name. The generated command and skill files pre-approve loam's\nread-only and authoring verbs one by one and deliberately not this one: when\nthe work is done, hand back and say a vouch is owed.\n`,\n};\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `loam-codes` reference page: which codes each INVOCATION can raise.
|
|
3
|
+
*
|
|
4
|
+
* The largest of the four pages and the one this migration is mostly about. As
|
|
5
|
+
* a section of AGENTS.md it was 44,433 bytes — 41% of a 109,399-byte file that
|
|
6
|
+
* Codex truncates at 32,768 and Windsurf at 12,000 characters, both silently.
|
|
7
|
+
* It is also the half a reader consults at a moment it can NAME (a run reported
|
|
8
|
+
* something) rather than the half it needs to form a question at all, which is
|
|
9
|
+
* what decided which side of the split it went. ./reference.ts carries the rest
|
|
10
|
+
* of that argument.
|
|
11
|
+
*
|
|
12
|
+
* This module does one thing: it CONCATENATES, in the order ../../agents-md.ts
|
|
13
|
+
* used to. Nothing here reformats a part on the way past, and nothing here is
|
|
14
|
+
* written — every byte comes from ../../agents-md/, which is where the sections
|
|
15
|
+
* already lived and where they stayed. The parts still carry their own trailing
|
|
16
|
+
* newlines and are joined with no separator, so the printed page is the old
|
|
17
|
+
* section byte for byte.
|
|
18
|
+
*
|
|
19
|
+
* WHAT IS AND IS NOT DUPLICATED. `## Reading loam's output` still exists in
|
|
20
|
+
* AGENTS.md (../../agents-md/command-map.ts's READING_OUTPUT), and it is a
|
|
21
|
+
* different three facts, not a summary of these: that every command speaks
|
|
22
|
+
* JSON, that the envelope survives a bad invocation, and that codes are the
|
|
23
|
+
* contract, plus the two places the detail went. The per-invocation inventory
|
|
24
|
+
* below appears in exactly one place.
|
|
25
|
+
*/
|
|
26
|
+
import { CODE_MAP } from "../../agents-md/command-map.js";
|
|
27
|
+
import { CONTEXT_COMMAND } from "../../agents-md/map/lenses/context.js";
|
|
28
|
+
import { DIFF_COMMAND } from "../../agents-md/map/lenses/diff.js";
|
|
29
|
+
import { GATE_COMMAND } from "../../agents-md/map/lenses/gate.js";
|
|
30
|
+
import { EXPLAIN_COMMAND } from "../../agents-md/map/explain.js";
|
|
31
|
+
import { MCP_COMMAND } from "../../agents-md/map/mcp.js";
|
|
32
|
+
import { SUBSYSTEM_COMMANDS } from "../../agents-md/map/subsystem.js";
|
|
33
|
+
import { USECASE_VIEWS } from "../../agents-md/map/usecases.js";
|
|
34
|
+
import { REFUSALS } from "../../agents-md/refusals.js";
|
|
35
|
+
export const LOAM_CODES = {
|
|
36
|
+
name: "loam-codes",
|
|
37
|
+
description: "Reference: which codes each invocation can raise, command by command",
|
|
38
|
+
// No arguments: one document, printed whole. See ./spine.ts for why the hint
|
|
39
|
+
// is empty rather than a spelled-out "<none>".
|
|
40
|
+
argumentHint: "",
|
|
41
|
+
purpose: "The per-invocation inventory: which findings `validate --service` / `--feature` / `--all`, `status`, `doctor`, `gate`, `context`, `diff`, `explore`, `dependencies`, `rebase`, `seed`, `subsystem` and `mcp` can report, and the refusals the containment surface answers with.",
|
|
42
|
+
invocation: "loam instructions loam-codes",
|
|
43
|
+
placeholders: [],
|
|
44
|
+
// The page carries no `## ` headings — it is one list, and the bullets are
|
|
45
|
+
// the structure. The spine names the invocations it walks instead, which is
|
|
46
|
+
// what a reader is actually looking one of up.
|
|
47
|
+
spine: [
|
|
48
|
+
"validate --service / --feature / --all",
|
|
49
|
+
"status, doctor, rebase, dependencies, explore, seed",
|
|
50
|
+
"context, gate, subsystem, use-case views, diff, explain, mcp",
|
|
51
|
+
"the containment refusals and the OpenSpec migration surface",
|
|
52
|
+
],
|
|
53
|
+
// CODE_MAP already opens with the page's own "**What this page is.**" and
|
|
54
|
+
// leads with `status`, the orientation command.
|
|
55
|
+
body: CODE_MAP +
|
|
56
|
+
CONTEXT_COMMAND +
|
|
57
|
+
GATE_COMMAND +
|
|
58
|
+
SUBSYSTEM_COMMANDS +
|
|
59
|
+
USECASE_VIEWS +
|
|
60
|
+
DIFF_COMMAND +
|
|
61
|
+
EXPLAIN_COMMAND +
|
|
62
|
+
MCP_COMMAND +
|
|
63
|
+
REFUSALS,
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../../../../src/core/agent/workflows/reference/codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,sEAAsE;IACnF,6EAA6E;IAC7E,+CAA+C;IAC/C,YAAY,EAAE,EAAE;IAChB,OAAO,EACL,iRAAiR;IACnR,UAAU,EAAE,8BAA8B;IAC1C,YAAY,EAAE,EAAE;IAChB,2EAA2E;IAC3E,4EAA4E;IAC5E,+CAA+C;IAC/C,KAAK,EAAE;QACL,wCAAwC;QACxC,qDAAqD;QACrD,8DAA8D;QAC9D,6DAA6D;KAC9D;IACD,0EAA0E;IAC1E,gDAAgD;IAChD,IAAI,EACF,QAAQ;QACR,eAAe;QACf,YAAY;QACZ,kBAAkB;QAClB,aAAa;QACb,YAAY;QACZ,eAAe;QACf,WAAW;QACX,QAAQ;CACX,CAAC","sourcesContent":["/**\n * The `loam-codes` reference page: which codes each INVOCATION can raise.\n *\n * The largest of the four pages and the one this migration is mostly about. As\n * a section of AGENTS.md it was 44,433 bytes — 41% of a 109,399-byte file that\n * Codex truncates at 32,768 and Windsurf at 12,000 characters, both silently.\n * It is also the half a reader consults at a moment it can NAME (a run reported\n * something) rather than the half it needs to form a question at all, which is\n * what decided which side of the split it went. ./reference.ts carries the rest\n * of that argument.\n *\n * This module does one thing: it CONCATENATES, in the order ../../agents-md.ts\n * used to. Nothing here reformats a part on the way past, and nothing here is\n * written — every byte comes from ../../agents-md/, which is where the sections\n * already lived and where they stayed. The parts still carry their own trailing\n * newlines and are joined with no separator, so the printed page is the old\n * section byte for byte.\n *\n * WHAT IS AND IS NOT DUPLICATED. `## Reading loam's output` still exists in\n * AGENTS.md (../../agents-md/command-map.ts's READING_OUTPUT), and it is a\n * different three facts, not a summary of these: that every command speaks\n * JSON, that the envelope survives a bad invocation, and that codes are the\n * contract, plus the two places the detail went. The per-invocation inventory\n * below appears in exactly one place.\n */\nimport { CODE_MAP } from \"../../agents-md/command-map.js\";\nimport { CONTEXT_COMMAND } from \"../../agents-md/map/lenses/context.js\";\nimport { DIFF_COMMAND } from \"../../agents-md/map/lenses/diff.js\";\nimport { GATE_COMMAND } from \"../../agents-md/map/lenses/gate.js\";\nimport { EXPLAIN_COMMAND } from \"../../agents-md/map/explain.js\";\nimport { MCP_COMMAND } from \"../../agents-md/map/mcp.js\";\nimport { SUBSYSTEM_COMMANDS } from \"../../agents-md/map/subsystem.js\";\nimport { USECASE_VIEWS } from \"../../agents-md/map/usecases.js\";\nimport { REFUSALS } from \"../../agents-md/refusals.js\";\nimport type { CommandContent } from \"../../contract.js\";\n\nexport const LOAM_CODES: CommandContent = {\n name: \"loam-codes\",\n description: \"Reference: which codes each invocation can raise, command by command\",\n // No arguments: one document, printed whole. See ./spine.ts for why the hint\n // is empty rather than a spelled-out \"<none>\".\n argumentHint: \"\",\n purpose:\n \"The per-invocation inventory: which findings `validate --service` / `--feature` / `--all`, `status`, `doctor`, `gate`, `context`, `diff`, `explore`, `dependencies`, `rebase`, `seed`, `subsystem` and `mcp` can report, and the refusals the containment surface answers with.\",\n invocation: \"loam instructions loam-codes\",\n placeholders: [],\n // The page carries no `## ` headings — it is one list, and the bullets are\n // the structure. The spine names the invocations it walks instead, which is\n // what a reader is actually looking one of up.\n spine: [\n \"validate --service / --feature / --all\",\n \"status, doctor, rebase, dependencies, explore, seed\",\n \"context, gate, subsystem, use-case views, diff, explain, mcp\",\n \"the containment refusals and the OpenSpec migration surface\",\n ],\n // CODE_MAP already opens with the page's own \"**What this page is.**\" and\n // leads with `status`, the orientation command.\n body:\n CODE_MAP +\n CONTEXT_COMMAND +\n GATE_COMMAND +\n SUBSYSTEM_COMMANDS +\n USECASE_VIEWS +\n DIFF_COMMAND +\n EXPLAIN_COMMAND +\n MCP_COMMAND +\n REFUSALS,\n};\n"]}
|