@ybotok/loam 0.2.0-alpha.6 → 0.2.0-alpha.9
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 +1477 -1
- package/COMPARISON.md +91 -3
- package/CONTRIBUTING.md +37 -0
- package/MIGRATING-from-OpenSpec.md +40 -22
- package/QUICKSTART.md +181 -9
- package/README.md +256 -57
- package/ROADMAP.md +108 -11
- package/SCHEMA.md +721 -130
- package/WORKFLOW.md +272 -62
- package/dist/cli.js +26 -8
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt/adopt.js +5 -10
- package/dist/commands/adopt/adopt.js.map +1 -1
- package/dist/commands/archive/archive.js +15 -18
- package/dist/commands/archive/archive.js.map +1 -1
- package/dist/commands/archive/plan/contracts/asyncapi.js +27 -41
- package/dist/commands/archive/plan/contracts/asyncapi.js.map +1 -1
- package/dist/commands/archive/plan/contracts/consumers.js +56 -0
- package/dist/commands/archive/plan/contracts/consumers.js.map +1 -0
- package/dist/commands/archive/plan/contracts/openapi.js +25 -42
- package/dist/commands/archive/plan/contracts/openapi.js.map +1 -1
- package/dist/commands/archive/plan/contracts/verdict-lines.js +41 -0
- package/dist/commands/archive/plan/contracts/verdict-lines.js.map +1 -0
- package/dist/commands/archive/plan/gate.js +3 -7
- package/dist/commands/archive/plan/gate.js.map +1 -1
- package/dist/commands/archive/plan/landscape.js +4 -4
- package/dist/commands/archive/plan/landscape.js.map +1 -1
- package/dist/commands/archive/plan/refusal.js +8 -18
- package/dist/commands/archive/plan/refusal.js.map +1 -1
- package/dist/commands/archive/plan/specs.js +134 -25
- package/dist/commands/archive/plan/specs.js.map +1 -1
- package/dist/commands/archive/plan/state.js +1 -0
- package/dist/commands/archive/plan/state.js.map +1 -1
- package/dist/commands/archive/run.js +82 -33
- package/dist/commands/archive/run.js.map +1 -1
- package/dist/commands/archive/shipped.js +49 -0
- package/dist/commands/archive/shipped.js.map +1 -0
- package/dist/commands/context/context.js +4 -7
- package/dist/commands/context/context.js.map +1 -1
- package/dist/commands/context/print.js +2 -2
- package/dist/commands/context/print.js.map +1 -1
- package/dist/commands/delta/delta.js +44 -12
- package/dist/commands/delta/delta.js.map +1 -1
- package/dist/commands/delta/print.js +1 -1
- package/dist/commands/delta/print.js.map +1 -1
- package/dist/commands/dependencies.js +3 -7
- package/dist/commands/dependencies.js.map +1 -1
- package/dist/commands/diff/diff.js +20 -27
- package/dist/commands/diff/diff.js.map +1 -1
- package/dist/commands/explore.js +4 -8
- package/dist/commands/explore.js.map +1 -1
- package/dist/commands/gate/gate.js +45 -8
- package/dist/commands/gate/gate.js.map +1 -1
- package/dist/commands/gate/print.js +15 -3
- package/dist/commands/gate/print.js.map +1 -1
- package/dist/commands/gherkin/commit.js +13 -54
- package/dist/commands/gherkin/commit.js.map +1 -1
- package/dist/commands/gherkin/gherkin.js +36 -20
- package/dist/commands/gherkin/gherkin.js.map +1 -1
- package/dist/commands/gherkin/reconcile.js +10 -13
- package/dist/commands/gherkin/reconcile.js.map +1 -1
- package/dist/commands/init/first-hour.js +44 -0
- package/dist/commands/init/first-hour.js.map +1 -1
- package/dist/commands/init/init.js +18 -22
- package/dist/commands/init/init.js.map +1 -1
- package/dist/commands/list/campaign/campaign.js +4 -6
- package/dist/commands/list/campaign/campaign.js.map +1 -1
- package/dist/commands/list/json.js +0 -4
- package/dist/commands/list/json.js.map +1 -1
- package/dist/commands/list/list.js +38 -23
- package/dist/commands/list/list.js.map +1 -1
- package/dist/commands/list/print.js +38 -6
- package/dist/commands/list/print.js.map +1 -1
- package/dist/commands/list/suites/suites.js +140 -0
- package/dist/commands/list/suites/suites.js.map +1 -0
- package/dist/commands/list/views.js +28 -33
- package/dist/commands/list/views.js.map +1 -1
- package/dist/commands/mcp/dispatch.js +91 -36
- package/dist/commands/mcp/dispatch.js.map +1 -1
- package/dist/commands/mcp/mcp.js +56 -15
- package/dist/commands/mcp/mcp.js.map +1 -1
- package/dist/commands/mcp/serve.js.map +1 -1
- package/dist/commands/migrate-openspec/materialize/active.js +27 -22
- package/dist/commands/migrate-openspec/materialize/active.js.map +1 -1
- package/dist/commands/migrate-openspec/materialize/stage.js +4 -3
- package/dist/commands/migrate-openspec/materialize/stage.js.map +1 -1
- package/dist/commands/migrate-openspec/materialize/target.js +2 -2
- package/dist/commands/migrate-openspec/materialize/target.js.map +1 -1
- package/dist/commands/migrate-openspec/openspec/decisions.js +9 -14
- package/dist/commands/migrate-openspec/openspec/decisions.js.map +1 -1
- package/dist/commands/migrate-openspec/openspec/error.js +7 -8
- package/dist/commands/migrate-openspec/openspec/error.js.map +1 -1
- package/dist/commands/migrate-openspec/openspec/mapping.js +1 -9
- package/dist/commands/migrate-openspec/openspec/mapping.js.map +1 -1
- package/dist/commands/migrate-openspec/openspec/paths.js +3 -6
- package/dist/commands/migrate-openspec/openspec/paths.js.map +1 -1
- package/dist/commands/new/capability-template.js +118 -0
- package/dist/commands/new/capability-template.js.map +1 -0
- package/dist/commands/new/commit.js +8 -22
- package/dist/commands/new/commit.js.map +1 -1
- package/dist/commands/new/modifies.js +206 -0
- package/dist/commands/new/modifies.js.map +1 -0
- package/dist/commands/new/new.js +59 -14
- package/dist/commands/new/new.js.map +1 -1
- package/dist/commands/new/templates.js +48 -124
- package/dist/commands/new/templates.js.map +1 -1
- package/dist/commands/open.js +3 -7
- package/dist/commands/open.js.map +1 -1
- package/dist/commands/policy/gate.js +27 -0
- package/dist/commands/policy/gate.js.map +1 -1
- package/dist/commands/rebase/plan.js +2 -2
- package/dist/commands/rebase/plan.js.map +1 -1
- package/dist/commands/rebase/rebase.js +60 -35
- package/dist/commands/rebase/rebase.js.map +1 -1
- package/dist/commands/seed/commit.js +55 -26
- package/dist/commands/seed/commit.js.map +1 -1
- package/dist/commands/seed/plan.js +64 -13
- package/dist/commands/seed/plan.js.map +1 -1
- package/dist/commands/seed/seed.js +6 -9
- package/dist/commands/seed/seed.js.map +1 -1
- package/dist/commands/show/show.js +3 -7
- package/dist/commands/show/show.js.map +1 -1
- package/dist/commands/status/print.js +13 -4
- package/dist/commands/status/print.js.map +1 -1
- package/dist/commands/status/status.js +3 -7
- package/dist/commands/status/status.js.map +1 -1
- package/dist/commands/steps/steps.js +3 -7
- package/dist/commands/steps/steps.js.map +1 -1
- package/dist/commands/subsystem/edit.js +7 -7
- package/dist/commands/subsystem/edit.js.map +1 -1
- package/dist/commands/subsystem/move.js +60 -25
- package/dist/commands/subsystem/move.js.map +1 -1
- package/dist/commands/subsystem/query.js +2 -4
- package/dist/commands/subsystem/query.js.map +1 -1
- package/dist/commands/subsystem/subsystem.js +4 -7
- package/dist/commands/subsystem/subsystem.js.map +1 -1
- package/dist/commands/subsystem/sync.js +141 -71
- package/dist/commands/subsystem/sync.js.map +1 -1
- package/dist/commands/subsystem/txn/report.js +55 -5
- package/dist/commands/subsystem/txn/report.js.map +1 -1
- package/dist/commands/subsystem/txn/txn.js +121 -45
- package/dist/commands/subsystem/txn/txn.js.map +1 -1
- package/dist/commands/subsystem/txn/views.js +82 -12
- package/dist/commands/subsystem/txn/views.js.map +1 -1
- package/dist/commands/tasks/render.js +116 -0
- package/dist/commands/tasks/render.js.map +1 -0
- package/dist/commands/tasks/tasks.js +113 -0
- package/dist/commands/tasks/tasks.js.map +1 -0
- package/dist/commands/unarchive/manifest.js +6 -9
- package/dist/commands/unarchive/manifest.js.map +1 -1
- package/dist/commands/unarchive/restore.js +17 -28
- package/dist/commands/unarchive/restore.js.map +1 -1
- package/dist/commands/unarchive/unarchive.js +22 -30
- package/dist/commands/unarchive/unarchive.js.map +1 -1
- package/dist/commands/validate/arch-coverage.js +6 -15
- package/dist/commands/validate/arch-coverage.js.map +1 -1
- package/dist/commands/validate/checks/fleet-shape.js +4 -49
- package/dist/commands/validate/checks/fleet-shape.js.map +1 -1
- package/dist/commands/validate/checks/health-deps.js +9 -6
- package/dist/commands/validate/checks/health-deps.js.map +1 -1
- package/dist/commands/validate/checks/requirements.js +18 -8
- package/dist/commands/validate/checks/requirements.js.map +1 -1
- package/dist/commands/validate/checks/sources.js +6 -2
- package/dist/commands/validate/checks/sources.js.map +1 -1
- package/dist/commands/validate/feature.js +23 -19
- package/dist/commands/validate/feature.js.map +1 -1
- package/dist/commands/validate/fleet/census.js +26 -3
- package/dist/commands/validate/fleet/census.js.map +1 -1
- package/dist/commands/validate/fleet/landscape.js +35 -32
- package/dist/commands/validate/fleet/landscape.js.map +1 -1
- package/dist/commands/validate/fleet/map/attest.js +7 -12
- package/dist/commands/validate/fleet/map/attest.js.map +1 -1
- package/dist/commands/validate/fleet/map/bindings.js +16 -5
- package/dist/commands/validate/fleet/map/bindings.js.map +1 -1
- package/dist/commands/validate/fleet/map/consumers.js +43 -122
- package/dist/commands/validate/fleet/map/consumers.js.map +1 -1
- package/dist/commands/validate/fleet/map/usecases.js +5 -11
- package/dist/commands/validate/fleet/map/usecases.js.map +1 -1
- package/dist/commands/validate/fleet/obligations.js +1 -5
- package/dist/commands/validate/fleet/obligations.js.map +1 -1
- package/dist/commands/validate/fleet/scorecard/print.js +5 -1
- package/dist/commands/validate/fleet/scorecard/print.js.map +1 -1
- package/dist/commands/validate/fleet/scorecard/scorecard.js +17 -11
- package/dist/commands/validate/fleet/scorecard/scorecard.js.map +1 -1
- package/dist/commands/validate/fleet/usecases/usecases.js +6 -4
- package/dist/commands/validate/fleet/usecases/usecases.js.map +1 -1
- package/dist/commands/validate/fleet/views/fleet-project.js +1 -1
- package/dist/commands/validate/fleet/views/fleet-project.js.map +1 -1
- package/dist/commands/validate/fleet/views/ids.js +33 -7
- package/dist/commands/validate/fleet/views/ids.js.map +1 -1
- package/dist/commands/validate/fleet/views/root-documents.js +17 -35
- package/dist/commands/validate/fleet/views/root-documents.js.map +1 -1
- package/dist/commands/validate/fleet/views/stale.js +31 -14
- package/dist/commands/validate/fleet/views/stale.js.map +1 -1
- package/dist/commands/validate/links/corpus.js +1 -4
- package/dist/commands/validate/links/corpus.js.map +1 -1
- package/dist/commands/validate/links/glossary.js.map +1 -1
- package/dist/commands/validate/report.js +5 -4
- package/dist/commands/validate/report.js.map +1 -1
- package/dist/commands/validate/scope.js +113 -0
- package/dist/commands/validate/scope.js.map +1 -0
- package/dist/commands/validate/service/api.js +16 -104
- package/dist/commands/validate/service/api.js.map +1 -1
- package/dist/commands/validate/service/contracts/generated.js +134 -0
- package/dist/commands/validate/service/contracts/generated.js.map +1 -0
- package/dist/commands/validate/service/events/events.js +1 -1
- package/dist/commands/validate/service/events/events.js.map +1 -1
- package/dist/commands/validate/service/events/message-producers.js +1 -1
- package/dist/commands/validate/service/events/message-producers.js.map +1 -1
- package/dist/commands/validate/service/evidence-pins.js +56 -10
- package/dist/commands/validate/service/evidence-pins.js.map +1 -1
- package/dist/commands/validate/service/service.js +16 -26
- package/dist/commands/validate/service/service.js.map +1 -1
- package/dist/commands/validate/service/specs.js +31 -38
- package/dist/commands/validate/service/specs.js.map +1 -1
- package/dist/commands/validate/service/spine.js +8 -11
- package/dist/commands/validate/service/spine.js.map +1 -1
- package/dist/commands/validate/service/usecases/usecases.js +3 -3
- package/dist/commands/validate/service/usecases/usecases.js.map +1 -1
- package/dist/commands/validate/validate.js +44 -26
- package/dist/commands/validate/validate.js.map +1 -1
- package/dist/commands/verify/cross/diff.js +2 -6
- package/dist/commands/verify/cross/diff.js.map +1 -1
- package/dist/commands/verify/evidence/contract.js +1 -1
- package/dist/commands/verify/evidence/contract.js.map +1 -1
- package/dist/commands/verify/evidence/read.js +12 -3
- package/dist/commands/verify/evidence/read.js.map +1 -1
- package/dist/commands/verify/frozen.js +45 -23
- package/dist/commands/verify/frozen.js.map +1 -1
- package/dist/commands/verify/record.js +69 -17
- package/dist/commands/verify/record.js.map +1 -1
- package/dist/commands/verify/report.js +27 -44
- package/dist/commands/verify/report.js.map +1 -1
- package/dist/commands/verify/results.js +112 -30
- package/dist/commands/verify/results.js.map +1 -1
- package/dist/commands/verify/verify.js +54 -51
- package/dist/commands/verify/verify.js.map +1 -1
- package/dist/commands/vouch/pack/pack.js +2 -2
- package/dist/commands/vouch/pack/pack.js.map +1 -1
- package/dist/commands/vouch/pack/print.js +1 -6
- package/dist/commands/vouch/pack/print.js.map +1 -1
- package/dist/commands/vouch/pack/sections.js +1 -2
- package/dist/commands/vouch/pack/sections.js.map +1 -1
- package/dist/commands/vouch/run.js +26 -81
- package/dist/commands/vouch/run.js.map +1 -1
- package/dist/commands/vouch/sample/plan.js +20 -34
- package/dist/commands/vouch/sample/plan.js.map +1 -1
- package/dist/commands/vouch/vet/verify.js +39 -7
- package/dist/commands/vouch/vet/verify.js.map +1 -1
- package/dist/commands/vouch/vouch.js +10 -17
- package/dist/commands/vouch/vouch.js.map +1 -1
- package/dist/core/agent/agents-md/command-map.js +57 -102
- package/dist/core/agent/agents-md/command-map.js.map +1 -1
- package/dist/core/agent/agents-md/map/explain.js +4 -3
- package/dist/core/agent/agents-md/map/explain.js.map +1 -1
- package/dist/core/agent/agents-md/map/lenses/context.js +4 -3
- package/dist/core/agent/agents-md/map/lenses/context.js.map +1 -1
- package/dist/core/agent/agents-md/map/lenses/diff.js +33 -20
- package/dist/core/agent/agents-md/map/lenses/diff.js.map +1 -1
- package/dist/core/agent/agents-md/map/lenses/gate.js +13 -5
- package/dist/core/agent/agents-md/map/lenses/gate.js.map +1 -1
- package/dist/core/agent/agents-md/map/mcp.js +10 -7
- package/dist/core/agent/agents-md/map/mcp.js.map +1 -1
- package/dist/core/agent/agents-md/map/status.js +9 -3
- package/dist/core/agent/agents-md/map/status.js.map +1 -1
- package/dist/core/agent/agents-md/map/subsystem.js +31 -17
- package/dist/core/agent/agents-md/map/subsystem.js.map +1 -1
- package/dist/core/agent/agents-md/map/usecases.js +24 -6
- package/dist/core/agent/agents-md/map/usecases.js.map +1 -1
- package/dist/core/agent/agents-md/refusals.js +37 -21
- package/dist/core/agent/agents-md/refusals.js.map +1 -1
- package/dist/core/agent/agents-md.js +25 -10
- package/dist/core/agent/agents-md.js.map +1 -1
- package/dist/core/agent/agents-stamp.js +10 -0
- package/dist/core/agent/agents-stamp.js.map +1 -1
- package/dist/core/agent/scaffold.js +10 -15
- package/dist/core/agent/scaffold.js.map +1 -1
- package/dist/core/agent/tools/dialects.js +1 -0
- package/dist/core/agent/tools/dialects.js.map +1 -1
- package/dist/core/agent/tools/registry.js +41 -76
- package/dist/core/agent/tools/registry.js.map +1 -1
- package/dist/core/agent/workflows/adopt.js +5 -3
- package/dist/core/agent/workflows/adopt.js.map +1 -1
- package/dist/core/agent/workflows/check.js +25 -22
- package/dist/core/agent/workflows/check.js.map +1 -1
- package/dist/core/agent/workflows/closing.js +54 -21
- package/dist/core/agent/workflows/closing.js.map +1 -1
- package/dist/core/agent/workflows/feature.js +79 -11
- package/dist/core/agent/workflows/feature.js.map +1 -1
- package/dist/core/agent/workflows/implement.js +91 -13
- package/dist/core/agent/workflows/implement.js.map +1 -1
- package/dist/core/agent/workflows/reference/authoring.js +3 -1
- package/dist/core/agent/workflows/reference/authoring.js.map +1 -1
- package/dist/core/agent/workflows/reference/codes.js +8 -6
- package/dist/core/agent/workflows/reference/codes.js.map +1 -1
- package/dist/core/agent/workflows/reference/done-check.js +37 -15
- package/dist/core/agent/workflows/reference/done-check.js.map +1 -1
- package/dist/core/agent/workflows/reference/reference.js.map +1 -1
- package/dist/core/agent/workflows/reference/spine.js +62 -24
- package/dist/core/agent/workflows/reference/spine.js.map +1 -1
- package/dist/core/asyncapi/baseline/plan.js +14 -81
- package/dist/core/asyncapi/baseline/plan.js.map +1 -1
- package/dist/core/asyncapi/digest.js +30 -25
- package/dist/core/asyncapi/digest.js.map +1 -1
- package/dist/core/asyncapi/merge/components.js +5 -4
- package/dist/core/asyncapi/merge/components.js.map +1 -1
- package/dist/core/asyncapi/merge/error.js +7 -2
- package/dist/core/asyncapi/merge/error.js.map +1 -1
- package/dist/core/asyncapi/merge/markers.js +30 -50
- package/dist/core/asyncapi/merge/markers.js.map +1 -1
- package/dist/core/asyncapi/merge/merge.js +31 -53
- package/dist/core/asyncapi/merge/merge.js.map +1 -1
- package/dist/core/asyncapi/merge/pin.js +10 -36
- package/dist/core/asyncapi/merge/pin.js.map +1 -1
- package/dist/core/asyncapi/model.js.map +1 -1
- package/dist/core/asyncapi/read.js +36 -12
- package/dist/core/asyncapi/read.js.map +1 -1
- package/dist/core/brief/brief.js +30 -25
- package/dist/core/brief/brief.js.map +1 -1
- package/dist/core/brief/landscape.js +8 -12
- package/dist/core/brief/landscape.js.map +1 -1
- package/dist/core/brief/map/extend.js +8 -5
- package/dist/core/brief/map/extend.js.map +1 -1
- package/dist/core/brief/map/owed.js +8 -26
- package/dist/core/brief/map/owed.js.map +1 -1
- package/dist/core/brief/targets.js +79 -5
- package/dist/core/brief/targets.js.map +1 -1
- package/dist/core/brief/unchecked.js +1 -1
- package/dist/core/brief/unchecked.js.map +1 -1
- package/dist/core/c4/likec4.js +147 -16
- package/dist/core/c4/likec4.js.map +1 -1
- package/dist/core/c4/locate/unlocated.js +150 -0
- package/dist/core/c4/locate/unlocated.js.map +1 -0
- package/dist/core/c4/parsed/values.js +54 -1
- package/dist/core/c4/parsed/values.js.map +1 -1
- package/dist/core/c4/prefetch/fleet.js +1 -9
- package/dist/core/c4/prefetch/fleet.js.map +1 -1
- package/dist/core/c4/project/architecture.js +31 -9
- package/dist/core/c4/project/architecture.js.map +1 -1
- package/dist/core/c4/project/documents.js +36 -10
- package/dist/core/c4/project/documents.js.map +1 -1
- package/dist/core/c4/project/load.js +14 -21
- package/dist/core/c4/project/load.js.map +1 -1
- package/dist/core/c4/project/staged.js +7 -3
- package/dist/core/c4/project/staged.js.map +1 -1
- package/dist/core/c4/resolve/external.js +51 -0
- package/dist/core/c4/resolve/external.js.map +1 -0
- package/dist/core/c4/resolve/service.js +25 -1
- package/dist/core/c4/resolve/service.js.map +1 -1
- package/dist/core/c4/seed/template.js +15 -1
- package/dist/core/c4/seed/template.js.map +1 -1
- package/dist/core/c4/service-model/shape.js +2 -22
- package/dist/core/c4/service-model/shape.js.map +1 -1
- package/dist/core/c4/source-mask.js +288 -4
- package/dist/core/c4/source-mask.js.map +1 -1
- package/dist/core/c4/source-scan.js +203 -147
- package/dist/core/c4/source-scan.js.map +1 -1
- package/dist/core/c4/splice/authored-source.js +19 -0
- package/dist/core/c4/splice/authored-source.js.map +1 -1
- package/dist/core/c4/splice/delta-blocks.js +5 -18
- package/dist/core/c4/splice/delta-blocks.js.map +1 -1
- package/dist/core/c4/splice/landscape-merge.js +13 -8
- package/dist/core/c4/splice/landscape-merge.js.map +1 -1
- package/dist/core/c4/splice/model/merge.js +10 -6
- package/dist/core/c4/splice/model/merge.js.map +1 -1
- package/dist/core/c4/splice/placement.js +108 -18
- package/dist/core/c4/splice/placement.js.map +1 -1
- package/dist/core/c4/workspace.js +13 -22
- package/dist/core/c4/workspace.js.map +1 -1
- package/dist/core/capabilities/capabilities.js +6 -6
- package/dist/core/capabilities/capabilities.js.map +1 -1
- package/dist/core/capabilities/delta/doc.js +7 -10
- package/dist/core/capabilities/delta/doc.js.map +1 -1
- package/dist/core/capabilities/findings.js +15 -20
- package/dist/core/capabilities/findings.js.map +1 -1
- package/dist/core/capabilities/realizes/findings.js +12 -19
- package/dist/core/capabilities/realizes/findings.js.map +1 -1
- package/dist/core/capabilities/realizes/join.js +0 -20
- package/dist/core/capabilities/realizes/join.js.map +1 -1
- package/dist/core/capabilities/rollup.js +6 -0
- package/dist/core/capabilities/rollup.js.map +1 -1
- package/dist/core/capabilities/tree.js +6 -28
- package/dist/core/capabilities/tree.js.map +1 -1
- package/dist/core/capabilities/usecase-join.js +3 -13
- package/dist/core/capabilities/usecase-join.js.map +1 -1
- package/dist/core/coherence/authoring/scaffold.js +11 -3
- package/dist/core/coherence/authoring/scaffold.js.map +1 -1
- package/dist/core/coherence/authoring/sentinels.js +2 -1
- package/dist/core/coherence/authoring/sentinels.js.map +1 -1
- package/dist/core/coherence/coherence.js +30 -16
- package/dist/core/coherence/coherence.js.map +1 -1
- package/dist/core/coherence/consumed/operations.js +70 -0
- package/dist/core/coherence/consumed/operations.js.map +1 -0
- package/dist/core/coherence/consumed/refusal.js +38 -0
- package/dist/core/coherence/consumed/refusal.js.map +1 -0
- package/dist/core/coherence/declared.js +60 -34
- package/dist/core/coherence/declared.js.map +1 -1
- package/dist/core/coherence/events/declared.js +44 -59
- package/dist/core/coherence/events/declared.js.map +1 -1
- package/dist/core/coherence/events/events.js +119 -8
- package/dist/core/coherence/events/events.js.map +1 -1
- package/dist/core/coherence/events/grades.js +31 -8
- package/dist/core/coherence/events/grades.js.map +1 -1
- package/dist/core/coherence/events/lookups.js +14 -82
- package/dist/core/coherence/events/lookups.js.map +1 -1
- package/dist/core/coherence/lookups.js +18 -78
- package/dist/core/coherence/lookups.js.map +1 -1
- package/dist/core/coherence/retired/archived.js +285 -0
- package/dist/core/coherence/retired/archived.js.map +1 -0
- package/dist/core/coherence/retired/event-pair.js +62 -0
- package/dist/core/coherence/retired/event-pair.js.map +1 -0
- package/dist/core/coherence/retired/merged.js +79 -0
- package/dist/core/coherence/retired/merged.js.map +1 -0
- package/dist/core/coherence/retired/retirement.js +49 -0
- package/dist/core/coherence/retired/retirement.js.map +1 -0
- package/dist/core/coherence/retired/revival/arrivals.js +131 -0
- package/dist/core/coherence/retired/revival/arrivals.js.map +1 -0
- package/dist/core/coherence/retired/revival/revived.js +297 -0
- package/dist/core/coherence/retired/revival/revived.js.map +1 -0
- package/dist/core/consumers/after.js +113 -0
- package/dist/core/consumers/after.js.map +1 -0
- package/dist/core/consumers/consumers.js +296 -0
- package/dist/core/consumers/consumers.js.map +1 -0
- package/dist/core/consumers/current.js +211 -0
- package/dist/core/consumers/current.js.map +1 -0
- package/dist/core/consumers/scan.js +46 -0
- package/dist/core/consumers/scan.js.map +1 -0
- package/dist/core/consumers/state.js +27 -0
- package/dist/core/consumers/state.js.map +1 -0
- package/dist/core/delta/delta.js +1 -1
- package/dist/core/delta/delta.js.map +1 -1
- package/dist/core/deployment/delta.js +15 -16
- package/dist/core/deployment/delta.js.map +1 -1
- package/dist/core/diff/base-git.js +94 -12
- package/dist/core/diff/base-git.js.map +1 -1
- package/dist/core/diff/base-state.js +28 -16
- package/dist/core/diff/base-state.js.map +1 -1
- package/dist/core/diff/joins.js +136 -0
- package/dist/core/diff/joins.js.map +1 -0
- package/dist/core/diff/scope/changed-paths.js +22 -6
- package/dist/core/diff/scope/changed-paths.js.map +1 -1
- package/dist/core/diff/scope/edges.js +82 -0
- package/dist/core/diff/scope/edges.js.map +1 -0
- package/dist/core/diff/semantic.js +100 -31
- package/dist/core/diff/semantic.js.map +1 -1
- package/dist/core/doctor/agents.js +34 -18
- package/dist/core/doctor/agents.js.map +1 -1
- package/dist/core/doctor/report.js.map +1 -1
- package/dist/core/document/apply.js +10 -2
- package/dist/core/document/apply.js.map +1 -1
- package/dist/core/document/frontmatter.js +55 -0
- package/dist/core/document/frontmatter.js.map +1 -1
- package/dist/core/document/parse.js +29 -6
- package/dist/core/document/parse.js.map +1 -1
- package/dist/core/document/scenarios.js +17 -0
- package/dist/core/document/scenarios.js.map +1 -1
- package/dist/core/document/spec.js +4 -11
- package/dist/core/document/spec.js.map +1 -1
- package/dist/core/envelope/config.js +10 -0
- package/dist/core/envelope/config.js.map +1 -1
- package/dist/core/envelope/json.js +34 -0
- package/dist/core/envelope/json.js.map +1 -1
- package/dist/core/explain/families.js +17 -12
- package/dist/core/explain/families.js.map +1 -1
- package/dist/core/explain/refusals.js +3 -3
- package/dist/core/explain/refusals.js.map +1 -1
- package/dist/core/explain/terms.js +18 -9
- package/dist/core/explain/terms.js.map +1 -1
- package/dist/core/explore/explore.js +2 -7
- package/dist/core/explore/explore.js.map +1 -1
- package/dist/core/fleet-context.js +34 -95
- package/dist/core/fleet-context.js.map +1 -1
- package/dist/core/gate/checks.js +10 -3
- package/dist/core/gate/checks.js.map +1 -1
- package/dist/core/gate/partners.js +64 -19
- package/dist/core/gate/partners.js.map +1 -1
- package/dist/core/gate/report.js.map +1 -1
- package/dist/core/gate/verification.js +75 -12
- package/dist/core/gate/verification.js.map +1 -1
- package/dist/core/gherkin/stale.js +13 -37
- package/dist/core/gherkin/stale.js.map +1 -1
- package/dist/core/glossary/tree.js +6 -19
- package/dist/core/glossary/tree.js.map +1 -1
- package/dist/core/kernel/concurrency.js +19 -0
- package/dist/core/kernel/concurrency.js.map +1 -1
- package/dist/core/kernel/records.js +11 -0
- package/dist/core/kernel/records.js.map +1 -1
- package/dist/core/links/backlinks.js +1 -3
- package/dist/core/links/backlinks.js.map +1 -1
- package/dist/core/links/corpus.js +5 -36
- package/dist/core/links/corpus.js.map +1 -1
- package/dist/core/mcp/argv.js +101 -0
- package/dist/core/mcp/argv.js.map +1 -1
- package/dist/core/mcp/author-tools.js +2 -1
- package/dist/core/mcp/author-tools.js.map +1 -1
- package/dist/core/mcp/protocol.js +2 -2
- package/dist/core/mcp/protocol.js.map +1 -1
- package/dist/core/mcp/tools.js +43 -33
- package/dist/core/mcp/tools.js.map +1 -1
- package/dist/core/openapi/baseline/gate.js +53 -12
- package/dist/core/openapi/baseline/gate.js.map +1 -1
- package/dist/core/openapi/baseline/plan.js +22 -8
- package/dist/core/openapi/baseline/plan.js.map +1 -1
- package/dist/core/openapi/baseline/record.js +0 -1
- package/dist/core/openapi/baseline/record.js.map +1 -1
- package/dist/core/openapi/contract-text.js +33 -0
- package/dist/core/openapi/contract-text.js.map +1 -0
- package/dist/core/openapi/contract-tree.js +56 -0
- package/dist/core/openapi/contract-tree.js.map +1 -0
- package/dist/core/openapi/depth.js +38 -24
- package/dist/core/openapi/depth.js.map +1 -1
- package/dist/core/openapi/digest.js +52 -2
- package/dist/core/openapi/digest.js.map +1 -1
- package/dist/core/openapi/doc.js +12 -4
- package/dist/core/openapi/doc.js.map +1 -1
- package/dist/core/openapi/merge/components.js +25 -60
- package/dist/core/openapi/merge/components.js.map +1 -1
- package/dist/core/openapi/merge/error.js +3 -13
- package/dist/core/openapi/merge/error.js.map +1 -1
- package/dist/core/openapi/merge/markers.js +26 -30
- package/dist/core/openapi/merge/markers.js.map +1 -1
- package/dist/core/openapi/merge/merge.js +26 -52
- package/dist/core/openapi/merge/merge.js.map +1 -1
- package/dist/core/openapi/merge/pin.js +15 -35
- package/dist/core/openapi/merge/pin.js.map +1 -1
- package/dist/core/openspec/decide/verdict.js.map +1 -1
- package/dist/core/openspec/inventory.js +4 -5
- package/dist/core/openspec/inventory.js.map +1 -1
- package/dist/core/openspec/model/mapping.js +30 -28
- package/dist/core/openspec/model/mapping.js.map +1 -1
- package/dist/core/openspec/model/model.js +12 -7
- package/dist/core/openspec/model/model.js.map +1 -1
- package/dist/core/openspec/scan/changes.js +10 -4
- package/dist/core/openspec/scan/changes.js.map +1 -1
- package/dist/core/openspec/scan/config.js +7 -16
- package/dist/core/openspec/scan/config.js.map +1 -1
- package/dist/core/openspec/scan/shape.js +63 -19
- package/dist/core/openspec/scan/shape.js.map +1 -1
- package/dist/core/openspec/scan/walk.js +21 -38
- package/dist/core/openspec/scan/walk.js.map +1 -1
- package/dist/core/pack/living.js +2 -16
- package/dist/core/pack/living.js.map +1 -1
- package/dist/core/provenance/findings.js +48 -12
- package/dist/core/provenance/findings.js.map +1 -1
- package/dist/core/provenance/git.js +33 -57
- package/dist/core/provenance/git.js.map +1 -1
- package/dist/core/provenance/gitq/moves.js +71 -114
- package/dist/core/provenance/gitq/moves.js.map +1 -1
- package/dist/core/provenance/gitq/vouched-ancestor.js +2 -2
- package/dist/core/provenance/gitq/vouched-ancestor.js.map +1 -1
- package/dist/core/provenance/sources.js +23 -6
- package/dist/core/provenance/sources.js.map +1 -1
- package/dist/core/provenance/stamp.js +5 -17
- package/dist/core/provenance/stamp.js.map +1 -1
- package/dist/core/repo/entries.js.map +1 -1
- package/dist/core/repo/paths.js +34 -29
- package/dist/core/repo/paths.js.map +1 -1
- package/dist/core/repo/repo.js +24 -14
- package/dist/core/repo/repo.js.map +1 -1
- package/dist/core/repo/tree/find.js +12 -3
- package/dist/core/repo/tree/find.js.map +1 -1
- package/dist/core/repo/tree/fs.js +27 -1
- package/dist/core/repo/tree/fs.js.map +1 -1
- package/dist/core/repo/tree/render/body.js +45 -6
- package/dist/core/repo/tree/render/body.js.map +1 -1
- package/dist/core/repo/tree/render/service/header.js +125 -0
- package/dist/core/repo/tree/render/service/header.js.map +1 -0
- package/dist/core/repo/tree/render/service/peers.js +28 -0
- package/dist/core/repo/tree/render/service/peers.js.map +1 -0
- package/dist/core/repo/tree/render/service/view-id.js +67 -0
- package/dist/core/repo/tree/render/service/view-id.js.map +1 -0
- package/dist/core/repo/tree/render/service/views.js +78 -0
- package/dist/core/repo/tree/render/service/views.js.map +1 -0
- package/dist/core/repo/tree/render/stale.js +19 -2
- package/dist/core/repo/tree/render/stale.js.map +1 -1
- package/dist/core/repo/tree/render/views.js +102 -33
- package/dist/core/repo/tree/render/views.js.map +1 -1
- package/dist/core/repo/tree/walk.js +8 -30
- package/dist/core/repo/tree/walk.js.map +1 -1
- package/dist/core/results.js +47 -12
- package/dist/core/results.js.map +1 -1
- package/dist/core/staging/commit.js +10 -12
- package/dist/core/staging/commit.js.map +1 -1
- package/dist/core/staging/lock.js +74 -12
- package/dist/core/staging/lock.js.map +1 -1
- package/dist/core/staging/recovery/intent.js +2 -5
- package/dist/core/staging/recovery/intent.js.map +1 -1
- package/dist/core/staging/recovery/recover.js +60 -1
- package/dist/core/staging/recovery/recover.js.map +1 -1
- package/dist/core/staging/snapshot/manifest.js +152 -0
- package/dist/core/staging/snapshot/manifest.js.map +1 -0
- package/dist/core/staging/{snapshot.js → snapshot/snapshot.js} +10 -34
- package/dist/core/staging/snapshot/snapshot.js.map +1 -0
- package/dist/core/status/actions/execution.js +11 -0
- package/dist/core/status/actions/execution.js.map +1 -1
- package/dist/core/status/feature/artifacts.js +2 -2
- package/dist/core/status/feature/artifacts.js.map +1 -1
- package/dist/core/status/feature/feature.js +5 -11
- package/dist/core/status/feature/feature.js.map +1 -1
- package/dist/core/status/fleet/fleet.js +6 -2
- package/dist/core/status/fleet/fleet.js.map +1 -1
- package/dist/core/status/fleet/next.js +26 -3
- package/dist/core/status/fleet/next.js.map +1 -1
- package/dist/core/status/report.js.map +1 -1
- package/dist/core/status/verification.js +30 -15
- package/dist/core/status/verification.js.map +1 -1
- package/dist/core/tasks/packet.js +174 -0
- package/dist/core/tasks/packet.js.map +1 -0
- package/dist/core/tasks/record.js +43 -0
- package/dist/core/tasks/record.js.map +1 -0
- package/dist/core/tasks/sources.js +181 -0
- package/dist/core/tasks/sources.js.map +1 -0
- package/dist/core/tasks/stamps.js +76 -0
- package/dist/core/tasks/stamps.js.map +1 -0
- package/dist/core/tasks/unit.js +0 -0
- package/dist/core/tasks/unit.js.map +1 -0
- package/dist/core/usecases/capability.js +11 -14
- package/dist/core/usecases/capability.js.map +1 -1
- package/dist/core/usecases/delta/flows.js +5 -7
- package/dist/core/usecases/delta/flows.js.map +1 -1
- package/dist/core/usecases/fleet.js +178 -31
- package/dist/core/usecases/fleet.js.map +1 -1
- package/dist/core/usecases/operations.js +5 -4
- package/dist/core/usecases/operations.js.map +1 -1
- package/dist/core/usecases/service/flows.js +9 -6
- package/dist/core/usecases/service/flows.js.map +1 -1
- package/dist/core/usecases/suites/participants.js +83 -0
- package/dist/core/usecases/suites/participants.js.map +1 -0
- package/dist/core/usecases/suites/suites.js +45 -0
- package/dist/core/usecases/suites/suites.js.map +1 -0
- package/dist/core/verify/answers.js +12 -5
- package/dist/core/verify/answers.js.map +1 -1
- package/dist/core/verify/build.js +102 -82
- package/dist/core/verify/build.js.map +1 -1
- package/dist/core/verify/checklist.js +45 -10
- package/dist/core/verify/checklist.js.map +1 -1
- package/dist/core/verify/location.js +67 -0
- package/dist/core/verify/location.js.map +1 -0
- package/dist/core/verify/pins/lint.js +3 -2
- package/dist/core/verify/pins/lint.js.map +1 -1
- package/dist/core/verify/pins/pin.js +1 -1
- package/dist/core/verify/pins/pin.js.map +1 -1
- package/dist/core/verify/read/file.js +224 -0
- package/dist/core/verify/read/file.js.map +1 -0
- package/dist/core/verify/{file.js → read/shape.js} +16 -104
- package/dist/core/verify/read/shape.js.map +1 -0
- package/dist/core/verify/read/union.js +105 -0
- package/dist/core/verify/read/union.js.map +1 -0
- package/dist/core/verify/record.js +35 -12
- package/dist/core/verify/record.js.map +1 -1
- package/dist/core/verify/store/commit.js +40 -30
- package/dist/core/verify/store/commit.js.map +1 -1
- package/dist/core/verify/store/render.js +8 -4
- package/dist/core/verify/store/render.js.map +1 -1
- package/dist/core/vocabulary/issue.js +1 -0
- package/dist/core/vocabulary/issue.js.map +1 -1
- package/dist/core/vocabulary/maturity.js +53 -3
- package/dist/core/vocabulary/maturity.js.map +1 -1
- package/examples/README.md +28 -9
- package/examples/docs/architecture/landscape.likec4 +21 -7
- package/examples/docs/architecture/services.likec4 +70 -0
- package/examples/docs/architecture/subsystems.likec4 +3 -0
- package/examples/docs/architecture/usecases/order-notification.likec4 +6 -2
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-service/asyncapi.yaml +11 -8
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/openapi.yaml +6 -6
- package/examples/docs/features/archive/FEAT-088-refunds/specs/payment-service/openapi.yaml +13 -10
- package/examples/docs/services/order-service/asyncapi.yaml +3 -2
- package/examples/docs/services/order-service/model.likec4 +10 -8
- package/examples/docs/services/payment-service/model.likec4 +6 -4
- package/examples/docs/services/platform/identity-service/model.likec4 +9 -7
- package/examples/docs/services/platform/notification-service/asyncapi.yaml +2 -1
- package/examples/docs/services/platform/notification-service/model.likec4 +4 -5
- package/package.json +1 -1
- package/dist/commands/validate/checks/vocabulary.js +0 -16
- package/dist/commands/validate/checks/vocabulary.js.map +0 -1
- package/dist/core/agent/agents-md/artifacts.js +0 -221
- package/dist/core/agent/agents-md/artifacts.js.map +0 -1
- package/dist/core/agent/agents-md/cycle.js +0 -180
- package/dist/core/agent/agents-md/cycle.js.map +0 -1
- package/dist/core/agent/agents-md/shipped/archive-gate.js +0 -98
- package/dist/core/agent/agents-md/shipped/archive-gate.js.map +0 -1
- package/dist/core/agent/agents-md/spine.js +0 -40
- package/dist/core/agent/agents-md/spine.js.map +0 -1
- package/dist/core/coherence/events/merged.js +0 -40
- package/dist/core/coherence/events/merged.js.map +0 -1
- package/dist/core/diff/current-state.js +0 -96
- package/dist/core/diff/current-state.js.map +0 -1
- package/dist/core/diff/victims.js +0 -256
- package/dist/core/diff/victims.js.map +0 -1
- package/dist/core/staging/snapshot.js.map +0 -1
- package/dist/core/verify/file.js.map +0 -1
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The handful of facts every validate check speaks, and none of them owns.
|
|
3
|
-
*
|
|
4
|
-
* A leaf module rather than a paragraph beside its first caller, because the
|
|
5
|
-
* checks are spread across packages and each of these is read from more than
|
|
6
|
-
* one of them: the dispatcher's rollup and the service target's sources check
|
|
7
|
-
* both name one finding code. ACTOR_KINDS and EXTERNAL_TAG lived here too, until they
|
|
8
|
-
* reached a third copy (`core/gate/partners.ts`, `core/verify/checklist.ts`);
|
|
9
|
-
* their shared spelling is now `core/vocabulary/maturity.ts`, beside the
|
|
10
|
-
* landscape evidence that asks the same questions. The parser-diagnostic line
|
|
11
|
-
* (`errorText`) went the same way, to `core/c4/likec4.ts` beside the type it
|
|
12
|
-
* reads, once four hand-rolled copies had disagreed about the line base.
|
|
13
|
-
*/
|
|
14
|
-
/** The one code the rollup line counts; spelled once so the two cannot drift. */
|
|
15
|
-
export const UNVERIFIABLE = "sources.unverifiable-from-here";
|
|
16
|
-
//# sourceMappingURL=vocabulary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../../../src/commands/validate/checks/vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG,gCAAgC,CAAC","sourcesContent":["/**\n * The handful of facts every validate check speaks, and none of them owns.\n *\n * A leaf module rather than a paragraph beside its first caller, because the\n * checks are spread across packages and each of these is read from more than\n * one of them: the dispatcher's rollup and the service target's sources check\n * both name one finding code. ACTOR_KINDS and EXTERNAL_TAG lived here too, until they\n * reached a third copy (`core/gate/partners.ts`, `core/verify/checklist.ts`);\n * their shared spelling is now `core/vocabulary/maturity.ts`, beside the\n * landscape evidence that asks the same questions. The parser-diagnostic line\n * (`errorText`) went the same way, to `core/c4/likec4.ts` beside the type it\n * reads, once four hand-rolled copies had disagreed about the line base.\n */\n\n/** The one code the rollup line counts; spelled once so the two cannot drift. */\nexport const UNVERIFIABLE = \"sources.unverifiable-from-here\";\n"]}
|
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The document's opening arc: what the docs repo HOLDS — the layout, how its
|
|
3
|
-
* documents link to each other, the glossary, architectural obligations, and
|
|
4
|
-
* the `loam.json` wiring every repository commits.
|
|
5
|
-
*
|
|
6
|
-
* The three sections that used to close this file — the architecture spec
|
|
7
|
-
* axis, the generated Gherkin suite, and the frontmatter/vouch chain — are now
|
|
8
|
-
* the `loam-authoring` reference page (../workflows/reference/authoring.ts),
|
|
9
|
-
* printed by `loam instructions loam-authoring` rather than written into
|
|
10
|
-
* AGENTS.md. They are grammars consulted while writing ONE document, and the
|
|
11
|
-
* file they were in is auto-loaded on every session by hosts that truncate it
|
|
12
|
-
* silently; ./command-map.ts's header carries the measurement that decided it.
|
|
13
|
-
* What is left here is what an agent must know before it can form a question
|
|
14
|
-
* at all.
|
|
15
|
-
*
|
|
16
|
-
* One section of the AGENTS.md template. ../agents-md.ts assembles the
|
|
17
|
-
* document by PLAIN CONCATENATION — no join separator — so every section
|
|
18
|
-
* starts at the first character of its opening line and ends with the newline
|
|
19
|
-
* that closes its last one. Keep that shape when editing, or two sections glue
|
|
20
|
-
* onto one line in every docs repo loam scaffolds from now on.
|
|
21
|
-
*/
|
|
22
|
-
export const ARTIFACTS = `# Working in this docs repo
|
|
23
|
-
|
|
24
|
-
This is a **loam** docs repo: the shared source of truth for a governed software
|
|
25
|
-
system — its architecture, requirements, contracts and evidence. Everything here
|
|
26
|
-
is plain files. \`loam\` reads and writes them; delete \`loam\` and the docs remain.
|
|
27
|
-
|
|
28
|
-
**The bar this artifact set aims at is reproducibility**: a reader should be able
|
|
29
|
-
to answer, from these files alone — what each governed boundary exposes, what it
|
|
30
|
-
reaches, what shapes it exchanges, how it is run, and what pages whom —
|
|
31
|
-
without opening the code. \`loam validate\` grades form and joins, never depth:
|
|
32
|
-
green means the files agree with each other, and the bar is what "done" is
|
|
33
|
-
measured against — a thin baseline that validates is thin, not done.
|
|
34
|
-
|
|
35
|
-
## Layout
|
|
36
|
-
|
|
37
|
-
\`\`\`
|
|
38
|
-
architecture/landscape.likec4 the living C4 model of the whole system
|
|
39
|
-
architecture/permissions.yaml optional system-wide authorization vocabulary
|
|
40
|
-
architecture/obligations.yaml optional ARCHITECTURAL obligations (#obl-<name> on the map)
|
|
41
|
-
architecture/adrs/NNNN-*.md optional SYSTEM-level decisions (MADR) — only their links are graded
|
|
42
|
-
glossary/<term>.md optional domain vocabulary — one file per term, nesting allowed
|
|
43
|
-
services/<svc>/
|
|
44
|
-
model.likec4 this governed boundary's C4
|
|
45
|
-
spec.md its living requirements (current state)
|
|
46
|
-
arch.spec.md its living ARCHITECTURE requirements (outbox, retries, alerts)
|
|
47
|
-
openapi.yaml its API contract
|
|
48
|
-
asyncapi.yaml its AsyncAPI 3 event contract
|
|
49
|
-
usecases/<name>.likec4 optional flows INSIDE this boundary — dynamic views over its containers, graded when tagged #req- (any .likec4 beside model.likec4 is read the same way)
|
|
50
|
-
adrs/ runbook.md health.yaml why it is like this, how to run it
|
|
51
|
-
features/<FEAT>/ a change in flight
|
|
52
|
-
intent.md why, in business terms
|
|
53
|
-
delta.likec4 the architecture change, tagged #<FEAT>
|
|
54
|
-
specs/<svc>/spec.md the requirement change for one governed boundary
|
|
55
|
-
specs/<svc>/arch.spec.md the architectural requirement change, same delta grammar
|
|
56
|
-
specs/<svc>/openapi.yaml the endpoints this feature adds
|
|
57
|
-
specs/<svc>/asyncapi.yaml the event-contract delta (optional; a complete AsyncAPI 3 document)
|
|
58
|
-
verification.yaml what was checked once the code was built
|
|
59
|
-
features/archive/<FEAT>/ shipped changes — the evolution history
|
|
60
|
-
\`\`\`
|
|
61
|
-
|
|
62
|
-
## Linking between documents
|
|
63
|
-
|
|
64
|
-
Documents here link to each other with **standard markdown links**, and the
|
|
65
|
-
target is a relative path to the file:
|
|
66
|
-
|
|
67
|
-
\`\`\`markdown
|
|
68
|
-
[0001 — transactional outbox](../../architecture/adrs/0001-transactional-outbox.md)
|
|
69
|
-
\`\`\`
|
|
70
|
-
|
|
71
|
-
Two reasons, and the second is the one that decides it. A markdown link renders
|
|
72
|
-
as a link in pull-request review, which is where these documents are actually
|
|
73
|
-
read, while \`[[0001 transactional outbox]]\` renders there as the literal
|
|
74
|
-
brackets somebody typed. And its target is a real relative path, so "does this
|
|
75
|
-
link resolve" is a filesystem question with a yes-or-no answer — where resolving
|
|
76
|
-
a wikilink means reimplementing Obsidian's shortest-unique-path search across the
|
|
77
|
-
whole repo, which is guessing, and loam refuses and names rather than guessing.
|
|
78
|
-
|
|
79
|
-
You lose nothing by it. Obsidian reads a repo written this way with no
|
|
80
|
-
integration at all — graph view, backlinks and search all work on markdown links
|
|
81
|
-
— and its per-vault \`Use [[Wikilinks]]\` setting turns OFF, after which its own
|
|
82
|
-
autocomplete and rename-tracking produce markdown links too. The authoring
|
|
83
|
-
comfort is a toggle in somebody's editor, not a decision this repo carries.
|
|
84
|
-
|
|
85
|
-
**\`loam validate\` resolves these links** (\`link.unresolved\`, error): a relative
|
|
86
|
-
target that names nothing is a broken join, reported once per document with
|
|
87
|
-
every bad link and its line. A link here is a **join**, not decoration — a
|
|
88
|
-
requirement that names a term wants that term's document linked, and an ADR that
|
|
89
|
-
supersedes another wants to say which, the same kind of relationship
|
|
90
|
-
\`Operations:\` and \`Covers:\` already state.
|
|
91
|
-
|
|
92
|
-
Three things are deliberately NOT graded, so write them freely: a target outside
|
|
93
|
-
this repository (\`../../some-service/README.md\` — that tree may not be checked
|
|
94
|
-
out beside these documents), a link to a heading (\`#section\`), and any link
|
|
95
|
-
inside a fenced code block or an inline code span, which is how a document shows
|
|
96
|
-
the convention without being convicted for it.
|
|
97
|
-
|
|
98
|
-
CASE **is** graded, and deliberately: \`[Order](Order.md)\` beside a file called
|
|
99
|
-
\`order.md\` resolves on Windows and macOS and 404s on GitHub and every Linux
|
|
100
|
-
runner, so the message names the stored spelling on all of them alike.
|
|
101
|
-
|
|
102
|
-
## The glossary — the system's domain words
|
|
103
|
-
|
|
104
|
-
\`glossary/<term>.md\`, one file per term, nesting allowed
|
|
105
|
-
(\`glossary/payments/authorization.md\` is the term \`payments/authorization\`). There is
|
|
106
|
-
no \`glossary.yaml\`: a definition is prose, and the DIRECTORY is the list. The
|
|
107
|
-
directory's existence is the opt-in — a system without one hears nothing.
|
|
108
|
-
|
|
109
|
-
**A term is checkable because a link is a join.** Cite it from the document that
|
|
110
|
-
uses the word — a requirement, a capability document, a feature's intent — with an
|
|
111
|
-
ordinary relative link:
|
|
112
|
-
|
|
113
|
-
\`\`\`markdown
|
|
114
|
-
An [Order](../../glossary/order.md) is what a customer has confirmed.
|
|
115
|
-
\`\`\`
|
|
116
|
-
|
|
117
|
-
A citation that does not resolve is \`link.unresolved\` like any other; a term nothing
|
|
118
|
-
outside \`glossary/\` cites is \`glossary.unlinked\` (warn). Terms citing each other is
|
|
119
|
-
normal and does NOT count as adoption — a glossary is a network of definitions, and
|
|
120
|
-
two terms defining each other say nothing about whether the system uses either word.
|
|
121
|
-
\`loam list glossary\` prints every term with the documents that cite it.
|
|
122
|
-
|
|
123
|
-
**A feature may bring a new word with it**: write it at
|
|
124
|
-
\`features/<FEAT>/glossary/<term>.md\` and \`loam archive\` copies it into \`glossary/\`,
|
|
125
|
-
\`loam unarchive\` takes it back out. This route is CREATE-ONLY — a term the living
|
|
126
|
-
glossary already defines is \`glossary.term-exists\`, which \`--approve\` does not
|
|
127
|
-
override, because the merge is a whole-file copy and would replace an authored
|
|
128
|
-
definition wholesale. To CHANGE a definition, edit \`glossary/<term>.md\` directly in
|
|
129
|
-
the same pull request, where git produces an ordinary conflict.
|
|
130
|
-
|
|
131
|
-
Cite the new word at its FUTURE living path (\`../../../../glossary/order.md\` from a
|
|
132
|
-
\`specs/<svc>/\` delta) — that link resolves while the feature is in flight, and the
|
|
133
|
-
merge re-expresses it from wherever the text lands, so it keeps resolving afterwards.
|
|
134
|
-
|
|
135
|
-
Write the definition for a reader who knows the business and not this system: what the
|
|
136
|
-
word means, and what it is NOT (an order is not a cart). Never which service owns it —
|
|
137
|
-
that is the system map's question and it changes.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
## Architectural obligations — what the architect hands the team
|
|
141
|
-
|
|
142
|
-
An architect has always had one checked channel here: an edge carrying
|
|
143
|
-
\`metadata { op 'authorizePayment' }\` obliges the provider to define that operationId,
|
|
144
|
-
or \`spine.op-undefined\` fails the gate. Obligations are the same handoff for the rules
|
|
145
|
-
that VARY — an outbox on this publisher and not that one, a circuit breaker on two
|
|
146
|
-
edges out of five — and they are three separate things on purpose:
|
|
147
|
-
|
|
148
|
-
- an **ADR** in \`architecture/adrs/\` says WHAT was decided, as thin or as thick as the
|
|
149
|
-
decision needs;
|
|
150
|
-
- a **\`#obl-<name>\` tag** on an element or an edge in \`architecture/landscape.likec4\`
|
|
151
|
-
says WHERE it applies, so one ADR governs three edges and not the fourth without the
|
|
152
|
-
document forking;
|
|
153
|
-
- **\`architecture/obligations.yaml\`** declares the names, so a mistyped tag is an error
|
|
154
|
-
rather than a word nobody notices.
|
|
155
|
-
|
|
156
|
-
\`\`\`yaml
|
|
157
|
-
obligations:
|
|
158
|
-
outbox:
|
|
159
|
-
description: Publishers write the event and the state change in one transaction.
|
|
160
|
-
adr: architecture/adrs/0001-transactional-outbox.md # relative to the docs repo root
|
|
161
|
-
\`\`\`
|
|
162
|
-
|
|
163
|
-
**Your side of it is \`Covers:\`**. A tagged object with no living requirement covering it
|
|
164
|
-
is \`obligation.uncovered\` (warn), and the finding names the service, the object and the
|
|
165
|
-
exact line to write — \`Covers: <element>\` or \`Covers: <source> -> <target>\` in that
|
|
166
|
-
service's \`arch.spec.md\`, with a scenario that proves it. An id is its own tag suffix,
|
|
167
|
-
so it may hold letters, digits, \`_\` and \`-\` only.
|
|
168
|
-
|
|
169
|
-
## \`loam.json\` — the wiring, in every repo
|
|
170
|
-
|
|
171
|
-
A governed system is **N + 1 repositories**: this docs repo, and one per governed
|
|
172
|
-
implementation boundary. Paths and commands call that boundary a \`service\`; it
|
|
173
|
-
may be a modular monolith, a network service, a CLI or a worker. Every repo
|
|
174
|
-
commits its own \`loam.json\`, so an agent, human or CI runner can find the rest
|
|
175
|
-
of the system. There is no global config; without a \`loam.json\`, commands refuse
|
|
176
|
-
with \`no-config\` rather than guessing.
|
|
177
|
-
|
|
178
|
-
\`\`\`json
|
|
179
|
-
{ "docsDir": "../docs-repo", "service": "payment-service", "gherkinDir": "features" }
|
|
180
|
-
\`\`\`
|
|
181
|
-
|
|
182
|
-
- \`docsDir\` — where the docs repo is, **stored exactly as it was passed** and
|
|
183
|
-
resolved against the directory holding the \`loam.json\`. So \`../docs-repo\`
|
|
184
|
-
keeps working on every machine that checks the repos out side by side, which
|
|
185
|
-
is the point of committing the file. An absolute path is a warning
|
|
186
|
-
(\`doctor.docs-absolute\`): it resolves only on the machine that ran \`loam init\`.
|
|
187
|
-
The docs repo's own \`loam.json\` says \`"docsDir": "."\`.
|
|
188
|
-
- \`service\` — the canonical id of the governed boundary THIS repo contains, i.e. the
|
|
189
|
-
\`services/<id>/\` directory it is allowed to speak for. \`loam vouch\`,
|
|
190
|
-
\`loam gherkin\` and \`loam verify --service\` when writing with \`--record\`,
|
|
191
|
-
\`--results\` or \`--contract-results\` bind to it; without it they refuse
|
|
192
|
-
(\`repository-unavailable\`) rather than write another boundary's documents
|
|
193
|
-
from a repo that is not that boundary's. A read-only verify checklist needs no
|
|
194
|
-
binding and works from the docs repo.
|
|
195
|
-
- \`gherkinDir\` — optional, default \`features\`: the directory \`loam gherkin\`
|
|
196
|
-
writes its own \`loam/\` subtree into.
|
|
197
|
-
- \`agentTools\` — optional: the agent tools \`loam init\` has written command and
|
|
198
|
-
skill files for here, accumulated across runs. Written by \`init\`, read by
|
|
199
|
-
\`loam doctor\`; nothing else depends on it, and a config without it loads.
|
|
200
|
-
|
|
201
|
-
**Step 0 of everything below, once per repo:**
|
|
202
|
-
|
|
203
|
-
\`\`\`sh
|
|
204
|
-
loam init --docs ../docs-repo --service payment-service # in EACH service repo
|
|
205
|
-
loam doctor # before you trust any of it
|
|
206
|
-
\`\`\`
|
|
207
|
-
|
|
208
|
-
\`loam init --docs <dir>\` **joins** an existing docs repo; creating a new one
|
|
209
|
-
takes \`--create\`, so a mistyped path cannot quietly scaffold a second source of
|
|
210
|
-
truth beside the real one. \`loam doctor\` is the read-only preflight: it reads
|
|
211
|
-
loam.json defensively, resolves \`docsDir\`, probes access, checks \`services/\` and
|
|
212
|
-
the system map, and reports the service binding — run it first when anything
|
|
213
|
-
behaves as though the system were empty.
|
|
214
|
-
|
|
215
|
-
**Living vs delta.** \`services/<svc>/spec.md\` is the complete current state.
|
|
216
|
-
\`features/<FEAT>/specs/<svc>/spec.md\` is a diff against it, reviewed as a diff, with
|
|
217
|
-
requirements grouped under \`## ADDED\`, \`## MODIFIED\` or \`## REMOVED Requirements\`.
|
|
218
|
-
\`loam archive\` folds the delta into the living state.
|
|
219
|
-
|
|
220
|
-
`;
|
|
221
|
-
//# sourceMappingURL=artifacts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../../src/core/agent/agents-md/artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsMxB,CAAC","sourcesContent":["/**\n * The document's opening arc: what the docs repo HOLDS — the layout, how its\n * documents link to each other, the glossary, architectural obligations, and\n * the `loam.json` wiring every repository commits.\n *\n * The three sections that used to close this file — the architecture spec\n * axis, the generated Gherkin suite, and the frontmatter/vouch chain — are now\n * the `loam-authoring` reference page (../workflows/reference/authoring.ts),\n * printed by `loam instructions loam-authoring` rather than written into\n * AGENTS.md. They are grammars consulted while writing ONE document, and the\n * file they were in is auto-loaded on every session by hosts that truncate it\n * silently; ./command-map.ts's header carries the measurement that decided it.\n * What is left here is what an agent must know before it can form a question\n * at all.\n *\n * One section of the AGENTS.md template. ../agents-md.ts assembles the\n * document by PLAIN CONCATENATION — no join separator — so every section\n * starts at the first character of its opening line and ends with the newline\n * that closes its last one. Keep that shape when editing, or two sections glue\n * onto one line in every docs repo loam scaffolds from now on.\n */\nexport const ARTIFACTS = `# Working in this docs repo\n\nThis is a **loam** docs repo: the shared source of truth for a governed software\nsystem — its architecture, requirements, contracts and evidence. Everything here\nis plain files. \\`loam\\` reads and writes them; delete \\`loam\\` and the docs remain.\n\n**The bar this artifact set aims at is reproducibility**: a reader should be able\nto answer, from these files alone — what each governed boundary exposes, what it\nreaches, what shapes it exchanges, how it is run, and what pages whom —\nwithout opening the code. \\`loam validate\\` grades form and joins, never depth:\ngreen means the files agree with each other, and the bar is what \"done\" is\nmeasured against — a thin baseline that validates is thin, not done.\n\n## Layout\n\n\\`\\`\\`\narchitecture/landscape.likec4 the living C4 model of the whole system\narchitecture/permissions.yaml optional system-wide authorization vocabulary\narchitecture/obligations.yaml optional ARCHITECTURAL obligations (#obl-<name> on the map)\narchitecture/adrs/NNNN-*.md optional SYSTEM-level decisions (MADR) — only their links are graded\nglossary/<term>.md optional domain vocabulary — one file per term, nesting allowed\nservices/<svc>/\n model.likec4 this governed boundary's C4\n spec.md its living requirements (current state)\n arch.spec.md its living ARCHITECTURE requirements (outbox, retries, alerts)\n openapi.yaml its API contract\n asyncapi.yaml its AsyncAPI 3 event contract\n usecases/<name>.likec4 optional flows INSIDE this boundary — dynamic views over its containers, graded when tagged #req- (any .likec4 beside model.likec4 is read the same way)\n adrs/ runbook.md health.yaml why it is like this, how to run it\nfeatures/<FEAT>/ a change in flight\n intent.md why, in business terms\n delta.likec4 the architecture change, tagged #<FEAT>\n specs/<svc>/spec.md the requirement change for one governed boundary\n specs/<svc>/arch.spec.md the architectural requirement change, same delta grammar\n specs/<svc>/openapi.yaml the endpoints this feature adds\n specs/<svc>/asyncapi.yaml the event-contract delta (optional; a complete AsyncAPI 3 document)\n verification.yaml what was checked once the code was built\nfeatures/archive/<FEAT>/ shipped changes — the evolution history\n\\`\\`\\`\n\n## Linking between documents\n\nDocuments here link to each other with **standard markdown links**, and the\ntarget is a relative path to the file:\n\n\\`\\`\\`markdown\n[0001 — transactional outbox](../../architecture/adrs/0001-transactional-outbox.md)\n\\`\\`\\`\n\nTwo reasons, and the second is the one that decides it. A markdown link renders\nas a link in pull-request review, which is where these documents are actually\nread, while \\`[[0001 transactional outbox]]\\` renders there as the literal\nbrackets somebody typed. And its target is a real relative path, so \"does this\nlink resolve\" is a filesystem question with a yes-or-no answer — where resolving\na wikilink means reimplementing Obsidian's shortest-unique-path search across the\nwhole repo, which is guessing, and loam refuses and names rather than guessing.\n\nYou lose nothing by it. Obsidian reads a repo written this way with no\nintegration at all — graph view, backlinks and search all work on markdown links\n— and its per-vault \\`Use [[Wikilinks]]\\` setting turns OFF, after which its own\nautocomplete and rename-tracking produce markdown links too. The authoring\ncomfort is a toggle in somebody's editor, not a decision this repo carries.\n\n**\\`loam validate\\` resolves these links** (\\`link.unresolved\\`, error): a relative\ntarget that names nothing is a broken join, reported once per document with\nevery bad link and its line. A link here is a **join**, not decoration — a\nrequirement that names a term wants that term's document linked, and an ADR that\nsupersedes another wants to say which, the same kind of relationship\n\\`Operations:\\` and \\`Covers:\\` already state.\n\nThree things are deliberately NOT graded, so write them freely: a target outside\nthis repository (\\`../../some-service/README.md\\` — that tree may not be checked\nout beside these documents), a link to a heading (\\`#section\\`), and any link\ninside a fenced code block or an inline code span, which is how a document shows\nthe convention without being convicted for it.\n\nCASE **is** graded, and deliberately: \\`[Order](Order.md)\\` beside a file called\n\\`order.md\\` resolves on Windows and macOS and 404s on GitHub and every Linux\nrunner, so the message names the stored spelling on all of them alike.\n\n## The glossary — the system's domain words\n\n\\`glossary/<term>.md\\`, one file per term, nesting allowed\n(\\`glossary/payments/authorization.md\\` is the term \\`payments/authorization\\`). There is\nno \\`glossary.yaml\\`: a definition is prose, and the DIRECTORY is the list. The\ndirectory's existence is the opt-in — a system without one hears nothing.\n\n**A term is checkable because a link is a join.** Cite it from the document that\nuses the word — a requirement, a capability document, a feature's intent — with an\nordinary relative link:\n\n\\`\\`\\`markdown\nAn [Order](../../glossary/order.md) is what a customer has confirmed.\n\\`\\`\\`\n\nA citation that does not resolve is \\`link.unresolved\\` like any other; a term nothing\noutside \\`glossary/\\` cites is \\`glossary.unlinked\\` (warn). Terms citing each other is\nnormal and does NOT count as adoption — a glossary is a network of definitions, and\ntwo terms defining each other say nothing about whether the system uses either word.\n\\`loam list glossary\\` prints every term with the documents that cite it.\n\n**A feature may bring a new word with it**: write it at\n\\`features/<FEAT>/glossary/<term>.md\\` and \\`loam archive\\` copies it into \\`glossary/\\`,\n\\`loam unarchive\\` takes it back out. This route is CREATE-ONLY — a term the living\nglossary already defines is \\`glossary.term-exists\\`, which \\`--approve\\` does not\noverride, because the merge is a whole-file copy and would replace an authored\ndefinition wholesale. To CHANGE a definition, edit \\`glossary/<term>.md\\` directly in\nthe same pull request, where git produces an ordinary conflict.\n\nCite the new word at its FUTURE living path (\\`../../../../glossary/order.md\\` from a\n\\`specs/<svc>/\\` delta) — that link resolves while the feature is in flight, and the\nmerge re-expresses it from wherever the text lands, so it keeps resolving afterwards.\n\nWrite the definition for a reader who knows the business and not this system: what the\nword means, and what it is NOT (an order is not a cart). Never which service owns it —\nthat is the system map's question and it changes.\n\n\n## Architectural obligations — what the architect hands the team\n\nAn architect has always had one checked channel here: an edge carrying\n\\`metadata { op 'authorizePayment' }\\` obliges the provider to define that operationId,\nor \\`spine.op-undefined\\` fails the gate. Obligations are the same handoff for the rules\nthat VARY — an outbox on this publisher and not that one, a circuit breaker on two\nedges out of five — and they are three separate things on purpose:\n\n- an **ADR** in \\`architecture/adrs/\\` says WHAT was decided, as thin or as thick as the\n decision needs;\n- a **\\`#obl-<name>\\` tag** on an element or an edge in \\`architecture/landscape.likec4\\`\n says WHERE it applies, so one ADR governs three edges and not the fourth without the\n document forking;\n- **\\`architecture/obligations.yaml\\`** declares the names, so a mistyped tag is an error\n rather than a word nobody notices.\n\n\\`\\`\\`yaml\nobligations:\n outbox:\n description: Publishers write the event and the state change in one transaction.\n adr: architecture/adrs/0001-transactional-outbox.md # relative to the docs repo root\n\\`\\`\\`\n\n**Your side of it is \\`Covers:\\`**. A tagged object with no living requirement covering it\nis \\`obligation.uncovered\\` (warn), and the finding names the service, the object and the\nexact line to write — \\`Covers: <element>\\` or \\`Covers: <source> -> <target>\\` in that\nservice's \\`arch.spec.md\\`, with a scenario that proves it. An id is its own tag suffix,\nso it may hold letters, digits, \\`_\\` and \\`-\\` only.\n\n## \\`loam.json\\` — the wiring, in every repo\n\nA governed system is **N + 1 repositories**: this docs repo, and one per governed\nimplementation boundary. Paths and commands call that boundary a \\`service\\`; it\nmay be a modular monolith, a network service, a CLI or a worker. Every repo\ncommits its own \\`loam.json\\`, so an agent, human or CI runner can find the rest\nof the system. There is no global config; without a \\`loam.json\\`, commands refuse\nwith \\`no-config\\` rather than guessing.\n\n\\`\\`\\`json\n{ \"docsDir\": \"../docs-repo\", \"service\": \"payment-service\", \"gherkinDir\": \"features\" }\n\\`\\`\\`\n\n- \\`docsDir\\` — where the docs repo is, **stored exactly as it was passed** and\n resolved against the directory holding the \\`loam.json\\`. So \\`../docs-repo\\`\n keeps working on every machine that checks the repos out side by side, which\n is the point of committing the file. An absolute path is a warning\n (\\`doctor.docs-absolute\\`): it resolves only on the machine that ran \\`loam init\\`.\n The docs repo's own \\`loam.json\\` says \\`\"docsDir\": \".\"\\`.\n- \\`service\\` — the canonical id of the governed boundary THIS repo contains, i.e. the\n \\`services/<id>/\\` directory it is allowed to speak for. \\`loam vouch\\`,\n \\`loam gherkin\\` and \\`loam verify --service\\` when writing with \\`--record\\`,\n \\`--results\\` or \\`--contract-results\\` bind to it; without it they refuse\n (\\`repository-unavailable\\`) rather than write another boundary's documents\n from a repo that is not that boundary's. A read-only verify checklist needs no\n binding and works from the docs repo.\n- \\`gherkinDir\\` — optional, default \\`features\\`: the directory \\`loam gherkin\\`\n writes its own \\`loam/\\` subtree into.\n- \\`agentTools\\` — optional: the agent tools \\`loam init\\` has written command and\n skill files for here, accumulated across runs. Written by \\`init\\`, read by\n \\`loam doctor\\`; nothing else depends on it, and a config without it loads.\n\n**Step 0 of everything below, once per repo:**\n\n\\`\\`\\`sh\nloam init --docs ../docs-repo --service payment-service # in EACH service repo\nloam doctor # before you trust any of it\n\\`\\`\\`\n\n\\`loam init --docs <dir>\\` **joins** an existing docs repo; creating a new one\ntakes \\`--create\\`, so a mistyped path cannot quietly scaffold a second source of\ntruth beside the real one. \\`loam doctor\\` is the read-only preflight: it reads\nloam.json defensively, resolves \\`docsDir\\`, probes access, checks \\`services/\\` and\nthe system map, and reports the service binding — run it first when anything\nbehaves as though the system were empty.\n\n**Living vs delta.** \\`services/<svc>/spec.md\\` is the complete current state.\n\\`features/<FEAT>/specs/<svc>/spec.md\\` is a diff against it, reviewed as a diff, with\nrequirements grouped under \\`## ADDED\\`, \\`## MODIFIED\\` or \\`## REMOVED Requirements\\`.\n\\`loam archive\\` folds the delta into the living state.\n\n`;\n"]}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What an agent DOES: the cycle step by step, adopting a service, what is
|
|
3
|
-
* authored versus derived, and the rules the validator enforces.
|
|
4
|
-
*
|
|
5
|
-
* The done-check itself is no longer here — it is `loam instructions
|
|
6
|
-
* loam-done-check` (../workflows/reference/done-check.ts). Steps 4 and 7 used
|
|
7
|
-
* to end `See "The requirement baseline"` and `See "The done-check"`, naming
|
|
8
|
-
* headings that were further down this same file; they now name the COMMAND
|
|
9
|
-
* that prints them. That is not a rewording for its own sake: a section
|
|
10
|
-
* reference to a section that left is a pointer at nothing, and a reader who
|
|
11
|
-
* scrolls looking for it concludes the file is truncated — which, on the two
|
|
12
|
-
* hosts that truncate silently, is a conclusion they cannot check.
|
|
13
|
-
*
|
|
14
|
-
* Not a section of the scaffolded AGENTS.md any more: that document carries a
|
|
15
|
-
* condensed cycle of its own (../agents-md.ts), sized for a host that loads it
|
|
16
|
-
* on every turn. This constant is the long teaching, and it is DELIVERED
|
|
17
|
-
* through `loam explain`'s term paragraphs — ../../explain/terms.ts pins
|
|
18
|
-
* verbatim phrases of it, so rewording a sentence here breaks the pairing
|
|
19
|
-
* loudly instead of letting a term drift away from what loam ships. Two
|
|
20
|
-
* consequences for an editor: a claim written here is read by an agent through
|
|
21
|
-
* `loam explain <term>` and must stay true, and a phrase a pin names cannot be
|
|
22
|
-
* reworded on one side alone.
|
|
23
|
-
*/
|
|
24
|
-
export const CYCLE = `## The cycle
|
|
25
|
-
|
|
26
|
-
0. **Wire the repo** — \`loam init --docs <path-to-docs-repo> --service <id>\` in
|
|
27
|
-
each service repo, then \`loam doctor\`. Once per repository, before anything
|
|
28
|
-
else; see "\`loam.json\` — the wiring" above. Every step below runs in a repo
|
|
29
|
-
that has been through this one.
|
|
30
|
-
1. **Adopt** — a service with no documentation at all starts at
|
|
31
|
-
\`loam adopt --service <id> --json\`, which briefs you on the baseline to write.
|
|
32
|
-
See "Adopting a service" below. Once per service, not once per feature.
|
|
33
|
-
2. **Understand** — \`loam status --json\` first if you joined halfway or lost the
|
|
34
|
-
session: it says what is in flight and what the next step is, for the fleet or
|
|
35
|
-
for one feature (\`loam status FEAT-101 --json\`). Then \`loam list --json\` and
|
|
36
|
-
\`loam show <service> --json\`.
|
|
37
|
-
Then \`loam explore <service> --json\` around the services you believe are
|
|
38
|
-
involved — it writes nothing and answers the one question the next step takes
|
|
39
|
-
as an argument: which services this change actually touches. It reports the
|
|
40
|
-
ring one hop out in the fleet map (\`neighbours\`), how far each service's
|
|
41
|
-
documentation has got (\`maturity\`), what each already exposes, the features
|
|
42
|
-
already in flight over the same ground (\`overlaps\`), and the \`loam new\` line
|
|
43
|
-
the seeds imply (\`scaffold\`). \`--op <operationId>\` seeds from an operation
|
|
44
|
-
when you know the call but not who owns it.
|
|
45
|
-
Never propose a change to a service you have not read.
|
|
46
|
-
3. **Scaffold** — \`loam new FEAT-101 --title "..." --touches <existing> --new-service <new>\`.
|
|
47
|
-
The scaffold leaves a \`delta.likec4\` whose context elements are commented out —
|
|
48
|
-
a requirements-only feature should DELETE that file rather than ship an empty
|
|
49
|
-
one — and gives every \`--new-service\` a \`specs/<svc>/arch.spec.md\` alongside.
|
|
50
|
-
\`--capability <id>\` (repeatable, and it composes with \`--touches\`) scaffolds a
|
|
51
|
-
capability delta instead of a service one — the inversion of this step, for a
|
|
52
|
-
change whose BUSINESS side is what is known: open the promise that changes and
|
|
53
|
-
derive the service work from it. An id the fleet has never named is scaffolded
|
|
54
|
-
rather than refused, with the close spellings printed beside it; the archive
|
|
55
|
-
is what creates the living \`capabilities/<id>/spec.md\`.
|
|
56
|
-
4. **Author** the four files the scaffold left as TODO: intent, delta.likec4,
|
|
57
|
-
a spec.md per service, an openapi.yaml per new service. Finish with
|
|
58
|
-
\`loam rebase FEAT-101\`: it pins every MODIFIED/REMOVED requirement and every
|
|
59
|
-
operation in the contract delta to the living version you wrote it against.
|
|
60
|
-
On the contract axis run it even when you changed nothing but one endpoint —
|
|
61
|
-
that is exactly what marks the REST of the document as quotation the merge
|
|
62
|
-
must not write. See \`loam instructions loam-spine\` — "The requirement baseline".
|
|
63
|
-
5. **Check** — \`loam validate FEAT-101 --json\`. Fix every error before writing code.
|
|
64
|
-
\`loam dependencies --json\` says whether another feature in flight has to
|
|
65
|
-
archive first.
|
|
66
|
-
6. **Build** — \`loam delta FEAT-101 --service <svc> --json\` is the task for one service:
|
|
67
|
-
intent, its requirement delta with scenarios verbatim, and the edges around it.
|
|
68
|
-
In the service's own repo, \`loam gherkin FEAT-101\` then emits those scenarios as
|
|
69
|
-
\`.feature\` files under \`<gherkinDir>/loam/\` — write step definitions against them
|
|
70
|
-
**first**, outside \`loam/\`, and implement until they pass.
|
|
71
|
-
If \`architecture.errors\` is non-empty the payload keeps \`ok: true\` (the command
|
|
72
|
-
ran) but the exit code is 1: the C4 slice is empty because delta.likec4 did not
|
|
73
|
-
parse, not because the feature changes no architecture — do not build on it.
|
|
74
|
-
7. **Verify** — \`loam verify FEAT-101 --json\` turns the feature's own promises into a
|
|
75
|
-
checklist. The scenario claims are answered by the cucumber report
|
|
76
|
-
(\`--results report.json\`); answer the rest with evidence and record them
|
|
77
|
-
(\`--record answers.json --service <id>\`), **from each affected service's own
|
|
78
|
-
repo**. See \`loam instructions loam-done-check\`.
|
|
79
|
-
8. **Ship** — \`loam archive FEAT-101\` once the code is merged. \`--dry-run\` shows
|
|
80
|
-
every file the merge would write, and writes none of them.
|
|
81
|
-
|
|
82
|
-
## Adopting a service
|
|
83
|
-
|
|
84
|
-
\`loam adopt --service <id>\` does not read code and never will. Nothing
|
|
85
|
-
deterministic can look at a legacy service and say what its architecture MEANS,
|
|
86
|
-
and a guessed model is worse than none: everybody downstream has to re-derive it
|
|
87
|
-
to know whether to believe it. So loam takes the half of the job that is
|
|
88
|
-
mechanical — stating the work, and checking the result — and you do the reading.
|
|
89
|
-
|
|
90
|
-
The brief names every file to write, the grammar each must be in, what the
|
|
91
|
-
landscape already says about the service (bind to those elements, do not draw a
|
|
92
|
-
parallel fleet), the frontmatter, and the checks that follow. It also lists what
|
|
93
|
-
**no** check will ever catch. Read that list: everything on it is a way to be
|
|
94
|
-
wrong quietly, and \`loam validate\` passing means nothing about any of it.
|
|
95
|
-
|
|
96
|
-
One of the targets is not under \`services/<id>/\`: \`architecture/landscape.likec4\`,
|
|
97
|
-
the fleet map, carried with \`action: "edit"\` and a \`landscape.instruction\`
|
|
98
|
-
spelling out the write this service owes it. That target appears while nothing
|
|
99
|
-
in the map resolves to the service, and again while the element that does has
|
|
100
|
-
no edge touching it — \`landscape.touched\` says which, and \`landscape.attested\`
|
|
101
|
-
lists the calls the service's own model.likec4 declares across its boundary,
|
|
102
|
-
which are the edges the map owes. **Add to that file; never rewrite it** —
|
|
103
|
-
every other service's elements and edges are in there. A service that is
|
|
104
|
-
fully documented and undrawn is \`landscape.service-unmodelled\` (error) and is
|
|
105
|
-
invisible to every cross-service check: no edge into it can be graded against
|
|
106
|
-
its openapi.yaml, and no feature can draw a call to it. A drawn, bound,
|
|
107
|
-
edgeless service whose model reaches other systems is
|
|
108
|
-
\`landscape.service-isolated\` (warn): drawn, and invisible to every
|
|
109
|
-
cross-service check all the same. One whose model attests no such call is
|
|
110
|
-
silent there — the brief's \`landscape.touched: false\` is the only place that
|
|
111
|
-
state is named, so read it before the fleet run rather than hoping for it in it.
|
|
112
|
-
And one edge closes the state; the check is touched/untouched, not a set
|
|
113
|
-
difference, so draw every attested call in one pass — nothing names the ones
|
|
114
|
-
left out.
|
|
115
|
-
|
|
116
|
-
An adoption ends with two runs, not one: \`loam validate --service <id> --json\`
|
|
117
|
-
for the baseline, then \`loam validate --all --json\` in the docs repo — the
|
|
118
|
-
fleet cross-check the first invocation does not perform is exactly where a
|
|
119
|
-
landscape edit that did not land shows up. Done, stated once: \`--service\`
|
|
120
|
-
clean when run from inside the service's own repo, and \`--all\` reporting no
|
|
121
|
-
\`landscape.*\` finding. The fleet run is never SILENT — \`sources.unverifiable-from-here\`
|
|
122
|
-
(severity ok) appears per service as a confirmation, not work — so "keep going
|
|
123
|
-
until validation is quiet" is the wrong loop; the two runs above are the test.
|
|
124
|
-
|
|
125
|
-
Two rules the brief repeats and this file will too. An artifact that already
|
|
126
|
-
exists is reported as \`action: "diff"\` — read it and report what disagrees;
|
|
127
|
-
never replace it, because a document somebody wrote is evidence. And everything
|
|
128
|
-
you write is \`status: draft\`: promotion is \`loam vouch\`, run by a person in the
|
|
129
|
-
service's own repo — \`loam vouch --pack --service <id>\` (read-only) preps that read.
|
|
130
|
-
|
|
131
|
-
## What you author, what loam derives
|
|
132
|
-
|
|
133
|
-
Authored by hand: \`intent.md\`, \`delta.likec4\`, \`specs/<svc>/spec.md\`,
|
|
134
|
-
\`specs/<svc>/arch.spec.md\`, \`specs/<svc>/openapi.yaml\`, ADRs, runbooks, health.
|
|
135
|
-
|
|
136
|
-
Written by loam: the merge into \`services/<svc>/spec.md\`, \`services/<svc>/arch.spec.md\`,
|
|
137
|
-
\`services/<svc>/openapi.yaml\` and \`architecture/landscape.likec4\` at archive time.
|
|
138
|
-
|
|
139
|
-
**Do not hand-edit the living landscape to add a feature's changes.** Put them in a
|
|
140
|
-
delta and archive it — otherwise the change has no intent, no requirement and no
|
|
141
|
-
history behind it.
|
|
142
|
-
|
|
143
|
-
## Rules the validator enforces
|
|
144
|
-
|
|
145
|
-
- every requirement has at least one \`#### Scenario:\` — scenarios are the acceptance
|
|
146
|
-
criteria and the source for tests;
|
|
147
|
-
- every operationId a requirement governs exists in that service's OpenAPI;
|
|
148
|
-
- every C4 edge's \`op\` resolves to an operation the target actually exposes;
|
|
149
|
-
- every operation is governed by some requirement (warning);
|
|
150
|
-
- a "Calls" edge with no \`metadata { op }\` is unlinked (warning);
|
|
151
|
-
- **the map is complete**: every \`services/<svc>/\` has an element in the landscape,
|
|
152
|
-
and every element that looks like a service has a directory (warning) or is
|
|
153
|
-
tagged \`#external\`;
|
|
154
|
-
- **the diff applies**: a \`MODIFIED\` or \`REMOVED\` requirement exists in the living
|
|
155
|
-
spec, an \`ADDED\` one does not, and a section heading matches the grammar exactly;
|
|
156
|
-
- a \`Requirement-ID: <id>\` is optional, but when present it is valid and unique;
|
|
157
|
-
archive selects by it, so carry the same ID through \`MODIFIED\` to rename a heading;
|
|
158
|
-
- **every requirement in a delta is under a delta section**: one under a prose heading
|
|
159
|
-
(\`## Behavior\`) is documentation as far as the merge is concerned and is dropped
|
|
160
|
-
(warning). \`## Requirements\` is exempt — quoting the living state is legal.
|
|
161
|
-
|
|
162
|
-
That last pair of rules exists because each of its failures used to be silent.
|
|
163
|
-
\`MODIFIED\` of a requirement that does not exist merged as a creation; \`ADDED\` of one
|
|
164
|
-
that does exist REPLACED it, scenarios and all; a near-miss heading like
|
|
165
|
-
\`## ADDED Requirement\` (singular) parses as plain prose, so archive merged nothing and
|
|
166
|
-
said nothing; and a requirement under \`## Behavior\` vanished the same way.
|
|
167
|
-
|
|
168
|
-
Write the delta section heading on its own line exactly as \`## ADDED Requirements\`.
|
|
169
|
-
The heading is the only thing that gives a requirement its kind: without a matching
|
|
170
|
-
one, archive merges the requirement as nothing.
|
|
171
|
-
|
|
172
|
-
Severity and gating are two different questions. An ERROR means the document is
|
|
173
|
-
invalid — \`loam validate\` fails. A finding with \`gates: true\` means \`loam archive\`
|
|
174
|
-
will refuse — the merge is unsafe. They usually agree (errors gate, warnings do
|
|
175
|
-
not), and where they diverge the \`--json\` output says so: \`delta.requirement-not-merged\`
|
|
176
|
-
is a warning (the shape is legal OpenSpec) that gates (the merge would drop the
|
|
177
|
-
requirement). Leave a warning standing only deliberately.
|
|
178
|
-
|
|
179
|
-
`;
|
|
180
|
-
//# sourceMappingURL=cycle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cycle.js","sourceRoot":"","sources":["../../../../src/core/agent/agents-md/cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2JpB,CAAC","sourcesContent":["/**\n * What an agent DOES: the cycle step by step, adopting a service, what is\n * authored versus derived, and the rules the validator enforces.\n *\n * The done-check itself is no longer here — it is `loam instructions\n * loam-done-check` (../workflows/reference/done-check.ts). Steps 4 and 7 used\n * to end `See \"The requirement baseline\"` and `See \"The done-check\"`, naming\n * headings that were further down this same file; they now name the COMMAND\n * that prints them. That is not a rewording for its own sake: a section\n * reference to a section that left is a pointer at nothing, and a reader who\n * scrolls looking for it concludes the file is truncated — which, on the two\n * hosts that truncate silently, is a conclusion they cannot check.\n *\n * Not a section of the scaffolded AGENTS.md any more: that document carries a\n * condensed cycle of its own (../agents-md.ts), sized for a host that loads it\n * on every turn. This constant is the long teaching, and it is DELIVERED\n * through `loam explain`'s term paragraphs — ../../explain/terms.ts pins\n * verbatim phrases of it, so rewording a sentence here breaks the pairing\n * loudly instead of letting a term drift away from what loam ships. Two\n * consequences for an editor: a claim written here is read by an agent through\n * `loam explain <term>` and must stay true, and a phrase a pin names cannot be\n * reworded on one side alone.\n */\nexport const CYCLE = `## The cycle\n\n0. **Wire the repo** — \\`loam init --docs <path-to-docs-repo> --service <id>\\` in\n each service repo, then \\`loam doctor\\`. Once per repository, before anything\n else; see \"\\`loam.json\\` — the wiring\" above. Every step below runs in a repo\n that has been through this one.\n1. **Adopt** — a service with no documentation at all starts at\n \\`loam adopt --service <id> --json\\`, which briefs you on the baseline to write.\n See \"Adopting a service\" below. Once per service, not once per feature.\n2. **Understand** — \\`loam status --json\\` first if you joined halfway or lost the\n session: it says what is in flight and what the next step is, for the fleet or\n for one feature (\\`loam status FEAT-101 --json\\`). Then \\`loam list --json\\` and\n \\`loam show <service> --json\\`.\n Then \\`loam explore <service> --json\\` around the services you believe are\n involved — it writes nothing and answers the one question the next step takes\n as an argument: which services this change actually touches. It reports the\n ring one hop out in the fleet map (\\`neighbours\\`), how far each service's\n documentation has got (\\`maturity\\`), what each already exposes, the features\n already in flight over the same ground (\\`overlaps\\`), and the \\`loam new\\` line\n the seeds imply (\\`scaffold\\`). \\`--op <operationId>\\` seeds from an operation\n when you know the call but not who owns it.\n Never propose a change to a service you have not read.\n3. **Scaffold** — \\`loam new FEAT-101 --title \"...\" --touches <existing> --new-service <new>\\`.\n The scaffold leaves a \\`delta.likec4\\` whose context elements are commented out —\n a requirements-only feature should DELETE that file rather than ship an empty\n one — and gives every \\`--new-service\\` a \\`specs/<svc>/arch.spec.md\\` alongside.\n \\`--capability <id>\\` (repeatable, and it composes with \\`--touches\\`) scaffolds a\n capability delta instead of a service one — the inversion of this step, for a\n change whose BUSINESS side is what is known: open the promise that changes and\n derive the service work from it. An id the fleet has never named is scaffolded\n rather than refused, with the close spellings printed beside it; the archive\n is what creates the living \\`capabilities/<id>/spec.md\\`.\n4. **Author** the four files the scaffold left as TODO: intent, delta.likec4,\n a spec.md per service, an openapi.yaml per new service. Finish with\n \\`loam rebase FEAT-101\\`: it pins every MODIFIED/REMOVED requirement and every\n operation in the contract delta to the living version you wrote it against.\n On the contract axis run it even when you changed nothing but one endpoint —\n that is exactly what marks the REST of the document as quotation the merge\n must not write. See \\`loam instructions loam-spine\\` — \"The requirement baseline\".\n5. **Check** — \\`loam validate FEAT-101 --json\\`. Fix every error before writing code.\n \\`loam dependencies --json\\` says whether another feature in flight has to\n archive first.\n6. **Build** — \\`loam delta FEAT-101 --service <svc> --json\\` is the task for one service:\n intent, its requirement delta with scenarios verbatim, and the edges around it.\n In the service's own repo, \\`loam gherkin FEAT-101\\` then emits those scenarios as\n \\`.feature\\` files under \\`<gherkinDir>/loam/\\` — write step definitions against them\n **first**, outside \\`loam/\\`, and implement until they pass.\n If \\`architecture.errors\\` is non-empty the payload keeps \\`ok: true\\` (the command\n ran) but the exit code is 1: the C4 slice is empty because delta.likec4 did not\n parse, not because the feature changes no architecture — do not build on it.\n7. **Verify** — \\`loam verify FEAT-101 --json\\` turns the feature's own promises into a\n checklist. The scenario claims are answered by the cucumber report\n (\\`--results report.json\\`); answer the rest with evidence and record them\n (\\`--record answers.json --service <id>\\`), **from each affected service's own\n repo**. See \\`loam instructions loam-done-check\\`.\n8. **Ship** — \\`loam archive FEAT-101\\` once the code is merged. \\`--dry-run\\` shows\n every file the merge would write, and writes none of them.\n\n## Adopting a service\n\n\\`loam adopt --service <id>\\` does not read code and never will. Nothing\ndeterministic can look at a legacy service and say what its architecture MEANS,\nand a guessed model is worse than none: everybody downstream has to re-derive it\nto know whether to believe it. So loam takes the half of the job that is\nmechanical — stating the work, and checking the result — and you do the reading.\n\nThe brief names every file to write, the grammar each must be in, what the\nlandscape already says about the service (bind to those elements, do not draw a\nparallel fleet), the frontmatter, and the checks that follow. It also lists what\n**no** check will ever catch. Read that list: everything on it is a way to be\nwrong quietly, and \\`loam validate\\` passing means nothing about any of it.\n\nOne of the targets is not under \\`services/<id>/\\`: \\`architecture/landscape.likec4\\`,\nthe fleet map, carried with \\`action: \"edit\"\\` and a \\`landscape.instruction\\`\nspelling out the write this service owes it. That target appears while nothing\nin the map resolves to the service, and again while the element that does has\nno edge touching it — \\`landscape.touched\\` says which, and \\`landscape.attested\\`\nlists the calls the service's own model.likec4 declares across its boundary,\nwhich are the edges the map owes. **Add to that file; never rewrite it** —\nevery other service's elements and edges are in there. A service that is\nfully documented and undrawn is \\`landscape.service-unmodelled\\` (error) and is\ninvisible to every cross-service check: no edge into it can be graded against\nits openapi.yaml, and no feature can draw a call to it. A drawn, bound,\nedgeless service whose model reaches other systems is\n\\`landscape.service-isolated\\` (warn): drawn, and invisible to every\ncross-service check all the same. One whose model attests no such call is\nsilent there — the brief's \\`landscape.touched: false\\` is the only place that\nstate is named, so read it before the fleet run rather than hoping for it in it.\nAnd one edge closes the state; the check is touched/untouched, not a set\ndifference, so draw every attested call in one pass — nothing names the ones\nleft out.\n\nAn adoption ends with two runs, not one: \\`loam validate --service <id> --json\\`\nfor the baseline, then \\`loam validate --all --json\\` in the docs repo — the\nfleet cross-check the first invocation does not perform is exactly where a\nlandscape edit that did not land shows up. Done, stated once: \\`--service\\`\nclean when run from inside the service's own repo, and \\`--all\\` reporting no\n\\`landscape.*\\` finding. The fleet run is never SILENT — \\`sources.unverifiable-from-here\\`\n(severity ok) appears per service as a confirmation, not work — so \"keep going\nuntil validation is quiet\" is the wrong loop; the two runs above are the test.\n\nTwo rules the brief repeats and this file will too. An artifact that already\nexists is reported as \\`action: \"diff\"\\` — read it and report what disagrees;\nnever replace it, because a document somebody wrote is evidence. And everything\nyou write is \\`status: draft\\`: promotion is \\`loam vouch\\`, run by a person in the\nservice's own repo — \\`loam vouch --pack --service <id>\\` (read-only) preps that read.\n\n## What you author, what loam derives\n\nAuthored by hand: \\`intent.md\\`, \\`delta.likec4\\`, \\`specs/<svc>/spec.md\\`,\n\\`specs/<svc>/arch.spec.md\\`, \\`specs/<svc>/openapi.yaml\\`, ADRs, runbooks, health.\n\nWritten by loam: the merge into \\`services/<svc>/spec.md\\`, \\`services/<svc>/arch.spec.md\\`,\n\\`services/<svc>/openapi.yaml\\` and \\`architecture/landscape.likec4\\` at archive time.\n\n**Do not hand-edit the living landscape to add a feature's changes.** Put them in a\ndelta and archive it — otherwise the change has no intent, no requirement and no\nhistory behind it.\n\n## Rules the validator enforces\n\n- every requirement has at least one \\`#### Scenario:\\` — scenarios are the acceptance\n criteria and the source for tests;\n- every operationId a requirement governs exists in that service's OpenAPI;\n- every C4 edge's \\`op\\` resolves to an operation the target actually exposes;\n- every operation is governed by some requirement (warning);\n- a \"Calls\" edge with no \\`metadata { op }\\` is unlinked (warning);\n- **the map is complete**: every \\`services/<svc>/\\` has an element in the landscape,\n and every element that looks like a service has a directory (warning) or is\n tagged \\`#external\\`;\n- **the diff applies**: a \\`MODIFIED\\` or \\`REMOVED\\` requirement exists in the living\n spec, an \\`ADDED\\` one does not, and a section heading matches the grammar exactly;\n- a \\`Requirement-ID: <id>\\` is optional, but when present it is valid and unique;\n archive selects by it, so carry the same ID through \\`MODIFIED\\` to rename a heading;\n- **every requirement in a delta is under a delta section**: one under a prose heading\n (\\`## Behavior\\`) is documentation as far as the merge is concerned and is dropped\n (warning). \\`## Requirements\\` is exempt — quoting the living state is legal.\n\nThat last pair of rules exists because each of its failures used to be silent.\n\\`MODIFIED\\` of a requirement that does not exist merged as a creation; \\`ADDED\\` of one\nthat does exist REPLACED it, scenarios and all; a near-miss heading like\n\\`## ADDED Requirement\\` (singular) parses as plain prose, so archive merged nothing and\nsaid nothing; and a requirement under \\`## Behavior\\` vanished the same way.\n\nWrite the delta section heading on its own line exactly as \\`## ADDED Requirements\\`.\nThe heading is the only thing that gives a requirement its kind: without a matching\none, archive merges the requirement as nothing.\n\nSeverity and gating are two different questions. An ERROR means the document is\ninvalid — \\`loam validate\\` fails. A finding with \\`gates: true\\` means \\`loam archive\\`\nwill refuse — the merge is unsafe. They usually agree (errors gate, warnings do\nnot), and where they diverge the \\`--json\\` output says so: \\`delta.requirement-not-merged\\`\nis a warning (the shape is legal OpenSpec) that gates (the merge would drop the\nrequirement). Leave a warning standing only deliberately.\n\n`;\n"]}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How a SHIPPED change is gated, undone or dropped: the archive gate,
|
|
3
|
-
* unarchive, and dropping a feature. The continuation of ../refusals.ts —
|
|
4
|
-
* that module holds what loam refuses and the error-envelope codes; this one
|
|
5
|
-
* holds what happens to a feature once the merge is on the table. Split
|
|
6
|
-
* there because the two subjects were one 300-plus-line file, and the file's
|
|
7
|
-
* own header already named them separately.
|
|
8
|
-
*
|
|
9
|
-
* One section of the AGENTS.md template. ../../agents-md.ts assembles the
|
|
10
|
-
* document by PLAIN CONCATENATION — no join separator — so this section
|
|
11
|
-
* starts at the first character of its opening heading and ends with the
|
|
12
|
-
* newline that closes its last line. Keep that shape when editing, or two
|
|
13
|
-
* sections glue onto one line in every docs repo loam scaffolds from now on.
|
|
14
|
-
*/
|
|
15
|
-
export const ARCHIVE_GATE = `## The archive gate
|
|
16
|
-
|
|
17
|
-
The three axes agreeing is called **coherence**, and \`loam validate --feature\` reports
|
|
18
|
-
it as such. \`loam archive\` runs the same coherence check first and refuses a feature
|
|
19
|
-
with GATING issues — every error, plus the rare warning marked \`gates: true\` because
|
|
20
|
-
the merge would silently drop authored content even though the document is legal.
|
|
21
|
-
Advisory warnings never block: archive prints them and proceeds. Each one still names
|
|
22
|
-
something real — usually something the merge will drop or overwrite — so read them
|
|
23
|
-
before the merge runs, not after.
|
|
24
|
-
|
|
25
|
-
\`--approve\` overrides the gating issues — only those, and archive prints exactly which
|
|
26
|
-
ones it overrode. It is a human decision, not an agent's: if archive refuses, fix the
|
|
27
|
-
breach or hand it back. Two refusals sit outside its reach, because the damage is
|
|
28
|
-
mechanical rather than a judgment about the feature: \`delta.service-id-invalid\` — a
|
|
29
|
-
\`specs/<svc>/\` directory whose name is not a legal service id, which the merge
|
|
30
|
-
would materialise as a \`services/<svc>/\` every loam command then refuses to
|
|
31
|
-
address — and \`c4.service-binding-invalid\` — an explicit \`metadata { service }\`
|
|
32
|
-
binding that breaks the same grammar, on a tagged element or anything nested
|
|
33
|
-
inside its block (the merge splices the whole authored block into the living
|
|
34
|
-
landscape verbatim, untagged children included, and a \`../\` in the binding even
|
|
35
|
-
collapses the archive's \`services/\` probe out of the docs repo). There is
|
|
36
|
-
nothing a judgment call could accept: rename the directory, or fix the binding,
|
|
37
|
-
instead.
|
|
38
|
-
|
|
39
|
-
Breaches only the merge computation itself can see are reported at plan time,
|
|
40
|
-
after the gate. \`living.requirement-outside-requirements\` (error): the LIVING spec
|
|
41
|
-
holds a requirement outside \`## Requirements\`, and the merge rewrites only that
|
|
42
|
-
section, so the requirement would land in the file twice — \`--approve\` does not
|
|
43
|
-
override it, because the duplication is mechanical, not a judgment call; re-home the
|
|
44
|
-
requirement first. \`openapi.op-modified\` (warn): the feature redefines an operation
|
|
45
|
-
the living OpenAPI already has, and the merge overwrites the living definition
|
|
46
|
-
wholesale.
|
|
47
|
-
|
|
48
|
-
The OpenAPI merge also carries a \`$ref\` closure rooted in what it actually WROTE
|
|
49
|
-
— the merged operations and the components this delta declares alike: every
|
|
50
|
-
\`#/components/<kind>/<name>\` they reference, recursively with a component's own
|
|
51
|
-
refs included, is copied from the feature document into the living one, so nothing
|
|
52
|
-
lands pointing at a schema that stayed behind. A delta whose whole change is a
|
|
53
|
-
shared schema, with no \`paths\` at all, is merged the same way and by the same
|
|
54
|
-
rules. \`openapi.component-modified\` (warn): a carried component overwrites a
|
|
55
|
-
living one that differs, wholesale, same discipline as an operation.
|
|
56
|
-
\`openapi.ref-unresolved\` (error, \`--approve\` overrides): a ref reachable from the
|
|
57
|
-
merged operations or a merged component resolves in neither document, so merging
|
|
58
|
-
would write a dangling reference. External refs — URLs, file paths, anything not
|
|
59
|
-
starting \`#/\` — are out of scope: left untouched, never gated.
|
|
60
|
-
|
|
61
|
-
## Taking an archive back
|
|
62
|
-
|
|
63
|
-
\`loam unarchive <FEAT>\` restores the living docs and re-opens the feature. It works
|
|
64
|
-
by putting bytes back, not by inverting the merge — archive copies every file it is
|
|
65
|
-
about to overwrite into \`features/archive/<FEAT>/.loam-before/\` first, because the
|
|
66
|
-
previous text of a \`MODIFIED\` requirement is written down nowhere else. Do not edit
|
|
67
|
-
or delete that directory, and never reconstruct an old living spec by hand from an
|
|
68
|
-
archived delta: what the requirement said BEFORE is not in there, and a plausible
|
|
69
|
-
reconstruction is a lie the next reader has no way to catch.
|
|
70
|
-
|
|
71
|
-
Every pre-image is digested when the archive writes it, and re-checked before the
|
|
72
|
-
restore stages anything: \`snapshot-corrupt\` means a pre-image's bytes no longer
|
|
73
|
-
match the digest archive recorded for them, so restoring it would write text
|
|
74
|
-
nobody authored. \`--force\` does NOT override that one — the damage is to the
|
|
75
|
-
undo itself, not to the living docs — and the fix is version control.
|
|
76
|
-
|
|
77
|
-
It refuses rather than guesses, under codes you can branch on: \`feature-active\` (a
|
|
78
|
-
feature of that id is in flight again), \`snapshot-missing\` (archived before loam
|
|
79
|
-
recorded this — the docs have to come back from version control), \`snapshot-stale\`
|
|
80
|
-
(a merged file changed after the archive, so restoring would revert someone else's
|
|
81
|
-
work). \`--force\` overrides the last one, and like \`--approve\` it is a human's call.
|
|
82
|
-
|
|
83
|
-
A restore that fails outright splits the same way archive's does: \`restore-failed\`
|
|
84
|
-
means nothing was restored or everything was rolled back — the living docs are
|
|
85
|
-
unchanged, fix the reported cause and re-run; \`rollback-incomplete\` means the
|
|
86
|
-
restore failed AND some files could not be put back — stop and hand it to a human,
|
|
87
|
-
the message lists the files to check.
|
|
88
|
-
|
|
89
|
-
## Dropping a feature
|
|
90
|
-
|
|
91
|
-
A feature that was never archived is one directory and nothing else: no living doc
|
|
92
|
-
references it until \`loam archive\` merges it. To abandon it, delete the directory —
|
|
93
|
-
\`git rm -r features/<FEAT-dir>\` — and version control keeps the record of the
|
|
94
|
-
attempt. An ARCHIVED feature is the opposite, its content folded into the living
|
|
95
|
-
docs: run \`loam unarchive <FEAT>\` first, then delete. There is no \`loam abandon\`,
|
|
96
|
-
deliberately — a removal that computes nothing is what version control is for.
|
|
97
|
-
`;
|
|
98
|
-
//# sourceMappingURL=archive-gate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archive-gate.js","sourceRoot":"","sources":["../../../../../src/core/agent/agents-md/shipped/archive-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkF3B,CAAC","sourcesContent":["/**\n * How a SHIPPED change is gated, undone or dropped: the archive gate,\n * unarchive, and dropping a feature. The continuation of ../refusals.ts —\n * that module holds what loam refuses and the error-envelope codes; this one\n * holds what happens to a feature once the merge is on the table. Split\n * there because the two subjects were one 300-plus-line file, and the file's\n * own header already named them separately.\n *\n * One section of the AGENTS.md template. ../../agents-md.ts assembles the\n * document by PLAIN CONCATENATION — no join separator — so this section\n * starts at the first character of its opening heading and ends with the\n * newline that closes its last line. Keep that shape when editing, or two\n * sections glue onto one line in every docs repo loam scaffolds from now on.\n */\nexport const ARCHIVE_GATE = `## The archive gate\n\nThe three axes agreeing is called **coherence**, and \\`loam validate --feature\\` reports\nit as such. \\`loam archive\\` runs the same coherence check first and refuses a feature\nwith GATING issues — every error, plus the rare warning marked \\`gates: true\\` because\nthe merge would silently drop authored content even though the document is legal.\nAdvisory warnings never block: archive prints them and proceeds. Each one still names\nsomething real — usually something the merge will drop or overwrite — so read them\nbefore the merge runs, not after.\n\n\\`--approve\\` overrides the gating issues — only those, and archive prints exactly which\nones it overrode. It is a human decision, not an agent's: if archive refuses, fix the\nbreach or hand it back. Two refusals sit outside its reach, because the damage is\nmechanical rather than a judgment about the feature: \\`delta.service-id-invalid\\` — a\n\\`specs/<svc>/\\` directory whose name is not a legal service id, which the merge\nwould materialise as a \\`services/<svc>/\\` every loam command then refuses to\naddress — and \\`c4.service-binding-invalid\\` — an explicit \\`metadata { service }\\`\nbinding that breaks the same grammar, on a tagged element or anything nested\ninside its block (the merge splices the whole authored block into the living\nlandscape verbatim, untagged children included, and a \\`../\\` in the binding even\ncollapses the archive's \\`services/\\` probe out of the docs repo). There is\nnothing a judgment call could accept: rename the directory, or fix the binding,\ninstead.\n\nBreaches only the merge computation itself can see are reported at plan time,\nafter the gate. \\`living.requirement-outside-requirements\\` (error): the LIVING spec\nholds a requirement outside \\`## Requirements\\`, and the merge rewrites only that\nsection, so the requirement would land in the file twice — \\`--approve\\` does not\noverride it, because the duplication is mechanical, not a judgment call; re-home the\nrequirement first. \\`openapi.op-modified\\` (warn): the feature redefines an operation\nthe living OpenAPI already has, and the merge overwrites the living definition\nwholesale.\n\nThe OpenAPI merge also carries a \\`$ref\\` closure rooted in what it actually WROTE\n— the merged operations and the components this delta declares alike: every\n\\`#/components/<kind>/<name>\\` they reference, recursively with a component's own\nrefs included, is copied from the feature document into the living one, so nothing\nlands pointing at a schema that stayed behind. A delta whose whole change is a\nshared schema, with no \\`paths\\` at all, is merged the same way and by the same\nrules. \\`openapi.component-modified\\` (warn): a carried component overwrites a\nliving one that differs, wholesale, same discipline as an operation.\n\\`openapi.ref-unresolved\\` (error, \\`--approve\\` overrides): a ref reachable from the\nmerged operations or a merged component resolves in neither document, so merging\nwould write a dangling reference. External refs — URLs, file paths, anything not\nstarting \\`#/\\` — are out of scope: left untouched, never gated.\n\n## Taking an archive back\n\n\\`loam unarchive <FEAT>\\` restores the living docs and re-opens the feature. It works\nby putting bytes back, not by inverting the merge — archive copies every file it is\nabout to overwrite into \\`features/archive/<FEAT>/.loam-before/\\` first, because the\nprevious text of a \\`MODIFIED\\` requirement is written down nowhere else. Do not edit\nor delete that directory, and never reconstruct an old living spec by hand from an\narchived delta: what the requirement said BEFORE is not in there, and a plausible\nreconstruction is a lie the next reader has no way to catch.\n\nEvery pre-image is digested when the archive writes it, and re-checked before the\nrestore stages anything: \\`snapshot-corrupt\\` means a pre-image's bytes no longer\nmatch the digest archive recorded for them, so restoring it would write text\nnobody authored. \\`--force\\` does NOT override that one — the damage is to the\nundo itself, not to the living docs — and the fix is version control.\n\nIt refuses rather than guesses, under codes you can branch on: \\`feature-active\\` (a\nfeature of that id is in flight again), \\`snapshot-missing\\` (archived before loam\nrecorded this — the docs have to come back from version control), \\`snapshot-stale\\`\n(a merged file changed after the archive, so restoring would revert someone else's\nwork). \\`--force\\` overrides the last one, and like \\`--approve\\` it is a human's call.\n\nA restore that fails outright splits the same way archive's does: \\`restore-failed\\`\nmeans nothing was restored or everything was rolled back — the living docs are\nunchanged, fix the reported cause and re-run; \\`rollback-incomplete\\` means the\nrestore failed AND some files could not be put back — stop and hand it to a human,\nthe message lists the files to check.\n\n## Dropping a feature\n\nA feature that was never archived is one directory and nothing else: no living doc\nreferences it until \\`loam archive\\` merges it. To abandon it, delete the directory —\n\\`git rm -r features/<FEAT-dir>\\` — and version control keeps the record of the\nattempt. An ARCHIVED feature is the opposite, its content folded into the living\ndocs: run \\`loam unarchive <FEAT>\\` first, then delete. There is no \\`loam abandon\\`,\ndeliberately — a removal that computes nothing is what version control is for.\n`;\n"]}
|