@webex/plugin-meetings 3.12.0-next.15 → 3.12.0-next.150
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/.sdd/manifest.json +1312 -0
- package/.sdd/templates/.source.json +30 -0
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
- package/.sdd/templates/component-repo/template-map.json +112 -0
- package/AGENTS.md +135 -0
- package/ai-docs/ARCHITECTURE.md +207 -0
- package/ai-docs/CONTRACTS.md +267 -0
- package/ai-docs/DATA_MODEL.md +64 -0
- package/ai-docs/GETTING_STARTED.md +73 -0
- package/ai-docs/GLOSSARY.md +56 -0
- package/ai-docs/REVIEW_CHECKLIST.md +45 -0
- package/ai-docs/RULES.md +79 -0
- package/ai-docs/SECURITY.md +74 -0
- package/ai-docs/SERVICE_STATE.md +59 -0
- package/ai-docs/SPEC_INDEX.md +85 -0
- package/ai-docs/TEST_INDEX.md +45 -0
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
- package/ai-docs/patterns/defensive-error-propagation.md +55 -0
- package/ai-docs/patterns/event-scope-emission.md +46 -0
- package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
- package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
- package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
- package/dist/aiEnableRequest/index.js +15 -2
- package/dist/aiEnableRequest/index.js.map +1 -1
- package/dist/annotation/index.js +2 -2
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +99 -4
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/constants.js +37 -10
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +46 -10
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/hashTree/constants.js +4 -1
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1096 -391
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/utils.js +20 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/dataChannelAuthToken.js +75 -15
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interpretation/index.js +55 -12
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +4 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +615 -176
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/types.js +20 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +15 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +7 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1684 -835
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +5 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +37 -3
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +2 -1
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +9 -3
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +300 -128
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +10 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +30 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +7 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +62 -15
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +121 -83
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +2 -2
- package/dist/types/constants.d.ts +13 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +1 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
- package/dist/types/hashTree/utils.d.ts +7 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +106 -8
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +22 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
- package/dist/types/media/properties.d.ts +6 -2
- package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
- package/dist/types/meeting/index.d.ts +176 -11
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +1 -0
- package/dist/types/meeting/util.d.ts +9 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
- package/dist/types/meetings/index.d.ts +40 -19
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +9 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +6 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +3 -0
- package/dist/webinar/index.js +307 -161
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -23
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
- package/src/aiEnableRequest/index.ts +16 -0
- package/src/annotation/ai-docs/annotation-spec.md +236 -0
- package/src/annotation/index.ts +6 -4
- package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +122 -2
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +2 -2
- package/src/constants.ts +21 -3
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
- package/src/controls-options-manager/index.ts +62 -10
- package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
- package/src/hashTree/constants.ts +7 -0
- package/src/hashTree/hashTreeParser.ts +861 -193
- package/src/hashTree/utils.ts +19 -0
- package/src/index.ts +6 -0
- package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
- package/src/interceptors/dataChannelAuthToken.ts +88 -12
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
- package/src/interpretation/index.ts +65 -10
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
- package/src/locus-info/controlsUtils.ts +3 -1
- package/src/locus-info/index.ts +566 -164
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/types.ts +26 -1
- package/src/media/MediaConnectionAwaiter.ts +21 -4
- package/src/media/ai-docs/media-spec.md +267 -0
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +8 -3
- package/src/meeting/ai-docs/meeting-spec.md +401 -0
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +937 -119
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +11 -0
- package/src/meeting/util.ts +51 -7
- package/src/meeting/voicea-meeting.ts +1 -1
- package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
- package/src/meeting-info/meeting-info-v2.ts +10 -4
- package/src/meetings/ai-docs/meetings-spec.md +296 -0
- package/src/meetings/index.ts +200 -80
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/ai-docs/member-spec.md +196 -0
- package/src/member/index.ts +10 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +29 -0
- package/src/members/ai-docs/members-spec.md +256 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/ai-docs/metrics-spec.md +185 -0
- package/src/metrics/constants.ts +6 -0
- package/src/multistream/ai-docs/multistream-spec.md +292 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +119 -28
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
- package/src/reachability/ai-docs/reachability-spec.md +261 -0
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +47 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/ai-docs/reactions-spec.md +198 -0
- package/src/reactions/reactions.type.ts +3 -0
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
- package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/ai-docs/roap-spec.md +241 -0
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/ai-docs/webinar-spec.md +243 -0
- package/src/webinar/index.ts +216 -38
- package/test/unit/spec/aiEnableRequest/index.ts +86 -0
- package/test/unit/spec/annotation/index.ts +3 -3
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +223 -3
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +139 -32
- package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
- package/test/unit/spec/hashTree/utils.ts +37 -0
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interpretation/index.ts +119 -4
- package/test/unit/spec/locus-info/controlsUtils.js +172 -57
- package/test/unit/spec/locus-info/index.js +1014 -58
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +23 -23
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +2811 -117
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +12 -0
- package/test/unit/spec/meeting/utils.js +179 -16
- package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
- package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
- package/test/unit/spec/meetings/index.js +544 -49
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +89 -0
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
- package/test/unit/spec/reachability/index.ts +128 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +332 -31
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: Glossary
|
|
3
|
+
Template-ID: glossary
|
|
4
|
+
Generates: ai-docs/GLOSSARY.md
|
|
5
|
+
Description: Ubiquitous language — domain term → definition → authoritative code location.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-06-30
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Glossary — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this doc; related: `DATA_MODEL.md`, `CONTRACTS.md`.
|
|
13
|
+
> Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
STANDING reference doc. The repo's ubiquitous language: each domain term → a precise definition → where it
|
|
17
|
+
lives in code. Prevents renamed concepts and invented synonyms. Headings are flat; sections preceded by
|
|
18
|
+
`<!-- Include if: ... -->` are kept only when the condition holds. Each section comment gives Capture /
|
|
19
|
+
Avoid / Example. Fill from real code (file path) — never invent a term that isn't used.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
> Read this before naming anything. Use the canonical name exactly; never introduce a synonym. Find a term
|
|
23
|
+
> in code that isn't here? Add it rather than guessing its meaning.
|
|
24
|
+
|
|
25
|
+
## Domain Terms
|
|
26
|
+
<!-- Capture: each term that has a SPECIFIC meaning here → definition + the type/file that owns it + synonyms
|
|
27
|
+
to avoid. Avoid: dictionary definitions or terms with no code anchor. Example: "<Term> | <precise repo meaning>
|
|
28
|
+
| <module>/<file>.ts | not '<ambiguous synonym>'." -->
|
|
29
|
+
| Term | Definition (one or two sentences) | Authoritative location (file/type) | Notes / synonyms to avoid |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| `<term>` | <what it means here> | `<file path>` | <"do not call it X"> |
|
|
32
|
+
|
|
33
|
+
## Abbreviations & Acronyms
|
|
34
|
+
<!-- Capture: every abbreviation the codebase uses, expanded + its meaning here. Avoid: leaving an acronym
|
|
35
|
+
ambiguous across domains. Example: "<ABC> — <Full Expansion> (not '<other possible expansion>')." -->
|
|
36
|
+
| Abbreviation | Expansion | Meaning in this repo |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
|
|
39
|
+
<!-- Include if: the same word means different things in different modules/bounded contexts -->
|
|
40
|
+
## Context-Specific Meanings
|
|
41
|
+
<!-- Capture: where a term legitimately differs by area, each meaning + its boundary. Avoid: merging the two
|
|
42
|
+
meanings. Example: "'<Term>' = <meaning A> in <module-a>/, but = <meaning B> in <module-b>/." -->
|
|
43
|
+
| Term | Context / module | Meaning here |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
|
|
46
|
+
<!-- Include if: the repo has deprecated/renamed concepts still present in older code -->
|
|
47
|
+
## Deprecated / Renamed Terms
|
|
48
|
+
<!-- Capture: old term → current term, why renamed, where the old one still appears. Avoid: silently dropping
|
|
49
|
+
the old name (readers still hit it in old code). Example: "'<OldTerm>' → '<CurrentTerm>'; renamed in <version>; still in <legacy-path>/." -->
|
|
50
|
+
| Old term | Current term | Why renamed | Still appears in |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
|
|
53
|
+
## Maintenance
|
|
54
|
+
<!-- Capture: the rule that keeps this current. Avoid: letting the glossary rot. Example: "New entity/event/
|
|
55
|
+
state → add a term here in the same change." -->
|
|
56
|
+
- When a new domain concept is introduced (new entity, event, state), add it here in the same change.
|
|
57
|
+
- Cross-reference: data entities → `DATA_MODEL.md`; public-surface terms → `CONTRACTS.md`.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: Review-Check Catalog
|
|
3
|
+
Template-ID: review-checklist
|
|
4
|
+
Generates: ai-docs/REVIEW_CHECKLIST.md
|
|
5
|
+
Description: The review checks — 6 core + 4 coverage-conditional + 3 cross-cutting — selected by manifest coverage state.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-06-30
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Review-Check Catalog — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this doc at Review & Merge.
|
|
13
|
+
> Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
STANDING checklist the repo's change reviews run against (Review & Merge). 6 core (always) + 4
|
|
17
|
+
coverage-conditional (by the touched module's manifest coverage state) + 3 cross-cutting (higher risk). Run by a
|
|
18
|
+
DIFFERENT runtime than the generator; findings remain review artifacts until explicitly approved for
|
|
19
|
+
publication. Headings are flat. Each section comment gives Capture / Avoid / Example.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
> Each finding records: severity (Blocking / Important / Medium / Minor), check id, file path, what's wrong,
|
|
23
|
+
> why it matters, a concrete fix. Any Blocking finding fails the gate.
|
|
24
|
+
|
|
25
|
+
## Core checks (always run)
|
|
26
|
+
<!-- Capture: run all six on every change; record a finding per failure with file path + a concrete fix. Avoid:
|
|
27
|
+
vague findings ("improve error handling"). Example: "C3 fail — spec says verifier 43-128, code enforces
|
|
28
|
+
32-128 @auth.ts." -->
|
|
29
|
+
| # | Check | What it verifies | Severity if it fails |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| C1 | Spec-currency + WHAT/WHY | Spec/docs changed in the same change as code; the implementation plan's repo-specific AI Docs Impact matrix entries are complete and closed; every requirement (incl. ADDED) states WHAT and WHY | Blocking |
|
|
32
|
+
| C2 | Contract correctness | Provides/Requires delta is real and complete; no undocumented breaking change to a public surface | Blocking |
|
|
33
|
+
| C3 | Code-vs-spec match | Signatures, data-flow, and architecture claims in the spec match the actual code (file path) | Blocking |
|
|
34
|
+
| C4 | Test adequacy | Each acceptance criterion has a test with a positive AND a negative case; changed-line coverage meets the bar | Important |
|
|
35
|
+
| C5 | Error handling + input validation | Untrusted input validated at boundaries; failure/edge paths handled, not swallowed | Important |
|
|
36
|
+
| C6 | Security baseline | No hardcoded secrets; authz enforced; data-classification/logging rules respected (per `SECURITY.md`) | Blocking |
|
|
37
|
+
|
|
38
|
+
## Coverage-conditional checks (run by the touched module's manifest coverage state)
|
|
39
|
+
<!-- Capture: add these when the manifest coverage state requires code cross-check or characterization
|
|
40
|
+
(or a guarantee is removed/modified). Avoid: skipping the regression guard when changing a weakly covered module. Example: "K1 applies — no characterization
|
|
41
|
+
baseline exists → Blocking until one is added." -->
|
|
42
|
+
| # | Check | When it applies | What it verifies | Severity |
|
|
43
|
+
|---|---|---|---|---|
|
|
44
|
+
| K1 | Regression guard | Modifying a weakly covered module, or any MODIFIED/REMOVED requirement | A characterization baseline exists; invariants the change claims NOT to alter still hold (positive + negative) | Blocking |
|
|
45
|
+
| K2 | Grounding | Weakly covered module | Claims cite real code (file path), not memory; uncovered public surfaces flagged `[NEEDS HUMAN INPUT]` | Important |
|
|
46
|
+
| K3 | Drift threshold | Any tracked module | Module drift is within its status threshold (see `RULES.md` / `coverage-policy.defaults.yaml`) | Important |
|
|
47
|
+
| K4 | Coverage-state accuracy | Coverage-state change proposed | The recorded manifest coverage state matches the evidence; promotion/demotion rules honored | Medium |
|
|
48
|
+
|
|
49
|
+
## Cross-cutting checks (apply at higher risk / autonomy)
|
|
50
|
+
<!-- Capture: add these for high-risk or higher-autonomy changes. Avoid: merging an autonomous change that the
|
|
51
|
+
generator also validated. Example: "X1 — validator ran on the same runtime as the generator → Blocking." -->
|
|
52
|
+
| # | Check | What it verifies | Severity |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| X1 | Cross-model review | The artifact was validated by a different runtime than the one that generated it (generator ≠ validator) | Blocking when required |
|
|
55
|
+
| X2 | Observability | Logs/metrics/alerts adequate for the change; nothing sensitive logged | Medium |
|
|
56
|
+
| X3 | Rollout safety | Feature-flag default is safe; rollback path exists; migration/rollout interlock is correct | Important |
|
|
57
|
+
|
|
58
|
+
## How the set is selected
|
|
59
|
+
<!-- Capture: 6 core always + the coverage-conditional checks matching the touched modules' manifest coverage state + cross-cutting
|
|
60
|
+
for high-risk. Avoid: running only the core set on a risky migration. -->
|
|
61
|
+
1. Always run the 6 core checks.
|
|
62
|
+
2. Add the coverage-conditional checks whose "when it applies" matches the touched modules' manifest coverage state.
|
|
63
|
+
3. Add the cross-cutting checks when the change is high-risk or runs at higher autonomy.
|
|
64
|
+
|
|
65
|
+
## Output
|
|
66
|
+
<!-- Capture: a compliance matrix (check → pass/warn/fail w/ file path) + severity-sorted findings + verdict;
|
|
67
|
+
draft only. Avoid: auto-posting to the PR. Example: verdict "Blocked — 1 Blocking (C3)". -->
|
|
68
|
+
- A compliance matrix + severity-sorted findings + a verdict (Pass / Pass-with-warnings / Blocked).
|
|
69
|
+
Draft only; a human posts.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: RULES
|
|
3
|
+
Template-ID: rules
|
|
4
|
+
Generates: ai-docs/RULES.md
|
|
5
|
+
Description: Enforceable do/don't beyond AGENTS — coverage, autonomy, naming, logging, errors, testing, security, drift, secrets.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-06-30
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Rules — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry, carries the critical rules) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this doc; per-language detail in `rules/<language>/`.
|
|
13
|
+
> Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
STANDING reference doc — the enforceable do/don't rules beyond AGENTS.md's few critical ones. Every rule is
|
|
17
|
+
EXTRACTED from this repo's real reviews/conventions (file path), not generic best practice; defer to the
|
|
18
|
+
linter where it already enforces. Headings are flat; sections preceded by `<!-- Include if: ... -->` are
|
|
19
|
+
kept only when the condition holds. Each section comment gives Capture / Avoid / Example.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
> These rules are checkable. Every MUST rule records its source requirement/risk, verification path,
|
|
23
|
+
> severity, and owner. Name the tool where one enforces a rule; say "review only" plus why otherwise.
|
|
24
|
+
|
|
25
|
+
## Coverage Map (which docs/specs to trust)
|
|
26
|
+
<!-- Capture: per-module coverage state (mirrored from the manifest) + what it implies. Avoid: drifting from the
|
|
27
|
+
manifest. Example: "<module-a>/ manifest state → trust level; <module-b>/ manifest state → code cross-check required." -->
|
|
28
|
+
| Module | Manifest coverage state | What it means here |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `<module>` | <from `.sdd/manifest.json`> | <how strongly the spec can be trusted; whether code cross-check is required> |
|
|
31
|
+
|
|
32
|
+
## Autonomy & Ask-First
|
|
33
|
+
<!-- Capture: what may proceed without asking vs needs confirmation vs never-without-approval, for THIS repo.
|
|
34
|
+
Avoid: blanket autonomy on risky changes. Example: "May: a copy tweak. Ask: a schema change. Never: deploy." -->
|
|
35
|
+
- **May proceed:** <low-risk changes that don't touch contracts/data/security>
|
|
36
|
+
- **Ask first / plan + confirm:** <contract changes, migrations, security surfaces, anything irreversible>
|
|
37
|
+
- **Never without explicit human approval:** <push, deploy, delete data, post to trackers/PRs>
|
|
38
|
+
|
|
39
|
+
## Naming
|
|
40
|
+
<!-- Capture: the real conventions for files/types/functions/events, with one example. Avoid: a generic style
|
|
41
|
+
guide. Example: "Events are past-tense PascalCase: `<ResourceCreated>`, not `<createResource>`." -->
|
|
42
|
+
- <real naming conventions, from the codebase, with an example>
|
|
43
|
+
|
|
44
|
+
## Logging
|
|
45
|
+
<!-- Capture: levels, structured format, correlation/request id, what must NEVER be logged. Avoid: logging PII/
|
|
46
|
+
secrets. Example: "JSON logs; include request_id; never log card numbers or tokens." -->
|
|
47
|
+
- <levels, structured format, correlation id, never-log list (see SECURITY.md)>
|
|
48
|
+
|
|
49
|
+
## Error Handling
|
|
50
|
+
<!-- Capture: the repo's error idiom (exceptions/result types), wrapping/enrichment, user vs internal errors.
|
|
51
|
+
Avoid: swallowing errors or leaking internals to users. Example: "Domain errors are typed Result; map to
|
|
52
|
+
HTTP at the edge; never leak stack traces." -->
|
|
53
|
+
- <error idiom + wrapping + user-facing vs internal>
|
|
54
|
+
|
|
55
|
+
## Imports / Dependencies
|
|
56
|
+
<!-- Capture: import ordering/boundaries, allowed layering, how new deps are vetted. Avoid: cross-layer imports
|
|
57
|
+
or unvetted deps. Example: "domain/ must not import api/; new deps need a lead's approval." -->
|
|
58
|
+
- <import ordering/boundaries, allowed layering, dep-vetting>
|
|
59
|
+
|
|
60
|
+
## Testing
|
|
61
|
+
<!-- Capture: what each change must add (unit + the fitting higher tier), the positive-AND-negative rule, the
|
|
62
|
+
coverage bar, where tests live. Avoid: only-happy-path tests. Example: "Each behavior gets a passing and a
|
|
63
|
+
must-not-fire test; changed-line coverage ≥ 80%." -->
|
|
64
|
+
- <required tests + positive/negative rule + coverage bar + test location>
|
|
65
|
+
|
|
66
|
+
## Security
|
|
67
|
+
<!-- Capture: the repo-specific security must-dos (defer to SECURITY.md for the full posture). Avoid: restating
|
|
68
|
+
all of SECURITY.md. Example: "Validate all input at the edge; authz on every handler; no secrets in code." -->
|
|
69
|
+
- <repo-specific must-dos; pointer to SECURITY.md>
|
|
70
|
+
|
|
71
|
+
## Spec-Currency & Drift Thresholds
|
|
72
|
+
<!-- Capture: the same-change spec rule + the drift thresholds per manifest coverage state. Avoid: merging code without updating
|
|
73
|
+
the spec. Example: "manifest state A ≤5% drift; manifest state B ≤15%; manifest state C ≤25%." -->
|
|
74
|
+
- Update the spec/docs in the SAME change as the code (spec-currency).
|
|
75
|
+
- Drift thresholds: mirror `.sdd/coverage-policy.defaults.yaml` or the repo's stricter manifest policy.
|
|
76
|
+
|
|
77
|
+
## Secrets Policy
|
|
78
|
+
<!-- Capture: where secrets come from + the never-log/never-commit rule. Avoid: any hardcoded secret. Example:
|
|
79
|
+
"Secrets from the manager at boot; CI secret-scans; build fails on a detected secret." -->
|
|
80
|
+
- No hardcoded secrets/tokens/keys/connection strings — ever. Source from <secret store>; never log them.
|
|
81
|
+
|
|
82
|
+
<!-- Include if: the repo is concurrent/async/reactive -->
|
|
83
|
+
## Concurrency & Async
|
|
84
|
+
<!-- Capture: what must be non-blocking, ordering guarantees, idempotency expectations. Avoid: blocking the
|
|
85
|
+
event loop / assuming single delivery. Example: "Handlers idempotent (keyed by event id); no blocking I/O on the loop." -->
|
|
86
|
+
- <threading/reactive rules, ordering, idempotency>
|
|
87
|
+
|
|
88
|
+
<!-- Include if: the repo runs automated ticket-to-change or strict-compliance processes -->
|
|
89
|
+
## Strict-Compliance Mode
|
|
90
|
+
<!-- Capture: when blocking gates apply, retry caps, stop-on-violation. Avoid: silent retries past the cap.
|
|
91
|
+
Example: "In auto-runs: stop on first MUST violation; max 3 retries; then escalate." -->
|
|
92
|
+
- <when blocking gates apply, retry caps, stop-on-violation behavior>
|
|
93
|
+
|
|
94
|
+
## Maintenance
|
|
95
|
+
- Add a rule when a review correction recurs; remove it when a lint rule starts enforcing it.
|
|
96
|
+
- Cross-reference: patterns → `patterns/`; per-language → `rules/<language>/`.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: Security Baseline
|
|
3
|
+
Template-ID: security
|
|
4
|
+
Generates: ai-docs/SECURITY.md
|
|
5
|
+
Description: Standing security posture — trust boundaries, authn/authz, secret handling, data classification.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-07-11
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Security Baseline — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this doc; module-specific security behavior lives in each owning module spec.
|
|
13
|
+
> Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
STANDING reference doc — the security posture an agent must respect on EVERY change (distinct from a
|
|
17
|
+
change-specific threat review). Document what the repo ACTUALLY enforces today (file path), not aspirations;
|
|
18
|
+
mark gaps `[NEEDS HUMAN INPUT]`. Headings are flat; sections preceded by `<!-- Include if: ... -->` are
|
|
19
|
+
kept only when the condition holds. Each section comment gives Capture / Avoid / Example.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
> Read before changing anything that touches input, identity, data, or external calls. Don't weaken a
|
|
23
|
+
> documented control without an explicit, approved decision (record it as an ADR).
|
|
24
|
+
|
|
25
|
+
## Trust Boundaries
|
|
26
|
+
<!-- Capture: each point where untrusted input crosses in, and what's enforced at the crossing. Avoid: assuming
|
|
27
|
+
internal == trusted. Example: "Public API edge | internet caller | service | JWT verify + schema validate." -->
|
|
28
|
+
| Boundary | Untrusted side | Trusted side | What is enforced at the crossing |
|
|
29
|
+
|---|---|---|---|
|
|
30
|
+
| <e.g. public API edge> | <caller> | <service> | <authn, input validation, rate limit> |
|
|
31
|
+
|
|
32
|
+
## Authentication & Authorization Model
|
|
33
|
+
<!-- Capture: how identity is established and how access decisions are made, each with where enforced (file path).
|
|
34
|
+
Avoid: per-endpoint ad-hoc checks with no central model. Example: "JWT verified in middleware/auth.ts;
|
|
35
|
+
RBAC checked in each handler via requireRole()." -->
|
|
36
|
+
- **Authentication:** <mechanism + where verified> (`<file path>`)
|
|
37
|
+
- **Authorization:** <model (RBAC/ABAC/ownership) + where enforced> (`<file path>`)
|
|
38
|
+
- **Default posture:** <deny-by-default? where the default lives>
|
|
39
|
+
|
|
40
|
+
## Secret & Credential Handling
|
|
41
|
+
<!-- Capture: where secrets come from, how they're injected, rotation policy. Avoid: secrets in code/env files/
|
|
42
|
+
logs. Example: "From the secret manager at boot; never in source; rotated 90d." -->
|
|
43
|
+
- Secrets source: <vault / KMS / secret store — never source code>
|
|
44
|
+
- Injection: <how the running code obtains them>
|
|
45
|
+
- Rotation: <policy, or `[NEEDS HUMAN INPUT]`>
|
|
46
|
+
- **Hard rule:** never commit secrets, tokens, keys, or connection strings; never log them.
|
|
47
|
+
|
|
48
|
+
## Data Classification & Handling
|
|
49
|
+
<!-- Capture: the data classes handled + the storage/logging/transit rule per class. Avoid: logging PII or
|
|
50
|
+
storing it unencrypted. Example: "PII (email) | encrypted at rest | never logged | TLS in transit." -->
|
|
51
|
+
| Data class | Examples | Storage rule | Logging rule | In transit |
|
|
52
|
+
|---|---|---|---|---|
|
|
53
|
+
| <e.g. PII> | <fields> | <encrypted at rest?> | <never log / masked> | <TLS> |
|
|
54
|
+
|
|
55
|
+
## Input Validation & Output Encoding Posture
|
|
56
|
+
<!-- Capture: the repo-wide expectation for untrusted input and rendered/serialized output. Avoid: trusting
|
|
57
|
+
client input or string-concatenating queries. Example: "Validate at the boundary (allow-list); parameterize
|
|
58
|
+
all SQL; encode output for its sink." -->
|
|
59
|
+
- Validate at the boundary (allow-list where possible); parameterize queries/commands; encode output for its sink.
|
|
60
|
+
|
|
61
|
+
<!-- Include if: the repo exposes a network/HTTP API or web surface -->
|
|
62
|
+
## Transport & Headers
|
|
63
|
+
<!-- Capture: TLS, security headers, CORS/CSRF posture (file path). Avoid: permissive CORS (*) on authed routes.
|
|
64
|
+
Example: "HTTPS only + HSTS; CORS allow-list in config/cors.ts; CSRF tokens on state-changing routes." -->
|
|
65
|
+
- HTTPS/TLS everywhere; relevant security headers; CORS/CSRF posture (`<file path>`).
|
|
66
|
+
|
|
67
|
+
<!-- Include if: the repo handles sessions or cookies -->
|
|
68
|
+
## Session & Cookie Posture
|
|
69
|
+
<!-- Capture: session id generation, cookie flags, timeout/rotation. Avoid: tokens in localStorage; missing
|
|
70
|
+
HttpOnly. Example: "CSPRNG id; Secure+HttpOnly+SameSite=Strict; rotate on login; 30m idle timeout." -->
|
|
71
|
+
- Session id generation, cookie flags (Secure/HttpOnly/SameSite), timeout/rotation policy.
|
|
72
|
+
|
|
73
|
+
<!-- Include if: the repo has known security-sensitive areas or accepted risks -->
|
|
74
|
+
## Known Sensitive Areas & Accepted Risks
|
|
75
|
+
<!-- Capture: each sensitive area, its risk, the mitigation/why-accepted, the owner. Avoid: an undocumented
|
|
76
|
+
accepted risk. Example: "Legacy import endpoint | no rate limit | behind VPN only | @platform." -->
|
|
77
|
+
| Area | Risk | Mitigation / why accepted | Owner |
|
|
78
|
+
|---|---|---|---|
|
|
79
|
+
|
|
80
|
+
## Reporting & Review
|
|
81
|
+
<!-- Capture: who reviews security changes + where to report vulnerabilities. Avoid: no defined path. -->
|
|
82
|
+
- Security-relevant changes require <review path>. Suspected vulnerabilities: <where to report>.
|
|
83
|
+
- Cross-reference: module-specific security behavior lives in the owning module spec and native
|
|
84
|
+
threat-model or security-review source when one exists.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: Service State (living)
|
|
3
|
+
Template-ID: service-state
|
|
4
|
+
Generates: ai-docs/SERVICE_STATE.md
|
|
5
|
+
Description: Living as-built registry — current endpoints/events/stores/deps/limits/metrics/flags; read first to avoid duplicates.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-06-30
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Service State (living) — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Read this FIRST before adding a surface; stable contracts in `CONTRACTS.md`.
|
|
13
|
+
> Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
STANDING, LIVING current-state registry — the as-built snapshot of what this service exposes and depends on
|
|
17
|
+
RIGHT NOW. Read FIRST before adding an endpoint/event/dependency, to avoid duplicating or breaking it.
|
|
18
|
+
Describes reality, not intent. Headings are flat; sections preceded by `<!-- Include if: ... -->` are kept
|
|
19
|
+
only when the condition holds. Each section comment gives Capture / Avoid / Example. Fill from real
|
|
20
|
+
code/config (file path) at the current SHA.
|
|
21
|
+
-->
|
|
22
|
+
|
|
23
|
+
> Source of truth for "does X already exist?" Keep current in the same change that adds/removes a surface.
|
|
24
|
+
|
|
25
|
+
<!-- Include if: the service exposes endpoints -->
|
|
26
|
+
## Current Endpoints
|
|
27
|
+
<!-- Capture: every endpoint that exists now — method+path, handler, auth/scope, gating flag. Avoid: listing a
|
|
28
|
+
planned endpoint. Example: "GET /<resource> | <ResourceController>.list | read:<resource> | (no flag)." -->
|
|
29
|
+
| Method + path | Handler / controller | Auth / scope | Feature flag (if any) |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
|
|
32
|
+
<!-- Include if: the service publishes or consumes events -->
|
|
33
|
+
## Current Events
|
|
34
|
+
<!-- Capture: each event in/out now + producer/consumer + payload ref. Avoid: omitting direction. Example:
|
|
35
|
+
"<ResourceCreated> | publish | <module> | events/<resource>.ts." -->
|
|
36
|
+
| Event / topic | Direction | Producer/consumer | Payload ref |
|
|
37
|
+
|---|---|---|---|
|
|
38
|
+
|
|
39
|
+
<!-- Include if: the service owns or uses data stores -->
|
|
40
|
+
## Data Stores
|
|
41
|
+
<!-- Capture: each store, its purpose, and whether THIS service owns it. Avoid: claiming ownership of a shared
|
|
42
|
+
store. Example: "<datastore> `<resource_table>` | <resource> records | owned: yes." -->
|
|
43
|
+
| Store | Purpose | Owned by this service? |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
|
|
46
|
+
## External Dependencies
|
|
47
|
+
<!-- Capture: each outbound dependency + resilience (timeout/retry, breaker/fallback). Avoid: a dependency with
|
|
48
|
+
no timeout. Example: "<external-service> | <lookup purpose> | 2s timeout, 3 retries | breaker → last-good cache." -->
|
|
49
|
+
| Dependency | Used for | Timeout / retry | Circuit breaker / fallback |
|
|
50
|
+
|---|---|---|---|
|
|
51
|
+
|
|
52
|
+
<!-- Include if: the service enforces rate limits / quotas -->
|
|
53
|
+
## Rate Limits & Quotas
|
|
54
|
+
<!-- Capture: each limited surface + the limit + its scope. Avoid: an undocumented limit that surprises callers.
|
|
55
|
+
Example: "POST /<resource> | 100/min | per API key." -->
|
|
56
|
+
| Surface | Limit | Scope (per user/tenant/global) |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
|
|
59
|
+
<!-- Include if: the service has defined SLOs / performance targets -->
|
|
60
|
+
## Key Metrics & Performance Targets
|
|
61
|
+
<!-- Capture: the signals that matter + their target + where measured. Avoid: vanity metrics with no target.
|
|
62
|
+
Example: "p99 latency | < 200ms | dashboard X." -->
|
|
63
|
+
| Signal | Target | Where measured |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
|
|
66
|
+
## Feature Flags (current)
|
|
67
|
+
<!-- Capture: each live flag — what it gates, current default, owner, removal condition. Avoid: re-adding or
|
|
68
|
+
mis-defaulting an existing flag. Example: "<newCapability> | new capability path | OFF | <owner> | remove after GA." -->
|
|
69
|
+
| Flag | Gates | Current default | Owner | Safe to remove when |
|
|
70
|
+
|---|---|---|---|---|
|
|
71
|
+
|
|
72
|
+
<!-- Include if: the service holds compliance certifications/obligations worth surfacing -->
|
|
73
|
+
## Compliance / Certifications
|
|
74
|
+
<!-- Capture: the obligations an agent must not regress. Avoid: omitting a regulated constraint. Example:
|
|
75
|
+
"PCI scope: card data never logged or stored in plaintext." -->
|
|
76
|
+
- <relevant obligations an agent must not regress>
|
|
77
|
+
|
|
78
|
+
## Maintenance
|
|
79
|
+
<!-- Capture: update the relevant row in the SAME change that alters a surface/dep/limit/flag. Avoid: letting
|
|
80
|
+
the registry drift from reality. -->
|
|
81
|
+
- Update the relevant row in the same change that adds/changes/removes a surface, dependency, limit, or flag.
|
|
82
|
+
- Cross-reference: stable contracts → `CONTRACTS.md`; entities → `DATA_MODEL.md`; security posture → `SECURITY.md`.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: Spec Index
|
|
3
|
+
Template-ID: spec-index
|
|
4
|
+
Generates: ai-docs/SPEC_INDEX.md
|
|
5
|
+
Description: Router — which docs to load for which task and the canonical module registry.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-07-31
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Spec Index — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry). This file is the router (generated at `ai-docs/SPEC_INDEX.md`); system overview in [`ARCHITECTURE.md`](ARCHITECTURE.md). Load `AGENTS.md` + this file first; pull every other doc on demand.
|
|
13
|
+
> Context-efficiency: link to canonical docs — don't duplicate them; route to the minimum needed per task.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
ROOT FILE 3 of 3. The ROUTER — tells an agent which docs to load for which task; holds the module
|
|
17
|
+
registry and incident-history reference rows. Human-readable mirror of
|
|
18
|
+
.sdd/manifest.json. Headings are flat; sections preceded by `<!-- Include if: ... -->` are kept only when
|
|
19
|
+
the condition holds. Each section comment gives Capture / Avoid / Example.
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
> AI agent entry point after `AGENTS.md`. Load this once at session start; pull other docs on demand.
|
|
23
|
+
> **Source of truth:** `.sdd/manifest.json` (this file mirrors it for humans).
|
|
24
|
+
|
|
25
|
+
## Module Registry
|
|
26
|
+
<!-- Capture: one row per module mirroring the manifest — responsibility, manifest coverage state, and
|
|
27
|
+
the module spec link. Module-specific details live in the single module spec, so this router stays
|
|
28
|
+
compact. Avoid: drifting from .sdd/manifest.json (it is authoritative).
|
|
29
|
+
|
|
30
|
+
NESTING: modules form a tree. Show depth with one `↳ ` prefix per level BEFORE the backticked path,
|
|
31
|
+
never inside it, and keep rows in depth-first order so each child follows its parent. Depth must
|
|
32
|
+
increase by at most one per row — a jump means a parent row is missing. Keep the table at four
|
|
33
|
+
columns; depth lives in the Module cell, not a fifth column. A top-level module carries no prefix.
|
|
34
|
+
|
|
35
|
+
A child's path always BEGINS WITH its parent's path, but the two need not be adjacent: source-layout
|
|
36
|
+
directories that are not themselves modules (`src/`, `main/`, `java/`, `res/`…) sit in between and are
|
|
37
|
+
written out in full. They do not add depth — one `↳ ` per MODULE level, never one per path segment. So
|
|
38
|
+
a module at `billing/src/main/java/ledger/` whose nearest module ancestor is `billing/` is depth 1 and
|
|
39
|
+
takes a single marker.
|
|
40
|
+
Example:
|
|
41
|
+
"`<module>/` | <responsibility> | manifest state | `<module-path>/ai-docs/<module-name>-spec.md`
|
|
42
|
+
↳ `<module>/src/main/<child>/` | <what the child owns> | manifest state | `<module>/src/main/<child>/ai-docs/<child>-spec.md`" -->
|
|
43
|
+
| Module | Responsibility | Manifest coverage state | Start here |
|
|
44
|
+
|---|---|---|---|
|
|
45
|
+
| `<module>/` | <one line> | <from `.sdd/manifest.json`> | `<module-path>/ai-docs/<module-name>-spec.md` |
|
|
46
|
+
| ↳ `<module>/.../<child>/` | <one line> | <from `.sdd/manifest.json`> | `<module>/.../<child>/ai-docs/<child>-spec.md` |
|
|
47
|
+
|
|
48
|
+
## Task Routing
|
|
49
|
+
<!-- Capture: for each kind of work, exactly which docs to load (keep token usage low). Avoid: "load
|
|
50
|
+
everything". Example: "Working in a module → that module's spec; load the relevant section only." -->
|
|
51
|
+
| If the task is… | Load |
|
|
52
|
+
|---|---|
|
|
53
|
+
| Understanding the system | `ARCHITECTURE.md` |
|
|
54
|
+
| Working in `<module>` | `<module-path>/ai-docs/<module-name>-spec.md` |
|
|
55
|
+
| A cross-service contract change | the relevant contract docs + `ARCHITECTURE.md` interaction section |
|
|
56
|
+
| Running or changing tests | `TEST_INDEX.md` + the affected module spec or feature test strategy |
|
|
57
|
+
| Updating docs after a code change | affected module specs + relevant standing indexes/contracts |
|
|
58
|
+
| Migrating existing specs | manifest source routes + affected module specs + source-fidelity report |
|
|
59
|
+
|
|
60
|
+
## Incident History
|
|
61
|
+
<!-- Capture: a one-line REFERENCE row per incident with a link to the full RCA (ticket/wiki). Avoid: pasting
|
|
62
|
+
full RCAs here. Example: "INC-3014 | 2026-05-02 | <module>/ | <failure mode> | <link>". -->
|
|
63
|
+
| INC id | Date | Module | One-line | Link |
|
|
64
|
+
|---|---|---|---|---|
|
|
65
|
+
| <INC-xxxx> | <YYYY-MM-DD> | `<module>/` | <what happened> | <url> |
|
|
66
|
+
|
|
67
|
+
<!-- Include if: the repo is large enough that phase-based on-demand spec loading is worthwhile -->
|
|
68
|
+
## Phase-Based Loading Protocol
|
|
69
|
+
<!-- Capture: which docs to load per phase to bound token usage. Avoid: front-loading every spec. Example:
|
|
70
|
+
"Orient → AGENTS + this file; Build → the one module spec + its rules." -->
|
|
71
|
+
| Phase | Load |
|
|
72
|
+
|---|---|
|
|
73
|
+
| Orient | AGENTS.md + this file |
|
|
74
|
+
| Specify | relevant module docs and routed source specs |
|
|
75
|
+
| Build | the selected module SPEC(s) + patterns/rules |
|
|
76
|
+
| Verify | independent validation |
|
|
77
|
+
*Token-budget table and strict-compliance loading go here if the repo runs automated ticket-to-change processes.*
|
|
78
|
+
|
|
79
|
+
## Spec Registry
|
|
80
|
+
<!-- Capture: where each standing doc lives so an agent can route to it. Avoid: linking docs that don't exist
|
|
81
|
+
in this repo — drop rows that don't apply. Example: keep DATA_MODEL only if the repo owns data. -->
|
|
82
|
+
| Doc | Location | Purpose |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| Patterns | `patterns/` (+ `<lang>/`) | repo conventions, correct vs incorrect |
|
|
85
|
+
| Rules | `RULES.md` + `rules/` (+ `<language>/`) | enforceable do/don't beyond AGENTS.md critical rules |
|
|
86
|
+
| Glossary | `GLOSSARY.md` | ubiquitous language: term → definition → code location |
|
|
87
|
+
| Security | `SECURITY.md` | trust boundaries, authn/authz, secret handling, data classification |
|
|
88
|
+
| Contracts | `CONTRACTS.md` | root index of public-surface contracts; details live at owning modules or native contract sources |
|
|
89
|
+
| Data model | `DATA_MODEL.md` | entities, ownership, relationships, migration discipline (if the repo owns data) |
|
|
90
|
+
| Service state | `SERVICE_STATE.md` | living as-built registry — read first to avoid duplicate/breaking surfaces |
|
|
91
|
+
| Test index | `TEST_INDEX.md` | test tiers, canonical commands, locations, frameworks, dependencies, and quality gates |
|
|
92
|
+
| Getting started | `GETTING_STARTED.md` | clone/build/run + multi-repo workspace layout |
|
|
93
|
+
| Decision records | `adr/` | standing ADRs — why the architecture is the way it is |
|
|
94
|
+
| Review catalog | `REVIEW_CHECKLIST.md` | the 6-core + 4-coverage + 3-cross-cutting review checks |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!-- ───────────────────────────────
|
|
2
|
+
Template: Test Index
|
|
3
|
+
Template-ID: test-index
|
|
4
|
+
Generates: ai-docs/TEST_INDEX.md
|
|
5
|
+
Description: Repo-wide test surface — tiers, commands (by role), directories, frameworks, and coverage gate — routing to where cases live.
|
|
6
|
+
Library ver: 0.2.2
|
|
7
|
+
Last updated: 2026-07-22
|
|
8
|
+
─────────────────────────────── -->
|
|
9
|
+
|
|
10
|
+
# Test Index — <repo name>
|
|
11
|
+
|
|
12
|
+
> Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). This doc is the repo-wide map of the test surface.
|
|
13
|
+
> Context-efficiency: this is an INDEX, not a case list. It links to where cases live — it does not duplicate them.
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
STANDING reference doc — the one place to understand the whole test surface of the repository: which
|
|
17
|
+
test tiers exist, the command role that runs each, where the tests live, the framework, external
|
|
18
|
+
dependencies, and the enforced coverage/quality gate. It is mirrored from the machine-readable
|
|
19
|
+
`.sdd/manifest.json` (`commands`, `tests`, `quality_gates`) and MUST NOT restate the actual test cases:
|
|
20
|
+
- per-module unit-test detail lives in each module spec's "Test-Case Strategy (module)" section;
|
|
21
|
+
- per-feature/system test detail lives in the feature test strategy at
|
|
22
|
+
`features/<KEY>/test-strategy.md`.
|
|
23
|
+
Headings are flat; sections preceded by `<!-- Include if: ... -->` are kept only when the condition
|
|
24
|
+
holds. Each section comment gives Capture / Avoid / Example. Fill every command/dir/framework from the
|
|
25
|
+
real build config (file path) — never guess.
|
|
26
|
+
-->
|
|
27
|
+
|
|
28
|
+
## Test Surface
|
|
29
|
+
<!-- Capture: one row per test tier the repo actually runs, mirrored from the manifest `tests` block and
|
|
30
|
+
`commands` (by role). Name the command by its role so a reader/workflow runs the right one; give the
|
|
31
|
+
directory and framework from the real test setup; list external dependencies the tier needs (e.g.
|
|
32
|
+
containers). Avoid: inventing a tier the repo doesn't have, or defaulting to a web/JS framework when
|
|
33
|
+
the repo isn't web. Example: "Unit | mvn -pl '!test' test | src/test | JUnit 5 | none". -->
|
|
34
|
+
| Tier | Command (role) | Test directory | Framework | External deps |
|
|
35
|
+
|---|---|---|---|---|
|
|
36
|
+
| Unit | `<unit-test cmd>` | `<dir>` | `<framework>` | <none / list> |
|
|
37
|
+
| Integration | `<integration-test cmd>` | `<dir>` | `<framework>` | <e.g. docker: postgres, redis> |
|
|
38
|
+
| E2E / System | `<e2e cmd>` | `<dir>` | `<framework>` | <deps> |
|
|
39
|
+
|
|
40
|
+
## Where the Cases Live
|
|
41
|
+
<!-- Capture: the routing so a reader finds the actual cases without this doc duplicating them. Avoid:
|
|
42
|
+
copying test cases here. -->
|
|
43
|
+
- **Unit test cases** → each module's spec, "Test-Case Strategy (module)" section (see `SPEC_INDEX.md` for the module registry).
|
|
44
|
+
- **Integration / E2E / scale / security / resiliency / QA cases** → the per-feature test strategy at `features/<KEY>/test-strategy.md`.
|
|
45
|
+
|
|
46
|
+
<!-- Include if: the repo enforces a coverage / static-analysis / lint gate -->
|
|
47
|
+
## Coverage / Quality Gate
|
|
48
|
+
<!-- Capture: the enforced gate, mirrored from the manifest `quality_gates.code_coverage`: the minimum,
|
|
49
|
+
what it measures (Sonar / lint / unit-test coverage), whether it applies to the whole codebase or
|
|
50
|
+
changed lines, and where it is enforced. This gate often lives outside the repo build (Sonar/CI/org
|
|
51
|
+
policy); record it as stated by the repo owner, not a guessed default. Avoid: implying a platform
|
|
52
|
+
default is a repo rule, or claiming a gate the repo doesn't enforce. Example: "≥ 85% (Sonar), changed
|
|
53
|
+
lines, enforced in CI." -->
|
|
54
|
+
- Minimum: `<n>%` · Measures: <sonar / lint / unit-test> · Applies to: <whole codebase / changed lines> · Enforced in: <where>.
|
|
55
|
+
|
|
56
|
+
## QA Dependencies & Environments
|
|
57
|
+
<!-- Capture: standing test-environment or external-team dependencies the repo's testing relies on, and
|
|
58
|
+
where manual/QA cases are tracked. Avoid: assuming a test environment is always available. Example:
|
|
59
|
+
"staging bulk-data set for load tests; manual QA cases tracked in the QA tracker project." -->
|
|
60
|
+
- <standing test env / external dependency / manual-QA tracker location — or "none">
|
|
61
|
+
|
|
62
|
+
## Where to Go Next
|
|
63
|
+
- Agent entry: `../AGENTS.md` · System shape: `ARCHITECTURE.md` · Routing: `SPEC_INDEX.md`
|
|
64
|
+
- Machine source of truth: `.sdd/manifest.json` (`commands`, `tests`, `quality_gates`).
|