@phuc1403/musketeer 0.8.0 → 0.10.0
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/INSTALLATION.md +52 -52
- package/README.md +49 -49
- package/bin/musketeer.js +168 -168
- package/manifest.json +333 -301
- package/package.json +48 -48
- package/src/dotnet-scaffold-copier.js +79 -79
- package/src/provisioner/detect.js +93 -93
- package/src/self-update.js +77 -77
- package/template/.claude/agents/code-reviewer.md +182 -166
- package/template/.claude/agents/git-manager.md +18 -18
- package/template/.claude/agents/hallmark-auditor.md +78 -78
- package/template/.claude/agents/researcher.md +33 -33
- package/template/.claude/hooks/block-unsafe-adr-title.cjs +85 -85
- package/template/.claude/hooks/git-skill-reminder.cjs +53 -0
- package/template/.claude/hooks/init-adr-dir.cjs +173 -173
- package/template/.claude/hooks/inject-adr-flags.cjs +94 -94
- package/template/.claude/hooks/lib/adr/command-scan.cjs +115 -115
- package/template/.claude/hooks/lib/characteristics/checker.cjs +357 -357
- package/template/.claude/hooks/lib/colors.cjs +180 -122
- package/template/.claude/hooks/lib/git-info-cache.cjs +191 -191
- package/template/.claude/hooks/lib/transcript-parser.cjs +300 -277
- package/template/.claude/hooks/sync-adr-toc.cjs +146 -146
- package/template/.claude/hooks/{usage-context-awareness.cjs → usage-quota-cache-refresh.cjs} +166 -166
- package/template/.claude/hooks/validate-characteristics-hook.cjs +66 -66
- package/template/.claude/hooks/validate-cml-hook.js +145 -145
- package/template/.claude/skills/adr-writer/SKILL.md +48 -48
- package/template/.claude/skills/adr-writer/references/adr-example.md +35 -35
- package/template/.claude/skills/architecture-characteristic-writer/SKILL.md +215 -215
- package/template/.claude/skills/architecture-characteristic-writer/assets/worksheet-template.md +29 -29
- package/template/.claude/skills/architecture-characteristic-writer/references/characteristics-catalog.md +40 -40
- package/template/.claude/skills/architecture-characteristic-writer/scripts/ranking-table.cjs +171 -171
- package/template/.claude/skills/code-review/SKILL.md +201 -54
- package/template/.claude/skills/code-review/references/checklist-workflow.md +96 -0
- package/template/.claude/skills/code-review/references/checklists/api.md +52 -52
- package/template/.claude/skills/code-review/references/checklists/base.md +100 -100
- package/template/.claude/skills/code-review/references/checklists/web-app.md +54 -54
- package/template/.claude/skills/code-review/references/code-review-reception.md +113 -0
- package/template/.claude/skills/code-review/references/codebase-scan-workflow.md +30 -0
- package/template/.claude/skills/code-review/references/edge-case-scouting.md +119 -0
- package/template/.claude/skills/code-review/references/input-mode-resolution.md +135 -0
- package/template/.claude/skills/code-review/references/parallel-review-workflow.md +76 -0
- package/template/.claude/skills/code-review/references/requesting-code-review.md +116 -0
- package/template/.claude/skills/code-review/references/spec-compliance-review.md +43 -0
- package/template/.claude/skills/code-review/references/task-management-reviews.md +140 -0
- package/template/.claude/skills/code-review/references/verification-before-completion.md +139 -0
- package/template/.claude/skills/context-map/SKILL.md +80 -80
- package/template/.claude/skills/context-map/example.cml +106 -106
- package/template/.claude/skills/context-map/reference/Bounded Context/Bounded Context.md +40 -40
- package/template/.claude/skills/context-map/reference/Bounded Context/businessModel.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md +2 -2
- package/template/.claude/skills/context-map/reference/Bounded Context/evolution.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md +1 -1
- package/template/.claude/skills/context-map/reference/Bounded Context/implements.md +1 -1
- package/template/.claude/skills/context-map/reference/Bounded Context/knowledgeLevel.md +4 -4
- package/template/.claude/skills/context-map/reference/Bounded Context/realizes.md +9 -9
- package/template/.claude/skills/context-map/reference/Bounded Context/refines.md +10 -10
- package/template/.claude/skills/context-map/reference/Bounded Context/responsibilities.md +26 -26
- package/template/.claude/skills/context-map/reference/Bounded Context/type.md +23 -23
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Anticorruption Layer.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Bounded Context Relationship.md +12 -12
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Conformist.md +5 -5
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Customer-Supplier (C-S).md +22 -22
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Open Host Service.md +4 -4
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Partnership (P).md +13 -13
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Published Language.md +4 -4
- package/template/.claude/skills/context-map/reference/Bounded Context Relationship/Shared Kernel (SK).md +12 -12
- package/template/.claude/skills/context-map/reference/Context Map.md +62 -62
- package/template/.claude/skills/context-map/reference/Domain/Domain.md +30 -30
- package/template/.claude/skills/context-map/reference/Domain/supports.md +33 -33
- package/template/.claude/skills/context-map/reference/Domain/type.md +3 -3
- package/template/.claude/skills/context-map/reference/Semantic Rules.md +32 -32
- package/template/.claude/skills/git/SKILL.md +131 -115
- package/template/.claude/skills/git/references/branch-management.md +88 -88
- package/template/.claude/skills/git/references/commit-standards.md +46 -46
- package/template/.claude/skills/git/references/context-efficiency.md +54 -0
- package/template/.claude/skills/git/references/gh-cli-guide.md +109 -109
- package/template/.claude/skills/git/references/safety-protocols.md +69 -69
- package/template/.claude/skills/git/references/workflow-commit.md +58 -58
- package/template/.claude/skills/git/references/workflow-merge-pr.md +136 -0
- package/template/.claude/skills/git/references/workflow-merge.md +48 -48
- package/template/.claude/skills/git/references/workflow-pr.md +58 -58
- package/template/.claude/skills/git/references/workflow-push.md +52 -52
- package/template/.claude/skills/hallmark/SKILL.md +552 -552
- package/template/.claude/skills/hallmark/references/anti-patterns.md +412 -412
- package/template/.claude/skills/hallmark/references/assets.md +406 -406
- package/template/.claude/skills/hallmark/references/color.md +95 -95
- package/template/.claude/skills/hallmark/references/component-cookbook.md +256 -256
- package/template/.claude/skills/hallmark/references/components/c1-outlined-chip.md +12 -12
- package/template/.claude/skills/hallmark/references/components/c2-inline-form-as-cta.md +16 -16
- package/template/.claude/skills/hallmark/references/components/c3-typographic-link.md +8 -8
- package/template/.claude/skills/hallmark/references/components/c4-sticky-bottom-bar.md +16 -16
- package/template/.claude/skills/hallmark/references/components/f1-bento-grid.md +20 -20
- package/template/.claude/skills/hallmark/references/components/f2-sticky-scroll-stack.md +20 -20
- package/template/.claude/skills/hallmark/references/components/f3-tabular-spec-sheet.md +11 -11
- package/template/.claude/skills/hallmark/references/components/f4-step-sequence.md +11 -11
- package/template/.claude/skills/hallmark/references/components/f5-annotated-screenshot.md +11 -11
- package/template/.claude/skills/hallmark/references/components/f6-product-card-grid.md +41 -41
- package/template/.claude/skills/hallmark/references/components/ft1-mast-headed.md +13 -13
- package/template/.claude/skills/hallmark/references/components/ft2-inline-rule-single-line.md +10 -10
- package/template/.claude/skills/hallmark/references/components/ft3-index-style-category-list.md +12 -12
- package/template/.claude/skills/hallmark/references/components/ft4-dense-typographic.md +10 -10
- package/template/.claude/skills/hallmark/references/components/ft5-statement.md +21 -21
- package/template/.claude/skills/hallmark/references/components/ft6-letter-close.md +19 -19
- package/template/.claude/skills/hallmark/references/components/ft7-newsletter-first.md +27 -27
- package/template/.claude/skills/hallmark/references/components/ft8-marquee-scroll.md +25 -25
- package/template/.claude/skills/hallmark/references/components/h1-marquee.md +15 -15
- package/template/.claude/skills/hallmark/references/components/h2-split-diptych.md +15 -15
- package/template/.claude/skills/hallmark/references/components/h3-quote-led.md +11 -11
- package/template/.claude/skills/hallmark/references/components/h4-stat-led.md +14 -14
- package/template/.claude/skills/hallmark/references/components/h5-letter-hero.md +11 -11
- package/template/.claude/skills/hallmark/references/components/h6-photographic-fold.md +16 -16
- package/template/.claude/skills/hallmark/references/components/h7-demo-video-clipped-by-viewport-edge.md +27 -27
- package/template/.claude/skills/hallmark/references/components/h8-mockup-split-browser-framed.md +23 -23
- package/template/.claude/skills/hallmark/references/components/h9-custom-illustration-centerpiece.md +27 -27
- package/template/.claude/skills/hallmark/references/components/n1-wordmark-2-links.md +12 -12
- package/template/.claude/skills/hallmark/references/components/n10-floating-on-scroll-morph.md +19 -19
- package/template/.claude/skills/hallmark/references/components/n2-floating-chip.md +14 -14
- package/template/.claude/skills/hallmark/references/components/n3-side-rail.md +14 -14
- package/template/.claude/skills/hallmark/references/components/n4-hidden-behind-k.md +9 -9
- package/template/.claude/skills/hallmark/references/components/n5-floating-pill.md +28 -28
- package/template/.claude/skills/hallmark/references/components/n6-newspaper-masthead.md +24 -24
- package/template/.claude/skills/hallmark/references/components/n7-brutal-slab.md +22 -22
- package/template/.claude/skills/hallmark/references/components/n8-terminal-command.md +21 -21
- package/template/.claude/skills/hallmark/references/components/n9-edge-aligned-minimal.md +17 -17
- package/template/.claude/skills/hallmark/references/components/s1-left-margin-numbered.md +15 -15
- package/template/.claude/skills/hallmark/references/components/s2-hanging.md +13 -13
- package/template/.claude/skills/hallmark/references/components/s3-sticky-pinned.md +19 -19
- package/template/.claude/skills/hallmark/references/components/s4-inline-no-break.md +11 -11
- package/template/.claude/skills/hallmark/references/components/s5-bottom-anchored.md +13 -13
- package/template/.claude/skills/hallmark/references/components/t1-pull-quote-with-marginalia.md +12 -12
- package/template/.claude/skills/hallmark/references/components/t2-logo-wall-hairline.md +19 -19
- package/template/.claude/skills/hallmark/references/components/t3-single-huge-quote.md +11 -11
- package/template/.claude/skills/hallmark/references/components/t4-numbered-stat-strip.md +14 -14
- package/template/.claude/skills/hallmark/references/contract.md +24 -24
- package/template/.claude/skills/hallmark/references/copy.md +182 -182
- package/template/.claude/skills/hallmark/references/custom-craft.md +626 -626
- package/template/.claude/skills/hallmark/references/custom-theme.md +329 -329
- package/template/.claude/skills/hallmark/references/design-md.md +116 -116
- package/template/.claude/skills/hallmark/references/export-formats.md +328 -328
- package/template/.claude/skills/hallmark/references/floating-nav.md +89 -89
- package/template/.claude/skills/hallmark/references/genres/atmospheric.md +65 -65
- package/template/.claude/skills/hallmark/references/genres/editorial.md +70 -70
- package/template/.claude/skills/hallmark/references/genres/modern-minimal.md +67 -67
- package/template/.claude/skills/hallmark/references/genres/playful.md +65 -65
- package/template/.claude/skills/hallmark/references/hero-enrichment.md +474 -474
- package/template/.claude/skills/hallmark/references/imagery-kit.md +170 -170
- package/template/.claude/skills/hallmark/references/interaction-and-states.md +207 -207
- package/template/.claude/skills/hallmark/references/layout-and-space.md +111 -111
- package/template/.claude/skills/hallmark/references/macrostructures/01-bento-grid.md +35 -35
- package/template/.claude/skills/hallmark/references/macrostructures/02-long-document.md +34 -34
- package/template/.claude/skills/hallmark/references/macrostructures/03-marquee-hero.md +31 -31
- package/template/.claude/skills/hallmark/references/macrostructures/04-stat-led.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/05-workbench.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/06-conversational-faq.md +33 -33
- package/template/.claude/skills/hallmark/references/macrostructures/07-manifesto.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/08-photographic.md +34 -34
- package/template/.claude/skills/hallmark/references/macrostructures/09-quote-led.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/10-specimen.md +32 -32
- package/template/.claude/skills/hallmark/references/macrostructures/11-catalogue.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/12-letter.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/13-index-first.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/14-narrative-workflow.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/15-split-studio.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/16-feature-stack.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/17-type-specimen.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/18-portfolio-grid.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/19-map-diagram.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/20-ecosystem-index.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures/21-component-playground.md +23 -23
- package/template/.claude/skills/hallmark/references/macrostructures.md +89 -89
- package/template/.claude/skills/hallmark/references/microinteractions.md +260 -260
- package/template/.claude/skills/hallmark/references/motion.md +109 -109
- package/template/.claude/skills/hallmark/references/preview-examples.md +49 -49
- package/template/.claude/skills/hallmark/references/responsive.md +138 -138
- package/template/.claude/skills/hallmark/references/slop-test.md +205 -205
- package/template/.claude/skills/hallmark/references/structure.md +164 -164
- package/template/.claude/skills/hallmark/references/study.md +511 -511
- package/template/.claude/skills/hallmark/references/typography.md +243 -243
- package/template/.claude/skills/hallmark/references/verbs/audit.md +25 -25
- package/template/.claude/skills/hallmark/references/verbs/redesign.md +269 -269
- package/template/.claude/skills/hallmark-loop/SKILL.md +105 -105
- package/template/.claude/skills/hallmark-loop/references/auditor-call.md +60 -60
- package/template/.claude/skills/hallmark-loop/references/capture.md +78 -78
- package/template/.claude/skills/hallmark-loop/references/loop-control.md +79 -79
- package/template/.claude/skills/handoff/SKILL.md +15 -15
- package/template/.claude/skills/knowledge-crunching/SKILL.md +94 -94
- package/template/.claude/skills/research/SKILL.md +69 -69
- package/template/.claude/skills/skill-creator/LICENSE.txt +201 -201
- package/template/.claude/skills/skill-creator/SKILL.md +154 -149
- package/template/.claude/skills/skill-creator/agents/analyzer.md +274 -274
- package/template/.claude/skills/skill-creator/agents/comparator.md +202 -202
- package/template/.claude/skills/skill-creator/agents/grader.md +223 -223
- package/template/.claude/skills/skill-creator/assets/eval_review.html +146 -146
- package/template/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -471
- package/template/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -1325
- package/template/.claude/skills/skill-creator/references/benchmark-optimization-guide.md +86 -86
- package/template/.claude/skills/skill-creator/references/distribution-guide.md +79 -79
- package/template/.claude/skills/skill-creator/references/eval-infrastructure-guide.md +129 -129
- package/template/.claude/skills/skill-creator/references/eval-schemas.md +121 -121
- package/template/.claude/skills/skill-creator/references/mcp-skills-integration.md +71 -71
- package/template/.claude/skills/skill-creator/references/metadata-quality-criteria.md +94 -94
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -104
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-overview.md +89 -89
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-schema.md +93 -93
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-sources.md +103 -103
- package/template/.claude/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -76
- package/template/.claude/skills/skill-creator/references/script-quality-criteria.md +106 -106
- package/template/.claude/skills/skill-creator/references/skill-anatomy-and-requirements.md +77 -77
- package/template/.claude/skills/skill-creator/references/skill-creation-workflow.md +152 -151
- package/template/.claude/skills/skill-creator/references/skill-design-patterns.md +75 -75
- package/template/.claude/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -102
- package/template/.claude/skills/skill-creator/references/structure-organization-criteria.md +114 -114
- package/template/.claude/skills/skill-creator/references/testing-and-iteration.md +78 -78
- package/template/.claude/skills/skill-creator/references/token-efficiency-criteria.md +74 -74
- package/template/.claude/skills/skill-creator/references/troubleshooting-guide.md +81 -81
- package/template/.claude/skills/skill-creator/references/validation-checklist.md +83 -83
- package/template/.claude/skills/skill-creator/references/writing-effective-instructions.md +88 -88
- package/template/.claude/skills/skill-creator/references/yaml-frontmatter-reference.md +92 -92
- package/template/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -401
- package/template/.claude/skills/skill-creator/scripts/encoding_utils.py +36 -36
- package/template/.claude/skills/skill-creator/scripts/generate_report.py +326 -326
- package/template/.claude/skills/skill-creator/scripts/improve_description.py +248 -248
- package/template/.claude/skills/skill-creator/scripts/init_skill.py +360 -360
- package/template/.claude/skills/skill-creator/scripts/package_skill.py +143 -143
- package/template/.claude/skills/skill-creator/scripts/quick_validate.py +110 -110
- package/template/.claude/skills/skill-creator/scripts/run_eval.py +310 -310
- package/template/.claude/skills/skill-creator/scripts/run_loop.py +332 -332
- package/template/.claude/skills/skill-creator/scripts/utils.py +47 -47
- package/template/.claude/skills/tdd/SKILL.md +142 -142
- package/template/.claude/skills/tdd/deep-modules.md +15 -15
- package/template/.claude/skills/tdd/interface-design.md +31 -31
- package/template/.claude/skills/tdd/mocking.md +59 -59
- package/template/.claude/skills/tdd/refactoring.md +10 -10
- package/template/.claude/skills/tdd/tests.md +61 -61
- package/template/.claude/statusline.cjs +0 -0
- package/template/.claude/skills/code-review/references/adversarial-review.md +0 -223
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Before Completion
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Claiming work is complete without verification is dishonesty, not efficiency.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Evidence before claims, always.
|
|
13
|
+
|
|
14
|
+
**Violating the letter of this rule is violating the spirit of this rule.**
|
|
15
|
+
|
|
16
|
+
## The Iron Law
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If you haven't run the verification command in this message, you cannot claim it passes.
|
|
23
|
+
|
|
24
|
+
## The Gate Function
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
BEFORE claiming any status or expressing satisfaction:
|
|
28
|
+
|
|
29
|
+
1. IDENTIFY: What command proves this claim?
|
|
30
|
+
2. RUN: Execute the FULL command (fresh, complete)
|
|
31
|
+
3. READ: Full output, check exit code, count failures
|
|
32
|
+
4. VERIFY: Does output confirm the claim?
|
|
33
|
+
- If NO: State actual status with evidence
|
|
34
|
+
- If YES: State claim WITH evidence
|
|
35
|
+
5. ONLY THEN: Make the claim
|
|
36
|
+
|
|
37
|
+
Skip any step = lying, not verifying
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Common Failures
|
|
41
|
+
|
|
42
|
+
| Claim | Requires | Not Sufficient |
|
|
43
|
+
|-------|----------|----------------|
|
|
44
|
+
| Tests pass | Test command output: 0 failures | Previous run, "should pass" |
|
|
45
|
+
| Linter clean | Linter output: 0 errors | Partial check, extrapolation |
|
|
46
|
+
| Build succeeds | Build command: exit 0 | Linter passing, logs look good |
|
|
47
|
+
| Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
|
|
48
|
+
| Regression test works | Red-green cycle verified | Test passes once |
|
|
49
|
+
| Agent completed | VCS diff shows changes | Agent reports "success" |
|
|
50
|
+
| Requirements met | Line-by-line checklist | Tests passing |
|
|
51
|
+
|
|
52
|
+
## Red Flags - STOP
|
|
53
|
+
|
|
54
|
+
- Using "should", "probably", "seems to"
|
|
55
|
+
- Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
|
|
56
|
+
- About to commit/push/PR without verification
|
|
57
|
+
- Trusting agent success reports
|
|
58
|
+
- Relying on partial verification
|
|
59
|
+
- Thinking "just this once"
|
|
60
|
+
- Tired and wanting work over
|
|
61
|
+
- **ANY wording implying success without having run verification**
|
|
62
|
+
|
|
63
|
+
## Rationalization Prevention
|
|
64
|
+
|
|
65
|
+
| Excuse | Reality |
|
|
66
|
+
|--------|---------|
|
|
67
|
+
| "Should work now" | RUN the verification |
|
|
68
|
+
| "I'm confident" | Confidence ≠ evidence |
|
|
69
|
+
| "Just this once" | No exceptions |
|
|
70
|
+
| "Linter passed" | Linter ≠ compiler |
|
|
71
|
+
| "Agent said success" | Verify independently |
|
|
72
|
+
| "I'm tired" | Exhaustion ≠ excuse |
|
|
73
|
+
| "Partial check is enough" | Partial proves nothing |
|
|
74
|
+
| "Different words so rule doesn't apply" | Spirit over letter |
|
|
75
|
+
|
|
76
|
+
## Key Patterns
|
|
77
|
+
|
|
78
|
+
**Tests:**
|
|
79
|
+
```
|
|
80
|
+
✅ [Run test command] [See: 34/34 pass] "All tests pass"
|
|
81
|
+
❌ "Should pass now" / "Looks correct"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Regression tests (TDD Red-Green):**
|
|
85
|
+
```
|
|
86
|
+
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
|
|
87
|
+
❌ "I've written a regression test" (without red-green verification)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Build:**
|
|
91
|
+
```
|
|
92
|
+
✅ [Run build] [See: exit 0] "Build passes"
|
|
93
|
+
❌ "Linter passed" (linter doesn't check compilation)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Requirements:**
|
|
97
|
+
```
|
|
98
|
+
✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
|
|
99
|
+
❌ "Tests pass, phase complete"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Agent delegation:**
|
|
103
|
+
```
|
|
104
|
+
✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
|
|
105
|
+
❌ Trust agent report
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Why This Matters
|
|
109
|
+
|
|
110
|
+
From 24 failure memories:
|
|
111
|
+
- your human partner said "I don't believe you" - trust broken
|
|
112
|
+
- Undefined functions shipped - would crash
|
|
113
|
+
- Missing requirements shipped - incomplete features
|
|
114
|
+
- Time wasted on false completion → redirect → rework
|
|
115
|
+
- Violates: "Honesty is a core value. If you lie, you'll be replaced."
|
|
116
|
+
|
|
117
|
+
## When To Apply
|
|
118
|
+
|
|
119
|
+
**ALWAYS before:**
|
|
120
|
+
- ANY variation of success/completion claims
|
|
121
|
+
- ANY expression of satisfaction
|
|
122
|
+
- ANY positive statement about work state
|
|
123
|
+
- Committing, PR creation, task completion
|
|
124
|
+
- Moving to next task
|
|
125
|
+
- Delegating to agents
|
|
126
|
+
|
|
127
|
+
**Rule applies to:**
|
|
128
|
+
- Exact phrases
|
|
129
|
+
- Paraphrases and synonyms
|
|
130
|
+
- Implications of success
|
|
131
|
+
- ANY communication suggesting completion/correctness
|
|
132
|
+
|
|
133
|
+
## The Bottom Line
|
|
134
|
+
|
|
135
|
+
**No shortcuts for verification.**
|
|
136
|
+
|
|
137
|
+
Run the command. Read the output. THEN claim the result.
|
|
138
|
+
|
|
139
|
+
This is non-negotiable.
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: context-map
|
|
3
|
-
description: Write or update a DDD Context Map in CML (Context Mapper Language).
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<what-to-do>
|
|
7
|
-
|
|
8
|
-
Given a Context Map intent, produce or update the single `docs/bounded-contexts/context-map.cml` (one map per system, spanning every BC). The four intent shapes (use these exact labels):
|
|
9
|
-
|
|
10
|
-
- **`BC`** — name, optional `type` / `domainVisionStatement` / `responsibilities`. Adds it to `contains` and appends a `BoundedContext <Name>` declaration.
|
|
11
|
-
- **`peer-context`** — same shape as `BC`, named after an external system. Used for every `external_system` declared on the EventStorming wall.
|
|
12
|
-
- **`relationship`** — upstream BC, downstream BC, shape (Partnership / Shared-Kernel / Upstream-Downstream / Customer-Supplier), role brackets, optional name, optional `{ implementationTechnology, downstreamRights, exposedAggregates }` attributes.
|
|
13
|
-
- **`Aggregate`** — name + owning BC. Adds `Aggregate <Name>` inside the BC's `{ … }` body, creating the body if it was empty. Required when the name appears in any relationship's `exposedAggregates`. Maintain 1:1 sync with the wall JSON: every entry in `aggregates[]` on the BC's `docs/bounded-contexts/{bc}/event-storming.json` (or the general `docs/event-storming.json` before segregation) has a matching `Aggregate <Name>` inside its owning BC, written the same turn.
|
|
14
|
-
|
|
15
|
-
Workflow:
|
|
16
|
-
|
|
17
|
-
1. **Locate or scaffold the file.** If it doesn't exist, scaffold a minimal `ContextMap SystemContextMap { type = SYSTEM_LANDSCAPE state = AS_IS contains <BCs> }` block followed by one `BoundedContext <Name>` declaration per BC in `contains`. Use [example.cml](./example.cml) as a **syntax reference**, not a literal copy — its DDDSample BCs are illustrative.
|
|
18
|
-
2. **Write the requested change.** Per intent shape: add the `contains` entry + `BoundedContext` declaration (`BC` / `peer-context`); add the relationship line (`relationship`); add `Aggregate <Name>` inside the owning BC's body (`Aggregate`). For every BC newly referenced anywhere, append a `BoundedContext <Name>` declaration — without it Xtext linker fails with `Couldn't resolve reference to BoundedContext '<Name>'`.
|
|
19
|
-
3. **Lint.** A PostToolUse hook auto-runs Context Mapper validation on every `.cml` edit. Treat any `ERROR …` line in its output as blocking; `WARNING …` lines (e.g. ACL on Customer-Supplier per Semantic Rule #7) are allowed when intentional.
|
|
20
|
-
4. **Hand-audit.** `cm validate` is necessary but not sufficient — see Limitations below. Audit three things by hand before reporting success: (i) every `exposedAggregates` name lives in the upstream BC of its relationship; (ii) every role bracket combo respects the 10 Semantic Rules; (iii) no Aggregate name is duplicated across BCs unless deliberate.
|
|
21
|
-
5. **Report.** State the line(s) written and PASS/FAIL of `cm validate` (on FAIL, paste only the first `ERROR` line and where to fix). Call out anything the hand-audit flagged.
|
|
22
|
-
|
|
23
|
-
If a piece of the intent is ambiguous (e.g. which side is upstream, which roles to use), ask the caller — don't invent. The skill's job is mechanical correctness, not design judgement.
|
|
24
|
-
|
|
25
|
-
</what-to-do>
|
|
26
|
-
|
|
27
|
-
<supporting-info>
|
|
28
|
-
|
|
29
|
-
## File location
|
|
30
|
-
|
|
31
|
-
`docs/bounded-contexts/context-map.cml` — a single map for the whole system, sitting beside the per-BC folders.
|
|
32
|
-
|
|
33
|
-
## Reference (load lazily by intent shape)
|
|
34
|
-
|
|
35
|
-
The reference is an Obsidian folder with `[[wikilinks]]` between files. Load in tiers — don't front-load everything:
|
|
36
|
-
|
|
37
|
-
- **Always** (first invocation this session):
|
|
38
|
-
- `./reference/Context Map.md` — top-level grammar, relationship arrows, role brackets, attributes.
|
|
39
|
-
- `./reference/Semantic Rules.md` — the 10 combination rules.
|
|
40
|
-
- **When writing a `BC` or `peer-context`** with non-trivial attributes:
|
|
41
|
-
- `./reference/Bounded Context/Bounded Context.md` — attribute docs (`implements`, `refines`, `domainVisionStatement`, `responsibilities`, `type`, `knowledgeLevel`, `businessModel`, `evolution`, `realizes`).
|
|
42
|
-
- **When writing a `relationship`**:
|
|
43
|
-
- `./reference/Bounded Context Relationship/Bounded Context Relationship.md` — per-pattern pages (Partnership, Shared Kernel, Customer-Supplier, OHS, PL, CF, ACL).
|
|
44
|
-
- **When writing an `Aggregate` or setting `exposedAggregates`**:
|
|
45
|
-
- `./reference/Aggregate/Aggregate.md` — Aggregate composition.
|
|
46
|
-
- **When a BC uses `implements` / `refines`**:
|
|
47
|
-
- `./reference/Domain/Domain.md` — Domain / Subdomain framing.
|
|
48
|
-
|
|
49
|
-
## Linting (mandatory before reporting success)
|
|
50
|
-
|
|
51
|
-
Validation runs automatically via the PostToolUse `validate-cml-hook` on every `.cml` edit (Context Mapper CLI, self-bootstrapped from Maven on first run; requires Java 8+).
|
|
52
|
-
|
|
53
|
-
**CML-specific failure modes to recognise:**
|
|
54
|
-
|
|
55
|
-
- `Couldn't resolve reference to BoundedContext '<Name>'` + `The Bounded Context 'null' is not part of the Context Map.` — a name in `contains` or a relationship line has no `BoundedContext <Name>` declaration. Fix: append the missing declaration.
|
|
56
|
-
- `ERROR in null on line N: no viable alternative at input '<token>'` — parse error. Re-read the grammar at the reported line.
|
|
57
|
-
|
|
58
|
-
## Limitations of `cm validate` — hand-audit is required after it passes
|
|
59
|
-
|
|
60
|
-
Confirmed-misses (tested against 6.12.0):
|
|
61
|
-
|
|
62
|
-
| Catches | Misses |
|
|
63
|
-
| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
-
| Parse errors with line numbers | Semantic Rule violations from `Semantic Rules.md` (OHS on Customer-Supplier #6, CF on Customer-Supplier #5, ACL/CF/OHS/PL on symmetric relationships #4, etc.) |
|
|
65
|
-
| Linker errors when they fire | Duplicate Aggregate names across different BCs (CML scopes `exposedAggregates` by upstream BC, so duplicates resolve rather than collide — but they're semantically muddled) |
|
|
66
|
-
| Resource-level diagnostics from `cmlResource.getErrors()` | Anything that needs the full Xtext `IResourceValidator` chain (Eclipse/VSCode extension surfaces these; the CLI does not) |
|
|
67
|
-
|
|
68
|
-
After `cm validate` prints "without errors", audit by hand:
|
|
69
|
-
|
|
70
|
-
1. Every `exposedAggregates` name resolves to an Aggregate declared inside the **upstream** BC of that relationship line.
|
|
71
|
-
2. Every role bracket combo is allowed by the 10 Semantic Rules (consult `./reference/Semantic Rules.md`).
|
|
72
|
-
3. No Aggregate name is duplicated across BCs unless deliberate.
|
|
73
|
-
|
|
74
|
-
For deeper validation, open the file in VSCode with the Context Mapper extension installed.
|
|
75
|
-
|
|
76
|
-
## Glossary
|
|
77
|
-
|
|
78
|
-
Same `ubiquitous-language.md` convention as the EventStorming skills. Challenge BC names against the language doc before writing. If a relationship introduces a novel domain term, add a one-sentence definition in `docs/ubiquitous-language.md` the same turn.
|
|
79
|
-
|
|
80
|
-
</supporting-info>
|
|
1
|
+
---
|
|
2
|
+
name: context-map
|
|
3
|
+
description: Write or update a DDD Context Map in CML (Context Mapper Language).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
7
|
+
|
|
8
|
+
Given a Context Map intent, produce or update the single `docs/bounded-contexts/context-map.cml` (one map per system, spanning every BC). The four intent shapes (use these exact labels):
|
|
9
|
+
|
|
10
|
+
- **`BC`** — name, optional `type` / `domainVisionStatement` / `responsibilities`. Adds it to `contains` and appends a `BoundedContext <Name>` declaration.
|
|
11
|
+
- **`peer-context`** — same shape as `BC`, named after an external system. Used for every `external_system` declared on the EventStorming wall.
|
|
12
|
+
- **`relationship`** — upstream BC, downstream BC, shape (Partnership / Shared-Kernel / Upstream-Downstream / Customer-Supplier), role brackets, optional name, optional `{ implementationTechnology, downstreamRights, exposedAggregates }` attributes.
|
|
13
|
+
- **`Aggregate`** — name + owning BC. Adds `Aggregate <Name>` inside the BC's `{ … }` body, creating the body if it was empty. Required when the name appears in any relationship's `exposedAggregates`. Maintain 1:1 sync with the wall JSON: every entry in `aggregates[]` on the BC's `docs/bounded-contexts/{bc}/event-storming.json` (or the general `docs/event-storming.json` before segregation) has a matching `Aggregate <Name>` inside its owning BC, written the same turn.
|
|
14
|
+
|
|
15
|
+
Workflow:
|
|
16
|
+
|
|
17
|
+
1. **Locate or scaffold the file.** If it doesn't exist, scaffold a minimal `ContextMap SystemContextMap { type = SYSTEM_LANDSCAPE state = AS_IS contains <BCs> }` block followed by one `BoundedContext <Name>` declaration per BC in `contains`. Use [example.cml](./example.cml) as a **syntax reference**, not a literal copy — its DDDSample BCs are illustrative.
|
|
18
|
+
2. **Write the requested change.** Per intent shape: add the `contains` entry + `BoundedContext` declaration (`BC` / `peer-context`); add the relationship line (`relationship`); add `Aggregate <Name>` inside the owning BC's body (`Aggregate`). For every BC newly referenced anywhere, append a `BoundedContext <Name>` declaration — without it Xtext linker fails with `Couldn't resolve reference to BoundedContext '<Name>'`.
|
|
19
|
+
3. **Lint.** A PostToolUse hook auto-runs Context Mapper validation on every `.cml` edit. Treat any `ERROR …` line in its output as blocking; `WARNING …` lines (e.g. ACL on Customer-Supplier per Semantic Rule #7) are allowed when intentional.
|
|
20
|
+
4. **Hand-audit.** `cm validate` is necessary but not sufficient — see Limitations below. Audit three things by hand before reporting success: (i) every `exposedAggregates` name lives in the upstream BC of its relationship; (ii) every role bracket combo respects the 10 Semantic Rules; (iii) no Aggregate name is duplicated across BCs unless deliberate.
|
|
21
|
+
5. **Report.** State the line(s) written and PASS/FAIL of `cm validate` (on FAIL, paste only the first `ERROR` line and where to fix). Call out anything the hand-audit flagged.
|
|
22
|
+
|
|
23
|
+
If a piece of the intent is ambiguous (e.g. which side is upstream, which roles to use), ask the caller — don't invent. The skill's job is mechanical correctness, not design judgement.
|
|
24
|
+
|
|
25
|
+
</what-to-do>
|
|
26
|
+
|
|
27
|
+
<supporting-info>
|
|
28
|
+
|
|
29
|
+
## File location
|
|
30
|
+
|
|
31
|
+
`docs/bounded-contexts/context-map.cml` — a single map for the whole system, sitting beside the per-BC folders.
|
|
32
|
+
|
|
33
|
+
## Reference (load lazily by intent shape)
|
|
34
|
+
|
|
35
|
+
The reference is an Obsidian folder with `[[wikilinks]]` between files. Load in tiers — don't front-load everything:
|
|
36
|
+
|
|
37
|
+
- **Always** (first invocation this session):
|
|
38
|
+
- `./reference/Context Map.md` — top-level grammar, relationship arrows, role brackets, attributes.
|
|
39
|
+
- `./reference/Semantic Rules.md` — the 10 combination rules.
|
|
40
|
+
- **When writing a `BC` or `peer-context`** with non-trivial attributes:
|
|
41
|
+
- `./reference/Bounded Context/Bounded Context.md` — attribute docs (`implements`, `refines`, `domainVisionStatement`, `responsibilities`, `type`, `knowledgeLevel`, `businessModel`, `evolution`, `realizes`).
|
|
42
|
+
- **When writing a `relationship`**:
|
|
43
|
+
- `./reference/Bounded Context Relationship/Bounded Context Relationship.md` — per-pattern pages (Partnership, Shared Kernel, Customer-Supplier, OHS, PL, CF, ACL).
|
|
44
|
+
- **When writing an `Aggregate` or setting `exposedAggregates`**:
|
|
45
|
+
- `./reference/Aggregate/Aggregate.md` — Aggregate composition.
|
|
46
|
+
- **When a BC uses `implements` / `refines`**:
|
|
47
|
+
- `./reference/Domain/Domain.md` — Domain / Subdomain framing.
|
|
48
|
+
|
|
49
|
+
## Linting (mandatory before reporting success)
|
|
50
|
+
|
|
51
|
+
Validation runs automatically via the PostToolUse `validate-cml-hook` on every `.cml` edit (Context Mapper CLI, self-bootstrapped from Maven on first run; requires Java 8+).
|
|
52
|
+
|
|
53
|
+
**CML-specific failure modes to recognise:**
|
|
54
|
+
|
|
55
|
+
- `Couldn't resolve reference to BoundedContext '<Name>'` + `The Bounded Context 'null' is not part of the Context Map.` — a name in `contains` or a relationship line has no `BoundedContext <Name>` declaration. Fix: append the missing declaration.
|
|
56
|
+
- `ERROR in null on line N: no viable alternative at input '<token>'` — parse error. Re-read the grammar at the reported line.
|
|
57
|
+
|
|
58
|
+
## Limitations of `cm validate` — hand-audit is required after it passes
|
|
59
|
+
|
|
60
|
+
Confirmed-misses (tested against 6.12.0):
|
|
61
|
+
|
|
62
|
+
| Catches | Misses |
|
|
63
|
+
| --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| Parse errors with line numbers | Semantic Rule violations from `Semantic Rules.md` (OHS on Customer-Supplier #6, CF on Customer-Supplier #5, ACL/CF/OHS/PL on symmetric relationships #4, etc.) |
|
|
65
|
+
| Linker errors when they fire | Duplicate Aggregate names across different BCs (CML scopes `exposedAggregates` by upstream BC, so duplicates resolve rather than collide — but they're semantically muddled) |
|
|
66
|
+
| Resource-level diagnostics from `cmlResource.getErrors()` | Anything that needs the full Xtext `IResourceValidator` chain (Eclipse/VSCode extension surfaces these; the CLI does not) |
|
|
67
|
+
|
|
68
|
+
After `cm validate` prints "without errors", audit by hand:
|
|
69
|
+
|
|
70
|
+
1. Every `exposedAggregates` name resolves to an Aggregate declared inside the **upstream** BC of that relationship line.
|
|
71
|
+
2. Every role bracket combo is allowed by the 10 Semantic Rules (consult `./reference/Semantic Rules.md`).
|
|
72
|
+
3. No Aggregate name is duplicated across BCs unless deliberate.
|
|
73
|
+
|
|
74
|
+
For deeper validation, open the file in VSCode with the Context Mapper extension installed.
|
|
75
|
+
|
|
76
|
+
## Glossary
|
|
77
|
+
|
|
78
|
+
Same `ubiquitous-language.md` convention as the EventStorming skills. Challenge BC names against the language doc before writing. If a relationship introduces a novel domain term, add a one-sentence definition in `docs/ubiquitous-language.md` the same turn.
|
|
79
|
+
|
|
80
|
+
</supporting-info>
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
/* Canonical Context Map example for the context-map skill.
|
|
2
|
-
*
|
|
3
|
-
* Grammar reference: ./reference/Context Map.md
|
|
4
|
-
* Role combination rules: ./reference/Semantic Rules.md
|
|
5
|
-
*
|
|
6
|
-
* Shows all four relationship shapes (Partnership, Shared Kernel,
|
|
7
|
-
* Upstream-Downstream, Customer-Supplier) with the full attribute
|
|
8
|
-
* vocabulary so per-wall maps have a single place to copy from.
|
|
9
|
-
*
|
|
10
|
-
* This file is intended to compile clean against `cm validate -i <file>.cml`
|
|
11
|
-
* (Context Mapper CLI 6.12+). Every Bounded Context referenced in the
|
|
12
|
-
* ContextMap must also be declared as a `BoundedContext <Name>` below —
|
|
13
|
-
* forgetting that produces the Xtext linking error:
|
|
14
|
-
* "Couldn't resolve reference to BoundedContext '<Name>'."
|
|
15
|
-
* "The Bounded Context 'null' is not part of the Context Map."
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
ContextMap DDDSampleContextMap {
|
|
19
|
-
type = SYSTEM_LANDSCAPE
|
|
20
|
-
state = AS_IS
|
|
21
|
-
|
|
22
|
-
contains CargoBookingContext, VoyagePlanningContext, LocationContext
|
|
23
|
-
contains ContractsContext, ClaimsContext
|
|
24
|
-
contains CustomerSelfServiceContext, CustomerManagementContext
|
|
25
|
-
contains PrintingContext, PolicyManagementContext
|
|
26
|
-
|
|
27
|
-
/* Shared Kernel (symmetric) --------------------------------------------
|
|
28
|
-
* Two contexts share a common subset of the model (a library, a package).
|
|
29
|
-
* Changes on either side need coordinated review.
|
|
30
|
-
*/
|
|
31
|
-
CargoBookingContext [SK]<->[SK] VoyagePlanningContext : BookingVoyageRelationship {
|
|
32
|
-
implementationTechnology = "Java Library"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* Partnership (symmetric) ----------------------------------------------
|
|
36
|
-
* Two contexts succeed or fail together. Joint planning, shared roadmap.
|
|
37
|
-
*/
|
|
38
|
-
ContractsContext [P]<->[P] ClaimsContext : ContractClaimRelationship {
|
|
39
|
-
implementationTechnology = "Messaging"
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Upstream-Downstream with OHS / PL / ACL ------------------------------
|
|
43
|
-
* Upstream publishes a stable, documented API in a Published Language.
|
|
44
|
-
* Downstream wraps incoming data in an Anti-Corruption Layer to keep
|
|
45
|
-
* upstream model leakage out of its own domain.
|
|
46
|
-
*/
|
|
47
|
-
CargoBookingContext [D,ACL]<-[U,OHS,PL] LocationContext : CargoLocationRelationship {
|
|
48
|
-
implementationTechnology = "RESTful HTTP"
|
|
49
|
-
downstreamRights = VETO_RIGHT
|
|
50
|
-
exposedAggregates = Locations, Addresses
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Customer-Supplier (asymmetric, downstream has influence) -------------
|
|
54
|
-
* Special case of upstream-downstream: downstream's priorities factor
|
|
55
|
-
* into upstream planning. Note: CF and OHS are NOT applicable here
|
|
56
|
-
* (semantic-rule errors). ACL is allowed but emits a semantic WARNING
|
|
57
|
-
* (rule #7 in Semantic Rules.md) — kept here to show the form.
|
|
58
|
-
*/
|
|
59
|
-
CustomerSelfServiceContext [D,C,ACL]<-[U,S,PL] CustomerManagementContext : CustomerFrontendBackendRelationship {
|
|
60
|
-
implementationTechnology = "RESTful HTTP"
|
|
61
|
-
downstreamRights = OPINION_LEADER
|
|
62
|
-
exposedAggregates = Customers
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Upstream-Downstream with CF (no ACL) ---------------------------------
|
|
66
|
-
* Downstream conforms to the upstream model wholesale — no translation.
|
|
67
|
-
* Cheap to integrate, but downstream becomes coupled to upstream changes.
|
|
68
|
-
*/
|
|
69
|
-
PolicyManagementContext [D,CF]<-[U,OHS,PL] PrintingContext {
|
|
70
|
-
implementationTechnology = "SOAP"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* ---------------------------------------------------------------------------
|
|
75
|
-
* Bounded Context declarations.
|
|
76
|
-
*
|
|
77
|
-
* Each name used above in `contains` and in relationship lines must resolve
|
|
78
|
-
* to a BoundedContext declaration somewhere in the file. Empty bodies are
|
|
79
|
-
* legal — declarations can stay minimal in a strategic-only map.
|
|
80
|
-
*
|
|
81
|
-
* Aggregates referenced by `exposedAggregates` MUST live inside the upstream
|
|
82
|
-
* BoundedContext of the relationship — see the LocationContext block (which
|
|
83
|
-
* owns Locations + Addresses, exposed to CargoBookingContext) and the
|
|
84
|
-
* CustomerManagementContext block (which owns Customers, exposed to
|
|
85
|
-
* CustomerSelfServiceContext).
|
|
86
|
-
* --------------------------------------------------------------------------- */
|
|
87
|
-
|
|
88
|
-
BoundedContext CargoBookingContext
|
|
89
|
-
BoundedContext VoyagePlanningContext
|
|
90
|
-
|
|
91
|
-
BoundedContext LocationContext {
|
|
92
|
-
Aggregate Locations
|
|
93
|
-
Aggregate Addresses
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
BoundedContext ContractsContext
|
|
97
|
-
BoundedContext ClaimsContext
|
|
98
|
-
|
|
99
|
-
BoundedContext CustomerSelfServiceContext
|
|
100
|
-
|
|
101
|
-
BoundedContext CustomerManagementContext {
|
|
102
|
-
Aggregate Customers
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
BoundedContext PrintingContext
|
|
106
|
-
BoundedContext PolicyManagementContext
|
|
1
|
+
/* Canonical Context Map example for the context-map skill.
|
|
2
|
+
*
|
|
3
|
+
* Grammar reference: ./reference/Context Map.md
|
|
4
|
+
* Role combination rules: ./reference/Semantic Rules.md
|
|
5
|
+
*
|
|
6
|
+
* Shows all four relationship shapes (Partnership, Shared Kernel,
|
|
7
|
+
* Upstream-Downstream, Customer-Supplier) with the full attribute
|
|
8
|
+
* vocabulary so per-wall maps have a single place to copy from.
|
|
9
|
+
*
|
|
10
|
+
* This file is intended to compile clean against `cm validate -i <file>.cml`
|
|
11
|
+
* (Context Mapper CLI 6.12+). Every Bounded Context referenced in the
|
|
12
|
+
* ContextMap must also be declared as a `BoundedContext <Name>` below —
|
|
13
|
+
* forgetting that produces the Xtext linking error:
|
|
14
|
+
* "Couldn't resolve reference to BoundedContext '<Name>'."
|
|
15
|
+
* "The Bounded Context 'null' is not part of the Context Map."
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
ContextMap DDDSampleContextMap {
|
|
19
|
+
type = SYSTEM_LANDSCAPE
|
|
20
|
+
state = AS_IS
|
|
21
|
+
|
|
22
|
+
contains CargoBookingContext, VoyagePlanningContext, LocationContext
|
|
23
|
+
contains ContractsContext, ClaimsContext
|
|
24
|
+
contains CustomerSelfServiceContext, CustomerManagementContext
|
|
25
|
+
contains PrintingContext, PolicyManagementContext
|
|
26
|
+
|
|
27
|
+
/* Shared Kernel (symmetric) --------------------------------------------
|
|
28
|
+
* Two contexts share a common subset of the model (a library, a package).
|
|
29
|
+
* Changes on either side need coordinated review.
|
|
30
|
+
*/
|
|
31
|
+
CargoBookingContext [SK]<->[SK] VoyagePlanningContext : BookingVoyageRelationship {
|
|
32
|
+
implementationTechnology = "Java Library"
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Partnership (symmetric) ----------------------------------------------
|
|
36
|
+
* Two contexts succeed or fail together. Joint planning, shared roadmap.
|
|
37
|
+
*/
|
|
38
|
+
ContractsContext [P]<->[P] ClaimsContext : ContractClaimRelationship {
|
|
39
|
+
implementationTechnology = "Messaging"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Upstream-Downstream with OHS / PL / ACL ------------------------------
|
|
43
|
+
* Upstream publishes a stable, documented API in a Published Language.
|
|
44
|
+
* Downstream wraps incoming data in an Anti-Corruption Layer to keep
|
|
45
|
+
* upstream model leakage out of its own domain.
|
|
46
|
+
*/
|
|
47
|
+
CargoBookingContext [D,ACL]<-[U,OHS,PL] LocationContext : CargoLocationRelationship {
|
|
48
|
+
implementationTechnology = "RESTful HTTP"
|
|
49
|
+
downstreamRights = VETO_RIGHT
|
|
50
|
+
exposedAggregates = Locations, Addresses
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Customer-Supplier (asymmetric, downstream has influence) -------------
|
|
54
|
+
* Special case of upstream-downstream: downstream's priorities factor
|
|
55
|
+
* into upstream planning. Note: CF and OHS are NOT applicable here
|
|
56
|
+
* (semantic-rule errors). ACL is allowed but emits a semantic WARNING
|
|
57
|
+
* (rule #7 in Semantic Rules.md) — kept here to show the form.
|
|
58
|
+
*/
|
|
59
|
+
CustomerSelfServiceContext [D,C,ACL]<-[U,S,PL] CustomerManagementContext : CustomerFrontendBackendRelationship {
|
|
60
|
+
implementationTechnology = "RESTful HTTP"
|
|
61
|
+
downstreamRights = OPINION_LEADER
|
|
62
|
+
exposedAggregates = Customers
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Upstream-Downstream with CF (no ACL) ---------------------------------
|
|
66
|
+
* Downstream conforms to the upstream model wholesale — no translation.
|
|
67
|
+
* Cheap to integrate, but downstream becomes coupled to upstream changes.
|
|
68
|
+
*/
|
|
69
|
+
PolicyManagementContext [D,CF]<-[U,OHS,PL] PrintingContext {
|
|
70
|
+
implementationTechnology = "SOAP"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ---------------------------------------------------------------------------
|
|
75
|
+
* Bounded Context declarations.
|
|
76
|
+
*
|
|
77
|
+
* Each name used above in `contains` and in relationship lines must resolve
|
|
78
|
+
* to a BoundedContext declaration somewhere in the file. Empty bodies are
|
|
79
|
+
* legal — declarations can stay minimal in a strategic-only map.
|
|
80
|
+
*
|
|
81
|
+
* Aggregates referenced by `exposedAggregates` MUST live inside the upstream
|
|
82
|
+
* BoundedContext of the relationship — see the LocationContext block (which
|
|
83
|
+
* owns Locations + Addresses, exposed to CargoBookingContext) and the
|
|
84
|
+
* CustomerManagementContext block (which owns Customers, exposed to
|
|
85
|
+
* CustomerSelfServiceContext).
|
|
86
|
+
* --------------------------------------------------------------------------- */
|
|
87
|
+
|
|
88
|
+
BoundedContext CargoBookingContext
|
|
89
|
+
BoundedContext VoyagePlanningContext
|
|
90
|
+
|
|
91
|
+
BoundedContext LocationContext {
|
|
92
|
+
Aggregate Locations
|
|
93
|
+
Aggregate Addresses
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
BoundedContext ContractsContext
|
|
97
|
+
BoundedContext ClaimsContext
|
|
98
|
+
|
|
99
|
+
BoundedContext CustomerSelfServiceContext
|
|
100
|
+
|
|
101
|
+
BoundedContext CustomerManagementContext {
|
|
102
|
+
Aggregate Customers
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
BoundedContext PrintingContext
|
|
106
|
+
BoundedContext PolicyManagementContext
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
```cml
|
|
2
|
-
BoundedContext CustomerManagementContext implements CustomerManagementDomain {
|
|
3
|
-
type = FEATURE
|
|
4
|
-
domainVisionStatement = "The customer management context is responsible for ..."
|
|
5
|
-
implementationTechnology = "Java, JEE Application"
|
|
6
|
-
responsibilities = "Customers", "Addresses"
|
|
7
|
-
knowledgeLevel = CONCRETE
|
|
8
|
-
|
|
9
|
-
Module addresses {
|
|
10
|
-
Aggregate Addresses {
|
|
11
|
-
Entity Address {
|
|
12
|
-
String city
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
Aggregate Customers {
|
|
17
|
-
Entity Customer {
|
|
18
|
-
aggregateRoot
|
|
19
|
-
|
|
20
|
-
- SocialInsuranceNumber sin
|
|
21
|
-
String firstname
|
|
22
|
-
String lastname
|
|
23
|
-
- List<Address> addresses
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Note: Bounded Context names must be unique within your CML model.
|
|
30
|
-
|
|
31
|
-
[[implements]]
|
|
32
|
-
[[refines]]
|
|
33
|
-
[[domainVisionStatement]]
|
|
34
|
-
[[implementationTechnology]]
|
|
35
|
-
[[responsibilities]]
|
|
36
|
-
[[Domain-Driven Design/Context Map/Bounded Context/type]]
|
|
37
|
-
[[knowledgeLevel]]
|
|
38
|
-
[[businessModel]]
|
|
39
|
-
[[evolution]]
|
|
40
|
-
[[realizes]]
|
|
1
|
+
```cml
|
|
2
|
+
BoundedContext CustomerManagementContext implements CustomerManagementDomain {
|
|
3
|
+
type = FEATURE
|
|
4
|
+
domainVisionStatement = "The customer management context is responsible for ..."
|
|
5
|
+
implementationTechnology = "Java, JEE Application"
|
|
6
|
+
responsibilities = "Customers", "Addresses"
|
|
7
|
+
knowledgeLevel = CONCRETE
|
|
8
|
+
|
|
9
|
+
Module addresses {
|
|
10
|
+
Aggregate Addresses {
|
|
11
|
+
Entity Address {
|
|
12
|
+
String city
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
Aggregate Customers {
|
|
17
|
+
Entity Customer {
|
|
18
|
+
aggregateRoot
|
|
19
|
+
|
|
20
|
+
- SocialInsuranceNumber sin
|
|
21
|
+
String firstname
|
|
22
|
+
String lastname
|
|
23
|
+
- List<Address> addresses
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Note: Bounded Context names must be unique within your CML model.
|
|
30
|
+
|
|
31
|
+
[[implements]]
|
|
32
|
+
[[refines]]
|
|
33
|
+
[[domainVisionStatement]]
|
|
34
|
+
[[implementationTechnology]]
|
|
35
|
+
[[responsibilities]]
|
|
36
|
+
[[Domain-Driven Design/Context Map/Bounded Context/type]]
|
|
37
|
+
[[knowledgeLevel]]
|
|
38
|
+
[[businessModel]]
|
|
39
|
+
[[evolution]]
|
|
40
|
+
[[realizes]]
|
|
41
41
|
[[Bounded Context Relationship]]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
https://github.com/ddd-crew/bounded-context-canvas
|
|
2
|
-
- UNDEFINED
|
|
3
|
-
- REVENUE
|
|
4
|
-
- ENGAGEMENT
|
|
5
|
-
- COMPLIANCE
|
|
1
|
+
https://github.com/ddd-crew/bounded-context-canvas
|
|
2
|
+
- UNDEFINED
|
|
3
|
+
- REVENUE
|
|
4
|
+
- ENGAGEMENT
|
|
5
|
+
- COMPLIANCE
|
|
6
6
|
- COST_REDUCTION
|
package/template/.claude/skills/context-map/reference/Bounded Context/domainVisionStatement.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
The `domainVisionStatement` keyword describes the vision statement of your bounded context, according to the DDD Domain Vision Statement pattern. https://contextmapper.org/docs/domain-vision-statement/
|
|
2
|
-
|
|
1
|
+
The `domainVisionStatement` keyword describes the vision statement of your bounded context, according to the DDD Domain Vision Statement pattern. https://contextmapper.org/docs/domain-vision-statement/
|
|
2
|
+
|
|
3
3
|
Can be used in a [[Domain-Driven Design/Context Map/Bounded Context/Bounded Context|Bounded Context]], a [[Domain]], and a subdomain.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
https://github.com/ddd-crew/bounded-context-canvas
|
|
2
|
-
- UNDEFINED
|
|
3
|
-
- GENESIS
|
|
4
|
-
- CUSTOM_BUILT
|
|
5
|
-
- PRODUCT
|
|
1
|
+
https://github.com/ddd-crew/bounded-context-canvas
|
|
2
|
+
- UNDEFINED
|
|
3
|
+
- GENESIS
|
|
4
|
+
- CUSTOM_BUILT
|
|
5
|
+
- PRODUCT
|
|
6
6
|
- COMMODITY
|
package/template/.claude/skills/context-map/reference/Bounded Context/implementationTechnology.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
The `implementationTechnology` adds information about how the corresponding bounded context is implemented. Note that this attribute does not correspond to any DDD pattern.
|
|
1
|
+
The `implementationTechnology` adds information about how the corresponding bounded context is implemented. Note that this attribute does not correspond to any DDD pattern.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
The `implements` keyword specifies which domain or subdomains are implemented by this bounded context. Behind the `implements` keyword you can either reference a list of subdomains (comma-separated) or one top-level domain.
|
|
1
|
+
The `implements` keyword specifies which domain or subdomains are implemented by this bounded context. Behind the `implements` keyword you can either reference a list of subdomains (comma-separated) or one top-level domain.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
The `knowledgeLevel` keyword defines the knowledge level of the bounded context which can be one of the following two:
|
|
2
|
-
- `CONCRETE`
|
|
3
|
-
- `META`
|
|
4
|
-
|
|
1
|
+
The `knowledgeLevel` keyword defines the knowledge level of the bounded context which can be one of the following two:
|
|
2
|
+
- `CONCRETE`
|
|
3
|
+
- `META`
|
|
4
|
+
|
|
5
5
|
Also supports [[Aggregate]]
|