@ybotok/loam 0.1.0-beta.3 → 0.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2635 -86
- package/COMPARISON.md +80 -63
- package/CONTRIBUTING.md +84 -0
- package/MIGRATING-from-OpenSpec.md +213 -54
- package/QUICKSTART.md +125 -0
- package/README.md +450 -150
- package/ROADMAP.md +599 -0
- package/SCHEMA.md +2355 -256
- package/SECURITY.md +21 -3
- package/WORKFLOW.md +701 -0
- package/dist/cli.js +113 -19
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt/adopt.js +209 -0
- package/dist/commands/adopt/adopt.js.map +1 -0
- package/dist/commands/adopt/render.js +268 -0
- package/dist/commands/adopt/render.js.map +1 -0
- package/dist/commands/archive/archive.js +77 -0
- package/dist/commands/archive/archive.js.map +1 -0
- package/dist/commands/archive/plan/contracts/asyncapi.js +178 -0
- package/dist/commands/archive/plan/contracts/asyncapi.js.map +1 -0
- package/dist/commands/archive/plan/contracts/openapi.js +159 -0
- package/dist/commands/archive/plan/contracts/openapi.js.map +1 -0
- package/dist/commands/archive/plan/gate.js +323 -0
- package/dist/commands/archive/plan/gate.js.map +1 -0
- package/dist/commands/archive/plan/landscape.js +180 -0
- package/dist/commands/archive/plan/landscape.js.map +1 -0
- package/dist/commands/archive/plan/refusal.js +111 -0
- package/dist/commands/archive/plan/refusal.js.map +1 -0
- package/dist/commands/archive/plan/specs.js +237 -0
- package/dist/commands/archive/plan/specs.js.map +1 -0
- package/dist/commands/archive/plan/state.js +27 -0
- package/dist/commands/archive/plan/state.js.map +1 -0
- package/dist/commands/archive/run.js +252 -0
- package/dist/commands/archive/run.js.map +1 -0
- package/dist/commands/context/context.js +99 -0
- package/dist/commands/context/context.js.map +1 -0
- package/dist/commands/context/print.js +283 -0
- package/dist/commands/context/print.js.map +1 -0
- package/dist/commands/delta/delta.js +279 -0
- package/dist/commands/delta/delta.js.map +1 -0
- package/dist/commands/delta/print.js +205 -0
- package/dist/commands/delta/print.js.map +1 -0
- package/dist/commands/dependencies.js +9 -7
- package/dist/commands/dependencies.js.map +1 -1
- package/dist/commands/diff/diff.js +93 -0
- package/dist/commands/diff/diff.js.map +1 -0
- package/dist/commands/diff/print.js +38 -0
- package/dist/commands/diff/print.js.map +1 -0
- package/dist/commands/doctor.js +5 -4
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/explain/explain.js +151 -0
- package/dist/commands/explain/explain.js.map +1 -0
- package/dist/commands/explore.js +29 -24
- package/dist/commands/explore.js.map +1 -1
- package/dist/commands/gate/gate.js +115 -0
- package/dist/commands/gate/gate.js.map +1 -0
- package/dist/commands/gate/print.js +54 -0
- package/dist/commands/gate/print.js.map +1 -0
- package/dist/commands/gherkin/commit.js +146 -0
- package/dist/commands/gherkin/commit.js.map +1 -0
- package/dist/commands/gherkin/gherkin.js +246 -0
- package/dist/commands/gherkin/gherkin.js.map +1 -0
- package/dist/commands/gherkin/reconcile.js +149 -0
- package/dist/commands/gherkin/reconcile.js.map +1 -0
- package/dist/commands/gherkin/render.js +77 -0
- package/dist/commands/gherkin/render.js.map +1 -0
- package/dist/commands/init/example.js +204 -0
- package/dist/commands/init/example.js.map +1 -0
- package/dist/commands/init/first-hour.js +28 -0
- package/dist/commands/init/first-hour.js.map +1 -0
- package/dist/commands/{init.js → init/init.js} +146 -71
- package/dist/commands/init/init.js.map +1 -0
- package/dist/commands/init/mcp.js +131 -0
- package/dist/commands/init/mcp.js.map +1 -0
- package/dist/commands/init/options.js +78 -0
- package/dist/commands/init/options.js.map +1 -0
- package/dist/commands/instructions.js +72 -14
- package/dist/commands/instructions.js.map +1 -1
- package/dist/commands/list/campaign/campaign.js +65 -0
- package/dist/commands/list/campaign/campaign.js.map +1 -0
- package/dist/commands/list/campaign/owners.js +65 -0
- package/dist/commands/list/campaign/owners.js.map +1 -0
- package/dist/commands/list/json.js +157 -0
- package/dist/commands/list/json.js.map +1 -0
- package/dist/commands/list/list.js +343 -0
- package/dist/commands/list/list.js.map +1 -0
- package/dist/commands/list/print.js +301 -0
- package/dist/commands/list/print.js.map +1 -0
- package/dist/commands/list/review.js +120 -0
- package/dist/commands/list/review.js.map +1 -0
- package/dist/commands/list/views.js +105 -0
- package/dist/commands/list/views.js.map +1 -0
- package/dist/commands/mcp/dispatch.js +183 -0
- package/dist/commands/mcp/dispatch.js.map +1 -0
- package/dist/commands/mcp/mcp.js +34 -0
- package/dist/commands/mcp/mcp.js.map +1 -0
- package/dist/commands/mcp/serve.js +55 -0
- package/dist/commands/mcp/serve.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/active.js +170 -0
- package/dist/commands/migrate-openspec/materialize/active.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/feature.js +41 -0
- package/dist/commands/migrate-openspec/materialize/feature.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/living.js +62 -0
- package/dist/commands/migrate-openspec/materialize/living.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/stage.js +142 -0
- package/dist/commands/migrate-openspec/materialize/stage.js.map +1 -0
- package/dist/commands/migrate-openspec/materialize/target.js +219 -0
- package/dist/commands/migrate-openspec/materialize/target.js.map +1 -0
- package/dist/commands/migrate-openspec/migrate-openspec.js +142 -0
- package/dist/commands/migrate-openspec/migrate-openspec.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/decisions.js +91 -0
- package/dist/commands/migrate-openspec/openspec/decisions.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/error.js +19 -0
- package/dist/commands/migrate-openspec/openspec/error.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/mapping.js +170 -0
- package/dist/commands/migrate-openspec/openspec/mapping.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/paths.js +43 -0
- package/dist/commands/migrate-openspec/openspec/paths.js.map +1 -0
- package/dist/commands/migrate-openspec/openspec/read.js +49 -0
- package/dist/commands/migrate-openspec/openspec/read.js.map +1 -0
- package/dist/commands/migrate-openspec/print.js +89 -0
- package/dist/commands/migrate-openspec/print.js.map +1 -0
- package/dist/commands/new/commit.js +76 -0
- package/dist/commands/new/commit.js.map +1 -0
- package/dist/commands/new/new.js +283 -0
- package/dist/commands/new/new.js.map +1 -0
- package/dist/commands/new/templates.js +355 -0
- package/dist/commands/new/templates.js.map +1 -0
- package/dist/commands/open.js +203 -0
- package/dist/commands/open.js.map +1 -0
- package/dist/commands/policy/format.js +152 -0
- package/dist/commands/policy/format.js.map +1 -0
- package/dist/commands/{docs-repo-gate.js → policy/gate.js} +11 -11
- package/dist/commands/policy/gate.js.map +1 -0
- package/dist/commands/rebase/edit.js +106 -0
- package/dist/commands/rebase/edit.js.map +1 -0
- package/dist/commands/rebase/living.js +185 -0
- package/dist/commands/rebase/living.js.map +1 -0
- package/dist/commands/rebase/plan.js +245 -0
- package/dist/commands/rebase/plan.js.map +1 -0
- package/dist/commands/rebase/rebase.js +275 -0
- package/dist/commands/rebase/rebase.js.map +1 -0
- package/dist/commands/seed/commit.js +192 -0
- package/dist/commands/seed/commit.js.map +1 -0
- package/dist/commands/seed/plan.js +133 -0
- package/dist/commands/seed/plan.js.map +1 -0
- package/dist/commands/seed/seed.js +172 -0
- package/dist/commands/seed/seed.js.map +1 -0
- package/dist/commands/show/feature.js +178 -0
- package/dist/commands/show/feature.js.map +1 -0
- package/dist/commands/show/marks.js +24 -0
- package/dist/commands/show/marks.js.map +1 -0
- package/dist/commands/{show.js → show/service.js} +63 -152
- package/dist/commands/show/service.js.map +1 -0
- package/dist/commands/show/show.js +77 -0
- package/dist/commands/show/show.js.map +1 -0
- package/dist/commands/status/json.js +45 -0
- package/dist/commands/status/json.js.map +1 -0
- package/dist/commands/status/print.js +157 -0
- package/dist/commands/status/print.js.map +1 -0
- package/dist/commands/status/status.js +119 -0
- package/dist/commands/status/status.js.map +1 -0
- package/dist/commands/steps/steps.js +189 -0
- package/dist/commands/steps/steps.js.map +1 -0
- package/dist/commands/subsystem/edit.js +192 -0
- package/dist/commands/subsystem/edit.js.map +1 -0
- package/dist/commands/subsystem/move.js +265 -0
- package/dist/commands/subsystem/move.js.map +1 -0
- package/dist/commands/subsystem/query.js +115 -0
- package/dist/commands/subsystem/query.js.map +1 -0
- package/dist/commands/subsystem/subsystem.js +101 -0
- package/dist/commands/subsystem/subsystem.js.map +1 -0
- package/dist/commands/subsystem/sync.js +103 -0
- package/dist/commands/subsystem/sync.js.map +1 -0
- package/dist/commands/subsystem/txn/txn.js +94 -0
- package/dist/commands/subsystem/txn/txn.js.map +1 -0
- package/dist/commands/subsystem/txn/views.js +70 -0
- package/dist/commands/subsystem/txn/views.js.map +1 -0
- package/dist/commands/unarchive/manifest.js +160 -0
- package/dist/commands/unarchive/manifest.js.map +1 -0
- package/dist/commands/{unarchive.js → unarchive/restore.js} +47 -160
- package/dist/commands/unarchive/restore.js.map +1 -0
- package/dist/commands/unarchive/unarchive.js +67 -0
- package/dist/commands/unarchive/unarchive.js.map +1 -0
- package/dist/commands/validate/arch-coverage.js +204 -0
- package/dist/commands/validate/arch-coverage.js.map +1 -0
- package/dist/commands/validate/checks/fleet-shape.js +296 -0
- package/dist/commands/validate/checks/fleet-shape.js.map +1 -0
- package/dist/commands/validate/checks/health-deps.js +55 -0
- package/dist/commands/validate/checks/health-deps.js.map +1 -0
- package/dist/commands/validate/checks/requirements.js +254 -0
- package/dist/commands/validate/checks/requirements.js.map +1 -0
- package/dist/commands/validate/checks/sources.js +76 -0
- package/dist/commands/validate/checks/sources.js.map +1 -0
- package/dist/commands/validate/checks/vocabulary.js +31 -0
- package/dist/commands/validate/checks/vocabulary.js.map +1 -0
- package/dist/commands/validate/feature.js +216 -0
- package/dist/commands/validate/feature.js.map +1 -0
- package/dist/commands/validate/fleet/census.js +69 -0
- package/dist/commands/validate/fleet/census.js.map +1 -0
- package/dist/commands/validate/fleet/kind-tags.js +39 -0
- package/dist/commands/validate/fleet/kind-tags.js.map +1 -0
- package/dist/commands/validate/fleet/landscape.js +353 -0
- package/dist/commands/validate/fleet/landscape.js.map +1 -0
- package/dist/commands/validate/fleet/load.js +52 -0
- package/dist/commands/validate/fleet/load.js.map +1 -0
- package/dist/commands/validate/fleet/obligations.js +270 -0
- package/dist/commands/validate/fleet/obligations.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/adoption.js +102 -0
- package/dist/commands/validate/fleet/scorecard/adoption.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/contracts.js +98 -0
- package/dist/commands/validate/fleet/scorecard/contracts.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/print.js +63 -0
- package/dist/commands/validate/fleet/scorecard/print.js.map +1 -0
- package/dist/commands/validate/fleet/scorecard/scorecard.js +156 -0
- package/dist/commands/validate/fleet/scorecard/scorecard.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/capability-tag.js +94 -0
- package/dist/commands/validate/fleet/usecases/capability-tag.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/place.js +13 -0
- package/dist/commands/validate/fleet/usecases/place.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/requirement-tag.js +95 -0
- package/dist/commands/validate/fleet/usecases/requirement-tag.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/steps.js +197 -0
- package/dist/commands/validate/fleet/usecases/steps.js.map +1 -0
- package/dist/commands/validate/fleet/usecases/usecases.js +99 -0
- package/dist/commands/validate/fleet/usecases/usecases.js.map +1 -0
- package/dist/commands/validate/fleet/views/ids.js +40 -0
- package/dist/commands/validate/fleet/views/ids.js.map +1 -0
- package/dist/commands/validate/fleet/views/stale.js +59 -0
- package/dist/commands/validate/fleet/views/stale.js.map +1 -0
- package/dist/commands/validate/links/corpus.js +92 -0
- package/dist/commands/validate/links/corpus.js.map +1 -0
- package/dist/commands/validate/links/glossary.js +75 -0
- package/dist/commands/validate/links/glossary.js.map +1 -0
- package/dist/commands/validate/report.js +269 -0
- package/dist/commands/validate/report.js.map +1 -0
- package/dist/commands/validate/service/api.js +338 -0
- package/dist/commands/validate/service/api.js.map +1 -0
- package/dist/commands/validate/service/events/events.js +219 -0
- package/dist/commands/validate/service/events/events.js.map +1 -0
- package/dist/commands/validate/service/events/message-producers.js +77 -0
- package/dist/commands/validate/service/events/message-producers.js.map +1 -0
- package/dist/commands/validate/service/evidence-pins.js +131 -0
- package/dist/commands/validate/service/evidence-pins.js.map +1 -0
- package/dist/commands/validate/service/service.js +251 -0
- package/dist/commands/validate/service/service.js.map +1 -0
- package/dist/commands/validate/service/specs.js +251 -0
- package/dist/commands/validate/service/specs.js.map +1 -0
- package/dist/commands/validate/service/spine.js +113 -0
- package/dist/commands/validate/service/spine.js.map +1 -0
- package/dist/commands/validate/validate.js +338 -0
- package/dist/commands/validate/validate.js.map +1 -0
- package/dist/commands/verify/cross/diff.js +182 -0
- package/dist/commands/verify/cross/diff.js.map +1 -0
- package/dist/commands/verify/evidence/contract.js +32 -0
- package/dist/commands/verify/evidence/contract.js.map +1 -0
- package/dist/commands/verify/evidence/pins.js +52 -0
- package/dist/commands/verify/evidence/pins.js.map +1 -0
- package/dist/commands/verify/evidence/read.js +72 -0
- package/dist/commands/verify/evidence/read.js.map +1 -0
- package/dist/commands/verify/frozen.js +241 -0
- package/dist/commands/verify/frozen.js.map +1 -0
- package/dist/commands/verify/record.js +226 -0
- package/dist/commands/verify/record.js.map +1 -0
- package/dist/commands/verify/report.js +223 -0
- package/dist/commands/verify/report.js.map +1 -0
- package/dist/commands/verify/results.js +246 -0
- package/dist/commands/verify/results.js.map +1 -0
- package/dist/commands/verify/verify.js +217 -0
- package/dist/commands/verify/verify.js.map +1 -0
- package/dist/commands/vouch/contract.js +11 -0
- package/dist/commands/vouch/contract.js.map +1 -0
- package/dist/commands/vouch/pack/contract.js +2 -0
- package/dist/commands/vouch/pack/contract.js.map +1 -0
- package/dist/commands/vouch/pack/pack.js +266 -0
- package/dist/commands/vouch/pack/pack.js.map +1 -0
- package/dist/commands/vouch/pack/print.js +271 -0
- package/dist/commands/vouch/pack/print.js.map +1 -0
- package/dist/commands/vouch/pack/sections.js +142 -0
- package/dist/commands/vouch/pack/sections.js.map +1 -0
- package/dist/commands/vouch/prompt/confirm.js +46 -0
- package/dist/commands/vouch/prompt/confirm.js.map +1 -0
- package/dist/commands/vouch/report.js +101 -0
- package/dist/commands/vouch/report.js.map +1 -0
- package/dist/commands/vouch/run.js +285 -0
- package/dist/commands/vouch/run.js.map +1 -0
- package/dist/commands/vouch/sample/plan.js +125 -0
- package/dist/commands/vouch/sample/plan.js.map +1 -0
- package/dist/commands/vouch/sample/print.js +109 -0
- package/dist/commands/vouch/sample/print.js.map +1 -0
- package/dist/commands/vouch/vet/verify.js +123 -0
- package/dist/commands/vouch/vet/verify.js.map +1 -0
- package/dist/commands/vouch/vouch.js +176 -0
- package/dist/commands/vouch/vouch.js.map +1 -0
- package/dist/core/agent/agents-md/artifacts.js +220 -0
- package/dist/core/agent/agents-md/artifacts.js.map +1 -0
- package/dist/core/agent/agents-md/command-map.js +324 -0
- package/dist/core/agent/agents-md/command-map.js.map +1 -0
- package/dist/core/agent/agents-md/cycle.js +165 -0
- package/dist/core/agent/agents-md/cycle.js.map +1 -0
- package/dist/core/agent/agents-md/map/explain.js +34 -0
- package/dist/core/agent/agents-md/map/explain.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/context.js +41 -0
- package/dist/core/agent/agents-md/map/lenses/context.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/diff.js +46 -0
- package/dist/core/agent/agents-md/map/lenses/diff.js.map +1 -0
- package/dist/core/agent/agents-md/map/lenses/gate.js +57 -0
- package/dist/core/agent/agents-md/map/lenses/gate.js.map +1 -0
- package/dist/core/agent/agents-md/map/mcp.js +41 -0
- package/dist/core/agent/agents-md/map/mcp.js.map +1 -0
- package/dist/core/agent/agents-md/map/status.js +62 -0
- package/dist/core/agent/agents-md/map/status.js.map +1 -0
- package/dist/core/agent/agents-md/map/subsystem.js +32 -0
- package/dist/core/agent/agents-md/map/subsystem.js.map +1 -0
- package/dist/core/agent/agents-md/map/usecases.js +60 -0
- package/dist/core/agent/agents-md/map/usecases.js.map +1 -0
- package/dist/core/agent/agents-md/refusals.js +246 -0
- package/dist/core/agent/agents-md/refusals.js.map +1 -0
- package/dist/core/agent/agents-md/shipped/archive-gate.js +98 -0
- package/dist/core/agent/agents-md/shipped/archive-gate.js.map +1 -0
- package/dist/core/agent/agents-md/spine.js +40 -0
- package/dist/core/agent/agents-md/spine.js.map +1 -0
- package/dist/core/agent/agents-md.js +170 -0
- package/dist/core/agent/agents-md.js.map +1 -0
- package/dist/core/{agents-stamp.js → agent/agents-stamp.js} +50 -0
- package/dist/core/agent/agents-stamp.js.map +1 -0
- package/dist/core/agent/contract.js +2 -0
- package/dist/core/agent/contract.js.map +1 -0
- package/dist/core/agent/protocol.js +193 -0
- package/dist/core/agent/protocol.js.map +1 -0
- package/dist/core/agent/scaffold.js +259 -0
- package/dist/core/agent/scaffold.js.map +1 -0
- package/dist/core/agent/support/report.js +103 -0
- package/dist/core/agent/support/report.js.map +1 -0
- package/dist/core/agent/tools/dialects.js +150 -0
- package/dist/core/agent/tools/dialects.js.map +1 -0
- package/dist/core/agent/tools/registry.js +228 -0
- package/dist/core/agent/tools/registry.js.map +1 -0
- package/dist/core/agent/workflows/adopt.js +133 -0
- package/dist/core/agent/workflows/adopt.js.map +1 -0
- package/dist/core/agent/workflows/check.js +337 -0
- package/dist/core/agent/workflows/check.js.map +1 -0
- package/dist/core/agent/workflows/closing.js +262 -0
- package/dist/core/agent/workflows/closing.js.map +1 -0
- package/dist/core/agent/workflows/feature.js +105 -0
- package/dist/core/agent/workflows/feature.js.map +1 -0
- package/dist/core/agent/workflows/implement.js +105 -0
- package/dist/core/agent/workflows/implement.js.map +1 -0
- package/dist/core/agent/workflows/reference/authoring.js +209 -0
- package/dist/core/agent/workflows/reference/authoring.js.map +1 -0
- package/dist/core/agent/workflows/reference/codes.js +65 -0
- package/dist/core/agent/workflows/reference/codes.js.map +1 -0
- package/dist/core/agent/workflows/reference/done-check.js +188 -0
- package/dist/core/agent/workflows/reference/done-check.js.map +1 -0
- package/dist/core/agent/workflows/reference/reference.js +16 -0
- package/dist/core/agent/workflows/reference/reference.js.map +1 -0
- package/dist/core/agent/workflows/reference/spine.js +297 -0
- package/dist/core/agent/workflows/reference/spine.js.map +1 -0
- package/dist/core/asyncapi/baseline/plan.js +110 -0
- package/dist/core/asyncapi/baseline/plan.js.map +1 -0
- package/dist/core/asyncapi/baseline/surfaces.js +54 -0
- package/dist/core/asyncapi/baseline/surfaces.js.map +1 -0
- package/dist/core/asyncapi/depth.js +164 -0
- package/dist/core/asyncapi/depth.js.map +1 -0
- package/dist/core/asyncapi/digest.js +141 -0
- package/dist/core/asyncapi/digest.js.map +1 -0
- package/dist/core/asyncapi/merge/components.js +91 -0
- package/dist/core/asyncapi/merge/components.js.map +1 -0
- package/dist/core/asyncapi/merge/error.js +33 -0
- package/dist/core/asyncapi/merge/error.js.map +1 -0
- package/dist/core/asyncapi/merge/markers.js +308 -0
- package/dist/core/asyncapi/merge/markers.js.map +1 -0
- package/dist/core/asyncapi/merge/merge.js +215 -0
- package/dist/core/asyncapi/merge/merge.js.map +1 -0
- package/dist/core/asyncapi/merge/pin.js +107 -0
- package/dist/core/asyncapi/merge/pin.js.map +1 -0
- package/dist/core/asyncapi/model.js +11 -0
- package/dist/core/asyncapi/model.js.map +1 -0
- package/dist/core/asyncapi/producers.js +50 -0
- package/dist/core/asyncapi/producers.js.map +1 -0
- package/dist/core/{asyncapi.js → asyncapi/read.js} +95 -109
- package/dist/core/asyncapi/read.js.map +1 -0
- package/dist/core/brief/brief.js +225 -0
- package/dist/core/brief/brief.js.map +1 -0
- package/dist/core/brief/checks.js +250 -0
- package/dist/core/brief/checks.js.map +1 -0
- package/dist/core/brief/landscape.js +194 -0
- package/dist/core/brief/landscape.js.map +1 -0
- package/dist/core/brief/targets.js +226 -0
- package/dist/core/brief/targets.js.map +1 -0
- package/dist/core/brief/unchecked.js +48 -0
- package/dist/core/brief/unchecked.js.map +1 -0
- package/dist/core/c4/arch.js +174 -0
- package/dist/core/c4/arch.js.map +1 -0
- package/dist/core/c4/likec4.js +90 -0
- package/dist/core/c4/likec4.js.map +1 -0
- package/dist/core/c4/parsed/deployment.js +158 -0
- package/dist/core/c4/parsed/deployment.js.map +1 -0
- package/dist/core/c4/parsed/dynamic-views.js +132 -0
- package/dist/core/c4/parsed/dynamic-views.js.map +1 -0
- package/dist/core/c4/parsed/specification.js +78 -0
- package/dist/core/c4/parsed/specification.js.map +1 -0
- package/dist/core/c4/parsed/values.js +57 -0
- package/dist/core/c4/parsed/values.js.map +1 -0
- package/dist/core/c4/parsed/view-ids.js +75 -0
- package/dist/core/c4/parsed/view-ids.js.map +1 -0
- package/dist/core/c4/project/architecture.js +45 -0
- package/dist/core/c4/project/architecture.js.map +1 -0
- package/dist/core/c4/project/documents.js +58 -0
- package/dist/core/c4/project/documents.js.map +1 -0
- package/dist/core/c4/project/load.js +187 -0
- package/dist/core/c4/project/load.js.map +1 -0
- package/dist/core/c4/project/staged.js +220 -0
- package/dist/core/c4/project/staged.js.map +1 -0
- package/dist/core/c4/resolve/service.js +159 -0
- package/dist/core/c4/resolve/service.js.map +1 -0
- package/dist/core/c4/resolve/steps.js +144 -0
- package/dist/core/c4/resolve/steps.js.map +1 -0
- package/dist/core/c4/seed/fleet-file.js +201 -0
- package/dist/core/c4/seed/fleet-file.js.map +1 -0
- package/dist/core/c4/seed/items.js +91 -0
- package/dist/core/c4/seed/items.js.map +1 -0
- package/dist/core/c4/seed/stamp.js +48 -0
- package/dist/core/c4/seed/stamp.js.map +1 -0
- package/dist/core/c4/seed/template.js +109 -0
- package/dist/core/c4/seed/template.js.map +1 -0
- package/dist/core/c4/source-mask.js +82 -0
- package/dist/core/c4/source-mask.js.map +1 -0
- package/dist/core/c4/source-scan.js +227 -0
- package/dist/core/c4/source-scan.js.map +1 -0
- package/dist/core/c4/splice/authored-source.js +101 -0
- package/dist/core/c4/splice/authored-source.js.map +1 -0
- package/dist/core/c4/splice/contract.js +10 -0
- package/dist/core/c4/splice/contract.js.map +1 -0
- package/dist/core/c4/splice/delta-blocks.js +139 -0
- package/dist/core/c4/splice/delta-blocks.js.map +1 -0
- package/dist/core/c4/splice/identity/edges.js +36 -0
- package/dist/core/c4/splice/identity/edges.js.map +1 -0
- package/dist/core/c4/splice/landscape-merge.js +269 -0
- package/dist/core/c4/splice/landscape-merge.js.map +1 -0
- package/dist/core/c4/splice/placement.js +194 -0
- package/dist/core/c4/splice/placement.js.map +1 -0
- package/dist/core/c4/workspace.js +174 -0
- package/dist/core/c4/workspace.js.map +1 -0
- package/dist/core/capabilities/authoring/notes.js +141 -0
- package/dist/core/capabilities/authoring/notes.js.map +1 -0
- package/dist/core/capabilities/capabilities.js +124 -0
- package/dist/core/capabilities/capabilities.js.map +1 -0
- package/dist/core/capabilities/delta/doc.js +50 -0
- package/dist/core/capabilities/delta/doc.js.map +1 -0
- package/dist/core/capabilities/delta/overlay.js +129 -0
- package/dist/core/capabilities/delta/overlay.js.map +1 -0
- package/dist/core/capabilities/delta/summary.js +57 -0
- package/dist/core/capabilities/delta/summary.js.map +1 -0
- package/dist/core/capabilities/delta/tree.js +43 -0
- package/dist/core/capabilities/delta/tree.js.map +1 -0
- package/dist/core/capabilities/delta/uncovered.js +222 -0
- package/dist/core/capabilities/delta/uncovered.js.map +1 -0
- package/dist/core/capabilities/findings.js +342 -0
- package/dist/core/capabilities/findings.js.map +1 -0
- package/dist/core/capabilities/realizes/findings.js +181 -0
- package/dist/core/capabilities/realizes/findings.js.map +1 -0
- package/dist/core/capabilities/realizes/join.js +143 -0
- package/dist/core/capabilities/realizes/join.js.map +1 -0
- package/dist/core/capabilities/rollup.js +199 -0
- package/dist/core/capabilities/rollup.js.map +1 -0
- package/dist/core/capabilities/tree.js +126 -0
- package/dist/core/capabilities/tree.js.map +1 -0
- package/dist/core/capabilities/usecase-join.js +277 -0
- package/dist/core/capabilities/usecase-join.js.map +1 -0
- package/dist/core/coherence/authoring/scaffold.js +177 -0
- package/dist/core/coherence/authoring/scaffold.js.map +1 -0
- package/dist/core/coherence/authoring/sentinels.js +74 -0
- package/dist/core/coherence/authoring/sentinels.js.map +1 -0
- package/dist/core/coherence/coherence.js +287 -0
- package/dist/core/coherence/coherence.js.map +1 -0
- package/dist/core/coherence/declared.js +269 -0
- package/dist/core/coherence/declared.js.map +1 -0
- package/dist/core/coherence/events/declared.js +206 -0
- package/dist/core/coherence/events/declared.js.map +1 -0
- package/dist/core/coherence/events/events.js +204 -0
- package/dist/core/coherence/events/events.js.map +1 -0
- package/dist/core/coherence/events/grades.js +166 -0
- package/dist/core/coherence/events/grades.js.map +1 -0
- package/dist/core/coherence/events/lookups.js +122 -0
- package/dist/core/coherence/events/lookups.js.map +1 -0
- package/dist/core/coherence/events/merged.js +40 -0
- package/dist/core/coherence/events/merged.js.map +1 -0
- package/dist/core/coherence/living.js +198 -0
- package/dist/core/coherence/living.js.map +1 -0
- package/dist/core/coherence/lookups.js +155 -0
- package/dist/core/coherence/lookups.js.map +1 -0
- package/dist/core/coherence/pending.js +39 -0
- package/dist/core/coherence/pending.js.map +1 -0
- package/dist/core/conflict-markers.js +60 -0
- package/dist/core/conflict-markers.js.map +1 -0
- package/dist/core/delta/claims.js +73 -0
- package/dist/core/delta/claims.js.map +1 -0
- package/dist/core/delta/delta.js +296 -0
- package/dist/core/delta/delta.js.map +1 -0
- package/dist/core/delta/document.js +177 -0
- package/dist/core/delta/document.js.map +1 -0
- package/dist/core/delta/scope.js +48 -0
- package/dist/core/delta/scope.js.map +1 -0
- package/dist/core/delta/select.js +237 -0
- package/dist/core/delta/select.js.map +1 -0
- package/dist/core/dependencies/dependencies.js +141 -0
- package/dist/core/dependencies/dependencies.js.map +1 -0
- package/dist/core/dependencies/facts.js +165 -0
- package/dist/core/dependencies/facts.js.map +1 -0
- package/dist/core/dependencies/fanin.js +88 -0
- package/dist/core/dependencies/fanin.js.map +1 -0
- package/dist/core/dependencies/graph.js +106 -0
- package/dist/core/dependencies/graph.js.map +1 -0
- package/dist/core/deployment/delta.js +188 -0
- package/dist/core/deployment/delta.js.map +1 -0
- package/dist/core/deployment/objects.js +145 -0
- package/dist/core/deployment/objects.js.map +1 -0
- package/dist/core/diff/base-git.js +148 -0
- package/dist/core/diff/base-git.js.map +1 -0
- package/dist/core/diff/base-state.js +209 -0
- package/dist/core/diff/base-state.js.map +1 -0
- package/dist/core/diff/current-state.js +96 -0
- package/dist/core/diff/current-state.js.map +1 -0
- package/dist/core/diff/scope/changed-paths.js +188 -0
- package/dist/core/diff/scope/changed-paths.js.map +1 -0
- package/dist/core/diff/semantic.js +243 -0
- package/dist/core/diff/semantic.js.map +1 -0
- package/dist/core/diff/victims.js +247 -0
- package/dist/core/diff/victims.js.map +1 -0
- package/dist/core/docs.js +7 -64
- package/dist/core/docs.js.map +1 -1
- package/dist/core/doctor/agents.js +222 -0
- package/dist/core/doctor/agents.js.map +1 -0
- package/dist/core/doctor/config.js +135 -0
- package/dist/core/doctor/config.js.map +1 -0
- package/dist/core/doctor/doctor.js +275 -0
- package/dist/core/doctor/doctor.js.map +1 -0
- package/dist/core/doctor/report.js +13 -0
- package/dist/core/doctor/report.js.map +1 -0
- package/dist/core/doctor/residue.js +110 -0
- package/dist/core/doctor/residue.js.map +1 -0
- package/dist/core/document/apply.js +77 -0
- package/dist/core/document/apply.js.map +1 -0
- package/dist/core/{frontmatter.js → document/frontmatter.js} +48 -2
- package/dist/core/document/frontmatter.js.map +1 -0
- package/dist/core/document/grammar/directives.js +143 -0
- package/dist/core/document/grammar/directives.js.map +1 -0
- package/dist/core/document/parse.js +263 -0
- package/dist/core/document/parse.js.map +1 -0
- package/dist/core/document/scenarios.js +221 -0
- package/dist/core/document/scenarios.js.map +1 -0
- package/dist/core/document/spec.js +241 -0
- package/dist/core/document/spec.js.map +1 -0
- package/dist/core/{config.js → envelope/config.js} +79 -18
- package/dist/core/envelope/config.js.map +1 -0
- package/dist/core/envelope/json.js +175 -0
- package/dist/core/envelope/json.js.map +1 -0
- package/dist/core/{version.js → envelope/version.js} +3 -3
- package/dist/core/envelope/version.js.map +1 -0
- package/dist/core/explain/families.js +175 -0
- package/dist/core/explain/families.js.map +1 -0
- package/dist/core/explain/fix-tables.js +178 -0
- package/dist/core/explain/fix-tables.js.map +1 -0
- package/dist/core/explain/lookup.js +181 -0
- package/dist/core/explain/lookup.js.map +1 -0
- package/dist/core/explain/refusals.js +49 -0
- package/dist/core/explain/refusals.js.map +1 -0
- package/dist/core/explain/terms.js +144 -0
- package/dist/core/explain/terms.js.map +1 -0
- package/dist/core/explore/describe.js +105 -0
- package/dist/core/explore/describe.js.map +1 -0
- package/dist/core/{explore.js → explore/explore.js} +50 -101
- package/dist/core/explore/explore.js.map +1 -0
- package/dist/core/fleet-context.js +120 -78
- package/dist/core/fleet-context.js.map +1 -1
- package/dist/core/gate/checks.js +201 -0
- package/dist/core/gate/checks.js.map +1 -0
- package/dist/core/gate/partners.js +205 -0
- package/dist/core/gate/partners.js.map +1 -0
- package/dist/core/gate/report.js +47 -0
- package/dist/core/gate/report.js.map +1 -0
- package/dist/core/gate/verification.js +113 -0
- package/dist/core/gate/verification.js.map +1 -0
- package/dist/core/gherkin/digest.js +60 -0
- package/dist/core/gherkin/digest.js.map +1 -0
- package/dist/core/gherkin/emit.js +177 -0
- package/dist/core/gherkin/emit.js.map +1 -0
- package/dist/core/gherkin/read.js +76 -0
- package/dist/core/gherkin/read.js.map +1 -0
- package/dist/core/gherkin/stale.js +234 -0
- package/dist/core/gherkin/stale.js.map +1 -0
- package/dist/core/gherkin/stamp.js +77 -0
- package/dist/core/gherkin/stamp.js.map +1 -0
- package/dist/core/gherkin/steps/catalogue.js +154 -0
- package/dist/core/gherkin/steps/catalogue.js.map +1 -0
- package/dist/core/gherkin/steps/inventory.js +98 -0
- package/dist/core/gherkin/steps/inventory.js.map +1 -0
- package/dist/core/gherkin/steps/phrase.js +72 -0
- package/dist/core/gherkin/steps/phrase.js.map +1 -0
- package/dist/core/glossary/delta.js +106 -0
- package/dist/core/glossary/delta.js.map +1 -0
- package/dist/core/glossary/tree.js +86 -0
- package/dist/core/glossary/tree.js.map +1 -0
- package/dist/core/kernel/concurrency.js.map +1 -0
- package/dist/core/{document-bytes.js → kernel/document-bytes.js} +1 -1
- package/dist/core/kernel/document-bytes.js.map +1 -0
- package/dist/core/kernel/fences.js +42 -0
- package/dist/core/kernel/fences.js.map +1 -0
- package/dist/core/kernel/ids/capability.js +72 -0
- package/dist/core/kernel/ids/capability.js.map +1 -0
- package/dist/core/kernel/ids/dirs.js +33 -0
- package/dist/core/kernel/ids/dirs.js.map +1 -0
- package/dist/core/kernel/ids/feature.js +75 -0
- package/dist/core/kernel/ids/feature.js.map +1 -0
- package/dist/core/kernel/ids/service.js +156 -0
- package/dist/core/kernel/ids/service.js.map +1 -0
- package/dist/core/kernel/ids/subsystem.js +63 -0
- package/dist/core/kernel/ids/subsystem.js.map +1 -0
- package/dist/core/{path-safety.js → kernel/path-safety.js} +18 -4
- package/dist/core/kernel/path-safety.js.map +1 -0
- package/dist/core/kernel/records.js.map +1 -0
- package/dist/core/links/backlinks.js +68 -0
- package/dist/core/links/backlinks.js.map +1 -0
- package/dist/core/links/case.js +74 -0
- package/dist/core/links/case.js.map +1 -0
- package/dist/core/links/corpus.js +104 -0
- package/dist/core/links/corpus.js.map +1 -0
- package/dist/core/links/findings.js +110 -0
- package/dist/core/links/findings.js.map +1 -0
- package/dist/core/links/parse.js +236 -0
- package/dist/core/links/parse.js.map +1 -0
- package/dist/core/mcp/argv.js +111 -0
- package/dist/core/mcp/argv.js.map +1 -0
- package/dist/core/mcp/author-tools.js +72 -0
- package/dist/core/mcp/author-tools.js.map +1 -0
- package/dist/core/mcp/framing.js +46 -0
- package/dist/core/mcp/framing.js.map +1 -0
- package/dist/core/mcp/protocol.js +280 -0
- package/dist/core/mcp/protocol.js.map +1 -0
- package/dist/core/mcp/tools.js +314 -0
- package/dist/core/mcp/tools.js.map +1 -0
- package/dist/core/obligations/obligations.js +106 -0
- package/dist/core/obligations/obligations.js.map +1 -0
- package/dist/core/openapi/baseline/gate.js +166 -0
- package/dist/core/openapi/baseline/gate.js.map +1 -0
- package/dist/core/openapi/baseline/plan.js +112 -0
- package/dist/core/openapi/baseline/plan.js.map +1 -0
- package/dist/core/openapi/baseline/record.js +175 -0
- package/dist/core/openapi/baseline/record.js.map +1 -0
- package/dist/core/openapi/depth.js +122 -0
- package/dist/core/openapi/depth.js.map +1 -0
- package/dist/core/openapi/digest.js +189 -0
- package/dist/core/openapi/digest.js.map +1 -0
- package/dist/core/{openapi.js → openapi/doc.js} +44 -106
- package/dist/core/openapi/doc.js.map +1 -0
- package/dist/core/openapi/merge/components.js +234 -0
- package/dist/core/openapi/merge/components.js.map +1 -0
- package/dist/core/openapi/merge/error.js +26 -0
- package/dist/core/openapi/merge/error.js.map +1 -0
- package/dist/core/openapi/merge/markers.js +208 -0
- package/dist/core/openapi/merge/markers.js.map +1 -0
- package/dist/core/openapi/merge/merge.js +256 -0
- package/dist/core/openapi/merge/merge.js.map +1 -0
- package/dist/core/openapi/merge/pin.js +128 -0
- package/dist/core/openapi/merge/pin.js.map +1 -0
- package/dist/core/openspec/decide/capabilities.js +244 -0
- package/dist/core/openspec/decide/capabilities.js.map +1 -0
- package/dist/core/openspec/decide/dispositions.js +63 -0
- package/dist/core/openspec/decide/dispositions.js.map +1 -0
- package/dist/core/openspec/decide/renames.js +179 -0
- package/dist/core/openspec/decide/renames.js.map +1 -0
- package/dist/core/openspec/decide/verdict.js +84 -0
- package/dist/core/openspec/decide/verdict.js.map +1 -0
- package/dist/core/openspec/inventory.js +221 -0
- package/dist/core/openspec/inventory.js.map +1 -0
- package/dist/core/openspec/model/mapping.js +76 -0
- package/dist/core/openspec/model/mapping.js.map +1 -0
- package/dist/core/openspec/model/model.js +65 -0
- package/dist/core/openspec/model/model.js.map +1 -0
- package/dist/core/openspec/scan/changes.js +235 -0
- package/dist/core/openspec/scan/changes.js.map +1 -0
- package/dist/core/openspec/scan/config.js +200 -0
- package/dist/core/openspec/scan/config.js.map +1 -0
- package/dist/core/openspec/scan/shape.js +260 -0
- package/dist/core/openspec/scan/shape.js.map +1 -0
- package/dist/core/openspec/scan/walk.js +133 -0
- package/dist/core/openspec/scan/walk.js.map +1 -0
- package/dist/core/openspec/scan/workspace.js +71 -0
- package/dist/core/openspec/scan/workspace.js.map +1 -0
- package/dist/core/owners/codeowners.js +141 -0
- package/dist/core/owners/codeowners.js.map +1 -0
- package/dist/core/pack/features.js +120 -0
- package/dist/core/pack/features.js.map +1 -0
- package/dist/core/pack/joins.js +112 -0
- package/dist/core/pack/joins.js.map +1 -0
- package/dist/core/pack/living.js +137 -0
- package/dist/core/pack/living.js.map +1 -0
- package/dist/core/pack/pack.js +76 -0
- package/dist/core/pack/pack.js.map +1 -0
- package/dist/core/permissions/permissions.js +87 -0
- package/dist/core/permissions/permissions.js.map +1 -0
- package/dist/core/projection/api.js +84 -0
- package/dist/core/projection/api.js.map +1 -0
- package/dist/core/projection/arch-slice.js +63 -0
- package/dist/core/projection/arch-slice.js.map +1 -0
- package/dist/core/projection/events.js +34 -0
- package/dist/core/projection/events.js.map +1 -0
- package/dist/core/provenance/findings.js +208 -0
- package/dist/core/provenance/findings.js.map +1 -0
- package/dist/core/provenance/git.js +225 -0
- package/dist/core/provenance/git.js.map +1 -0
- package/dist/core/provenance/gitq/moves.js +182 -0
- package/dist/core/provenance/gitq/moves.js.map +1 -0
- package/dist/core/provenance/gitq/vouched-ancestor.js +179 -0
- package/dist/core/provenance/gitq/vouched-ancestor.js.map +1 -0
- package/dist/core/provenance/sample/scope.js +238 -0
- package/dist/core/provenance/sample/scope.js.map +1 -0
- package/dist/core/provenance/sample/sections.js +61 -0
- package/dist/core/provenance/sample/sections.js.map +1 -0
- package/dist/core/provenance/sources.js +263 -0
- package/dist/core/provenance/sources.js.map +1 -0
- package/dist/core/provenance/stamp.js +232 -0
- package/dist/core/provenance/stamp.js.map +1 -0
- package/dist/core/provenance/walk.js +157 -0
- package/dist/core/provenance/walk.js.map +1 -0
- package/dist/core/repo/authored/paths.js +210 -0
- package/dist/core/repo/authored/paths.js.map +1 -0
- package/dist/core/repo/entries.js +126 -0
- package/dist/core/repo/entries.js.map +1 -0
- package/dist/core/repo/paths.js +277 -0
- package/dist/core/repo/paths.js.map +1 -0
- package/dist/core/repo/repo.js +248 -0
- package/dist/core/repo/repo.js.map +1 -0
- package/dist/core/repo/service-target.js +153 -0
- package/dist/core/repo/service-target.js.map +1 -0
- package/dist/core/repo/state.js +58 -0
- package/dist/core/repo/state.js.map +1 -0
- package/dist/core/repo/tree/find.js +52 -0
- package/dist/core/repo/tree/find.js.map +1 -0
- package/dist/core/repo/tree/fs.js +64 -0
- package/dist/core/repo/tree/fs.js.map +1 -0
- package/dist/core/repo/tree/marker.js +61 -0
- package/dist/core/repo/tree/marker.js.map +1 -0
- package/dist/core/repo/tree/views.js +172 -0
- package/dist/core/repo/tree/views.js.map +1 -0
- package/dist/core/repo/tree/walk.js +234 -0
- package/dist/core/repo/tree/walk.js.map +1 -0
- package/dist/core/results.js +99 -2
- package/dist/core/results.js.map +1 -1
- package/dist/core/scaffold/landscape.js +131 -0
- package/dist/core/scaffold/landscape.js.map +1 -0
- package/dist/core/scaffold/readme.js +84 -0
- package/dist/core/scaffold/readme.js.map +1 -0
- package/dist/core/staging/commit.js +241 -0
- package/dist/core/staging/commit.js.map +1 -0
- package/dist/core/staging/interrupted.js +96 -0
- package/dist/core/staging/interrupted.js.map +1 -0
- package/dist/core/staging/lock.js +206 -0
- package/dist/core/staging/lock.js.map +1 -0
- package/dist/core/staging/recovery/finding.js +35 -0
- package/dist/core/staging/recovery/finding.js.map +1 -0
- package/dist/core/staging/recovery/intent.js +98 -0
- package/dist/core/staging/recovery/intent.js.map +1 -0
- package/dist/core/staging/recovery/recover.js +126 -0
- package/dist/core/staging/recovery/recover.js.map +1 -0
- package/dist/core/staging/recovery/residue.js +62 -0
- package/dist/core/staging/recovery/residue.js.map +1 -0
- package/dist/core/staging/snapshot.js +202 -0
- package/dist/core/staging/snapshot.js.map +1 -0
- package/dist/core/staging/txn/forward.js +171 -0
- package/dist/core/staging/txn/forward.js.map +1 -0
- package/dist/core/staging/txn/journal.js +139 -0
- package/dist/core/staging/txn/journal.js.map +1 -0
- package/dist/core/staging/txn/transaction.js +75 -0
- package/dist/core/staging/txn/transaction.js.map +1 -0
- package/dist/core/staging/writes.js +113 -0
- package/dist/core/staging/writes.js.map +1 -0
- package/dist/core/status/actions/execution.js +49 -0
- package/dist/core/status/actions/execution.js.map +1 -0
- package/dist/core/status/contracts.js +102 -0
- package/dist/core/status/contracts.js.map +1 -0
- package/dist/core/status/feature/artifacts.js +196 -0
- package/dist/core/status/feature/artifacts.js.map +1 -0
- package/dist/core/status/feature/feature.js +207 -0
- package/dist/core/status/feature/feature.js.map +1 -0
- package/dist/core/status/feature/next.js +150 -0
- package/dist/core/status/feature/next.js.map +1 -0
- package/dist/core/status/feature/state.js +21 -0
- package/dist/core/status/feature/state.js.map +1 -0
- package/dist/core/status/fleet/fleet.js +197 -0
- package/dist/core/status/fleet/fleet.js.map +1 -0
- package/dist/core/status/fleet/next.js +207 -0
- package/dist/core/status/fleet/next.js.map +1 -0
- package/dist/core/status/interrupted.js +97 -0
- package/dist/core/status/interrupted.js.map +1 -0
- package/dist/core/status/report.js +31 -0
- package/dist/core/status/report.js.map +1 -0
- package/dist/core/status/scan.js +41 -0
- package/dist/core/status/scan.js.map +1 -0
- package/dist/core/status/verification.js +201 -0
- package/dist/core/status/verification.js.map +1 -0
- package/dist/core/usecases/capability.js +169 -0
- package/dist/core/usecases/capability.js.map +1 -0
- package/dist/core/usecases/delta/claims.js +116 -0
- package/dist/core/usecases/delta/claims.js.map +1 -0
- package/dist/core/usecases/delta/flows.js +103 -0
- package/dist/core/usecases/delta/flows.js.map +1 -0
- package/dist/core/usecases/delta/overlay.js +72 -0
- package/dist/core/usecases/delta/overlay.js.map +1 -0
- package/dist/core/usecases/fleet.js +137 -0
- package/dist/core/usecases/fleet.js.map +1 -0
- package/dist/core/usecases/operations.js +111 -0
- package/dist/core/usecases/operations.js.map +1 -0
- package/dist/core/usecases/place.js +44 -0
- package/dist/core/usecases/place.js.map +1 -0
- package/dist/core/usecases/touch.js +101 -0
- package/dist/core/usecases/touch.js.map +1 -0
- package/dist/core/verify/answers.js +173 -0
- package/dist/core/verify/answers.js.map +1 -0
- package/dist/core/verify/build.js +150 -0
- package/dist/core/verify/build.js.map +1 -0
- package/dist/core/verify/checklist.js +201 -0
- package/dist/core/verify/checklist.js.map +1 -0
- package/dist/core/verify/claims/identity.js +61 -0
- package/dist/core/verify/claims/identity.js.map +1 -0
- package/dist/core/verify/cross/diff.js +97 -0
- package/dist/core/verify/cross/diff.js.map +1 -0
- package/dist/core/verify/evidence/contract.js +169 -0
- package/dist/core/verify/evidence/contract.js.map +1 -0
- package/dist/core/verify/file.js +257 -0
- package/dist/core/verify/file.js.map +1 -0
- package/dist/core/verify/pins/lint.js +157 -0
- package/dist/core/verify/pins/lint.js.map +1 -0
- package/dist/core/verify/pins/pin.js +95 -0
- package/dist/core/verify/pins/pin.js.map +1 -0
- package/dist/core/verify/record.js +142 -0
- package/dist/core/verify/record.js.map +1 -0
- package/dist/core/verify/store/commit.js +89 -0
- package/dist/core/verify/store/commit.js.map +1 -0
- package/dist/core/verify/store/render.js +57 -0
- package/dist/core/verify/store/render.js.map +1 -0
- package/dist/core/vocabulary/health.js +91 -0
- package/dist/core/vocabulary/health.js.map +1 -0
- package/dist/core/vocabulary/issue.js +58 -0
- package/dist/core/vocabulary/issue.js.map +1 -0
- package/dist/core/vocabulary/maturity.js +145 -0
- package/dist/core/vocabulary/maturity.js.map +1 -0
- package/dist/core/{report.js → vocabulary/report.js} +30 -2
- package/dist/core/vocabulary/report.js.map +1 -0
- package/dist/core/vocabulary/steps.js +266 -0
- package/dist/core/vocabulary/steps.js.map +1 -0
- package/dist/core/workspace/discover.js +239 -0
- package/dist/core/workspace/discover.js.map +1 -0
- package/dist/core/workspace/render.js +52 -0
- package/dist/core/workspace/render.js.map +1 -0
- package/examples/README.md +189 -0
- package/examples/docs/architecture/adrs/0001-transactional-outbox.md +33 -0
- package/examples/docs/architecture/capabilities.yaml +31 -0
- package/examples/docs/architecture/landscape.likec4 +280 -0
- package/examples/docs/architecture/obligations.yaml +23 -0
- package/examples/docs/architecture/permissions.yaml +50 -0
- package/examples/docs/architecture/subsystems.likec4 +11 -0
- package/examples/docs/architecture/usecases/order-notification.likec4 +65 -0
- package/examples/docs/capabilities/checkout/spec.md +55 -0
- package/examples/docs/capabilities/identity/tokens/spec.md +42 -0
- package/examples/docs/capabilities/order-notifications/spec.md +43 -0
- package/examples/docs/features/FEAT-101-payment-splitting/adrs/0001-dedicated-split-service.md +18 -0
- package/examples/docs/features/FEAT-101-payment-splitting/delta.likec4 +94 -0
- package/examples/docs/features/FEAT-101-payment-splitting/intent.md +44 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/checkout-web/spec.md +21 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-service/asyncapi.yaml +129 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-service/spec.md +36 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/arch.spec.md +40 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/openapi.yaml +116 -0
- package/examples/docs/features/FEAT-101-payment-splitting/specs/payment-split-service/spec.md +55 -0
- package/examples/docs/features/FEAT-112-retire-order-v1/intent.md +35 -0
- package/examples/docs/features/FEAT-112-retire-order-v1/specs/order-service/openapi.yaml +28 -0
- package/examples/docs/features/FEAT-112-retire-order-v1/specs/order-service/spec.md +17 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/architecture/landscape.likec4 +253 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/services/order-service/spec.md +121 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/services/payment-service/openapi.yaml +111 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/files/services/payment-service/spec.md +58 -0
- package/examples/docs/features/archive/FEAT-088-refunds/.loam-before/manifest.json +32 -0
- package/examples/docs/features/archive/FEAT-088-refunds/adrs/0001-refunds-stay-in-payment-service.md +26 -0
- package/examples/docs/features/archive/FEAT-088-refunds/delta.likec4 +28 -0
- package/examples/docs/features/archive/FEAT-088-refunds/intent.md +26 -0
- package/examples/docs/features/archive/FEAT-088-refunds/specs/order-service/spec.md +37 -0
- package/examples/docs/features/archive/FEAT-088-refunds/specs/payment-service/openapi.yaml +70 -0
- package/examples/docs/features/archive/FEAT-088-refunds/specs/payment-service/spec.md +23 -0
- package/examples/docs/features/archive/FEAT-088-refunds/verification.yaml +76 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/architecture/landscape.likec4 +275 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/payment-service/asyncapi.yaml +96 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/payment-service/spec.md +82 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/platform/notification-service/asyncapi.yaml +164 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/files/services/platform/notification-service/spec.md +91 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/.loam-before/manifest.json +46 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/delta.likec4 +36 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/intent.md +22 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/scenario-report.json +10 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/notification-service/asyncapi.yaml +208 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/notification-service/spec.md +24 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/payment-service/asyncapi.yaml +137 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/specs/payment-service/spec.md +31 -0
- package/examples/docs/features/archive/FEAT-120-refund-notification/verification.yaml +84 -0
- package/examples/docs/glossary/order.md +15 -0
- package/examples/docs/glossary/payments/authorization.md +14 -0
- package/examples/docs/likec4.config.json +9 -0
- package/examples/docs/loam.json +3 -0
- package/examples/docs/services/checkout-web/model.likec4 +109 -0
- package/examples/docs/services/checkout-web/spec.md +91 -0
- package/examples/docs/services/checkout-web/ui/pages/checkout.page.yaml +40 -0
- package/examples/docs/services/checkout-web/ui/pages/order-status.page.yaml +24 -0
- package/examples/docs/services/checkout-web/ui/pages/split-payment.page.yaml +26 -0
- package/examples/docs/services/order-service/adrs/0001-orchestrated-order-lifecycle.md +52 -0
- package/examples/docs/services/order-service/arch.spec.md +127 -0
- package/examples/docs/services/order-service/asyncapi.yaml +108 -0
- package/examples/docs/services/order-service/health.yaml +57 -0
- package/examples/docs/services/order-service/model.likec4 +138 -0
- package/examples/docs/services/order-service/openapi.yaml +257 -0
- package/examples/docs/services/order-service/runbook.md +62 -0
- package/examples/docs/services/order-service/spec.md +134 -0
- package/examples/docs/services/payment-service/adrs/0001-payments-outbox.md +18 -0
- package/examples/docs/services/payment-service/adrs/0002-idempotency-keys-on-authorization.md +27 -0
- package/examples/docs/services/payment-service/arch.spec.md +73 -0
- package/examples/docs/services/payment-service/asyncapi.yaml +130 -0
- package/examples/docs/services/payment-service/health.yaml +39 -0
- package/examples/docs/services/payment-service/model.likec4 +67 -0
- package/examples/docs/services/payment-service/openapi.yaml +151 -0
- package/examples/docs/services/payment-service/runbook.md +37 -0
- package/examples/docs/services/payment-service/spec.md +88 -0
- package/examples/docs/services/platform/identity-service/adrs/0001-token-introspection-over-local-validation.md +60 -0
- package/examples/docs/services/platform/identity-service/arch.spec.md +117 -0
- package/examples/docs/services/platform/identity-service/health.yaml +70 -0
- package/examples/docs/services/platform/identity-service/model.likec4 +83 -0
- package/examples/docs/services/platform/identity-service/openapi.yaml +197 -0
- package/examples/docs/services/platform/identity-service/runbook.md +95 -0
- package/examples/docs/services/platform/identity-service/spec.md +119 -0
- package/examples/docs/services/platform/notification-service/asyncapi.yaml +199 -0
- package/examples/docs/services/platform/notification-service/health.yaml +35 -0
- package/examples/docs/services/platform/notification-service/model.likec4 +118 -0
- package/examples/docs/services/platform/notification-service/runbook.md +48 -0
- package/examples/docs/services/platform/notification-service/spec.md +112 -0
- package/examples/docs/services/platform/subsystem.yaml +2 -0
- package/examples/fleet.yaml +57 -0
- package/package.json +19 -6
- package/dist/commands/adopt.js +0 -240
- package/dist/commands/adopt.js.map +0 -1
- package/dist/commands/archive.js +0 -1313
- package/dist/commands/archive.js.map +0 -1
- package/dist/commands/delta.js +0 -388
- package/dist/commands/delta.js.map +0 -1
- package/dist/commands/docs-repo-gate.js.map +0 -1
- package/dist/commands/format.js +0 -17
- package/dist/commands/format.js.map +0 -1
- package/dist/commands/gherkin.js +0 -309
- package/dist/commands/gherkin.js.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.js +0 -295
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/migrate-openspec.js +0 -950
- package/dist/commands/migrate-openspec.js.map +0 -1
- package/dist/commands/new.js +0 -413
- package/dist/commands/new.js.map +0 -1
- package/dist/commands/rebase.js +0 -356
- package/dist/commands/rebase.js.map +0 -1
- package/dist/commands/show.js.map +0 -1
- package/dist/commands/status.js +0 -262
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/unarchive.js.map +0 -1
- package/dist/commands/validate.js +0 -1773
- package/dist/commands/validate.js.map +0 -1
- package/dist/commands/verify.js +0 -775
- package/dist/commands/verify.js.map +0 -1
- package/dist/commands/vouch.js +0 -421
- package/dist/commands/vouch.js.map +0 -1
- package/dist/core/agent.js +0 -2173
- package/dist/core/agent.js.map +0 -1
- package/dist/core/agents-stamp.js.map +0 -1
- package/dist/core/arch.js +0 -130
- package/dist/core/arch.js.map +0 -1
- package/dist/core/asyncapi.js.map +0 -1
- package/dist/core/brief.js +0 -755
- package/dist/core/brief.js.map +0 -1
- package/dist/core/coherence.js +0 -577
- package/dist/core/coherence.js.map +0 -1
- package/dist/core/concurrency.js.map +0 -1
- package/dist/core/config.js.map +0 -1
- package/dist/core/delta.js +0 -476
- package/dist/core/delta.js.map +0 -1
- package/dist/core/dependencies.js +0 -356
- package/dist/core/dependencies.js.map +0 -1
- package/dist/core/doctor.js +0 -596
- package/dist/core/doctor.js.map +0 -1
- package/dist/core/document-bytes.js.map +0 -1
- package/dist/core/explore.js.map +0 -1
- package/dist/core/frontmatter.js.map +0 -1
- package/dist/core/gherkin.js +0 -463
- package/dist/core/gherkin.js.map +0 -1
- package/dist/core/health.js +0 -67
- package/dist/core/health.js.map +0 -1
- package/dist/core/ids.js +0 -122
- package/dist/core/ids.js.map +0 -1
- package/dist/core/issue.js +0 -9
- package/dist/core/issue.js.map +0 -1
- package/dist/core/json.js +0 -74
- package/dist/core/json.js.map +0 -1
- package/dist/core/likec4.js +0 -489
- package/dist/core/likec4.js.map +0 -1
- package/dist/core/maturity.js +0 -66
- package/dist/core/maturity.js.map +0 -1
- package/dist/core/openapi-merge.js +0 -552
- package/dist/core/openapi-merge.js.map +0 -1
- package/dist/core/openapi.js.map +0 -1
- package/dist/core/openspec-inventory.js +0 -1440
- package/dist/core/openspec-inventory.js.map +0 -1
- package/dist/core/path-safety.js.map +0 -1
- package/dist/core/provenance.js +0 -787
- package/dist/core/provenance.js.map +0 -1
- package/dist/core/records.js.map +0 -1
- package/dist/core/repo.js +0 -438
- package/dist/core/repo.js.map +0 -1
- package/dist/core/report.js.map +0 -1
- package/dist/core/spec.js +0 -505
- package/dist/core/spec.js.map +0 -1
- package/dist/core/staging.js +0 -890
- package/dist/core/staging.js.map +0 -1
- package/dist/core/status.js +0 -1132
- package/dist/core/status.js.map +0 -1
- package/dist/core/steps.js +0 -72
- package/dist/core/steps.js.map +0 -1
- package/dist/core/verify.js +0 -807
- package/dist/core/verify.js.map +0 -1
- package/dist/core/version.js.map +0 -1
- /package/dist/core/{concurrency.js → kernel/concurrency.js} +0 -0
- /package/dist/core/{records.js → kernel/records.js} +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
service: identity-service
|
|
3
|
+
status: draft
|
|
4
|
+
owner: platform-identity
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# identity-service — runbook
|
|
8
|
+
|
|
9
|
+
Written for whoever is holding the pager at 03:00, so every step below is one a
|
|
10
|
+
stranger to this service can carry out. `loam list` tracks only that this file
|
|
11
|
+
exists; nothing in it is checked, which means the burden of keeping it true is on
|
|
12
|
+
the same PR that changes the behaviour it describes.
|
|
13
|
+
|
|
14
|
+
Read this together with `arch.spec.md`: the two incidents below are the failure
|
|
15
|
+
modes ARCH-KEY-ROTATION and ARCH-INTROSPECT-CACHE exist to prevent, and each
|
|
16
|
+
mitigation here is the manual version of a promise the service is supposed to keep
|
|
17
|
+
on its own.
|
|
18
|
+
|
|
19
|
+
## Deploy
|
|
20
|
+
- Pipeline: `.github/workflows/release.yml` → `deploy-prod`, gated on a manual approval.
|
|
21
|
+
- Config: `config/prod.yaml`; the signing key material is never in it — the service
|
|
22
|
+
reads keys from the key store at startup and gets its store credentials from Vault
|
|
23
|
+
(`secret/identity-service`).
|
|
24
|
+
- Rollout is one instance at a time, and the gate is readiness (below). A key store
|
|
25
|
+
the new revision cannot reach fails readiness and stalls the rollout, which is the
|
|
26
|
+
intended outcome: half a fleet unable to sign is worse than a paused deploy.
|
|
27
|
+
|
|
28
|
+
## Health
|
|
29
|
+
- Liveness: `GET /healthz` — the process answers. Nothing behind it is checked, so
|
|
30
|
+
this never restarts an instance for a dependency's fault.
|
|
31
|
+
- Readiness: `GET /readyz` — the active signing key is loaded and the key store
|
|
32
|
+
answers. An instance that is up and cannot sign must take no traffic; it would
|
|
33
|
+
turn every issuance into a 5xx and burn `token_issue_5xx` for a fault that a
|
|
34
|
+
rolling restart fixes.
|
|
35
|
+
- SLIs and the alert are declared in `health.yaml`; the arch requirement covering
|
|
36
|
+
them is ARCH-ISSUE-HEALTH.
|
|
37
|
+
|
|
38
|
+
## Common incidents
|
|
39
|
+
|
|
40
|
+
### A rotation promoted a key the other instances cannot read
|
|
41
|
+
**Symptom.** Token issuance is fine, and every other service starts rejecting
|
|
42
|
+
tokens: 401s spread across the fleet within seconds of a rotation job running,
|
|
43
|
+
while `token_issue_5xx` stays quiet because *this* service is healthy. The
|
|
44
|
+
consumers are refusing on an introspection verdict of `active: false` — freshly
|
|
45
|
+
minted tokens that this service itself will not vouch for.
|
|
46
|
+
|
|
47
|
+
**Cause.** The new key was promoted to active before every instance could read it
|
|
48
|
+
from the key store, or the previous key was retired inside one token lifetime.
|
|
49
|
+
Either breaks the overlap ARCH-KEY-ROTATION requires: the instance that mints and
|
|
50
|
+
the instance that answers introspection are different processes, and only the key
|
|
51
|
+
store makes them agree.
|
|
52
|
+
|
|
53
|
+
**Mitigation.**
|
|
54
|
+
1. Demote to the previous key: `identityctl keys promote --key <previous-kid>`.
|
|
55
|
+
Tokens already signed with the bad key keep reading inactive; they expire within
|
|
56
|
+
a lifetime and there is nothing to do about them.
|
|
57
|
+
2. Confirm the key store holds both kids, and that a *different* instance than the
|
|
58
|
+
one you are on can verify a token minted with the new kid, before promoting
|
|
59
|
+
anything again.
|
|
60
|
+
3. Do not "fix" it by shortening the token lifetime — that widens the outage.
|
|
61
|
+
|
|
62
|
+
**Prevention.** Write, wait one full token lifetime, then promote. The rotation job
|
|
63
|
+
does this on its own; a manual promotion is the way it gets skipped.
|
|
64
|
+
|
|
65
|
+
### The introspection cache stampeded
|
|
66
|
+
**Symptom.** The key store's connection pool saturates and `token_issue_latency_p99_ms`
|
|
67
|
+
climbs past its SLO — issuance signs from the same store, so a flood of introspection
|
|
68
|
+
misses shows up on the issuance SLI even though issuance is not what changed. Usually
|
|
69
|
+
right after a cache restart, a failover, or a mass revocation that cleared many
|
|
70
|
+
entries at once.
|
|
71
|
+
|
|
72
|
+
**Cause.** Every introspection missed at the same moment and each miss became a
|
|
73
|
+
key store read. The service stays *correct* through this — ARCH-INTROSPECT-CACHE
|
|
74
|
+
requires a miss to produce the same verdict — so what is failing is latency, and
|
|
75
|
+
the cure is to protect the store rather than to bypass the cache.
|
|
76
|
+
|
|
77
|
+
**Mitigation.**
|
|
78
|
+
1. Check the miss rate and the store's pool metrics before touching anything; if
|
|
79
|
+
the pool is not saturated, this is a different incident.
|
|
80
|
+
2. Raise the per-key single-flight window (`introspection.singleflight_ms`) so that
|
|
81
|
+
concurrent misses for one token collapse into one store read.
|
|
82
|
+
3. If the store is already saturated, shed introspection load at the gateway before
|
|
83
|
+
restarting the cache — a cold restart replays the stampede.
|
|
84
|
+
4. Never disable the cache to "get more capacity": every request then reaches the
|
|
85
|
+
store.
|
|
86
|
+
|
|
87
|
+
**Prevention.** Jittered TTLs and single-flight on miss, both of which the cache
|
|
88
|
+
layer owns; a mass revocation should delete entries in batches rather than flush.
|
|
89
|
+
|
|
90
|
+
## Escalation
|
|
91
|
+
- On-call channel: `#identity-oncall`; the alert `token_issue_5xx` pages it directly.
|
|
92
|
+
- Because every service depends on this one, an incident here is announced in
|
|
93
|
+
`#fleet-incidents` as soon as it is confirmed, before it is understood — the
|
|
94
|
+
consumers are the ones who will see the symptom first.
|
|
95
|
+
- Owning team: platform-identity.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
service: identity-service
|
|
3
|
+
status: draft
|
|
4
|
+
owner: platform-identity
|
|
5
|
+
sources:
|
|
6
|
+
- internal/tokens/
|
|
7
|
+
- cmd/
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# identity-service
|
|
11
|
+
|
|
12
|
+
Issues the access tokens every other service in this fleet presents, and answers the
|
|
13
|
+
one question those services cannot answer for themselves: is this token still good?
|
|
14
|
+
This is the **living spec** — the complete current state, the operation on its way
|
|
15
|
+
out included. Feature deltas (ADDED/MODIFIED/REMOVED requirements) merge in here on
|
|
16
|
+
`loam archive`.
|
|
17
|
+
|
|
18
|
+
`status: draft`, and no digest anywhere in the frontmatter: nothing in this directory
|
|
19
|
+
has been vouched. `sources` names the two trees in the service's own repository these
|
|
20
|
+
requirements were written from, so that when `loam validate` runs inside that repo it
|
|
21
|
+
can say whether the code has moved since a human last read it (`sources.current` /
|
|
22
|
+
`sources.stale` / `sources.unvouched`). Writing `status: verified` by hand would be a
|
|
23
|
+
claim about bytes nobody hashed — the exact forgery `loam vouch` exists to make
|
|
24
|
+
impossible, which is why it and it alone writes `sources_digest`, `content_digest`,
|
|
25
|
+
`last_verified` and `vouched_by`.
|
|
26
|
+
|
|
27
|
+
One requirement below, `Answer legacy token validation`, deliberately draws
|
|
28
|
+
`api.requirement-deprecated`: it governs only an operation this service's OpenAPI
|
|
29
|
+
marks `deprecated: true`. That warning is the point — it is how a fleet sees, from
|
|
30
|
+
`loam validate` rather than from a migration wiki, which promised behaviour is being
|
|
31
|
+
retired and has not finished going.
|
|
32
|
+
|
|
33
|
+
## Requirements
|
|
34
|
+
|
|
35
|
+
### Requirement: Issue an access token
|
|
36
|
+
|
|
37
|
+
Requirement-ID: IDN-ISSUE
|
|
38
|
+
The service SHALL issue a signed, expiring access token to a client that presents
|
|
39
|
+
valid credentials, and SHALL refuse every other caller with one indistinguishable
|
|
40
|
+
refusal — a response that reveals which half of the credential was wrong turns the
|
|
41
|
+
token endpoint into a client-enumeration oracle.
|
|
42
|
+
|
|
43
|
+
Operations: issueToken
|
|
44
|
+
Capability: identity/tokens
|
|
45
|
+
Realizes: identity/tokens#IDENTITY-ONE-REFUSAL
|
|
46
|
+
|
|
47
|
+
#### Scenario: A valid client credential is exchanged for a token
|
|
48
|
+
- **Given** a registered client whose secret has not been revoked
|
|
49
|
+
- **When** it posts its credentials to the token endpoint
|
|
50
|
+
- **Then** a token signed by the currently active key is returned
|
|
51
|
+
- **And** the response states the expiry the token was minted with
|
|
52
|
+
|
|
53
|
+
#### Scenario: An unknown client is refused
|
|
54
|
+
- **Given** a client id that was never registered
|
|
55
|
+
- **When** it posts credentials to the token endpoint
|
|
56
|
+
- **Then** the request is refused with 401 and no token is minted
|
|
57
|
+
- **And** the body says only that authentication failed
|
|
58
|
+
|
|
59
|
+
#### Scenario: A revoked secret is refused identically
|
|
60
|
+
- **Given** a registered client whose secret was revoked an hour ago
|
|
61
|
+
- **When** it posts its old credentials to the token endpoint
|
|
62
|
+
- **Then** the request is refused with 401
|
|
63
|
+
- **And** the response is byte-identical to the unknown-client refusal, so the two cases cannot be told apart from outside
|
|
64
|
+
|
|
65
|
+
### Requirement: Introspect a token
|
|
66
|
+
|
|
67
|
+
Requirement-ID: IDN-INTROSPECT
|
|
68
|
+
The service SHALL report, for any token a caller presents, whether it is active now
|
|
69
|
+
and what it grants — computed from revocation state, never from the token's signature
|
|
70
|
+
alone, which stays valid for the whole of a revoked token's remaining lifetime. Only
|
|
71
|
+
callers holding `service/tokens:introspect` SHALL be answered: an introspection
|
|
72
|
+
endpoint open to anything on the network is a token-validity oracle for stolen
|
|
73
|
+
tokens.
|
|
74
|
+
|
|
75
|
+
Operations: introspectToken
|
|
76
|
+
Requires: service/tokens:introspect
|
|
77
|
+
Capability: identity/tokens
|
|
78
|
+
Realizes: identity/tokens#IDENTITY-REVOKE-EVERYWHERE
|
|
79
|
+
|
|
80
|
+
#### Scenario: An active token is described to its caller
|
|
81
|
+
- **Given** a token issued eight minutes ago with a thirty-minute lifetime
|
|
82
|
+
- **When** order-service introspects it
|
|
83
|
+
- **Then** the verdict is active, with the client it was issued to and the scopes it carries
|
|
84
|
+
|
|
85
|
+
#### Scenario: A revoked token reads inactive while its signature still verifies
|
|
86
|
+
- **Given** a token whose client was revoked after issuance
|
|
87
|
+
- **When** the token is introspected
|
|
88
|
+
- **Then** the verdict is inactive
|
|
89
|
+
- **And** no subject or scope is disclosed for it
|
|
90
|
+
|
|
91
|
+
#### Scenario: A caller without the introspection permission is told nothing
|
|
92
|
+
- **Given** a caller whose own token does not hold `service/tokens:introspect`
|
|
93
|
+
- **When** it introspects somebody else's token
|
|
94
|
+
- **Then** the request is refused before any verdict is computed
|
|
95
|
+
- **And** the refusal is the same whether or not the presented token exists, so a caller cannot use the refusal itself to test tokens
|
|
96
|
+
|
|
97
|
+
### Requirement: Answer legacy token validation
|
|
98
|
+
|
|
99
|
+
Requirement-ID: IDN-VALIDATE-LEGACY
|
|
100
|
+
`validateToken` is superseded by `introspectToken` and is kept alive for exactly one
|
|
101
|
+
reason: payment-service still calls it, and the fleet map says so with an op-linked
|
|
102
|
+
edge. Until that consumer migrates, the service SHALL answer the legacy endpoint with
|
|
103
|
+
the same verdict introspection would give — never a cheaper local signature check —
|
|
104
|
+
and SHALL NOT extend it: no new caller, no new field, no new status code. The
|
|
105
|
+
endpoint is retired by a feature delta that removes the operation and this
|
|
106
|
+
requirement together, not by quietly deleting either.
|
|
107
|
+
|
|
108
|
+
Operations: validateToken
|
|
109
|
+
|
|
110
|
+
#### Scenario: The legacy verdict agrees with introspection
|
|
111
|
+
- **Given** a token that introspection reports as active
|
|
112
|
+
- **When** the same token is checked through the legacy endpoint
|
|
113
|
+
- **Then** it is reported valid, with the same expiry introspection gave
|
|
114
|
+
|
|
115
|
+
#### Scenario: A revoked token is not reported valid by the legacy path
|
|
116
|
+
- **Given** a token whose client was revoked after issuance
|
|
117
|
+
- **When** the legacy endpoint is asked about it
|
|
118
|
+
- **Then** it is reported invalid
|
|
119
|
+
- **And** the answer came from revocation state, not from the token's signature
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# The async contract — read-only. Every operation here carries `action: receive`:
|
|
2
|
+
# this service produces no message and exposes no HTTP operation, so the whole of
|
|
3
|
+
# what it promises the fleet is what it does with three topics.
|
|
4
|
+
#
|
|
5
|
+
# AsyncAPI 3.0 only. Its operations are named top-level objects carrying
|
|
6
|
+
# `action: send|receive`, which is what makes a message's direction legible;
|
|
7
|
+
# 2.x spells the same thing as publish/subscribe under a channel, where the two
|
|
8
|
+
# words are ambiguous about whose perspective they take — and a 2.x document
|
|
9
|
+
# reads here as a contract with no messages at all.
|
|
10
|
+
#
|
|
11
|
+
# The name is the spine: the landscape edge's `metadata { consumes }`, the
|
|
12
|
+
# requirement's `Consumes:` line and `name` below are one name spelled three
|
|
13
|
+
# times, and they must be identical. For a consumer the line that grades THIS
|
|
14
|
+
# file is the requirement's — a `Consumes:` naming a message no operation here
|
|
15
|
+
# receives is `spec-event.message-undefined`. The edge's copy answers the other
|
|
16
|
+
# question, the one no single repository can: whether anybody publishes the
|
|
17
|
+
# name at all. Deleting a `Consumes:` line therefore does not move a check onto
|
|
18
|
+
# the landscape, it removes one.
|
|
19
|
+
#
|
|
20
|
+
# WHY THE PAYLOADS ARE HERE AT ALL, and why one of them is different in kind:
|
|
21
|
+
#
|
|
22
|
+
# * `order.OrderPlaced` and `payment.PaymentCaptured` are produced INSIDE the
|
|
23
|
+
# fleet, so order-service's and payment-service's own asyncapi.yaml are the
|
|
24
|
+
# authoritative contracts. What is restated below is the subset this consumer
|
|
25
|
+
# actually reads — enough that the handler is codeable from this file, not a
|
|
26
|
+
# second source of truth for the event.
|
|
27
|
+
#
|
|
28
|
+
# * `crm.CustomerUpdated` is produced by `salesforce`, an `#external` element in
|
|
29
|
+
# the landscape. There is no services/salesforce/, there never will be, and so
|
|
30
|
+
# no producer contract exists anywhere in this docs repo. That is a legal
|
|
31
|
+
# shape — loam recognizes an external producer and does not report
|
|
32
|
+
# `spine.message-unproduced` — but it shifts the contract question onto the
|
|
33
|
+
# only file that can answer it: this one. `spine.message-external` (warn)
|
|
34
|
+
# fires for exactly as long as this document defines no shape for the message,
|
|
35
|
+
# and stops the moment it does. The payload below is therefore not a
|
|
36
|
+
# convenience copy; it IS the fleet's contract for that message, and the
|
|
37
|
+
# reason the finding is absent from this service's validate output.
|
|
38
|
+
asyncapi: 3.0.0
|
|
39
|
+
info:
|
|
40
|
+
title: notification-service events
|
|
41
|
+
version: "1.0"
|
|
42
|
+
|
|
43
|
+
channels:
|
|
44
|
+
orderEvents:
|
|
45
|
+
address: order.events.v1
|
|
46
|
+
description: Order lifecycle events, produced by order-service
|
|
47
|
+
messages:
|
|
48
|
+
OrderPlaced:
|
|
49
|
+
$ref: '#/components/messages/OrderPlaced'
|
|
50
|
+
paymentEvents:
|
|
51
|
+
address: payment.events.v1
|
|
52
|
+
description: Payment lifecycle events, produced by payment-service's outbox relay
|
|
53
|
+
messages:
|
|
54
|
+
PaymentCaptured:
|
|
55
|
+
$ref: "#/components/messages/PaymentCaptured"
|
|
56
|
+
PaymentRefunded:
|
|
57
|
+
$ref: "#/components/messages/PaymentRefunded"
|
|
58
|
+
crmEvents:
|
|
59
|
+
address: crm.events.v1
|
|
60
|
+
description: Customer master-data events, produced by salesforce (outside the fleet)
|
|
61
|
+
messages:
|
|
62
|
+
CustomerUpdated:
|
|
63
|
+
$ref: '#/components/messages/CustomerUpdated'
|
|
64
|
+
|
|
65
|
+
# One operation per message rather than one per channel, so that adding a second
|
|
66
|
+
# message to a topic later is an addition here instead of a silent widening: an
|
|
67
|
+
# operation that lists no messages applies to EVERY message of its channel, and
|
|
68
|
+
# would start receiving contracts nobody read.
|
|
69
|
+
operations:
|
|
70
|
+
receiveOrderPlaced:
|
|
71
|
+
action: receive
|
|
72
|
+
channel:
|
|
73
|
+
$ref: '#/channels/orderEvents'
|
|
74
|
+
messages:
|
|
75
|
+
- $ref: '#/channels/orderEvents/messages/OrderPlaced'
|
|
76
|
+
receivePaymentCaptured:
|
|
77
|
+
action: receive
|
|
78
|
+
channel:
|
|
79
|
+
$ref: '#/channels/paymentEvents'
|
|
80
|
+
messages:
|
|
81
|
+
- $ref: '#/channels/paymentEvents/messages/PaymentCaptured'
|
|
82
|
+
receiveCustomerUpdated:
|
|
83
|
+
action: receive
|
|
84
|
+
channel:
|
|
85
|
+
$ref: '#/channels/crmEvents'
|
|
86
|
+
messages:
|
|
87
|
+
- $ref: '#/channels/crmEvents/messages/CustomerUpdated'
|
|
88
|
+
receivePaymentRefunded:
|
|
89
|
+
action: receive
|
|
90
|
+
channel:
|
|
91
|
+
$ref: "#/channels/paymentEvents"
|
|
92
|
+
messages:
|
|
93
|
+
- $ref: "#/channels/paymentEvents/messages/PaymentRefunded"
|
|
94
|
+
|
|
95
|
+
components:
|
|
96
|
+
messages:
|
|
97
|
+
OrderPlaced:
|
|
98
|
+
# Namespaced by the domain that OWNS the message, never by the service
|
|
99
|
+
# reading it: `order.` says order-service is the one producer, and two
|
|
100
|
+
# services declaring they send this name would be
|
|
101
|
+
# `asyncapi.message-contested` — which contract a consumer reads must not
|
|
102
|
+
# be a coin flip.
|
|
103
|
+
name: order.OrderPlaced
|
|
104
|
+
title: Order placed
|
|
105
|
+
payload:
|
|
106
|
+
type: object
|
|
107
|
+
# A payload declaring no shape — absent, or a bare `type: object` — is
|
|
108
|
+
# `asyncapi.payload-undescribed`: the name joins the spine while nothing
|
|
109
|
+
# says what a handler would read. loam probes for presence and never
|
|
110
|
+
# reads a field, which is what keeps a later move to Avro a
|
|
111
|
+
# `schemaFormat:` line here and no change in loam.
|
|
112
|
+
required: [ orderId, customerId, placedAt ]
|
|
113
|
+
properties:
|
|
114
|
+
orderId:
|
|
115
|
+
type: string
|
|
116
|
+
format: uuid
|
|
117
|
+
description: The idempotency key for the confirmation — one send per orderId
|
|
118
|
+
customerId:
|
|
119
|
+
type: string
|
|
120
|
+
format: uuid
|
|
121
|
+
placedAt:
|
|
122
|
+
type: string
|
|
123
|
+
format: date-time
|
|
124
|
+
PaymentCaptured:
|
|
125
|
+
name: payment.PaymentCaptured
|
|
126
|
+
title: Payment captured
|
|
127
|
+
payload:
|
|
128
|
+
type: object
|
|
129
|
+
required: [ paymentId, orderId, capturedAmount, currency, capturedAt ]
|
|
130
|
+
properties:
|
|
131
|
+
paymentId:
|
|
132
|
+
type: string
|
|
133
|
+
format: uuid
|
|
134
|
+
orderId:
|
|
135
|
+
type: string
|
|
136
|
+
format: uuid
|
|
137
|
+
description: What joins a receipt to the order the customer was told about
|
|
138
|
+
capturedAmount:
|
|
139
|
+
type: integer
|
|
140
|
+
description: minor units, restated on the receipt exactly as captured
|
|
141
|
+
currency:
|
|
142
|
+
type: string
|
|
143
|
+
pattern: '^[A-Z]{3}$'
|
|
144
|
+
capturedAt:
|
|
145
|
+
type: string
|
|
146
|
+
format: date-time
|
|
147
|
+
CustomerUpdated:
|
|
148
|
+
name: crm.CustomerUpdated
|
|
149
|
+
title: Customer contact details updated
|
|
150
|
+
payload:
|
|
151
|
+
type: object
|
|
152
|
+
# `version` is load-bearing rather than descriptive: the CRM redelivers
|
|
153
|
+
# and reorders, and the "out-of-order update is ignored" scenario in
|
|
154
|
+
# spec.md is only implementable because this field is in the contract.
|
|
155
|
+
# Nothing outside this document defines it.
|
|
156
|
+
required: [ customerId, version, updatedAt ]
|
|
157
|
+
properties:
|
|
158
|
+
customerId:
|
|
159
|
+
type: string
|
|
160
|
+
format: uuid
|
|
161
|
+
version:
|
|
162
|
+
type: integer
|
|
163
|
+
description: Monotonic per customer; an update at or below the stored version is
|
|
164
|
+
dropped
|
|
165
|
+
email:
|
|
166
|
+
type: string
|
|
167
|
+
format: email
|
|
168
|
+
phone:
|
|
169
|
+
type: string
|
|
170
|
+
description: E.164; absent when the customer has no phone on record
|
|
171
|
+
updatedAt:
|
|
172
|
+
type: string
|
|
173
|
+
format: date-time
|
|
174
|
+
PaymentRefunded:
|
|
175
|
+
name: payment.PaymentRefunded
|
|
176
|
+
title: Payment refunded
|
|
177
|
+
payload:
|
|
178
|
+
type: object
|
|
179
|
+
required:
|
|
180
|
+
- paymentId
|
|
181
|
+
- orderId
|
|
182
|
+
- refundedAmount
|
|
183
|
+
- currency
|
|
184
|
+
- refundedAt
|
|
185
|
+
properties:
|
|
186
|
+
paymentId:
|
|
187
|
+
type: string
|
|
188
|
+
format: uuid
|
|
189
|
+
orderId:
|
|
190
|
+
type: string
|
|
191
|
+
refundedAmount:
|
|
192
|
+
type: integer
|
|
193
|
+
description: minor units
|
|
194
|
+
currency:
|
|
195
|
+
type: string
|
|
196
|
+
pattern: ^[A-Z]{3}$
|
|
197
|
+
refundedAt:
|
|
198
|
+
type: string
|
|
199
|
+
format: date-time
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Service health model. Targets are authored; the dependency graph comes from C4
|
|
2
|
+
# — this service's own model.likec4, which carries everything the service touches.
|
|
3
|
+
# planned: `loam health` composes these across the fleet -> cascade / blast-radius.
|
|
4
|
+
#
|
|
5
|
+
# `loam validate` reads only ids out of this file: the `name` of each SLI and
|
|
6
|
+
# alert, and each dependency's `service:` id.
|
|
7
|
+
#
|
|
8
|
+
# THERE ARE NO `slis:` AND NO `alerts:` HERE, and the absence is the point of this
|
|
9
|
+
# example. `health.uncovered` asks that every declared signal be named by a
|
|
10
|
+
# `Covers: sli:<id>` / `Covers: alert:<id>` line in the service's living
|
|
11
|
+
# arch.spec.md — so declaring nothing is what makes an arch.spec.md genuinely not
|
|
12
|
+
# owed, and the check has nothing to fire on rather than being suppressed. The
|
|
13
|
+
# honest reading of this file today is "nobody has written this service's SLOs
|
|
14
|
+
# yet": consumer lag and provider failure rate are the two obvious ones, and the
|
|
15
|
+
# day either is declared here it also owes an arch requirement covering it. An
|
|
16
|
+
# absent file would say the same thing more quietly and lose the `checks:` and
|
|
17
|
+
# `dependencies:` below, which on-call reads first.
|
|
18
|
+
service: notification-service
|
|
19
|
+
status: draft
|
|
20
|
+
# Probes, not fleet operations: they carry no operationId, no requirement governs
|
|
21
|
+
# them and no service calls them, which is exactly why they live here and not in
|
|
22
|
+
# an openapi.yaml this service does not owe. Nothing below is read by any check —
|
|
23
|
+
# `checks:` is authored prose for whoever is holding the pager.
|
|
24
|
+
checks:
|
|
25
|
+
liveness: GET /internal/health/liveness
|
|
26
|
+
readiness: GET /internal/health/readiness # consumer group joined + both stores reachable
|
|
27
|
+
dependencies:
|
|
28
|
+
# Resolved against services/notification-service/model.likec4 and never the
|
|
29
|
+
# landscape (`health.dependency-unmodelled` when nothing there answers to the
|
|
30
|
+
# name). The delivery log and the contact store are absent on purpose: both
|
|
31
|
+
# are nested inside the service element and share its lifecycle, so they are
|
|
32
|
+
# blast radius rather than dependency — identity-service's health.yaml states
|
|
33
|
+
# the same rule for its two stores.
|
|
34
|
+
- service: kafka
|
|
35
|
+
criticality: critical # no broker -> no events -> nothing to notify anyone about
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// Per-service C4. Written by an agent from the `loam adopt` brief, then curated.
|
|
2
|
+
//
|
|
3
|
+
// Every .likec4 file is parsed ALONE, so the kinds this document uses have to be
|
|
4
|
+
// declared in this document: a `specification` block here is not a duplicate of
|
|
5
|
+
// the landscape's, it is what makes this file readable without it.
|
|
6
|
+
specification {
|
|
7
|
+
element softwareSystem
|
|
8
|
+
element container
|
|
9
|
+
element database
|
|
10
|
+
// Declared because the consumption edges below point at CHANNELS rather than
|
|
11
|
+
// at the broker. Three edges into one `kafka` box would say only "talks to
|
|
12
|
+
// kafka"; three edges into three topics say which contracts this service is
|
|
13
|
+
// standing on, and they line up one-for-one with the channels in
|
|
14
|
+
// asyncapi.yaml.
|
|
15
|
+
element topic {
|
|
16
|
+
style {
|
|
17
|
+
shape queue
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
model {
|
|
23
|
+
notificationService = softwareSystem 'notification-service' {
|
|
24
|
+
description 'Turns fleet events into customer email and SMS'
|
|
25
|
+
// The binding, not the title, is what ties this element to
|
|
26
|
+
// services/notification-service/. With only a title, renaming the box in a
|
|
27
|
+
// diagram silently detaches every join that runs through it — health.yaml's
|
|
28
|
+
// dependencies, `Covers:` entries, the landscape's service checks.
|
|
29
|
+
metadata {
|
|
30
|
+
service 'notification-service'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
consumer = container 'consumer' {
|
|
34
|
+
description 'Kafka consumer group; one handler per message name'
|
|
35
|
+
technology 'Go'
|
|
36
|
+
}
|
|
37
|
+
sender = container 'sender' {
|
|
38
|
+
description 'Renders a template and hands it to the email/SMS provider'
|
|
39
|
+
technology 'Go'
|
|
40
|
+
}
|
|
41
|
+
// Both stores are nested INSIDE the service and neither is drawn beside it
|
|
42
|
+
// in the landscape: a store with one consumer drawn as a fleet-level peer
|
|
43
|
+
// reads as a system other services may depend on, which is what
|
|
44
|
+
// `landscape.datastore-private` pushes back on. Neither appears in
|
|
45
|
+
// health.yaml's dependencies either — they share this service's lifecycle
|
|
46
|
+
// rather than being something it reaches across a boundary.
|
|
47
|
+
deliveryLog = database 'delivery-log' {
|
|
48
|
+
description 'One row per (message id, channel) — the idempotency key that makes redelivery a no-op — carrying the orderId and customer each send was addressed to, so a receipt can find its order and a capture that arrives first has somewhere to wait'
|
|
49
|
+
technology 'PostgreSQL'
|
|
50
|
+
}
|
|
51
|
+
// The state NTF-CONTACT is entirely about, and it cannot be a corner of the
|
|
52
|
+
// delivery log: that table is keyed by message and holds nothing per
|
|
53
|
+
// customer, so it has no place to put a `version` to compare an update
|
|
54
|
+
// against. Without this element the spec promises a versioned copy of every
|
|
55
|
+
// customer address that the model gives nowhere to live — a divergence no
|
|
56
|
+
// loam check catches, because loam grades that health.yaml's dependencies
|
|
57
|
+
// resolve here and never that the requirements do.
|
|
58
|
+
contacts = database 'contacts' {
|
|
59
|
+
description 'The copy of each customer email and phone this service sends to, with the CRM version that decides whether an arriving update is newer'
|
|
60
|
+
technology 'PostgreSQL'
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
consumer -> deliveryLog 'Claims a delivery before sending'
|
|
64
|
+
consumer -> contacts 'Applies a CRM update only when its version is newer'
|
|
65
|
+
consumer -> sender 'Hands off a rendered notification'
|
|
66
|
+
sender -> contacts 'Reads the address a notification goes to'
|
|
67
|
+
sender -> deliveryLog 'Records delivered / failed'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Everything the service touches belongs in its own model, cross-boundary
|
|
71
|
+
// dependencies included — the landscape carries only the boundary crossing.
|
|
72
|
+
// health.yaml names `kafka` as a critical dependency and that id has to resolve
|
|
73
|
+
// HERE, by element id, `metadata { service }` binding or title
|
|
74
|
+
// (`health.dependency-unmodelled` otherwise); and a model with elements and no
|
|
75
|
+
// edges beside a health.yaml that declares dependencies is `c4.no-relationships`
|
|
76
|
+
// — a service that reaches nothing is almost never true.
|
|
77
|
+
kafka = softwareSystem 'kafka' {
|
|
78
|
+
description 'Event backbone (platform)'
|
|
79
|
+
orderEvents = topic 'order.events'
|
|
80
|
+
paymentEvents = topic 'payment.events'
|
|
81
|
+
crmEvents = topic 'crm.events'
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// The second thing this service reaches across its own boundary, and the one
|
|
85
|
+
// the runbook spends an incident section on: while the provider is down or
|
|
86
|
+
// throttling, nothing is delivered and there is no fallback path. It belongs
|
|
87
|
+
// here for the same reason payment-service's model draws `stripe` — a model
|
|
88
|
+
// that stopped at the broker would show a worker whose only failure mode is
|
|
89
|
+
// lag, which is the half of the picture the on-call graphs already give you.
|
|
90
|
+
provider = softwareSystem 'notification-provider' {
|
|
91
|
+
description 'Third-party email and SMS gateway — quota-limited, and outside this fleet'
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// No `metadata { consumes }` on these edges, and adding it would change
|
|
95
|
+
// nothing: loam reads the event spine off `architecture/landscape.likec4`
|
|
96
|
+
// alone, never off a service model. What resolves a consumed name against
|
|
97
|
+
// asyncapi.yaml is each requirement's `Consumes:` line
|
|
98
|
+
// (`spec-event.message-undefined` when one names a message no `action:
|
|
99
|
+
// receive` operation declares); what the landscape settles is the other
|
|
100
|
+
// half — that somebody, inside the fleet or tagged #external, publishes it.
|
|
101
|
+
// These three edges are here for the picture only, and they earn it: this
|
|
102
|
+
// model, the three channels in asyncapi.yaml and the three topics the runbook
|
|
103
|
+
// names agree, or one of the three is out of date.
|
|
104
|
+
// Drawn topic → consumer, the direction the landscape uses and the one the
|
|
105
|
+
// event spine requires there: `consumes` binds the edge's TARGET, so the same
|
|
106
|
+
// edge drawn the other way round binds to nothing at all.
|
|
107
|
+
kafka.orderEvents -> notificationService.consumer 'OrderPlaced triggers the confirmation'
|
|
108
|
+
kafka.paymentEvents -> notificationService.consumer 'PaymentCaptured triggers the receipt'
|
|
109
|
+
kafka.crmEvents -> notificationService.consumer 'CustomerUpdated refreshes contact details'
|
|
110
|
+
|
|
111
|
+
notificationService.sender -> provider 'Sends email and SMS, and backs off on 429'
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
views {
|
|
115
|
+
view notification_service of notificationService {
|
|
116
|
+
include *
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
service: notification-service
|
|
3
|
+
status: draft
|
|
4
|
+
owner: growth-team
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# notification-service — runbook
|
|
8
|
+
|
|
9
|
+
A consumer-only worker: it serves no traffic, so nothing degrades when it stops — it falls
|
|
10
|
+
behind. Every incident below is a lag or a send failure, never a request error.
|
|
11
|
+
|
|
12
|
+
## Deploy
|
|
13
|
+
- Pipeline: `.gitlab-ci.yml` -> `deploy:prod` (manual gate).
|
|
14
|
+
- Config: `config/`; provider credentials via Vault path `secret/notification-service`.
|
|
15
|
+
- Rolling deploys rebalance the consumer group: expect a lag spike for the length of one
|
|
16
|
+
rebalance, and do not roll again until it has drained.
|
|
17
|
+
|
|
18
|
+
## Health
|
|
19
|
+
- Liveness: `GET /internal/health/liveness`
|
|
20
|
+
- Readiness: `GET /internal/health/readiness` (consumer group joined + both stores reachable)
|
|
21
|
+
- There are no SLOs yet — see the comment at the top of `health.yaml`.
|
|
22
|
+
|
|
23
|
+
## Common incidents
|
|
24
|
+
|
|
25
|
+
### Consumer lag on one topic
|
|
26
|
+
Symptom: notifications arrive late; `kafka_consumergroup_lag` climbs on `order.events.v1`,
|
|
27
|
+
`payment.events.v1` or `crm.events.v1`.
|
|
28
|
+
- Check which partition is behind — a single hot partition is a slow handler, all of them is
|
|
29
|
+
the provider (below) or the delivery log.
|
|
30
|
+
- Redelivery is safe on every topic, for two different reasons: `order.events.v1` and
|
|
31
|
+
`payment.events.v1` because the delivery log is keyed on `(message id, channel)` and a
|
|
32
|
+
replayed partition sends nothing twice, `crm.events.v1` because an update at or below the
|
|
33
|
+
`version` already in the contact store is dropped. Resetting an offset FORWARD is safe on
|
|
34
|
+
none of them — it drops confirmations nobody will re-emit.
|
|
35
|
+
|
|
36
|
+
### Provider throttling
|
|
37
|
+
Symptom: the sender's 429 rate rises and lag follows it on every topic at once.
|
|
38
|
+
- The sender backs off and retries; do not scale the consumer up, which only queues more
|
|
39
|
+
work behind the same provider quota.
|
|
40
|
+
- Confirm the quota with the provider before raising concurrency. Sending faster than the
|
|
41
|
+
quota converts throttling into hard rejections, and a rejected send is a customer who was
|
|
42
|
+
never told.
|
|
43
|
+
- A held receipt (a capture whose order has not arrived — `NTF-RECEIPT`) looks identical in
|
|
44
|
+
the lag graph. Check the held-receipt count before treating it as a provider problem.
|
|
45
|
+
|
|
46
|
+
## Escalation
|
|
47
|
+
On-call channel: `#growth-oncall`. Provider incidents escalate to the vendor's status page
|
|
48
|
+
first — this service has no way to deliver anything while the provider is down.
|