@leitwerk-dev/mattpocock-skills 0.0.0-stage → 0.4.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/README.md +57 -2
- package/dist/LICENSE +13 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/skills/manifest.json +46 -0
- package/dist/skills/mattpocock-codebase-design/DEEPENING.md +37 -0
- package/dist/skills/mattpocock-codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/dist/skills/mattpocock-codebase-design/SKILL.md +114 -0
- package/dist/skills/mattpocock-codebase-design/licenses/LICENSE +21 -0
- package/dist/skills/mattpocock-domain-modeling/ADR-FORMAT.md +47 -0
- package/dist/skills/mattpocock-domain-modeling/GLOSSARY-FORMAT.md +62 -0
- package/dist/skills/mattpocock-domain-modeling/SKILL.md +48 -0
- package/dist/skills/mattpocock-domain-modeling/licenses/LICENSE +21 -0
- package/dist/skills/mattpocock-grilling/SKILL.md +16 -0
- package/dist/skills/mattpocock-grilling/licenses/LICENSE +21 -0
- package/dist/skills/mattpocock-improve-codebase-architecture/MARKDOWN-REPORT.md +30 -0
- package/dist/skills/mattpocock-improve-codebase-architecture/SKILL.md +55 -0
- package/dist/skills/mattpocock-improve-codebase-architecture/licenses/LICENSE +21 -0
- package/package.json +55 -5
- package/patches/leitwerk.patch +490 -0
- package/skill-pack.json +33 -0
- package/src/index.ts +8 -0
- package/upstream/LICENSE +21 -0
- package/upstream/skills/engineering/codebase-design/DEEPENING.md +37 -0
- package/upstream/skills/engineering/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/upstream/skills/engineering/codebase-design/SKILL.md +114 -0
- package/upstream/skills/engineering/codebase-design/agents/openai.yaml +3 -0
- package/upstream/skills/engineering/domain-modeling/ADR-FORMAT.md +47 -0
- package/upstream/skills/engineering/domain-modeling/GLOSSARY-FORMAT.md +60 -0
- package/upstream/skills/engineering/domain-modeling/SKILL.md +74 -0
- package/upstream/skills/engineering/domain-modeling/agents/openai.yaml +3 -0
- package/upstream/skills/engineering/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/upstream/skills/engineering/improve-codebase-architecture/SKILL.md +71 -0
- package/upstream/skills/engineering/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/upstream/skills/productivity/grilling/SKILL.md +28 -0
- package/upstream/skills/productivity/grilling/agents/openai.yaml +3 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mattpocock-improve-codebase-architecture
|
|
3
|
+
description: Scan a codebase for deepening opportunities, present them as a Markdown report with Mermaid diagrams, then grill through whichever one you pick.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Improve Codebase Architecture
|
|
7
|
+
|
|
8
|
+
Surface architectural friction and propose **deepening opportunities**: refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
|
|
9
|
+
|
|
10
|
+
This command is _informed_ by the project's domain model and built on a shared design vocabulary:
|
|
11
|
+
|
|
12
|
+
- Read [mattpocock-codebase-design](../mattpocock-codebase-design/SKILL.md) with the available `read` tool for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion, and don't drift into "component," "service," "API," or "boundary."
|
|
13
|
+
- Read the target repository’s agent instructions to locate its domain glossary and ADRs. Follow those conventions; common glossary locations include `GLOSSARY.md`, `CONTEXT.md`, and `docs/ubiquitous_language.md`.
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
### 1. Explore
|
|
18
|
+
|
|
19
|
+
**Scope before you scan: YAGNI.** Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide *where* to look before you look:
|
|
20
|
+
|
|
21
|
+
- If the user named a direction (a module, a subsystem, a pain point), take it, and skip the inference below.
|
|
22
|
+
- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots, the files and areas that keep coming up, and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.
|
|
23
|
+
|
|
24
|
+
Read the project's documented domain glossary and any ADRs in the area you're touching first.
|
|
25
|
+
|
|
26
|
+
Then walk the codebase yourself using the active turn’s workspace tools. Don't follow rigid heuristics; explore organically and note where you experience friction:
|
|
27
|
+
|
|
28
|
+
- Where does understanding one concept require bouncing between many small modules?
|
|
29
|
+
- Where are modules **shallow**, with an interface nearly as complex as the implementation?
|
|
30
|
+
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)?
|
|
31
|
+
- Where do tightly-coupled modules leak across their seams?
|
|
32
|
+
- Which parts of the codebase are untested, or hard to test through their current interface?
|
|
33
|
+
|
|
34
|
+
Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
|
|
35
|
+
|
|
36
|
+
### 2. Present candidates as a Markdown report
|
|
37
|
+
|
|
38
|
+
Read [MARKDOWN-REPORT.md](MARKDOWN-REPORT.md) for the report format. Produce Markdown with fenced Mermaid diagrams showing each candidate before and after. Include affected files, the concrete problem, the proposed improvement, benefits to locality and leverage, and recommendation strength. End with your top recommendation and explain why it deserves attention first.
|
|
39
|
+
|
|
40
|
+
Use the target repository’s domain vocabulary and the architecture vocabulary from `mattpocock-codebase-design`. Surface an ADR conflict only when observed friction warrants revisiting the decision, and explain that conflict alongside the candidate.
|
|
41
|
+
|
|
42
|
+
Publish the report using the active turn’s result-publication instructions. Those instructions determine whether the result belongs in assistant output, a result tool, or an outcome argument. Follow the active turn’s completion rules.
|
|
43
|
+
|
|
44
|
+
If `ask_questions` is available and exploring a candidate fits the current task, present the candidates to the operator and call it with distinct choices, a recommended choice, and the reason for that recommendation. Wait for its response before choosing a candidate. Otherwise, include the candidate decision in the report’s next steps and finish according to the turn contract.
|
|
45
|
+
|
|
46
|
+
### 3. Grilling loop
|
|
47
|
+
|
|
48
|
+
Once the user picks a candidate, read [mattpocock-grilling](../mattpocock-grilling/SKILL.md) with `read` to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
|
|
49
|
+
|
|
50
|
+
Keep changes within the task’s authorized scope and the active turn’s tools. Read [mattpocock-domain-modeling](../mattpocock-domain-modeling/SKILL.md) when glossary or ADR changes are part of the task:
|
|
51
|
+
|
|
52
|
+
- **Naming a deepened module after a concept not in the repository’s glossary?** Add the term to the repository’s glossary. Use the repository’s documented location; propose a location if it has no convention.
|
|
53
|
+
- **Sharpening a fuzzy term during the conversation?** Update the repository’s glossary right there.
|
|
54
|
+
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing; skip ephemeral reasons ("not worth it right now") and self-evident ones.
|
|
55
|
+
- **Want to explore alternative interfaces for the deepened module?** Read [mattpocock-codebase-design](../mattpocock-codebase-design/SKILL.md) with the available `read` tool and work through its design-it-twice alternatives sequentially.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matt Pocock
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@leitwerk-dev/mattpocock-skills",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/leitwerk-dev/leitwerk.git",
|
|
7
|
+
"directory": "extensions/mattpocock-skills"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"leitwerk": {
|
|
11
|
+
"extension": {
|
|
12
|
+
"source": "./src/index.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"skills": "./dist/skills/manifest.json"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"source": "./src/index.ts",
|
|
20
|
+
"import": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup --silent",
|
|
26
|
+
"skills:prepare": "leitwerk-dev skills:prepare",
|
|
27
|
+
"skills:diff": "leitwerk-dev skills:diff",
|
|
28
|
+
"skills:build": "leitwerk-dev skills:build"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@leitwerk-dev/process-sdk": "0.4.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@leitwerk-dev/dev-tools": "0.4.0",
|
|
35
|
+
"@leitwerk-dev/extension-runtime": "0.4.0",
|
|
36
|
+
"@leitwerk-dev/protocol": "0.4.0",
|
|
37
|
+
"@types/node": "^22.15.30",
|
|
38
|
+
"tsup": "^8.5.1"
|
|
39
|
+
},
|
|
40
|
+
"license": "Apache-2.0",
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=26 <27"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"dist/**",
|
|
49
|
+
"src/**",
|
|
50
|
+
"!dist/**/*.test.*",
|
|
51
|
+
"!src/**/*.test.ts",
|
|
52
|
+
"skill-pack.json",
|
|
53
|
+
"patches/**",
|
|
54
|
+
"upstream/**"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
diff --git a/skills/engineering/codebase-design/DESIGN-IT-TWICE.md b/skills/engineering/codebase-design/DESIGN-IT-TWICE.md
|
|
2
|
+
index d099013..ed677d7 100644
|
|
3
|
+
--- a/skills/engineering/codebase-design/DESIGN-IT-TWICE.md
|
|
4
|
+
+++ b/skills/engineering/codebase-design/DESIGN-IT-TWICE.md
|
|
5
|
+
@@ -1,6 +1,6 @@
|
|
6
|
+
# Design It Twice
|
|
7
|
+
|
|
8
|
+
-When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout): your first idea is unlikely to be the best.
|
|
9
|
+
+When the user wants to explore alternative interfaces for a chosen deepening candidate, use these sequential design passes. Based on "Design It Twice" (Ousterhout): your first idea is unlikely to be the best.
|
|
10
|
+
|
|
11
|
+
Uses the vocabulary in [SKILL.md](SKILL.md): **module**, **interface**, **seam**, **adapter**, **leverage**.
|
|
12
|
+
|
|
13
|
+
@@ -8,28 +8,28 @@ Uses the vocabulary in [SKILL.md](SKILL.md): **module**, **interface**, **seam**
|
|
14
|
+
|
|
15
|
+
### 1. Frame the problem space
|
|
16
|
+
|
|
17
|
+
-Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
|
|
18
|
+
+Before designing alternatives, write a user-facing explanation of the problem space for the chosen candidate:
|
|
19
|
+
|
|
20
|
+
- The constraints any new interface would need to satisfy
|
|
21
|
+
- The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
|
|
22
|
+
- A rough illustrative code sketch to ground the constraints, not a proposal, just a way to make the constraints concrete
|
|
23
|
+
|
|
24
|
+
-Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
|
|
25
|
+
+Show this to the user, then immediately proceed to Step 2. Work through each design before comparing them.
|
|
26
|
+
|
|
27
|
+
-### 2. Spawn sub-agents
|
|
28
|
+
+### 2. Design alternatives
|
|
29
|
+
|
|
30
|
+
-Spawn 3+ sub-agents in parallel. Each must produce a **radically different** interface for the deepened module.
|
|
31
|
+
+Develop three **radically different** interfaces for the deepened module, one after another. Keep each design self-contained until comparison.
|
|
32
|
+
|
|
33
|
+
-Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
|
|
34
|
+
+Start each pass with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Use a different design constraint for each pass:
|
|
35
|
+
|
|
36
|
+
-- Agent 1: "Minimize the interface: aim for 1–3 entry points max. Maximise leverage per entry point."
|
|
37
|
+
-- Agent 2: "Maximise flexibility: support many use cases and extension."
|
|
38
|
+
-- Agent 3: "Optimise for the most common caller: make the default case trivial."
|
|
39
|
+
-- Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
|
|
40
|
+
+- Pass 1: "Minimize the interface: aim for 1–3 entry points max. Maximise leverage per entry point."
|
|
41
|
+
+- Pass 2: "Maximise flexibility: support many use cases and extension."
|
|
42
|
+
+- Pass 3: "Optimise for the most common caller: make the default case trivial."
|
|
43
|
+
+- Optional pass: "Design around ports & adapters for cross-seam dependencies."
|
|
44
|
+
|
|
45
|
+
-Include both [SKILL.md](SKILL.md) vocabulary and GLOSSARY.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
|
|
46
|
+
+Include both [SKILL.md](SKILL.md) vocabulary and the target repository’s domain vocabulary in the brief so each design names things consistently with the architecture language and the project's domain language.
|
|
47
|
+
|
|
48
|
+
-Each sub-agent outputs:
|
|
49
|
+
+Each design includes:
|
|
50
|
+
|
|
51
|
+
1. Interface (types, methods, params, plus invariants, ordering, error modes)
|
|
52
|
+
2. Usage example showing how callers use it
|
|
53
|
+
diff --git a/skills/engineering/codebase-design/SKILL.md b/skills/engineering/codebase-design/SKILL.md
|
|
54
|
+
index 3f63c81..3e68b03 100644
|
|
55
|
+
--- a/skills/engineering/codebase-design/SKILL.md
|
|
56
|
+
+++ b/skills/engineering/codebase-design/SKILL.md
|
|
57
|
+
@@ -1,5 +1,5 @@
|
|
58
|
+
---
|
|
59
|
+
-name: codebase-design
|
|
60
|
+
+name: mattpocock-codebase-design
|
|
61
|
+
description: Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
@@ -111,4 +111,4 @@ Good interfaces make testing natural:
|
|
65
|
+
## Going deeper
|
|
66
|
+
|
|
67
|
+
- **Deepening a cluster given its dependencies**, see [DEEPENING.md](DEEPENING.md): dependency categories, seam discipline, and replace-don't-layer testing.
|
|
68
|
+
-- **Exploring alternative interfaces**, see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
|
|
69
|
+
+- **Exploring alternative interfaces**, see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): design several radically different interfaces in sequential passes, then compare on depth, locality, and seam placement.
|
|
70
|
+
diff --git a/skills/engineering/codebase-design/agents/openai.yaml b/skills/engineering/codebase-design/agents/openai.yaml
|
|
71
|
+
deleted file mode 100644
|
|
72
|
+
index 3180715..0000000
|
|
73
|
+
--- a/skills/engineering/codebase-design/agents/openai.yaml
|
|
74
|
+
+++ /dev/null
|
|
75
|
+
@@ -1,3 +0,0 @@
|
|
76
|
+
-interface:
|
|
77
|
+
- display_name: "Codebase Design"
|
|
78
|
+
- short_description: "Vocabulary for deep-module design"
|
|
79
|
+
diff --git a/skills/engineering/domain-modeling/GLOSSARY-FORMAT.md b/skills/engineering/domain-modeling/GLOSSARY-FORMAT.md
|
|
80
|
+
index 9c0b4c7..ee43f1a 100644
|
|
81
|
+
--- a/skills/engineering/domain-modeling/GLOSSARY-FORMAT.md
|
|
82
|
+
+++ b/skills/engineering/domain-modeling/GLOSSARY-FORMAT.md
|
|
83
|
+
@@ -1,4 +1,6 @@
|
|
84
|
+
-# GLOSSARY.md Format
|
|
85
|
+
+# Default glossary format
|
|
86
|
+
+
|
|
87
|
+
+Use this format when the target repository has no documented glossary format. Follow existing repository paths and conventions when present.
|
|
88
|
+
|
|
89
|
+
## Structure
|
|
90
|
+
|
|
91
|
+
diff --git a/skills/engineering/domain-modeling/SKILL.md b/skills/engineering/domain-modeling/SKILL.md
|
|
92
|
+
index a4438c6..718c4e6 100644
|
|
93
|
+
--- a/skills/engineering/domain-modeling/SKILL.md
|
|
94
|
+
+++ b/skills/engineering/domain-modeling/SKILL.md
|
|
95
|
+
@@ -1,49 +1,23 @@
|
|
96
|
+
---
|
|
97
|
+
-name: domain-modeling
|
|
98
|
+
-description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
|
|
99
|
+
+name: mattpocock-domain-modeling
|
|
100
|
+
+description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a domain glossary, or recording or editing an ADR.
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
# Domain Modeling
|
|
104
|
+
|
|
105
|
+
Actively build and sharpen the project's domain model as you design. This is the *active* discipline: challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely *reading* `GLOSSARY.md` for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
106
|
+
|
|
107
|
+
-## File structure
|
|
108
|
+
-
|
|
109
|
+
-Most repos have a single context:
|
|
110
|
+
-
|
|
111
|
+
-```
|
|
112
|
+
-/
|
|
113
|
+
-├── GLOSSARY.md
|
|
114
|
+
-├── docs/
|
|
115
|
+
-│ └── adr/
|
|
116
|
+
-│ ├── 0001-event-sourced-orders.md
|
|
117
|
+
-│ └── 0002-postgres-for-write-model.md
|
|
118
|
+
-└── src/
|
|
119
|
+
-```
|
|
120
|
+
-
|
|
121
|
+
-If a `GLOSSARY-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
122
|
+
-
|
|
123
|
+
-```
|
|
124
|
+
-/
|
|
125
|
+
-├── GLOSSARY-MAP.md
|
|
126
|
+
-├── docs/
|
|
127
|
+
-│ └── adr/ ← system-wide decisions
|
|
128
|
+
-├── src/
|
|
129
|
+
-│ ├── ordering/
|
|
130
|
+
-│ │ ├── GLOSSARY.md
|
|
131
|
+
-│ │ └── docs/adr/ ← context-specific decisions
|
|
132
|
+
-│ └── billing/
|
|
133
|
+
-│ ├── GLOSSARY.md
|
|
134
|
+
-│ └── docs/adr/
|
|
135
|
+
-```
|
|
136
|
+
-
|
|
137
|
+
-Create files lazily: only when you have something to write. If no `GLOSSARY.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
138
|
+
+## Repository conventions
|
|
139
|
+
+
|
|
140
|
+
+Read the target repository’s agent instructions and existing domain documentation first. Use its glossary and ADR paths and formats. Common glossary names include `GLOSSARY.md`, `CONTEXT.md`, and `docs/ubiquitous_language.md`; a context map may identify several glossaries. References to the glossary below mean the repository’s chosen file.
|
|
141
|
+
+
|
|
142
|
+
+Update documents when the task authorizes those changes and the active turn exposes the necessary tools. Otherwise, publish proposed terms and decisions in the result. If no convention exists, use `GLOSSARY.md` and `docs/adr/` as defaults when creating the first needed document.
|
|
143
|
+
|
|
144
|
+
## During the session
|
|
145
|
+
|
|
146
|
+
### Challenge against the glossary
|
|
147
|
+
|
|
148
|
+
-When the user uses a term that conflicts with the existing language in `GLOSSARY.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
|
|
149
|
+
+When the user uses a term that conflicts with the existing language in the glossary, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
|
|
150
|
+
|
|
151
|
+
### Sharpen fuzzy language
|
|
152
|
+
|
|
153
|
+
@@ -57,11 +31,11 @@ When domain relationships are being discussed, stress-test them with specific sc
|
|
154
|
+
|
|
155
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"
|
|
156
|
+
|
|
157
|
+
-### Update GLOSSARY.md inline
|
|
158
|
+
+### Update the glossary inline
|
|
159
|
+
|
|
160
|
+
-When a term is resolved, update `GLOSSARY.md` right there. Don't batch these up: capture them as they happen. Use the format in [GLOSSARY-FORMAT.md](./GLOSSARY-FORMAT.md).
|
|
161
|
+
+When a term is resolved, update the repository’s glossary as part of the authorized changes. Don't batch these up: capture them as they happen. Use the repository’s format, or [GLOSSARY-FORMAT.md](./GLOSSARY-FORMAT.md) when establishing one.
|
|
162
|
+
|
|
163
|
+
-`GLOSSARY.md` should be totally devoid of implementation details. Do not treat `GLOSSARY.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
164
|
+
+The glossary should be totally devoid of implementation details. Do not treat the glossary as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
165
|
+
|
|
166
|
+
### Offer ADRs sparingly
|
|
167
|
+
|
|
168
|
+
@@ -71,4 +45,4 @@ Only offer to create an ADR when all three are true:
|
|
169
|
+
2. **Surprising without context**: a future reader will wonder "why did they do it this way?"
|
|
170
|
+
3. **The result of a real trade-off**: there were genuine alternatives and you picked one for specific reasons
|
|
171
|
+
|
|
172
|
+
-If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
|
|
173
|
+
+If any of the three is missing, skip the ADR. Use the repository’s ADR format, or [ADR-FORMAT.md](./ADR-FORMAT.md) when establishing one.
|
|
174
|
+
diff --git a/skills/engineering/domain-modeling/agents/openai.yaml b/skills/engineering/domain-modeling/agents/openai.yaml
|
|
175
|
+
deleted file mode 100644
|
|
176
|
+
index 7f1522d..0000000
|
|
177
|
+
--- a/skills/engineering/domain-modeling/agents/openai.yaml
|
|
178
|
+
+++ /dev/null
|
|
179
|
+
@@ -1,3 +0,0 @@
|
|
180
|
+
-interface:
|
|
181
|
+
- display_name: "Domain Modeling"
|
|
182
|
+
- short_description: "Build and sharpen a domain model"
|
|
183
|
+
diff --git a/skills/engineering/improve-codebase-architecture/HTML-REPORT.md b/skills/engineering/improve-codebase-architecture/HTML-REPORT.md
|
|
184
|
+
deleted file mode 100644
|
|
185
|
+
index e39e825..0000000
|
|
186
|
+
--- a/skills/engineering/improve-codebase-architecture/HTML-REPORT.md
|
|
187
|
+
+++ /dev/null
|
|
188
|
+
@@ -1,123 +0,0 @@
|
|
189
|
+
-# HTML Report Format
|
|
190
|
+
-
|
|
191
|
+
-The architectural review is rendered as a single self-contained HTML file in the OS temp directory. Tailwind and Mermaid both come from CDNs. Mermaid handles graph-shaped diagrams reliably; hand-built divs and inline SVG handle the more editorial visuals (mass diagrams, cross-sections). Mix the two: don't lean on Mermaid for everything, it'll start to look generic.
|
|
192
|
+
-
|
|
193
|
+
-## Scaffold
|
|
194
|
+
-
|
|
195
|
+
-```html
|
|
196
|
+
-<!doctype html>
|
|
197
|
+
-<html lang="en">
|
|
198
|
+
- <head>
|
|
199
|
+
- <meta charset="utf-8" />
|
|
200
|
+
- <title>Architecture review for {{repo name}}</title>
|
|
201
|
+
- <script src="https://cdn.tailwindcss.com"></script>
|
|
202
|
+
- <script type="module">
|
|
203
|
+
- import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";
|
|
204
|
+
- mermaid.initialize({ startOnLoad: true, theme: "neutral", securityLevel: "loose" });
|
|
205
|
+
- </script>
|
|
206
|
+
- <style>
|
|
207
|
+
- /* small custom layer for things Tailwind doesn't cover cleanly:
|
|
208
|
+
- dashed seam lines, hand-drawn-feeling arrow heads, etc. */
|
|
209
|
+
- .seam { stroke-dasharray: 4 4; }
|
|
210
|
+
- .leak { stroke: #dc2626; }
|
|
211
|
+
- .deep { background: linear-gradient(135deg, #0f172a, #1e293b); }
|
|
212
|
+
- </style>
|
|
213
|
+
- </head>
|
|
214
|
+
- <body class="bg-stone-50 text-slate-900 font-sans">
|
|
215
|
+
- <main class="max-w-5xl mx-auto px-6 py-12 space-y-12">
|
|
216
|
+
- <header>...</header>
|
|
217
|
+
- <section id="candidates" class="space-y-10">...</section>
|
|
218
|
+
- <section id="top-recommendation">...</section>
|
|
219
|
+
- </main>
|
|
220
|
+
- </body>
|
|
221
|
+
-</html>
|
|
222
|
+
-```
|
|
223
|
+
-
|
|
224
|
+
-## Header
|
|
225
|
+
-
|
|
226
|
+
-Repo name, date, and a compact legend: solid box = module, dashed line = seam, red arrow = leakage, thick dark box = deep module. No introduction paragraph. Straight into the candidates.
|
|
227
|
+
-
|
|
228
|
+
-## Candidate card
|
|
229
|
+
-
|
|
230
|
+
-The diagrams carry the weight. Prose is sparse, plain, and uses the glossary terms (from the `/codebase-design` skill) without ceremony.
|
|
231
|
+
-
|
|
232
|
+
-Each candidate is one `<article>`:
|
|
233
|
+
-
|
|
234
|
+
-- **Title**: short, names the deepening (e.g. "Collapse the Order intake pipeline").
|
|
235
|
+
-- **Badge row**: recommendation strength (`Strong` = emerald, `Worth exploring` = amber, `Speculative` = slate), plus a tag for the dependency category (`in-process`, `local-substitutable`, `ports & adapters`, `mock`).
|
|
236
|
+
-- **Files**: monospaced list, `font-mono text-sm`.
|
|
237
|
+
-- **Before / After diagram**: the centrepiece. Two columns, side by side. See patterns below.
|
|
238
|
+
-- **Problem**: one sentence. What hurts.
|
|
239
|
+
-- **Solution**: one sentence. What changes.
|
|
240
|
+
-- **Wins**: bullets, ≤6 words each. e.g. "Tests hit one interface", "Pricing logic stops leaking", "Delete 4 shallow wrappers".
|
|
241
|
+
-- **ADR callout** (if applicable): one line in an amber-tinted box.
|
|
242
|
+
-
|
|
243
|
+
-No paragraphs of explanation. If the diagram needs a paragraph to be understood, redraw the diagram.
|
|
244
|
+
-
|
|
245
|
+
-## Diagram patterns
|
|
246
|
+
-
|
|
247
|
+
-Pick the pattern that fits the candidate. Mix them. Don't make every diagram look the same. Variety is part of the point.
|
|
248
|
+
-
|
|
249
|
+
-### Mermaid graph (the workhorse for dependencies / call flow)
|
|
250
|
+
-
|
|
251
|
+
-Use a Mermaid `flowchart` or `graph` when the point is "X calls Y calls Z, and look at the mess." Wrap it in a Tailwind-styled card so it doesn't feel parachuted in. Style with classDef to colour leakage edges red and the deep module dark. Sequence diagrams work well for "before: 6 round-trips; after: 1."
|
|
252
|
+
-
|
|
253
|
+
-```html
|
|
254
|
+
-<div class="rounded-lg border border-slate-200 bg-white p-4">
|
|
255
|
+
- <pre class="mermaid">
|
|
256
|
+
- flowchart LR
|
|
257
|
+
- A[OrderHandler] --> B[OrderValidator]
|
|
258
|
+
- B --> C[OrderRepo]
|
|
259
|
+
- C -.leak.-> D[PricingClient]
|
|
260
|
+
- classDef leak stroke:#dc2626,stroke-width:2px;
|
|
261
|
+
- class C,D leak
|
|
262
|
+
- </pre>
|
|
263
|
+
-</div>
|
|
264
|
+
-```
|
|
265
|
+
-
|
|
266
|
+
-### Hand-built boxes-and-arrows (when Mermaid's layout fights you)
|
|
267
|
+
-
|
|
268
|
+
-Modules as `<div>`s with borders and labels. Arrows as inline SVG `<line>` or `<path>` elements positioned absolutely over a relative container. Reach for this when you want the "after" diagram to feel like one thick-bordered deep module with greyed-out internals, since Mermaid won't render that with the right weight.
|
|
269
|
+
-
|
|
270
|
+
-### Cross-section (good for layered shallowness)
|
|
271
|
+
-
|
|
272
|
+
-Stack horizontal bands (`h-12 border-l-4`) to show layers a call passes through. Before: 6 thin layers each doing nothing. After: 1 thick band labelled with the consolidated responsibility.
|
|
273
|
+
-
|
|
274
|
+
-### Mass diagram (good for "interface as wide as implementation")
|
|
275
|
+
-
|
|
276
|
+
-Two rectangles per module: one for interface surface area, one for implementation. Before: interface rectangle is nearly as tall as the implementation rectangle (shallow). After: interface rectangle is short, implementation rectangle is tall (deep).
|
|
277
|
+
-
|
|
278
|
+
-### Call-graph collapse
|
|
279
|
+
-
|
|
280
|
+
-Before: a tree of function calls rendered as nested boxes. After: the same tree collapsed into one box, with the now-internal calls shown faded inside it.
|
|
281
|
+
-
|
|
282
|
+
-## Style guidance
|
|
283
|
+
-
|
|
284
|
+
-- Lean editorial, not corporate-dashboard. Generous whitespace. Serif optional for headings (`font-serif` works well with stone/slate).
|
|
285
|
+
-- Colour sparingly: one accent (emerald or indigo) plus red for leakage and amber for warnings.
|
|
286
|
+
-- Keep diagrams ~320px tall so before/after sits comfortably side by side without scrolling.
|
|
287
|
+
-- Use `text-xs uppercase tracking-wider` for module labels inside diagrams, so they read as schematic, not as UI.
|
|
288
|
+
-- The only scripts are the Tailwind CDN and the Mermaid ESM import. The report is otherwise static: no app code, no interactivity beyond Mermaid's own rendering.
|
|
289
|
+
-
|
|
290
|
+
-## Top recommendation section
|
|
291
|
+
-
|
|
292
|
+
-One larger card. Candidate name, one sentence on why, anchor link to its card. That's it.
|
|
293
|
+
-
|
|
294
|
+
-## Tone
|
|
295
|
+
-
|
|
296
|
+
-Plain English, concise, but the architectural nouns and verbs come straight from the `/codebase-design` skill. Concision is not an excuse to drift.
|
|
297
|
+
-
|
|
298
|
+
-**Use exactly:** module, interface, implementation, depth, deep, shallow, seam, adapter, leverage, locality.
|
|
299
|
+
-
|
|
300
|
+
-**Never substitute:** component, service, unit (for module) · API, signature (for interface) · boundary (for seam) · layer, wrapper (for module, when you mean module).
|
|
301
|
+
-
|
|
302
|
+
-**Phrasings that fit the style:**
|
|
303
|
+
-
|
|
304
|
+
-- "Order intake module is shallow: interface nearly matches the implementation."
|
|
305
|
+
-- "Pricing leaks across the seam."
|
|
306
|
+
-- "Deepen: one interface, one place to test."
|
|
307
|
+
-- "Two adapters justify the seam: HTTP in prod, in-memory in tests."
|
|
308
|
+
-
|
|
309
|
+
-**Wins bullets** name the gain in glossary terms: *"locality: bugs concentrate in one module"*, *"leverage: one interface, N call sites"*, *"interface shrinks; implementation absorbs the wrappers"*. Don't write *"easier to maintain"* or *"cleaner code"*, because those terms aren't in the glossary and don't earn their place.
|
|
310
|
+
-
|
|
311
|
+
-No hedging, no throat-clearing, no "it's worth noting that…". If a sentence could be a bullet, make it a bullet. If a bullet could be cut, cut it. If a term isn't in the `/codebase-design` glossary, reach for one that is before inventing a new one.
|
|
312
|
+
diff --git a/skills/engineering/improve-codebase-architecture/MARKDOWN-REPORT.md b/skills/engineering/improve-codebase-architecture/MARKDOWN-REPORT.md
|
|
313
|
+
new file mode 100644
|
|
314
|
+
index 0000000..15a24bf
|
|
315
|
+
--- /dev/null
|
|
316
|
+
+++ b/skills/engineering/improve-codebase-architecture/MARKDOWN-REPORT.md
|
|
317
|
+
@@ -0,0 +1,30 @@
|
|
318
|
+
+# Architecture report
|
|
319
|
+
+
|
|
320
|
+
+Write the report as Markdown for the operator’s result view. Use the repository’s domain names and the vocabulary from `mattpocock-codebase-design`.
|
|
321
|
+
+
|
|
322
|
+
+Start with the repository, reviewed scope, and a short recommendation. Give each candidate a heading and include:
|
|
323
|
+
+
|
|
324
|
+
+- A recommendation strength: **Strong**, **Worth exploring**, or **Speculative**.
|
|
325
|
+
+- The affected files and observed behavior that demonstrates the problem.
|
|
326
|
+
+- The proposed change and its effect on locality, leverage, and testing.
|
|
327
|
+
+- Separate **Before** and **After** fenced Mermaid diagrams.
|
|
328
|
+
+- An ADR conflict when concrete evidence warrants reopening that decision.
|
|
329
|
+
+
|
|
330
|
+
+Use simple Mermaid flowcharts for dependencies and sequence diagrams for call order. Give nodes short, quoted labels and use domain names. For example:
|
|
331
|
+
+
|
|
332
|
+
+```mermaid
|
|
333
|
+
+flowchart LR
|
|
334
|
+
+ A["Order intake"] --> B["Validation"]
|
|
335
|
+
+ B --> C["Pricing"]
|
|
336
|
+
+ C --> D["Order storage"]
|
|
337
|
+
+```
|
|
338
|
+
+
|
|
339
|
+
+```mermaid
|
|
340
|
+
+flowchart LR
|
|
341
|
+
+ A["Caller"] --> B["Order placement"]
|
|
342
|
+
+ B --> C["Order storage adapter"]
|
|
343
|
+
+```
|
|
344
|
+
+
|
|
345
|
+
+Tie each diagram to evidence and label proposed behavior as a proposal. Close with the strongest candidate, the reason to tackle it first, and any operator decision needed next.
|
|
346
|
+
+
|
|
347
|
+
+Use the active turn’s result-publication instructions to deliver the Markdown. Completion and operator questions follow the active turn’s available tools.
|
|
348
|
+
diff --git a/skills/engineering/improve-codebase-architecture/SKILL.md b/skills/engineering/improve-codebase-architecture/SKILL.md
|
|
349
|
+
index 44cc7d3..43283b1 100644
|
|
350
|
+
--- a/skills/engineering/improve-codebase-architecture/SKILL.md
|
|
351
|
+
+++ b/skills/engineering/improve-codebase-architecture/SKILL.md
|
|
352
|
+
@@ -1,7 +1,6 @@
|
|
353
|
+
---
|
|
354
|
+
-name: improve-codebase-architecture
|
|
355
|
+
-description: Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
|
|
356
|
+
-disable-model-invocation: true
|
|
357
|
+
+name: mattpocock-improve-codebase-architecture
|
|
358
|
+
+description: Scan a codebase for deepening opportunities, present them as a Markdown report with Mermaid diagrams, then grill through whichever one you pick.
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
# Improve Codebase Architecture
|
|
362
|
+
@@ -10,8 +9,8 @@ Surface architectural friction and propose **deepening opportunities**: refactor
|
|
363
|
+
|
|
364
|
+
This command is _informed_ by the project's domain model and built on a shared design vocabulary:
|
|
365
|
+
|
|
366
|
+
-- Call the Skill tool with "codebase-design" for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion, and don't drift into "component," "service," "API," or "boundary."
|
|
367
|
+
-- The domain language in `GLOSSARY.md` gives names to good seams; ADRs in `docs/adr/` record decisions this command should not re-litigate.
|
|
368
|
+
+- Read [mattpocock-codebase-design](../mattpocock-codebase-design/SKILL.md) with the available `read` tool for the architecture vocabulary (**module**, **interface**, **depth**, **seam**, **adapter**, **leverage**, **locality**) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion, and don't drift into "component," "service," "API," or "boundary."
|
|
369
|
+
+- Read the target repository’s agent instructions to locate its domain glossary and ADRs. Follow those conventions; common glossary locations include `GLOSSARY.md`, `CONTEXT.md`, and `docs/ubiquitous_language.md`.
|
|
370
|
+
|
|
371
|
+
## Process
|
|
372
|
+
|
|
373
|
+
@@ -22,9 +21,9 @@ This command is _informed_ by the project's domain model and built on a shared d
|
|
374
|
+
- If the user named a direction (a module, a subsystem, a pain point), take it, and skip the inference below.
|
|
375
|
+
- Otherwise, walk back a good stretch of the commit history (`git log --oneline`) to find the codebase's hot spots, the files and areas that keep coming up, and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.
|
|
376
|
+
|
|
377
|
+
-Read the project's domain glossary (`GLOSSARY.md`) and any ADRs in the area you're touching first.
|
|
378
|
+
+Read the project's documented domain glossary and any ADRs in the area you're touching first.
|
|
379
|
+
|
|
380
|
+
-Then spawn a sub-agent to walk the codebase. Don't follow rigid heuristics; explore organically and note where you experience friction:
|
|
381
|
+
+Then walk the codebase yourself using the active turn’s workspace tools. Don't follow rigid heuristics; explore organically and note where you experience friction:
|
|
382
|
+
|
|
383
|
+
- Where does understanding one concept require bouncing between many small modules?
|
|
384
|
+
- Where are modules **shallow**, with an interface nearly as complex as the implementation?
|
|
385
|
+
@@ -34,38 +33,23 @@ Then spawn a sub-agent to walk the codebase. Don't follow rigid heuristics; expl
|
|
386
|
+
|
|
387
|
+
Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
|
|
388
|
+
|
|
389
|
+
-### 2. Present candidates as an HTML report
|
|
390
|
+
+### 2. Present candidates as a Markdown report
|
|
391
|
+
|
|
392
|
+
-Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and write to `<tmpdir>/architecture-review-<timestamp>.html` so each run gets a fresh file. Open it for the user (`xdg-open <path>` on Linux, `open <path>` on macOS, `start <path>` on Windows) and tell them the absolute path.
|
|
393
|
+
+Read [MARKDOWN-REPORT.md](MARKDOWN-REPORT.md) for the report format. Produce Markdown with fenced Mermaid diagrams showing each candidate before and after. Include affected files, the concrete problem, the proposed improvement, benefits to locality and leverage, and recommendation strength. End with your top recommendation and explain why it deserves attention first.
|
|
394
|
+
|
|
395
|
+
-The report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals: use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before/after visualisation**. Be visual.
|
|
396
|
+
+Use the target repository’s domain vocabulary and the architecture vocabulary from `mattpocock-codebase-design`. Surface an ADR conflict only when observed friction warrants revisiting the decision, and explain that conflict alongside the candidate.
|
|
397
|
+
|
|
398
|
+
-For each candidate, render a card with:
|
|
399
|
+
+Publish the report using the active turn’s result-publication instructions. Those instructions determine whether the result belongs in assistant output, a result tool, or an outcome argument. Follow the active turn’s completion rules.
|
|
400
|
+
|
|
401
|
+
-- **Files**: which files/modules are involved
|
|
402
|
+
-- **Problem**: why the current architecture is causing friction
|
|
403
|
+
-- **Solution**: plain English description of what would change
|
|
404
|
+
-- **Benefits**: explained in terms of locality and leverage, and how tests would improve
|
|
405
|
+
-- **Before / After diagram**: side-by-side, custom-drawn, illustrating the shallowness and the deepening
|
|
406
|
+
-- **Recommendation strength**: one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge
|
|
407
|
+
-
|
|
408
|
+
-End the report with a **Top recommendation** section: which candidate you'd tackle first and why.
|
|
409
|
+
-
|
|
410
|
+
-**Use GLOSSARY.md vocabulary for the domain, and the `/codebase-design` vocabulary for the architecture.** If `GLOSSARY.md` defines "Order," talk about "the Order intake module," not "the FooBarHandler," and not "the Order service."
|
|
411
|
+
-
|
|
412
|
+
-**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007, but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
|
|
413
|
+
-
|
|
414
|
+
-See [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.
|
|
415
|
+
-
|
|
416
|
+
-Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"
|
|
417
|
+
+If `ask_questions` is available and exploring a candidate fits the current task, present the candidates to the operator and call it with distinct choices, a recommended choice, and the reason for that recommendation. Wait for its response before choosing a candidate. Otherwise, include the candidate decision in the report’s next steps and finish according to the turn contract.
|
|
418
|
+
|
|
419
|
+
### 3. Grilling loop
|
|
420
|
+
|
|
421
|
+
-Once the user picks a candidate, call the Skill tool with "grilling" to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
|
|
422
|
+
+Once the user picks a candidate, read [mattpocock-grilling](../mattpocock-grilling/SKILL.md) with `read` to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
|
|
423
|
+
|
|
424
|
+
-Side effects happen inline as decisions crystallize; call the Skill tool with "domain-modeling" to keep the domain model current as you go:
|
|
425
|
+
+Keep changes within the task’s authorized scope and the active turn’s tools. Read [mattpocock-domain-modeling](../mattpocock-domain-modeling/SKILL.md) when glossary or ADR changes are part of the task:
|
|
426
|
+
|
|
427
|
+
-- **Naming a deepened module after a concept not in `GLOSSARY.md`?** Add the term to `GLOSSARY.md`. Create the file lazily if it doesn't exist.
|
|
428
|
+
-- **Sharpening a fuzzy term during the conversation?** Update `GLOSSARY.md` right there.
|
|
429
|
+
+- **Naming a deepened module after a concept not in the repository’s glossary?** Add the term to the repository’s glossary. Use the repository’s documented location; propose a location if it has no convention.
|
|
430
|
+
+- **Sharpening a fuzzy term during the conversation?** Update the repository’s glossary right there.
|
|
431
|
+
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing; skip ephemeral reasons ("not worth it right now") and self-evident ones.
|
|
432
|
+
-- **Want to explore alternative interfaces for the deepened module?** Call the Skill tool with "codebase-design" and use its design-it-twice parallel sub-agent pattern.
|
|
433
|
+
+- **Want to explore alternative interfaces for the deepened module?** Read [mattpocock-codebase-design](../mattpocock-codebase-design/SKILL.md) with the available `read` tool and work through its design-it-twice alternatives sequentially.
|
|
434
|
+
diff --git a/skills/engineering/improve-codebase-architecture/agents/openai.yaml b/skills/engineering/improve-codebase-architecture/agents/openai.yaml
|
|
435
|
+
deleted file mode 100644
|
|
436
|
+
index 706fdca..0000000
|
|
437
|
+
--- a/skills/engineering/improve-codebase-architecture/agents/openai.yaml
|
|
438
|
+
+++ /dev/null
|
|
439
|
+
@@ -1,5 +0,0 @@
|
|
440
|
+
-interface:
|
|
441
|
+
- display_name: "Improve Codebase Architecture"
|
|
442
|
+
- short_description: "Find and grill architecture improvements"
|
|
443
|
+
-policy:
|
|
444
|
+
- allow_implicit_invocation: false
|
|
445
|
+
diff --git a/skills/productivity/grilling/SKILL.md b/skills/productivity/grilling/SKILL.md
|
|
446
|
+
index 8ca78c6..5190dce 100644
|
|
447
|
+
--- a/skills/productivity/grilling/SKILL.md
|
|
448
|
+
+++ b/skills/productivity/grilling/SKILL.md
|
|
449
|
+
@@ -1,5 +1,5 @@
|
|
450
|
+
---
|
|
451
|
+
-name: grilling
|
|
452
|
+
+name: mattpocock-grilling
|
|
453
|
+
description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
@@ -7,22 +7,10 @@ Interview the user relentlessly until you reach a shared understanding. Map this
|
|
457
|
+
|
|
458
|
+
Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled: the questions you can ask _now_ without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
|
|
459
|
+
|
|
460
|
+
-Format a round like so:
|
|
461
|
+
-
|
|
462
|
+
-```
|
|
463
|
+
-❓ **Q1** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
|
|
464
|
+
-
|
|
465
|
+
-➡️ <your recommended answer>
|
|
466
|
+
-
|
|
467
|
+
----
|
|
468
|
+
-
|
|
469
|
+
-❓ **Q2** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
|
|
470
|
+
-
|
|
471
|
+
-➡️ <your recommended answer>
|
|
472
|
+
-```
|
|
473
|
+
+Use the active turn’s `ask_questions` tool for each round. Supply focused questions with distinct prepared choices; mark a recommended choice and explain why. Wait for the returned answers before progressing dependent decisions. When that tool is unavailable, publish the unresolved questions and recommendations through the turn’s result contract and leave those decisions open for follow-up.
|
|
474
|
+
|
|
475
|
+
Each round the user answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a _later_ round, not this one.
|
|
476
|
+
|
|
477
|
+
-Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait.
|
|
478
|
+
+Finding _facts_ is your job. Inspect the environment with the active turn’s tools before asking the operator for decisions. Work through independent exploration sequentially; then ask the questions whose prerequisites are settled.
|
|
479
|
+
|
|
480
|
+
-The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
|
|
481
|
+
+The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Confirm the settled decisions through `ask_questions` when it is available. Carry out changes only within the current task’s authorized scope and tools.
|
|
482
|
+
diff --git a/skills/productivity/grilling/agents/openai.yaml b/skills/productivity/grilling/agents/openai.yaml
|
|
483
|
+
deleted file mode 100644
|
|
484
|
+
index ddbdb96..0000000
|
|
485
|
+
--- a/skills/productivity/grilling/agents/openai.yaml
|
|
486
|
+
+++ /dev/null
|
|
487
|
+
@@ -1,3 +0,0 @@
|
|
488
|
+
-interface:
|
|
489
|
+
- display_name: "Grilling"
|
|
490
|
+
- short_description: "Stress-test thinking a round of questions at a time"
|