@danmoisan/drm-copilot-mcp 1.0.26 → 1.0.27
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/out/mcp-server.js +542 -41
- package/package.json +1 -1
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +109 -5
- package/resources/claude-customizations/.claude/hooks/enforce-mermaid-validation.ps1 +390 -0
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadius.psm1 +105 -2
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusConfig.psm1 +32 -52
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusExtraction.psm1 +107 -99
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusNormalization.psm1 +295 -0
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusValidation.psm1 +9 -3
- package/resources/claude-customizations/.claude/lib/mermaid/MermaidGrammar.psm1 +491 -0
- package/resources/claude-customizations/.claude/lib/mermaid/MermaidLineScanner.psm1 +488 -0
- package/resources/claude-customizations/.claude/lib/mermaid/MermaidMarkdownFences.psm1 +298 -0
- package/resources/claude-customizations/.claude/lib/mermaid/MermaidValidation.psm1 +496 -0
- package/resources/claude-customizations/.claude/rules/mermaid.md +142 -0
- package/resources/claude-customizations/.claude/rules/parallel-orchestration.md +61 -1
- package/resources/claude-customizations/.claude/rules/plan-acceptance-gates.md +116 -0
- package/resources/claude-customizations/.claude/settings.json +5 -0
- package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +15 -0
- package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +13 -0
- package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +6 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/SKILL.md +184 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/c4.md +50 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/class.md +63 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/er.md +56 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/flowchart.md +68 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/gantt.md +51 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/other-types.md +82 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/pie.md +32 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/sequence.md +63 -0
- package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/state.md +49 -0
- package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +8 -7
- package/resources/claude-customizations/.claude/skills/parallel-plan/SKILL.md +24 -4
- package/resources/claude-customizations/config/blast-radius.json +8 -0
- package/resources/claude-customizations/pack-manifests/core.json +19 -1
- package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +13 -0
- package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
- package/resources/customizations/.github/skills/evidence-and-timestamp-conventions/SKILL.md +13 -0
- package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +16 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Entity Relationship Diagram Syntax Reference
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Source: `https://mermaid.js.org/syntax/entityRelationshipDiagram.html`.
|
|
4
|
+
When a construct is absent here, `WebFetch` that page and confirm the form before generating.
|
|
5
|
+
|
|
6
|
+
## First-line keyword form
|
|
7
|
+
|
|
8
|
+
`erDiagram`.
|
|
9
|
+
|
|
10
|
+
## Cardinality tokens
|
|
11
|
+
|
|
12
|
+
A relationship token is `<left><line><right>`.
|
|
13
|
+
|
|
14
|
+
| Position | Options |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| left | `\|o` (zero or one), `\|\|` (exactly one), `}o` (zero or more), `}\|` (one or more) |
|
|
17
|
+
| line | `--` (identifying), `..` (non-identifying) |
|
|
18
|
+
| right | `o\|` (zero or one), `\|\|` (exactly one), `o{` (zero or more), `\|{` (one or more) |
|
|
19
|
+
|
|
20
|
+
Common complete forms: `||--||`, `||--o{`, `}o--o{`, `}|--|{`, `|o..o|`, `}|..|{`.
|
|
21
|
+
|
|
22
|
+
Word aliases are also accepted in place of the token: `one or zero`, `zero or more`, `only one`,
|
|
23
|
+
`1+`, `0+`, `many(0)`, `many(1)`, joined by `to` or `optionally to`.
|
|
24
|
+
|
|
25
|
+
The relationship label follows the first `:` and is free text.
|
|
26
|
+
|
|
27
|
+
## Structural conventions
|
|
28
|
+
|
|
29
|
+
- An attribute block is `ENTITY { <type> <name> <key> "<comment>" }`. Braces are structural.
|
|
30
|
+
- Key markers are `PK`, `FK`, `UK`; several may be comma-separated.
|
|
31
|
+
- An entity name may be quoted when it is not identifier-shaped.
|
|
32
|
+
- `%%` comments and the statement keywords behave as in every other type.
|
|
33
|
+
|
|
34
|
+
## Example
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
erDiagram
|
|
38
|
+
CUSTOMER ||--o{ ORDER : places
|
|
39
|
+
ORDER ||--|{ ORDER_LINE : contains
|
|
40
|
+
PRODUCT }o--o{ ORDER_LINE : "appears in"
|
|
41
|
+
CUSTOMER {
|
|
42
|
+
string id PK
|
|
43
|
+
string email UK "lowercased on write"
|
|
44
|
+
string display_name
|
|
45
|
+
}
|
|
46
|
+
ORDER {
|
|
47
|
+
string id PK
|
|
48
|
+
string customer_id FK
|
|
49
|
+
decimal total
|
|
50
|
+
}
|
|
51
|
+
ORDER_LINE {
|
|
52
|
+
string order_id FK
|
|
53
|
+
string product_id FK
|
|
54
|
+
int quantity
|
|
55
|
+
}
|
|
56
|
+
```
|
package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/flowchart.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Flowchart Syntax Reference
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Source: `https://mermaid.js.org/syntax/flowchart.html`.
|
|
4
|
+
When a construct is absent here, `WebFetch` that page and confirm the form before generating.
|
|
5
|
+
|
|
6
|
+
## First-line keyword forms
|
|
7
|
+
|
|
8
|
+
- `flowchart` followed optionally by a direction: `TB`, `TD`, `BT`, `LR`, `RL`. The direction is
|
|
9
|
+
optional and defaults to `TB`.
|
|
10
|
+
- `graph` with the same optional direction. Accepted and equivalent for the validator's purposes.
|
|
11
|
+
- `flowchart-elk` selects the ELK layout variant.
|
|
12
|
+
- A trailing `;` on the keyword line is accepted (`graph LR;`).
|
|
13
|
+
|
|
14
|
+
## Edge tokens
|
|
15
|
+
|
|
16
|
+
| Token | Meaning |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `-->` | arrow |
|
|
19
|
+
| `---` | open link |
|
|
20
|
+
| `-.->` | dotted arrow |
|
|
21
|
+
| `-.-` | dotted open link |
|
|
22
|
+
| `==>` | thick arrow |
|
|
23
|
+
| `===` | thick open link |
|
|
24
|
+
| `~~~` | invisible link |
|
|
25
|
+
| `--o` | circle edge |
|
|
26
|
+
| `--x` | cross edge |
|
|
27
|
+
| `o--o`, `x--x`, `<-->` | bidirectional forms |
|
|
28
|
+
|
|
29
|
+
Length variants extend the dash, dot, or equals run (`---->`, `====>`, `-...->`) and rank the edge
|
|
30
|
+
lower in layout. Text forms: `A -- text --> B`, `A -->|text| B`, `A -. text .-> B`,
|
|
31
|
+
`A == text ==> B`.
|
|
32
|
+
|
|
33
|
+
## Node shapes
|
|
34
|
+
|
|
35
|
+
`A[rect]`, `A(round)`, `A([stadium])`, `A[[subroutine]]`, `A[(cylinder)]`, `A((circle))`,
|
|
36
|
+
`A>asymmetric]`, `A{rhombus}`, `A{{hexagon}}`, `A[/parallelogram/]`, `A[\parallelogram alt\]`,
|
|
37
|
+
`A[/trapezoid\]`, `A(((double circle)))`.
|
|
38
|
+
|
|
39
|
+
Brackets are structural in a flowchart, so every opener needs its closer. A bracket inside a quoted
|
|
40
|
+
label is content, not structure: `A["foo[bar](baz)"]` is valid.
|
|
41
|
+
|
|
42
|
+
## Structural conventions
|
|
43
|
+
|
|
44
|
+
- `subgraph <id> [<free-text title>]` opens a block; `end` closes it. A `direction` statement inside
|
|
45
|
+
a subgraph sets that subgraph's direction.
|
|
46
|
+
- Statement lines are exempt from edge and bracket rules: `click`, `style`, `classDef`, `linkStyle`,
|
|
47
|
+
`class`, `accTitle`, `accDescr`, `title`.
|
|
48
|
+
- `%%` starts a comment outside a quoted span. `%%{init: {...}}%%` is a directive, not a comment.
|
|
49
|
+
- Labels may carry HTML (`<br/>`, `<b>`) and Markdown strings in backticks. Angle brackets are never
|
|
50
|
+
structural.
|
|
51
|
+
- Mermaid has no backslash escape; use the `#quot;` entity for a double quote inside a label.
|
|
52
|
+
|
|
53
|
+
## Example
|
|
54
|
+
|
|
55
|
+
```mermaid
|
|
56
|
+
flowchart LR
|
|
57
|
+
A[Client] --> B{Authenticated}
|
|
58
|
+
B -->|yes| C[Handler]
|
|
59
|
+
B -->|no| D((Reject))
|
|
60
|
+
subgraph backend [Backend services]
|
|
61
|
+
direction TB
|
|
62
|
+
C --> E[(Database)]
|
|
63
|
+
C -.-> F[Queue]
|
|
64
|
+
end
|
|
65
|
+
click C "https://example.com/handler" "Open the handler"
|
|
66
|
+
classDef hot fill:#f96,stroke:#333
|
|
67
|
+
class E hot
|
|
68
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Gantt Chart Syntax Reference
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Source: `https://mermaid.js.org/syntax/gantt.html`.
|
|
4
|
+
When a construct is absent here, `WebFetch` that page and confirm the form before generating.
|
|
5
|
+
|
|
6
|
+
## First-line keyword form
|
|
7
|
+
|
|
8
|
+
`gantt`.
|
|
9
|
+
|
|
10
|
+
## Body form
|
|
11
|
+
|
|
12
|
+
A gantt body is free text to the validator: it carries no edge tokens, and brackets and parentheses
|
|
13
|
+
are not structural. A task named `Deploy (phase 1` is accepted by the gate even though it is
|
|
14
|
+
untidy, because rejecting it would be a false positive. The date and duration grammar is not
|
|
15
|
+
structurally checkable either, so a malformed date passes the gate and fails to render — check
|
|
16
|
+
dates by reading them.
|
|
17
|
+
|
|
18
|
+
Statement lines:
|
|
19
|
+
|
|
20
|
+
- `title <free text>`
|
|
21
|
+
- `dateFormat <format>` — the input format of the task dates, for example `YYYY-MM-DD`.
|
|
22
|
+
- `axisFormat <format>` — the output format of the axis, for example `%Y-%m-%d`.
|
|
23
|
+
- `tickInterval <n><unit>` — for example `1week`, `2day`.
|
|
24
|
+
- `excludes <weekends|YYYY-MM-DD|monday..sunday>`
|
|
25
|
+
- `todayMarker <off|stroke:...>`
|
|
26
|
+
- `section <free text>` opens a section; sections need no closing statement.
|
|
27
|
+
|
|
28
|
+
## Task form
|
|
29
|
+
|
|
30
|
+
`<task label> :<tags>, <id>, <start or dependency>, <duration or end>`
|
|
31
|
+
|
|
32
|
+
- Tags: `done`, `active`, `crit`, `milestone`.
|
|
33
|
+
- The start may be a literal date, `after <id>`, or omitted to continue from the previous task.
|
|
34
|
+
- The duration is a number with a unit (`3d`, `2w`, `12h`) or an explicit end date.
|
|
35
|
+
|
|
36
|
+
## Example
|
|
37
|
+
|
|
38
|
+
```mermaid
|
|
39
|
+
gantt
|
|
40
|
+
title Order service rollout
|
|
41
|
+
dateFormat YYYY-MM-DD
|
|
42
|
+
axisFormat %m-%d
|
|
43
|
+
excludes weekends
|
|
44
|
+
section Preparation
|
|
45
|
+
Schema migration :done, mig, 2026-01-05, 3d
|
|
46
|
+
Contract tests :active, ct, after mig, 4d
|
|
47
|
+
section Rollout
|
|
48
|
+
Deploy to staging :crit, stg, after ct, 2d
|
|
49
|
+
Soak (24 hours minimum) : soak, after stg, 1d
|
|
50
|
+
Production cutover :milestone, prod, after soak, 0d
|
|
51
|
+
```
|
package/resources/claude-customizations/.claude/skills/mermaid-diagram/references/other-types.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Remaining Diagram Types
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Entry point: `https://mermaid.js.org/intro/syntax-reference.html`;
|
|
4
|
+
per-type pages at `https://mermaid.js.org/syntax/<type>.html`. When a construct is absent here,
|
|
5
|
+
`WebFetch` the type's page and confirm the form before generating.
|
|
6
|
+
|
|
7
|
+
Every type on this page is **keyword-checked only** by the structural gate: the validator confirms
|
|
8
|
+
the first-line keyword and declines to judge the body, because these grammars are free text,
|
|
9
|
+
indentation-structured, CSV-like, or supplied by an external plugin. A body defect in one of these
|
|
10
|
+
types therefore passes the gate and fails to render. Read the body.
|
|
11
|
+
|
|
12
|
+
## Verified keyword forms
|
|
13
|
+
|
|
14
|
+
| Keyword | Type | Body shape |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `journey` | User journey | `section <name>` then `Task: <score>: <Actor>, <Actor>` rows |
|
|
17
|
+
| `quadrantChart` | Quadrant chart | `x-axis`, `y-axis`, `quadrant-1`..`quadrant-4`, then `"<label>": [x, y]` points |
|
|
18
|
+
| `requirementDiagram` | Requirement diagram | `requirement`/`element` blocks in braces; relationships as `<a> - <verb> -> <b>` |
|
|
19
|
+
| `gitGraph` | Git graph | `commit`, `branch`, `checkout`, `merge`, `cherry-pick`. Accepts a direction and trailing colon: `gitGraph LR:`, `gitGraph TB:`, `gitGraph BT:` |
|
|
20
|
+
| `mindmap` | Mind map | indentation-structured; node shapes `((circle))`, `))cloud((`, `)bang(`, `{{hexagon}}` |
|
|
21
|
+
| `timeline` | Timeline | `title`, optional `section`, then `<period> : <event> : <event>` rows |
|
|
22
|
+
| `zenuml` | ZenUML sequence | requires the external `@mermaid-js/mermaid-zenuml` plugin even in browser Mermaid; the gate keyword-accepts and never judges the body |
|
|
23
|
+
| `sankey-beta` | Sankey diagram | CSV-like `source,target,value` rows |
|
|
24
|
+
| `xychart-beta` | XY chart | `title`, `x-axis`, `y-axis`, `bar [..]`, `line [..]`. Accepts the `horizontal` modifier: `xychart-beta horizontal` |
|
|
25
|
+
| `block-beta` | Block diagram | `columns <n>`, block ids, `space`, flowchart-style arrows between blocks |
|
|
26
|
+
| `packet` | Packet diagram | `<start>-<end>: "<name>"` rows. `packet-beta` was the earlier keyword and remains accepted |
|
|
27
|
+
| `kanban` | Kanban board | indentation-structured columns and cards |
|
|
28
|
+
| `architecture-beta` | Architecture diagram | `group`, `service`, `junction`; edges carry port syntax `L`/`R`/`T`/`B`, as in `db:L -- R:server` |
|
|
29
|
+
| `radar-beta` | Radar chart | axis list then per-series value rows |
|
|
30
|
+
| `treemap-beta` | Treemap | indentation plus `"<label>": <value>` rows |
|
|
31
|
+
| `info` | Version info | no body; renders the Mermaid version |
|
|
32
|
+
|
|
33
|
+
## Keyword-accept rows: documented types, unverified keyword form
|
|
34
|
+
|
|
35
|
+
These types appear in the 11.x documentation sidebar, but their exact first-line keyword form was
|
|
36
|
+
not individually verified against the pinned pages. The validator resolves them and records a drift
|
|
37
|
+
warning rather than judging the body, so neither spelling costs a false rejection. Confirm the form
|
|
38
|
+
by `WebFetch` before relying on one.
|
|
39
|
+
|
|
40
|
+
`swimlanes`, `eventmodeling`, `venn`, `ishikawa`, `wardley`, `cynefin`, `treeView`, `railroad`
|
|
41
|
+
(`railroad-beta`).
|
|
42
|
+
|
|
43
|
+
## Version drift
|
|
44
|
+
|
|
45
|
+
The allowlist in `.claude/lib/mermaid/MermaidGrammar.psm1` is a snapshot of 11.17.0, and Mermaid adds
|
|
46
|
+
diagram types several times a year. An unknown but keyword-shaped first-line token produces a drift
|
|
47
|
+
warning and is allowed. That warning is the signal to confirm the keyword against the documentation
|
|
48
|
+
and add it to the table; it is never a reason to abandon the diagram.
|
|
49
|
+
|
|
50
|
+
One exception: a token within a single character of a known keyword and at least five characters
|
|
51
|
+
long is reported as a misspelling and denied, because a typo is a defect the gate is required to
|
|
52
|
+
name. `flowchar TD` is a misspelling of `flowchart`, not a new diagram type.
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
```mermaid
|
|
57
|
+
gitGraph LR:
|
|
58
|
+
commit id: "init"
|
|
59
|
+
branch feature
|
|
60
|
+
checkout feature
|
|
61
|
+
commit id: "work"
|
|
62
|
+
checkout main
|
|
63
|
+
merge feature
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```mermaid
|
|
67
|
+
timeline
|
|
68
|
+
title Release history
|
|
69
|
+
2026-01 : 1.0 shipped : docs published
|
|
70
|
+
2026-02 : 1.1 shipped
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```mermaid
|
|
74
|
+
journey
|
|
75
|
+
title Order placement
|
|
76
|
+
section Browse
|
|
77
|
+
Search catalogue: 4: Customer
|
|
78
|
+
Read reviews: 3: Customer
|
|
79
|
+
section Checkout
|
|
80
|
+
Enter payment: 2: Customer
|
|
81
|
+
Confirm order: 5: Customer, System
|
|
82
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Pie Chart Syntax Reference
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Source: `https://mermaid.js.org/syntax/pie.html`.
|
|
4
|
+
When a construct is absent here, `WebFetch` that page and confirm the form before generating.
|
|
5
|
+
|
|
6
|
+
## First-line keyword forms
|
|
7
|
+
|
|
8
|
+
- `pie`
|
|
9
|
+
- `pie showData` — the modifier appends each slice's numeric value to its legend label.
|
|
10
|
+
|
|
11
|
+
## Body form
|
|
12
|
+
|
|
13
|
+
- `title <free text>` is optional and appears above the chart.
|
|
14
|
+
- Each data row is `"<label>" : <number>`. The label is double-quoted; the value may be an integer
|
|
15
|
+
or a decimal. Mermaid computes the percentages, so values need not sum to 100.
|
|
16
|
+
- Up to twelve slices render with distinct default colours; beyond that the palette repeats, so
|
|
17
|
+
aggregate the tail into one slice rather than emitting twenty.
|
|
18
|
+
|
|
19
|
+
The body carries no edge tokens and no structural brackets, so the validator keyword-checks a pie
|
|
20
|
+
chart and does not judge the body. An unquoted label or a non-numeric value passes the gate and
|
|
21
|
+
fails to render; read the rows.
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```mermaid
|
|
26
|
+
pie showData
|
|
27
|
+
title Test suite composition
|
|
28
|
+
"Unit" : 271
|
|
29
|
+
"Hook" : 28
|
|
30
|
+
"Contract" : 15
|
|
31
|
+
"Distribution" : 3
|
|
32
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Sequence Diagram Syntax Reference
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Source: `https://mermaid.js.org/syntax/sequenceDiagram.html`.
|
|
4
|
+
When a construct is absent here, `WebFetch` that page and confirm the form before generating.
|
|
5
|
+
|
|
6
|
+
## First-line keyword form
|
|
7
|
+
|
|
8
|
+
`sequenceDiagram`. No direction modifier.
|
|
9
|
+
|
|
10
|
+
## Message tokens
|
|
11
|
+
|
|
12
|
+
| Token | Meaning |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| `->` | solid line, no arrowhead |
|
|
15
|
+
| `-->` | dotted line, no arrowhead |
|
|
16
|
+
| `->>` | solid line with arrowhead |
|
|
17
|
+
| `-->>` | dotted line with arrowhead |
|
|
18
|
+
| `<<->>` | solid bidirectional |
|
|
19
|
+
| `<<-->>` | dotted bidirectional |
|
|
20
|
+
| `-x` | solid line with a cross (async, lost) |
|
|
21
|
+
| `--x` | dotted line with a cross |
|
|
22
|
+
| `-)` | solid line with an open arrow (async) |
|
|
23
|
+
| `--)` | dotted line with an open arrow |
|
|
24
|
+
|
|
25
|
+
Half-arrow variants (`-\`, `-/` families) were added in 11.12.3 and later.
|
|
26
|
+
|
|
27
|
+
Everything after the first `:` on a message line is free text: it may contain dashes, angle
|
|
28
|
+
brackets, and brackets, and it is never edge-checked. Only the pre-colon segment carries the
|
|
29
|
+
message token.
|
|
30
|
+
|
|
31
|
+
## Structural conventions
|
|
32
|
+
|
|
33
|
+
- `participant <id> as <label>` and `actor <id>` declare lifelines; declaration order fixes the
|
|
34
|
+
left-to-right order.
|
|
35
|
+
- `activate <id>` / `deactivate <id>`, or a `+`/`-` suffix on the message token, mark activation.
|
|
36
|
+
- Block keywords: `loop`, `alt`, `else`, `opt`, `par`, `and`, `critical`, `break`, `rect`, `box`.
|
|
37
|
+
Each block is closed by `end`.
|
|
38
|
+
- `Note left of <id>`, `Note right of <id>`, `Note over <id>,<id>` place notes.
|
|
39
|
+
- `autonumber` numbers messages. `create participant <id>` and `destroy <id>` manage lifeline
|
|
40
|
+
lifetime.
|
|
41
|
+
- Brackets are NOT structural in a sequence diagram, because message text routinely contains them.
|
|
42
|
+
|
|
43
|
+
## Example
|
|
44
|
+
|
|
45
|
+
```mermaid
|
|
46
|
+
sequenceDiagram
|
|
47
|
+
autonumber
|
|
48
|
+
participant C as Client
|
|
49
|
+
participant A as API
|
|
50
|
+
participant D as Database
|
|
51
|
+
C->>A: POST /orders [payload 2 - 3 items]
|
|
52
|
+
activate A
|
|
53
|
+
A->>D: INSERT order
|
|
54
|
+
D-->>A: order id
|
|
55
|
+
A-->>C: 201 Created
|
|
56
|
+
deactivate A
|
|
57
|
+
alt payment declined
|
|
58
|
+
A-->>C: 402 Payment Required
|
|
59
|
+
else accepted
|
|
60
|
+
A-)C: webhook: order.confirmed
|
|
61
|
+
end
|
|
62
|
+
Note over C,A: Retry policy is 3 attempts
|
|
63
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# State Diagram Syntax Reference
|
|
2
|
+
|
|
3
|
+
Pinned to Mermaid **11.17.0**. Source: `https://mermaid.js.org/syntax/stateDiagram.html`.
|
|
4
|
+
When a construct is absent here, `WebFetch` that page and confirm the form before generating.
|
|
5
|
+
|
|
6
|
+
## First-line keyword forms
|
|
7
|
+
|
|
8
|
+
`stateDiagram-v2` (preferred) or `stateDiagram` (legacy). Both accept a following `direction`
|
|
9
|
+
statement rather than a direction suffix on the keyword line.
|
|
10
|
+
|
|
11
|
+
## Transition token
|
|
12
|
+
|
|
13
|
+
`-->` is the only transition token. A single-dash `->` is a defect, and a sequence or class token in
|
|
14
|
+
a state diagram is a defect. Length variants (`--->`) are accepted.
|
|
15
|
+
|
|
16
|
+
The transition label follows the first `:` and is free text: `Idle --> Running: start button`.
|
|
17
|
+
|
|
18
|
+
## Structural conventions
|
|
19
|
+
|
|
20
|
+
- `[*]` is the start pseudo-state when it is the transition source and the end pseudo-state when it
|
|
21
|
+
is the target.
|
|
22
|
+
- `state <Name> { ... }` declares a composite state; braces are structural, so every opener needs a
|
|
23
|
+
closer. `direction` inside a composite sets that composite's direction.
|
|
24
|
+
- `state "free text description" as <id>` names a state whose label is not identifier-shaped.
|
|
25
|
+
- Fork and join use `<<fork>>` and `<<join>>` annotations; a choice point uses `<<choice>>`.
|
|
26
|
+
- `note left of <id>` / `note right of <id>` place notes; a `note` block is closed by `end note`.
|
|
27
|
+
- `--` inside a composite state separates concurrent regions.
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```mermaid
|
|
32
|
+
stateDiagram-v2
|
|
33
|
+
direction LR
|
|
34
|
+
[*] --> Idle
|
|
35
|
+
Idle --> Validating: submit
|
|
36
|
+
state Validating {
|
|
37
|
+
direction TB
|
|
38
|
+
[*] --> Schema
|
|
39
|
+
Schema --> Business: schema ok
|
|
40
|
+
Business --> [*]
|
|
41
|
+
}
|
|
42
|
+
Validating --> Accepted: all checks pass
|
|
43
|
+
Validating --> Rejected: any check fails
|
|
44
|
+
Accepted --> [*]
|
|
45
|
+
Rejected --> Idle: correct and resubmit
|
|
46
|
+
note right of Rejected
|
|
47
|
+
The reason names the failing check.
|
|
48
|
+
end note
|
|
49
|
+
```
|
|
@@ -324,13 +324,14 @@ Procedure, per item:
|
|
|
324
324
|
`docs/features/parallel/<slug>/parallel-status.md`.
|
|
325
325
|
5. On a merge failure caused by a conflict, follow `## Per-Item Merge-Conflict Handling`.
|
|
326
326
|
|
|
327
|
-
**
|
|
328
|
-
Bash-matcher hook that denies any `gh pr merge --merge` unless
|
|
329
|
-
its allow conditions; its block reason is `EPIC_MERGE_GATE_BLOCKED`.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
327
|
+
**Merge-gate authorization.** `.claude/hooks/enforce-epic-merge-gate.ps1` is a project-wide
|
|
328
|
+
`PreToolUse` Bash-matcher hook that denies any `gh pr merge --merge` unless a checkpoint satisfies
|
|
329
|
+
one of its allow conditions; its block reason is `EPIC_MERGE_GATE_BLOCKED`. The gate now authorizes
|
|
330
|
+
a parallel per-item merge when the parallel-orchestrator checkpoint has `route_id == "parallel"`,
|
|
331
|
+
the target item's `merge_status == "ci_green"`, and, when a PR number is named, it matches the
|
|
332
|
+
item's `pr_number`. Step 3 above is therefore permitted for a legitimate parallel merge; a missing,
|
|
333
|
+
unreadable, or invalid parallel checkpoint, a target item whose `merge_status` is not `ci_green`, or
|
|
334
|
+
a PR number that matches no item still fails closed with `EPIC_MERGE_GATE_BLOCKED`.
|
|
334
335
|
|
|
335
336
|
Branch protection on `main` affects only the pacing of step 3, not its ownership: if `main`
|
|
336
337
|
requires branches to be up to date, an automated `gh pr update-branch` plus re-green cycle is
|
|
@@ -221,14 +221,34 @@ separator-free repository-root shared surfaces from plan and spec text, admittin
|
|
|
221
221
|
as an exact ordinal member of the configured `shared_surfaces` list in `config/blast-radius.json`;
|
|
222
222
|
and the contention path comparison now honours listed-directory prefixes on both sides, aligning
|
|
223
223
|
with `is_path_subsumed`. Both corrections move results in the fail-closed direction — they report
|
|
224
|
-
more contention, not less. Do not work around either correction
|
|
225
|
-
|
|
224
|
+
more contention, not less. Do not work around either correction.
|
|
225
|
+
|
|
226
|
+
**The exclusions are configured, not improvised (issue #489).** `config/blast-radius.json` carries
|
|
227
|
+
an optional `mandate_reads` list naming the paths every agent is instructed to read before doing
|
|
228
|
+
any work: the policy rules, the tier map, and the process artifacts. A citation of one of those
|
|
229
|
+
paths is evidence that the author obeyed the reading order, not evidence that the change will write
|
|
230
|
+
the file, so `derive_blast_radius` drops it from the harvest and `validate_blast_radius` drops it
|
|
231
|
+
from its plan-side extraction, which keeps V1 and V2 self-consistent. The extractor likewise rejects
|
|
232
|
+
three token shapes that were never write claims: a wildcard-free token naming a directory rather
|
|
233
|
+
than a file, a `docs/features/` glob whose wildcard spans every feature folder, and a contract token
|
|
234
|
+
carrying no ASCII letter. These exclusions are part of the landed contract, so the prohibition now
|
|
235
|
+
reads: do not narrow a radius beyond the configured exclusions in order to suppress a conflict edge.
|
|
236
|
+
|
|
237
|
+
**Appending an excluded path is the planner's obligation, not an exception.** An exclusion describes
|
|
238
|
+
the default reading relationship, not a permanent ban. When an item's plan will genuinely WRITE a
|
|
239
|
+
path that the exclusions remove — amending a rule file under `.claude/rules/`, editing
|
|
240
|
+
`quality-tiers.yml`, or changing an instruction document under `.github/instructions/` — the planner
|
|
241
|
+
MUST append that exact path to the item's declared radius explicitly after normalization. Omitting
|
|
242
|
+
it under-reports contention and lets two items that both rewrite the same policy file run
|
|
243
|
+
concurrently.
|
|
226
244
|
|
|
227
245
|
### Planner procedure
|
|
228
246
|
|
|
229
247
|
1. After an item's plan is approved and preflight-clear, read the approved plan text and the
|
|
230
|
-
feature `spec.md` text, derive the radius with `source: "declared"`,
|
|
231
|
-
|
|
248
|
+
feature `spec.md` text, derive the radius with `source: "declared"`, then call
|
|
249
|
+
`normalize_declared_radius(radius, config)` to re-apply the current extraction rules and the
|
|
250
|
+
configured exclusions, append any excluded path the plan's diff will genuinely write, and record
|
|
251
|
+
the result on the item. The `declared` radius is the authoritative input to scheduling.
|
|
232
252
|
2. Validate the radius and record the findings under the item's `radius_validation` entry.
|
|
233
253
|
3. **V1 (coverage) or V2 (shared-surface enumeration) Blocking failure.** The item does NOT
|
|
234
254
|
transition to `prepared`. Record the findings in the checkpoint and issue a follow-up
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
"config/blast-radius.json"
|
|
7
7
|
],
|
|
8
8
|
"shared_surface_globs": [],
|
|
9
|
+
"mandate_reads": [
|
|
10
|
+
".claude/rules/**",
|
|
11
|
+
".claude/skills/atomic-plan-contract/SKILL.md",
|
|
12
|
+
".claude/skills/evidence-and-timestamp-conventions/SKILL.md",
|
|
13
|
+
".github/instructions/**",
|
|
14
|
+
"artifacts/**",
|
|
15
|
+
"quality-tiers.yml"
|
|
16
|
+
],
|
|
9
17
|
"modules": {
|
|
10
18
|
"claude-runtime": [".claude/**"],
|
|
11
19
|
"config": ["config/**"]
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
".claude/rules/general-code-change.md",
|
|
58
58
|
".claude/rules/general-unit-test.md",
|
|
59
59
|
".claude/rules/orchestrator-state.md",
|
|
60
|
+
".claude/rules/plan-acceptance-gates.md",
|
|
60
61
|
".claude/rules/quality-tiers.md",
|
|
61
62
|
".claude/rules/self-explanatory-code-commenting.md",
|
|
62
63
|
".claude/rules/tonality.md",
|
|
@@ -124,6 +125,7 @@
|
|
|
124
125
|
".claude/lib/blast-radius/BlastRadiusConfig.psm1",
|
|
125
126
|
".claude/lib/blast-radius/BlastRadiusValidation.psm1",
|
|
126
127
|
".claude/lib/blast-radius/BlastRadius.psm1",
|
|
128
|
+
".claude/lib/blast-radius/BlastRadiusNormalization.psm1",
|
|
127
129
|
".claude/rules/parallel-orchestration.md",
|
|
128
130
|
".claude/rules/shell.md",
|
|
129
131
|
".claude/lib/bash/compute-cohorts.sh",
|
|
@@ -136,6 +138,22 @@
|
|
|
136
138
|
".claude/lib/bash/parallel-yaml-scan.sh",
|
|
137
139
|
".claude/lib/bash/validate-parallel-manifest.sh",
|
|
138
140
|
"config/orchestration-routing.json",
|
|
139
|
-
"config/blast-radius.json"
|
|
141
|
+
"config/blast-radius.json",
|
|
142
|
+
".claude/hooks/enforce-mermaid-validation.ps1",
|
|
143
|
+
".claude/rules/mermaid.md",
|
|
144
|
+
".claude/skills/mermaid-diagram/SKILL.md",
|
|
145
|
+
".claude/lib/mermaid/MermaidGrammar.psm1",
|
|
146
|
+
".claude/lib/mermaid/MermaidLineScanner.psm1",
|
|
147
|
+
".claude/lib/mermaid/MermaidMarkdownFences.psm1",
|
|
148
|
+
".claude/lib/mermaid/MermaidValidation.psm1",
|
|
149
|
+
".claude/skills/mermaid-diagram/references/flowchart.md",
|
|
150
|
+
".claude/skills/mermaid-diagram/references/sequence.md",
|
|
151
|
+
".claude/skills/mermaid-diagram/references/class.md",
|
|
152
|
+
".claude/skills/mermaid-diagram/references/state.md",
|
|
153
|
+
".claude/skills/mermaid-diagram/references/er.md",
|
|
154
|
+
".claude/skills/mermaid-diagram/references/c4.md",
|
|
155
|
+
".claude/skills/mermaid-diagram/references/gantt.md",
|
|
156
|
+
".claude/skills/mermaid-diagram/references/pie.md",
|
|
157
|
+
".claude/skills/mermaid-diagram/references/other-types.md"
|
|
140
158
|
]
|
|
141
159
|
}
|
|
@@ -111,6 +111,19 @@ When evidence artifacts are used for automated checking or plan reconciliation,
|
|
|
111
111
|
- `Command: <exact command>`
|
|
112
112
|
- `EXIT_CODE: <int>`
|
|
113
113
|
|
|
114
|
+
One optional field may also be declared:
|
|
115
|
+
- `ExpectedExitCode: <int>` — the exit code the gate is expected to produce.
|
|
116
|
+
|
|
117
|
+
Rules for the optional expectation field:
|
|
118
|
+
- The spelling is exact and case-sensitive: `ExpectedExitCode`. `expectedexitcode` and `Expected Exit Code` do not match the accept-list and are discarded as unrecognized rows.
|
|
119
|
+
- The value is a single integer. A leading sign is accepted and no range check is applied; the value is used for an equality comparison only.
|
|
120
|
+
- When the field is absent the expectation defaults to `0`, so every artifact that omits it keeps its existing result. Writing `ExpectedExitCode: 0` explicitly renders identically to omitting the field.
|
|
121
|
+
- A present but non-integer value (including an empty value) makes the WHOLE artifact `unparseable`. An unparseable artifact is dropped by the collector filter, so a typo in the expectation removes the row from the PR body rather than degrading it to `fail`.
|
|
122
|
+
- When the field is duplicated, the FIRST occurrence wins in both the Python and the TypeScript parser; later occurrences are ignored.
|
|
123
|
+
- The field is per-FILE, not per-gate: one artifact carries exactly one expectation, so an artifact recording several gates cannot express a different expectation for each. Record a gate that needs a non-zero expectation in its own artifact file.
|
|
124
|
+
|
|
125
|
+
A gate whose observed `EXIT_CODE` equals its declared expectation is normalized to `pass`. The observed exit code is still displayed, and the rendered row additionally carries ` - Expected EXIT_CODE: <int>` between the `EXIT_CODE` and `Normalized result` lines when the expectation is non-zero.
|
|
126
|
+
|
|
114
127
|
### Baseline Evidence Output Summary (Required)
|
|
115
128
|
|
|
116
129
|
For baseline evidence artifacts stored under `evidence/baseline/`, include an output summary in addition to the schema fields above:
|
|
@@ -83,6 +83,19 @@ When evidence artifacts are used for automated checking or plan reconciliation,
|
|
|
83
83
|
- `Command: <exact command>`
|
|
84
84
|
- `EXIT_CODE: <int>`
|
|
85
85
|
|
|
86
|
+
One optional field may also be declared:
|
|
87
|
+
- `ExpectedExitCode: <int>` — the exit code the gate is expected to produce.
|
|
88
|
+
|
|
89
|
+
Rules for the optional expectation field:
|
|
90
|
+
- The spelling is exact and case-sensitive: `ExpectedExitCode`. `expectedexitcode` and `Expected Exit Code` do not match the accept-list and are discarded as unrecognized rows.
|
|
91
|
+
- The value is a single integer. A leading sign is accepted and no range check is applied; the value is used for an equality comparison only.
|
|
92
|
+
- When the field is absent the expectation defaults to `0`, so every artifact that omits it keeps its existing result. Writing `ExpectedExitCode: 0` explicitly renders identically to omitting the field.
|
|
93
|
+
- A present but non-integer value (including an empty value) makes the WHOLE artifact `unparseable`. An unparseable artifact is dropped by the collector filter, so a typo in the expectation removes the row from the PR body rather than degrading it to `fail`.
|
|
94
|
+
- When the field is duplicated, the FIRST occurrence wins in both the Python and the TypeScript parser; later occurrences are ignored.
|
|
95
|
+
- The field is per-FILE, not per-gate: one artifact carries exactly one expectation, so an artifact recording several gates cannot express a different expectation for each. Record a gate that needs a non-zero expectation in its own artifact file.
|
|
96
|
+
|
|
97
|
+
A gate whose observed `EXIT_CODE` equals its declared expectation is normalized to `pass`. The observed exit code is still displayed, and the rendered row additionally carries ` - Expected EXIT_CODE: <int>` between the `EXIT_CODE` and `Normalized result` lines when the expectation is non-zero.
|
|
98
|
+
|
|
86
99
|
### Baseline Evidence Output Summary (Required)
|
|
87
100
|
|
|
88
101
|
For baseline evidence artifacts stored under `evidence/baseline/`, include an output summary in addition to the schema fields above:
|
|
@@ -137,14 +137,20 @@
|
|
|
137
137
|
'.codex/hooks/enforce-epic-planning-only.ps1'
|
|
138
138
|
# Issue #447 added the .claude-resident PowerShell blast-radius library, the
|
|
139
139
|
# two-language mirror of scripts/dev_tools/compute_blast_radius.py and its
|
|
140
|
-
# helper modules. The set is split across
|
|
140
|
+
# helper modules. The set is split across six files only to satisfy the
|
|
141
141
|
# 500-line limit; measured here so no new production module is excluded from
|
|
142
142
|
# coverage.
|
|
143
|
+
# Issue #489 added BlastRadiusNormalization.psm1, which holds the
|
|
144
|
+
# read-by-mandate exclusion plus Get-ContractIdentifier and
|
|
145
|
+
# Resolve-BlastRadiusModule relocated out of the two modules that had run
|
|
146
|
+
# out of headroom. The relocation moves already-measured lines, so the new
|
|
147
|
+
# file is registered here to keep them in the coverage denominator.
|
|
143
148
|
'.claude/lib/blast-radius/BlastRadiusExtraction.psm1'
|
|
144
149
|
'.claude/lib/blast-radius/BlastRadiusGlob.psm1'
|
|
145
150
|
'.claude/lib/blast-radius/BlastRadiusConfig.psm1'
|
|
146
151
|
'.claude/lib/blast-radius/BlastRadiusValidation.psm1'
|
|
147
152
|
'.claude/lib/blast-radius/BlastRadius.psm1'
|
|
153
|
+
'.claude/lib/blast-radius/BlastRadiusNormalization.psm1'
|
|
148
154
|
# Issue #440 added the two parallel enforcement hooks (the Layer 1 cohort
|
|
149
155
|
# barrier and the worktree removal gate) and extended the invocation-origin
|
|
150
156
|
# hook with the parallel-agent family; measured here so no new or changed
|
|
@@ -164,6 +170,15 @@
|
|
|
164
170
|
# excluded from coverage. The test suite dot-sources the file (guarded body) so
|
|
165
171
|
# line attribution is valid.
|
|
166
172
|
'.claude/hooks/enforce-parallel-abandon-gate.ps1'
|
|
173
|
+
# Issue #491 added the Mermaid validation PreToolUse hook and its dependency-free
|
|
174
|
+
# validator library; measured here so the new production files are not excluded from
|
|
175
|
+
# coverage. The hook's test suite dot-sources the file (guarded body) and the library
|
|
176
|
+
# suites import the modules, so line attribution is valid.
|
|
177
|
+
'.claude/hooks/enforce-mermaid-validation.ps1'
|
|
178
|
+
'.claude/lib/mermaid/MermaidGrammar.psm1'
|
|
179
|
+
'.claude/lib/mermaid/MermaidLineScanner.psm1'
|
|
180
|
+
'.claude/lib/mermaid/MermaidMarkdownFences.psm1'
|
|
181
|
+
'.claude/lib/mermaid/MermaidValidation.psm1'
|
|
167
182
|
)
|
|
168
183
|
# Optional: don't fail the run on coverage percentage
|
|
169
184
|
CoveragePercentTarget = 0
|