jhste-skills 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.ja.md +5 -3
- package/README.ko.md +4 -2
- package/README.md +6 -4
- package/README.zh.md +5 -3
- package/cli/install-actions/skills.mjs +17 -1
- package/docs/ACCEPTANCE_CHECK.md +1 -1
- package/docs/CONFLICT_RESOLUTION.md +1 -1
- package/package.json +1 -1
- package/scripts/smoke/connect-scenarios.mjs +2 -2
- package/scripts/smoke/helpers.mjs +15 -0
- package/scripts/smoke/install-scenarios.mjs +5 -5
- package/scripts/smoke/mode-scenarios.mjs +1 -1
- package/scripts/vendor-check.mjs +4 -3
- package/skills/grill-me/SKILL.md +2 -5
- package/skills/grill-with-docs/ADR-FORMAT.md +2 -44
- package/skills/grill-with-docs/CONTEXT-FORMAT.md +2 -57
- package/skills/grill-with-docs/SKILL.md +10 -82
- package/skills/implement/SKILL.md +30 -0
- package/skills/improve-codebase-architecture/DEEPENING.md +2 -34
- package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +2 -41
- package/skills/improve-codebase-architecture/LANGUAGE.md +3 -51
- package/skills/improve-codebase-architecture/SKILL.md +26 -62
- package/skills/jhste-long-running-work-loop/SKILL.md +8 -8
- package/skills/to-issues/SKILL.md +12 -12
- package/skills/to-prd/SKILL.md +1 -1
- package/skills/triage/AGENT-BRIEF.md +40 -1
- package/skills/triage/OUT-OF-SCOPE.md +5 -1
- package/skills/triage/SKILL.md +36 -27
- package/skills/writing-great-skills/GLOSSARY.md +195 -0
- package/skills/writing-great-skills/SKILL.md +90 -0
- package/vendor/matt-pocock/NOTICE.md +1 -1
- package/vendor/matt-pocock/allowlist.json +2 -1
- package/vendor/matt-pocock/source-lock.json +38 -30
- package/skills/write-a-skill/SKILL.md +0 -125
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.7 - 2026-06-30
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Added `implement`, a jhste-compatible implementation workflow skill for scoped PRD/issue/spec work.
|
|
7
|
+
- Added `writing-great-skills`, replacing the legacy `write-a-skill` skill with upstream skill-writing guidance.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Refreshed Matt Pocock vendored workflow skills against upstream `43ea088`, excluding `tdd` and `resolving-merge-conflicts`.
|
|
11
|
+
- Updated `triage` to cover external PRs as a triage surface, including PR diff verification and PR-specific agent briefs.
|
|
12
|
+
- Slimmed duplicated architecture/grilling docs by routing shared vocabulary through `codebase-design`, `grilling`, and `domain-modeling`.
|
|
13
|
+
- Updated issue slicing to prefer prefactoring slices where they make later implementation easier and to represent human decisions as blockers rather than a separate HITL/AFK field.
|
|
14
|
+
- Removed managed legacy `write-a-skill` installs during sync/update; `writing-great-skills` is the replacement skill going forward.
|
|
15
|
+
|
|
16
|
+
### Validation
|
|
17
|
+
- `npm test` passed.
|
|
18
|
+
- `jhste-skills guard --scope changed --format text --fail-on error` passed with 0 warnings/errors.
|
|
19
|
+
- `git diff --check` passed.
|
|
20
|
+
## 0.3.6 - 2026-06-28
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Clarified that `jhste-long-running-work-loop` is triggered by state-loss risk rather than elapsed time alone, including same-day external wait states.
|
|
24
|
+
- Updated README skill summaries to describe durable state preservation instead of implying only long-duration work.
|
|
25
|
+
|
|
26
|
+
### Validation
|
|
27
|
+
- `npm test` passed.
|
|
28
|
+
- `jhste-skills guard --scope changed --format text --fail-on error` passed with 0 warnings/errors.
|
|
29
|
+
- `git diff --check` passed.
|
|
30
|
+
- `npm pack --dry-run` completed for `jhste-skills@0.3.6`.
|
|
31
|
+
|
|
3
32
|
## 0.3.5 - 2026-06-28
|
|
4
33
|
|
|
5
34
|
### Added
|
package/README.ja.md
CHANGED
|
@@ -168,10 +168,11 @@ Custom - 効果ベースの質問でセットアップ範囲を選択
|
|
|
168
168
|
| [`jhste-db-api-boundary`](skills/jhste-db-api-boundary/SKILL.md)<br>API route、service、repository、SQL 間の責任と data contract を確認する boundary skill | API、controller、service、repository、SQL、persistence code を触るとき | Fat route, unsafe SQL, missing auth/data scoping, leaky DTO |
|
|
169
169
|
| [`jhste-crawler-automation`](skills/jhste-crawler-automation/SKILL.md)<br>crawler/scraper/worker/scheduler の producer-consumer boundary と side effect を確認する automation skill | crawler、scraper、worker、scheduler、browser automation を触るとき | Fragile automation, unclear producer/consumer boundary, hidden side effect |
|
|
170
170
|
| [`jhste-red-team-review`](skills/jhste-red-team-review/SKILL.md)<br>完了前に変更コードを攻撃的に再確認する read-only red-team code review skill | non-trivial code work の完了宣言前 | Premature “done”, missed null/auth/env/write/API/performance risk |
|
|
171
|
+
| [`jhste-long-running-work-loop`](skills/jhste-long-running-work-loop/SKILL.md)<br>session、待ち状態、durable decision をまたいで作業状態を保つための狭い orchestration skill | 状態喪失が誤り、重複、不安全、または再開困難な作業につながるとき: 複数セッションの作業、繰り返し review、当日または複数日の外部待ち状態、複数 repo への影響、PRD→issue→implementation→review の流れ、durable decision | Lost context, stale scratchpad, unclear approval boundary, unsafe resume point |
|
|
171
172
|
|
|
172
173
|
## Bundled workflow skills
|
|
173
174
|
|
|
174
|
-
Normal install では、Matt Pocock の [`mattpocock/skills`](https://github.com/mattpocock/skills) から vendoring した
|
|
175
|
+
Normal install では、Matt Pocock の [`mattpocock/skills`](https://github.com/mattpocock/skills) から vendoring した 14 個の workflow skills もインストールします。これらは implementation、debugging、planning、architecture、issue workflow、prototyping、handoff、skill-writing guidance に役立ちます。インストールしたくない場合は `--skill-set core` を使ってください。
|
|
175
176
|
|
|
176
177
|
| Skill | いつ使うか |
|
|
177
178
|
|---|---|
|
|
@@ -187,11 +188,12 @@ Normal install では、Matt Pocock の [`mattpocock/skills`](https://github.com
|
|
|
187
188
|
| [`to-issues`](skills/to-issues/SKILL.md)<br>計画を issue-ready vertical slices に分解する skill | implementation tickets/work breakdown が必要なとき; tracker creation は直接依頼または repo approval がある場合 |
|
|
188
189
|
| [`triage`](skills/triage/SKILL.md)<br>issue を分類し次の action を計画する triage skill | issue classification、next-action planning、repo-approved triage writes が必要なとき |
|
|
189
190
|
| [`handoff`](skills/handoff/SKILL.md)<br>次の agent や session が続けられるよう context を圧縮する handoff skill | handoff、session summary、continuation brief、next-agent context の依頼時 |
|
|
190
|
-
| [`
|
|
191
|
+
| [`implement`](skills/implement/SKILL.md)<br>jhste groundwork、verification、guard、review を使う scoped PRD/issue/spec implementation workflow skill | PRD、issue、spec、handoff から focused work を実装したいとき |
|
|
192
|
+
| [`writing-great-skills`](skills/writing-great-skills/SKILL.md)<br>predictable invocation、progressive disclosure、context load control、pruning の skill-writing reference | agent skill を作成、置換、改善したいとき |
|
|
191
193
|
|
|
192
194
|
## Attribution: Matt Pocock skills
|
|
193
195
|
|
|
194
|
-
このリポジトリは、上記
|
|
196
|
+
このリポジトリは、上記 14 個の skills を Matt Pocock の [`mattpocock/skills`](https://github.com/mattpocock/skills) から vendoring しています。
|
|
195
197
|
|
|
196
198
|
これらの skills は upstream MIT License に基づいて vendoring されています。このリポジトリは必要な copyright/license notice を保持し、インポート元を記録しています。
|
|
197
199
|
|
package/README.ko.md
CHANGED
|
@@ -171,10 +171,11 @@ Custom - 효과 중심 질문을 통해 설치 범위를 직접 선택
|
|
|
171
171
|
| [`jhste-db-api-boundary`](skills/jhste-db-api-boundary/SKILL.md)<br>API route, service, repository, SQL 사이의 책임 경계와 데이터 계약을 점검하는 boundary 스킬 | API, controller, service, repository, SQL, persistence code를 만질 때 | fat route, unsafe SQL, missing auth/data scoping, leaky DTO |
|
|
172
172
|
| [`jhste-crawler-automation`](skills/jhste-crawler-automation/SKILL.md)<br>crawler, scraper, worker, scheduler의 producer/consumer boundary와 side effect를 점검하는 자동화 스킬 | crawler, scraper, worker, scheduler, browser automation을 만질 때 | fragile automation, unclear producer/consumer boundary, hidden side effect |
|
|
173
173
|
| [`jhste-red-team-review`](skills/jhste-red-team-review/SKILL.md)<br>완료 선언 전 변경 코드를 공격적으로 재검토하는 read-only red-team code review 스킬 | non-trivial code work 완료 선언 전 | premature “done”, missing consumer-path proof, 놓치기 쉬운 null/auth/env/write/API/performance risk |
|
|
174
|
+
| [`jhste-long-running-work-loop`](skills/jhste-long-running-work-loop/SKILL.md)<br>세션, 대기 상태, durable decision 사이의 작업 상태를 보존하는 좁은 orchestration 스킬 | 상태 손실이 잘못된 작업, 중복 작업, unsafe resume, 재개 어려움으로 이어질 수 있을 때: 여러 세션 작업, 반복 리뷰, 당일 또는 다일 외부 대기 상태, 여러 repo 영향, PRD→issue→구현→리뷰 흐름, durable decision | lost context, stale scratchpad, unclear approval boundary, unsafe resume point |
|
|
174
175
|
|
|
175
176
|
## Bundled workflow skills
|
|
176
177
|
|
|
177
|
-
Normal install은 Matt Pocock의 [`mattpocock/skills`](https://github.com/mattpocock/skills)에서 vendoring한 workflow skills
|
|
178
|
+
Normal install은 Matt Pocock의 [`mattpocock/skills`](https://github.com/mattpocock/skills)에서 vendoring한 workflow skills 14개도 함께 설치합니다. 이 스킬들은 implementation, debugging, planning, architecture, issue workflow, prototyping, handoff, skill-writing guidance 작업에 유용합니다. 설치하고 싶지 않다면 `--skill-set core`를 사용하세요.
|
|
178
179
|
|
|
179
180
|
| Skill | 언제 쓰나 |
|
|
180
181
|
|---|---|
|
|
@@ -190,7 +191,8 @@ Normal install은 Matt Pocock의 [`mattpocock/skills`](https://github.com/mattpo
|
|
|
190
191
|
| [`to-issues`](skills/to-issues/SKILL.md)<br>계획을 issue-ready vertical slice로 나누는 스킬 | implementation ticket/work breakdown이 필요할 때; tracker creation은 직접 요청이나 repo approval이 있을 때 |
|
|
191
192
|
| [`triage`](skills/triage/SKILL.md)<br>issue를 분류하고 다음 행동을 계획하는 triage 스킬 | issue classification, next-action planning, repo-approved triage write가 필요할 때 |
|
|
192
193
|
| [`handoff`](skills/handoff/SKILL.md)<br>다음 agent나 session이 이어받을 수 있도록 context를 압축하는 handoff 스킬 | handoff, session summary, continuation brief, next-agent context 요청 시 |
|
|
193
|
-
| [`
|
|
194
|
+
| [`implement`](skills/implement/SKILL.md)<br>jhste groundwork, verification, guard, review를 사용하는 scoped PRD/issue/spec 구현 workflow 스킬 | PRD, issue, spec, handoff에서 focused work를 구현하고 싶을 때 |
|
|
195
|
+
| [`writing-great-skills`](skills/writing-great-skills/SKILL.md)<br>predictable invocation, progressive disclosure, context load control, pruning을 다루는 skill-writing reference | agent skill을 만들거나, 교체하거나, 다듬고 싶을 때 |
|
|
194
196
|
|
|
195
197
|
## Attribution: Matt Pocock skills
|
|
196
198
|
|
package/README.md
CHANGED
|
@@ -171,10 +171,11 @@ These are the jhste-authored guardrail skills. They are installed by default as
|
|
|
171
171
|
| [`jhste-db-api-boundary`](skills/jhste-db-api-boundary/SKILL.md)<br>A boundary skill that checks responsibility and data contracts across API routes, services, repositories, and SQL | Touching API, controller, service, repository, SQL, or persistence code | Fat routes, unsafe SQL, missing auth/data scoping, leaky DTOs |
|
|
172
172
|
| [`jhste-crawler-automation`](skills/jhste-crawler-automation/SKILL.md)<br>An automation skill for crawler/scraper/worker/scheduler producer-consumer boundaries and side effects | Touching crawlers, scrapers, workers, schedulers, or browser automation | Fragile automation, unclear producer/consumer boundaries, hidden side effects |
|
|
173
173
|
| [`jhste-red-team-review`](skills/jhste-red-team-review/SKILL.md)<br>A read-only red-team code review skill that aggressively re-checks changed code before completion | Before declaring non-trivial code work complete | Premature “done”, missing consumer-path proof, missed null/auth/env/write/API/performance risks |
|
|
174
|
+
| [`jhste-long-running-work-loop`](skills/jhste-long-running-work-loop/SKILL.md)<br>A narrow orchestration skill for preserving work state across sessions, wait states, and durable decisions | Losing state could make work wrong, duplicated, unsafe, or hard to resume: multi-session work, recurring reviews, same-day or multi-day external wait states, multiple repos, PRD→issue→implementation→review flows, or durable decisions | Lost context, stale scratchpads, unclear approval boundaries, unsafe resume points |
|
|
174
175
|
|
|
175
176
|
## Bundled workflow skills
|
|
176
177
|
|
|
177
|
-
Normal install also includes
|
|
178
|
+
Normal install also includes 14 workflow skills vendored from Matt Pocock's [`mattpocock/skills`](https://github.com/mattpocock/skills). These are useful for implementation, debugging, planning, architecture, issue workflows, prototyping, handoffs, and skill-writing guidance. Use `--skill-set core` if you do not want them installed.
|
|
178
179
|
|
|
179
180
|
| Skill | Use it when |
|
|
180
181
|
|---|---|
|
|
@@ -190,11 +191,12 @@ Normal install also includes 13 workflow skills vendored from Matt Pocock's [`ma
|
|
|
190
191
|
| [`to-issues`](skills/to-issues/SKILL.md)<br>A skill that breaks a plan into issue-ready vertical slices | You want implementation tickets or work breakdown; tracker creation follows direct request or repo approval |
|
|
191
192
|
| [`triage`](skills/triage/SKILL.md)<br>An issue triage skill that classifies issues and plans next actions through a structured workflow | You want issue classification, next-action planning, or repo-approved triage writes |
|
|
192
193
|
| [`handoff`](skills/handoff/SKILL.md)<br>A handoff skill that compresses context so the next agent or session can continue | You ask for a handoff, session summary, continuation brief, or next-agent context |
|
|
193
|
-
| [`
|
|
194
|
+
| [`implement`](skills/implement/SKILL.md)<br>An implementation workflow skill for scoped PRD/issue/spec work using jhste groundwork, verification, guard, and review | You want an agent to implement focused work from a PRD, issue, spec, or handoff |
|
|
195
|
+
| [`writing-great-skills`](skills/writing-great-skills/SKILL.md)<br>A skill-writing reference for predictable invocation, progressive disclosure, context load control, and pruning | You want to create, replace, or refine an agent skill |
|
|
194
196
|
|
|
195
197
|
## Attribution: Matt Pocock skills
|
|
196
198
|
|
|
197
|
-
This repository vendors the
|
|
199
|
+
This repository vendors the 14 skills listed above from Matt Pocock's [`mattpocock/skills`](https://github.com/mattpocock/skills).
|
|
198
200
|
|
|
199
201
|
Those skills are vendored under the upstream MIT License. This repository preserves the required copyright/license notice and records the imported sources.
|
|
200
202
|
|
|
@@ -272,4 +274,4 @@ See [`docs/ACCEPTANCE_CHECK.md`](docs/ACCEPTANCE_CHECK.md) for release acceptanc
|
|
|
272
274
|
|
|
273
275
|
Fast agents need guardrails. `jhste-skills` gives them a repo-respecting engineering workflow.
|
|
274
276
|
|
|
275
|
-
Installed skill directories are tracked with `.jhste-skills-manifest.json`. `--force` refreshes manifest-managed skill copies and generated/managed profiles; modified profiles need `--force --allow-profile-overwrite`; overwriting unmanaged differing skill directories still requires the separate `--allow-unmanaged-skill-overwrite` flag after review. `sync` and `update` can also adopt additional known jhste skills into an already managed skills directory so older mixed installs can be reconciled without a manual overwrite flag. Legacy managed renames are also reconciled during `sync` and `update`, so older managed installs that still have `diagnose` or `jhste-engineering-judgment` are migrated to `diagnosing-bugs` or `jhste-engineering-groundwork
|
|
277
|
+
Installed skill directories are tracked with `.jhste-skills-manifest.json`. `--force` refreshes manifest-managed skill copies and generated/managed profiles; modified profiles need `--force --allow-profile-overwrite`; overwriting unmanaged differing skill directories still requires the separate `--allow-unmanaged-skill-overwrite` flag after review. `sync` and `update` can also adopt additional known jhste skills into an already managed skills directory so older mixed installs can be reconciled without a manual overwrite flag. Legacy managed renames are also reconciled during `sync` and `update`, so older managed installs that still have `diagnose` or `jhste-engineering-judgment` are migrated to `diagnosing-bugs` or `jhste-engineering-groundwork`. Managed copies of retired `write-a-skill` are removed rather than kept as a compatibility fallback.
|
package/README.zh.md
CHANGED
|
@@ -168,10 +168,11 @@ Custom - 通过面向效果的问题自定义安装范围
|
|
|
168
168
|
| [`jhste-db-api-boundary`](skills/jhste-db-api-boundary/SKILL.md)<br>检查 API route、service、repository、SQL 之间职责和 data contract 的 boundary skill | 修改 API、controller、service、repository、SQL、persistence code 时 | Fat route, unsafe SQL, missing auth/data scoping, leaky DTO |
|
|
169
169
|
| [`jhste-crawler-automation`](skills/jhste-crawler-automation/SKILL.md)<br>检查 crawler/scraper/worker/scheduler 的 producer-consumer boundary 和 side effect 的 automation skill | 修改 crawler、scraper、worker、scheduler、browser automation 时 | Fragile automation, unclear producer/consumer boundary, hidden side effect |
|
|
170
170
|
| [`jhste-red-team-review`](skills/jhste-red-team-review/SKILL.md)<br>read-only red-team code review skill,在完成前主动攻击性复查变更代码 | non-trivial code work 完成声明前 | Premature “done”, missed null/auth/env/write/API/performance risk |
|
|
171
|
+
| [`jhste-long-running-work-loop`](skills/jhste-long-running-work-loop/SKILL.md)<br>用于在 session、等待状态和 durable decision 间保留工作状态的窄 orchestration skill | 状态丢失可能导致错误、重复、不安全或难以恢复的工作时:多会话工作、重复 review、当天或多天外部等待状态、多 repo 影响、PRD→issue→implementation→review 流程或 durable decision | Lost context, stale scratchpad, unclear approval boundary, unsafe resume point |
|
|
171
172
|
|
|
172
173
|
## Bundled workflow skills
|
|
173
174
|
|
|
174
|
-
Normal install 还会安装
|
|
175
|
+
Normal install 还会安装 14 个从 Matt Pocock 的 [`mattpocock/skills`](https://github.com/mattpocock/skills) vendoring 的 workflow skills。它们适用于 implementation、debugging、planning、architecture、issue workflow、prototyping、handoff 和 skill-writing guidance。若不想安装它们,请使用 `--skill-set core`。
|
|
175
176
|
|
|
176
177
|
| Skill | 何时使用 |
|
|
177
178
|
|---|---|
|
|
@@ -187,11 +188,12 @@ Normal install 还会安装 13 个从 Matt Pocock 的 [`mattpocock/skills`](http
|
|
|
187
188
|
| [`to-issues`](skills/to-issues/SKILL.md)<br>把计划拆成 issue-ready vertical slices 的 skill | 需要 implementation tickets/work breakdown;tracker creation 需直接请求或 repo approval |
|
|
188
189
|
| [`triage`](skills/triage/SKILL.md)<br>分类 issue 并规划下一步行动的 triage skill | 需要 issue classification、next-action planning 或 repo-approved triage writes 时 |
|
|
189
190
|
| [`handoff`](skills/handoff/SKILL.md)<br>压缩 context,让下一个 agent 或 session 能继续工作的 handoff skill | 请求 handoff、session summary、continuation brief 或 next-agent context 时 |
|
|
190
|
-
| [`
|
|
191
|
+
| [`implement`](skills/implement/SKILL.md)<br>使用 jhste groundwork、verification、guard、review 的 scoped PRD/issue/spec implementation workflow skill | 想从 PRD、issue、spec 或 handoff 实现 focused work 时 |
|
|
192
|
+
| [`writing-great-skills`](skills/writing-great-skills/SKILL.md)<br>关于 predictable invocation、progressive disclosure、context load control、pruning 的 skill-writing reference | 想创建、替换或改进 agent skill 时 |
|
|
191
193
|
|
|
192
194
|
## Attribution: Matt Pocock skills
|
|
193
195
|
|
|
194
|
-
本仓库从 Matt Pocock 的 [`mattpocock/skills`](https://github.com/mattpocock/skills) vendoring 了上面列出的
|
|
196
|
+
本仓库从 Matt Pocock 的 [`mattpocock/skills`](https://github.com/mattpocock/skills) vendoring 了上面列出的 14 个 skills。
|
|
195
197
|
|
|
196
198
|
这些 skills 按 upstream MIT License vendoring。本仓库保留所需 copyright/license notice,并记录导入来源。
|
|
197
199
|
|
|
@@ -10,6 +10,8 @@ export const LEGACY_SKILL_RENAMES = Object.freeze({
|
|
|
10
10
|
'jhste-engineering-judgment': 'jhste-engineering-groundwork',
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
+
export const DELETED_MANAGED_SKILLS = Object.freeze(['write-a-skill']);
|
|
14
|
+
|
|
13
15
|
export function canonicalSkillName(name) {
|
|
14
16
|
return LEGACY_SKILL_RENAMES[name] || name;
|
|
15
17
|
}
|
|
@@ -101,6 +103,19 @@ function removeLegacySkillDirectories(skillsDir, selected, currentManifest, next
|
|
|
101
103
|
return results;
|
|
102
104
|
}
|
|
103
105
|
|
|
106
|
+
function removeDeletedManagedSkillDirectories(skillsDir, currentManifest, nextManifest) {
|
|
107
|
+
const results = [];
|
|
108
|
+
for (const deletedName of DELETED_MANAGED_SKILLS) {
|
|
109
|
+
const wasManaged = Boolean(currentManifest?.skills?.[deletedName]);
|
|
110
|
+
delete nextManifest.skills[deletedName];
|
|
111
|
+
const deletedPath = path.join(skillsDir, deletedName);
|
|
112
|
+
if (!wasManaged || !fs.existsSync(deletedPath)) continue;
|
|
113
|
+
fs.rmSync(deletedPath, { recursive: true, force: true });
|
|
114
|
+
results.push({ status: 'removed-deleted-managed-skill', source: deletedPath, destination: '', deletedName });
|
|
115
|
+
}
|
|
116
|
+
return results;
|
|
117
|
+
}
|
|
118
|
+
|
|
104
119
|
function copyManagedSkill(source, destination, name, {
|
|
105
120
|
force = false,
|
|
106
121
|
allowUnmanagedOverwrite = false,
|
|
@@ -201,6 +216,7 @@ export function installSkills(skillsDir, {
|
|
|
201
216
|
allowUnmanagedOverwrite,
|
|
202
217
|
adoptKnownSkills,
|
|
203
218
|
});
|
|
219
|
+
const deletedResults = removeDeletedManagedSkillDirectories(skillsDir, currentManifest, nextManifest);
|
|
204
220
|
const results = selected.map((name) => copyManagedSkill(path.join(sourceRoot, name), path.join(skillsDir, name), name, {
|
|
205
221
|
force,
|
|
206
222
|
allowUnmanagedOverwrite,
|
|
@@ -209,5 +225,5 @@ export function installSkills(skillsDir, {
|
|
|
209
225
|
nextManifest,
|
|
210
226
|
}));
|
|
211
227
|
writeSkillsManifest(skillsDir, nextManifest);
|
|
212
|
-
return [...legacyResults, ...results];
|
|
228
|
+
return [...legacyResults, ...deletedResults, ...results];
|
|
213
229
|
}
|
package/docs/ACCEPTANCE_CHECK.md
CHANGED
|
@@ -64,7 +64,7 @@ Record actual command output in release notes before publishing a release.
|
|
|
64
64
|
|
|
65
65
|
Release gates include dependency-free syntax checking, a first-run `install -> deep-scan -> tune --yes -> guard` smoke flow, `npm pack --dry-run` contents checks, and packed-tarball bin execution in a fresh temp consumer. These gates are not part of commit-time hooks.
|
|
66
66
|
|
|
67
|
-
- Verify `sync`/`update` migrates older managed renames without leaving duplicate directories, including `diagnose` → `diagnosing-bugs
|
|
67
|
+
- Verify `sync`/`update` migrates older managed renames without leaving duplicate directories, including `diagnose` → `diagnosing-bugs`, `jhste-engineering-judgment` → `jhste-engineering-groundwork`, and managed removal of retired `write-a-skill`.
|
|
68
68
|
|
|
69
69
|
## npm trusted publishing
|
|
70
70
|
|
|
@@ -61,4 +61,4 @@ If a similar section exists, the installer prints the snippet instead of editing
|
|
|
61
61
|
|
|
62
62
|
Managed hooks are identified by the jhste-skills hook markers. Existing non-managed hooks are never overwritten, including in `Full` mode and with `--force`. Full may install multiple hook targets, but each target is reported separately as installed, refreshed, skipped because non-managed, or failed.
|
|
63
63
|
|
|
64
|
-
Legacy managed renames are treated differently from unmanaged conflicts. During `sync` and `update`, older managed `diagnose` and `jhste-engineering-judgment` installs are migrated to `diagnosing-bugs` and `jhste-engineering-groundwork` automatically so the skills directory does not keep
|
|
64
|
+
Legacy managed renames are treated differently from unmanaged conflicts. During `sync` and `update`, older managed `diagnose` and `jhste-engineering-judgment` installs are migrated to `diagnosing-bugs` and `jhste-engineering-groundwork` automatically, and managed copies of retired `write-a-skill` are removed, so the skills directory does not keep duplicate or removed names.
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ export function runConnectScenarios({ root, tmp, skillsDir }) {
|
|
|
13
13
|
fs.mkdirSync(nonGitCwd, { recursive: true });
|
|
14
14
|
run(process.execPath, [path.join(root, 'cli/install.mjs'), '--yes', '--skills-dir', nonGitCwdSkills, '--skip-deep-scan'], { cwd: nonGitCwd });
|
|
15
15
|
if (fs.existsSync(path.join(nonGitCwd, '.jhste'))) fail('install outside git repo created .jhste');
|
|
16
|
-
if (skillDirs(nonGitCwdSkills).length !==
|
|
16
|
+
if (skillDirs(nonGitCwdSkills).length !== 22) fail('install outside git repo did not install 22 bundled skills');
|
|
17
17
|
|
|
18
18
|
const explicitNonGitRepo = path.join(tmp, 'explicit-non-git-repo');
|
|
19
19
|
const explicitNonGitSkills = path.join(tmp, 'explicit-non-git-skills');
|
|
@@ -42,6 +42,6 @@ export function runConnectScenarios({ root, tmp, skillsDir }) {
|
|
|
42
42
|
if (connectMissing.status !== 3) fail(`connect missing skills should exit 3, got ${connectMissing.status}`);
|
|
43
43
|
if (fs.existsSync(path.join(connectMissingRepo, '.jhste'))) fail('connect missing skills created .jhste');
|
|
44
44
|
run(process.execPath, [path.join(root, 'cli/connect.mjs'), '--mode', 'normal', '--yes', '--repo', connectMissingRepo, '--skills-dir', connectMissingSkills, '--skip-deep-scan', '--install-missing'], { cwd: connectMissingRepo });
|
|
45
|
-
if (skillDirs(connectMissingSkills).length !==
|
|
45
|
+
if (skillDirs(connectMissingSkills).length !== 22) fail('connect --install-missing did not install 22 bundled skills');
|
|
46
46
|
if (!fs.existsSync(path.join(connectMissingRepo, '.jhste', 'profile.yaml'))) fail('connect --install-missing did not create profile');
|
|
47
47
|
}
|
|
@@ -76,6 +76,21 @@ export function assertLegacySkillRenameMigration({ root, repo, skillsDir, manife
|
|
|
76
76
|
return migratedManifest;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
export function assertManagedDeletedSkillRemoval({ root, repo, skillsDir, manifest, deletedName, digest }) {
|
|
80
|
+
const deletedDir = path.join(skillsDir, deletedName);
|
|
81
|
+
fs.mkdirSync(deletedDir, { recursive: true });
|
|
82
|
+
fs.writeFileSync(path.join(deletedDir, 'SKILL.md'), '# stale deleted skill copy\n');
|
|
83
|
+
manifest.skills[deletedName] = { digest };
|
|
84
|
+
fs.writeFileSync(path.join(skillsDir, '.jhste-skills-manifest.json'), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
85
|
+
|
|
86
|
+
run(process.execPath, [path.join(root, 'cli/update.mjs'), '--yes', '--repo', repo, '--skills-dir', skillsDir], { cwd: repo });
|
|
87
|
+
|
|
88
|
+
if (fs.existsSync(deletedDir)) fail(`update did not remove deleted managed ${deletedName} skill directory`);
|
|
89
|
+
const updatedManifest = readManagedSkillsManifest(skillsDir);
|
|
90
|
+
if (updatedManifest.skills?.[deletedName]) fail(`update left deleted ${deletedName} entry in manifest`);
|
|
91
|
+
return updatedManifest;
|
|
92
|
+
}
|
|
93
|
+
|
|
79
94
|
export function assertNoInstallSideEffects({ repo, skillsDir, agentsBefore, label }) {
|
|
80
95
|
if (fs.existsSync(path.join(repo, '.jhste'))) fail(`${label} created .jhste`);
|
|
81
96
|
if (fs.existsSync(skillsDir)) fail(`${label} touched skills directory`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import {
|
|
4
|
-
assertLegacySkillRenameMigration,
|
|
4
|
+
assertLegacySkillRenameMigration, assertManagedDeletedSkillRemoval,
|
|
5
5
|
assertNoInstallSideEffects,
|
|
6
6
|
fail,
|
|
7
7
|
hashFile,
|
|
@@ -112,7 +112,7 @@ function runDefaultInstall(ctx) {
|
|
|
112
112
|
const manifest = readManagedSkillsManifest(skillsDir);
|
|
113
113
|
if (manifest.managed_by !== 'jhste-skills' || !manifest.skills?.['jhste-red-team-review']?.digest) fail('skills manifest missing managed skill digest');
|
|
114
114
|
const defaultSkillDirs = skillDirs(skillsDir);
|
|
115
|
-
if (defaultSkillDirs.length !==
|
|
115
|
+
if (defaultSkillDirs.length !== 22) fail(`default install should copy 22 bundled skills, got ${defaultSkillDirs.length}`);
|
|
116
116
|
if (!defaultSkillDirs.includes('improve-codebase-architecture')) fail('default install should copy vendored workflow skills');
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -204,7 +204,7 @@ run_jhste_skills guard --scope staged --format text --fail-on warning
|
|
|
204
204
|
migratedManifest = assertLegacySkillRenameMigration({
|
|
205
205
|
root, repo, skillsDir, manifest: migratedManifest, legacyName: 'jhste-engineering-judgment', canonicalName: 'jhste-engineering-groundwork', digest: 'legacy-groundwork-digest',
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
migratedManifest = assertManagedDeletedSkillRemoval({ root, repo, skillsDir, manifest: migratedManifest, deletedName: 'write-a-skill', digest: 'legacy-write-skill-digest' });
|
|
208
208
|
const unmanagedSkills = path.join(path.dirname(skillsDir), 'unmanaged-skills');
|
|
209
209
|
fs.mkdirSync(path.join(unmanagedSkills, 'jhste-code-quality'), { recursive: true });
|
|
210
210
|
fs.writeFileSync(path.join(unmanagedSkills, 'jhste-code-quality', 'SKILL.md'), '# unmanaged local copy\n');
|
|
@@ -258,7 +258,7 @@ function runSkillSetScenarios({ root, tmp }) {
|
|
|
258
258
|
fs.writeFileSync(path.join(vendorRepo, 'AGENTS.md'), '# Vendor skill repo\n');
|
|
259
259
|
run(process.execPath, [path.join(root, 'cli/install.mjs'), '--yes', '--repo', vendorRepo, '--skills-dir', vendorSkillsDir, '--skip-deep-scan', '--skip-hooks', '--skill-set', 'vendor'], { cwd: vendorRepo });
|
|
260
260
|
const vendorSkillDirs = skillDirs(vendorSkillsDir);
|
|
261
|
-
if (vendorSkillDirs.length !==
|
|
261
|
+
if (vendorSkillDirs.length !== 14) fail(`--skill-set vendor should copy 14 skills, got ${vendorSkillDirs.length}`);
|
|
262
262
|
if (!vendorSkillDirs.includes('improve-codebase-architecture')) fail('--skill-set vendor did not copy expected vendored skill');
|
|
263
263
|
if (vendorSkillDirs.includes('jhste-red-team-review')) fail('--skill-set vendor copied core skill');
|
|
264
264
|
|
|
@@ -268,7 +268,7 @@ function runSkillSetScenarios({ root, tmp }) {
|
|
|
268
268
|
fs.writeFileSync(path.join(allRepo, 'AGENTS.md'), '# All skill repo\n');
|
|
269
269
|
run(process.execPath, [path.join(root, 'cli/install.mjs'), '--yes', '--repo', allRepo, '--skills-dir', allSkillsDir, '--skip-deep-scan', '--skip-hooks', '--skill-set', 'all'], { cwd: allRepo });
|
|
270
270
|
const allSkillDirs = skillDirs(allSkillsDir);
|
|
271
|
-
if (allSkillDirs.length !==
|
|
271
|
+
if (allSkillDirs.length !== 22) fail(`--skill-set all should copy 22 skills, got ${allSkillDirs.length}`);
|
|
272
272
|
if (!allSkillDirs.includes('jhste-red-team-review') || !allSkillDirs.includes('improve-codebase-architecture')) fail('--skill-set all missing core or vendored skill');
|
|
273
273
|
}
|
|
274
274
|
|
|
@@ -47,7 +47,7 @@ function runFullModeScenarios({ root, tmp }) {
|
|
|
47
47
|
fs.writeFileSync(path.join(fullModeRepo, 'AGENTS.md'), '# Full mode repo\n');
|
|
48
48
|
run(process.execPath, [path.join(root, 'cli/install.mjs'), '--mode', 'full', '--yes', '--repo', fullModeRepo, '--skills-dir', fullModeSkillsDir, '--skip-deep-scan'], { cwd: fullModeRepo });
|
|
49
49
|
const fullModeSkillDirs = skillDirs(fullModeSkillsDir);
|
|
50
|
-
if (fullModeSkillDirs.length !==
|
|
50
|
+
if (fullModeSkillDirs.length !== 22) fail(`--mode full should copy 22 skills, got ${fullModeSkillDirs.length}`);
|
|
51
51
|
const fullPreCommit = path.join(fullModeRepo, '.git', 'hooks', 'pre-commit');
|
|
52
52
|
const fullPrePush = path.join(fullModeRepo, '.git', 'hooks', 'pre-push');
|
|
53
53
|
if (!fs.existsSync(fullPreCommit) || !fs.existsSync(fullPrePush)) fail('--mode full did not install pre-commit and pre-push');
|
package/scripts/vendor-check.mjs
CHANGED
|
@@ -14,7 +14,8 @@ const expected = [
|
|
|
14
14
|
'prototype',
|
|
15
15
|
'grill-me',
|
|
16
16
|
'handoff',
|
|
17
|
-
'
|
|
17
|
+
'writing-great-skills',
|
|
18
|
+
'implement',
|
|
18
19
|
'codebase-design',
|
|
19
20
|
'diagnosing-bugs',
|
|
20
21
|
'domain-modeling',
|
|
@@ -38,12 +39,12 @@ function readJson(file) {
|
|
|
38
39
|
|
|
39
40
|
const allowlist = readJson('vendor/matt-pocock/allowlist.json');
|
|
40
41
|
if (JSON.stringify(allowlist) !== JSON.stringify(expected)) {
|
|
41
|
-
fail('allowlist does not match the exact
|
|
42
|
+
fail('allowlist does not match the exact 14 selected skills');
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
const sourceLock = readJson('vendor/matt-pocock/source-lock.json');
|
|
45
46
|
if (!Array.isArray(sourceLock.skills) || sourceLock.skills.length !== expected.length) {
|
|
46
|
-
fail('source-lock must contain exactly
|
|
47
|
+
fail('source-lock must contain exactly 14 skills');
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
const seen = new Set();
|
package/skills/grill-me/SKILL.md
CHANGED
|
@@ -11,9 +11,6 @@ description: Direct red-team interrogation of the user's own plan or reasoning.
|
|
|
11
11
|
- This skill is read-only by default. Do not create or modify files, issues, PRs, commands, or repo state during grilling.
|
|
12
12
|
- If the user wants documentation updates, ADRs, glossary changes, issue creation, or other side effects, switch to the appropriate writing workflow such as `grill-with-docs`, `domain-modeling`, `to-issues`, or `triage`.
|
|
13
13
|
|
|
14
|
+
# Grill Me
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Ask the questions one at a time.
|
|
18
|
-
|
|
19
|
-
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
16
|
+
Run the `grilling` workflow for a personal, read-only pressure test. Keep the interaction one question at a time, include your recommended answer with each question, and explore the codebase instead of asking when the answer is discoverable locally.
|
|
@@ -1,47 +1,5 @@
|
|
|
1
1
|
# ADR Format
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This compatibility file is retained for older links. The maintained ADR format lives in [`../domain-modeling/ADR-FORMAT.md`](../domain-modeling/ADR-FORMAT.md).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## Template
|
|
8
|
-
|
|
9
|
-
```md
|
|
10
|
-
# {Short title of the decision}
|
|
11
|
-
|
|
12
|
-
{1-3 sentences: what's the context, what did we decide, and why.}
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections.
|
|
16
|
-
|
|
17
|
-
## Optional sections
|
|
18
|
-
|
|
19
|
-
Only include these when they add genuine value. Most ADRs won't need them.
|
|
20
|
-
|
|
21
|
-
- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`) — useful when decisions are revisited
|
|
22
|
-
- **Considered Options** — only when the rejected alternatives are worth remembering
|
|
23
|
-
- **Consequences** — only when non-obvious downstream effects need to be called out
|
|
24
|
-
|
|
25
|
-
## Numbering
|
|
26
|
-
|
|
27
|
-
Scan `docs/adr/` for the highest existing number and increment by one.
|
|
28
|
-
|
|
29
|
-
## When to offer an ADR
|
|
30
|
-
|
|
31
|
-
All three of these must be true:
|
|
32
|
-
|
|
33
|
-
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
34
|
-
2. **Surprising without context** — a future reader will look at the code and wonder "why on earth did they do it this way?"
|
|
35
|
-
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
36
|
-
|
|
37
|
-
If a decision is easy to reverse, skip it — you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."
|
|
38
|
-
|
|
39
|
-
### What qualifies
|
|
40
|
-
|
|
41
|
-
- **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
|
|
42
|
-
- **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
|
|
43
|
-
- **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library — just the ones that would take a quarter to swap out.
|
|
44
|
-
- **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
|
|
45
|
-
- **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
|
|
46
|
-
- **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
|
|
47
|
-
- **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it — otherwise someone will suggest GraphQL again in six months.
|
|
5
|
+
Repo-local instructions remain authoritative; use repo-local ADR conventions when they exist.
|
|
@@ -1,60 +1,5 @@
|
|
|
1
1
|
# CONTEXT.md Format
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This compatibility file is retained for older links. The maintained context/glossary format lives in [`../domain-modeling/CONTEXT-FORMAT.md`](../domain-modeling/CONTEXT-FORMAT.md).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
# {Context Name}
|
|
7
|
-
|
|
8
|
-
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
-
|
|
10
|
-
## Language
|
|
11
|
-
|
|
12
|
-
**Order**:
|
|
13
|
-
{A one or two sentence description of the term}
|
|
14
|
-
_Avoid_: Purchase, transaction
|
|
15
|
-
|
|
16
|
-
**Invoice**:
|
|
17
|
-
A request for payment sent to a customer after delivery.
|
|
18
|
-
_Avoid_: Bill, payment request
|
|
19
|
-
|
|
20
|
-
**Customer**:
|
|
21
|
-
A person or organization that places orders.
|
|
22
|
-
_Avoid_: Client, buyer, account
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Rules
|
|
26
|
-
|
|
27
|
-
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
-
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
-
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
-
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
-
|
|
32
|
-
## Single vs multi-context repos
|
|
33
|
-
|
|
34
|
-
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
-
|
|
36
|
-
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
-
|
|
38
|
-
```md
|
|
39
|
-
# Context Map
|
|
40
|
-
|
|
41
|
-
## Contexts
|
|
42
|
-
|
|
43
|
-
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
|
|
44
|
-
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
|
|
45
|
-
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
|
|
46
|
-
|
|
47
|
-
## Relationships
|
|
48
|
-
|
|
49
|
-
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
-
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
-
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The skill infers which structure applies:
|
|
55
|
-
|
|
56
|
-
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
57
|
-
- If only a root `CONTEXT.md` exists, single context
|
|
58
|
-
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
59
|
-
|
|
60
|
-
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
5
|
+
Repo-local instructions remain authoritative; use repo-local glossary conventions when they exist.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: grill-with-docs
|
|
3
|
-
description:
|
|
3
|
+
description: Stress-test a plan against project domain language and record resulting decisions in CONTEXT.md or ADRs. Use when the user wants grilling plus documentation, ADR, glossary, or CONTEXT updates.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## jhste compatibility
|
|
@@ -10,89 +10,17 @@ description: Red-team questioning of a plan against project domain language, the
|
|
|
10
10
|
- Vocabulary in this vendored skill is advisory unless adopted by repo-local docs; do not rename established repo concepts only to match this skill.
|
|
11
11
|
- File, repo, command, issue, PR, or other external side effects are allowed when the user directly requested that workflow or repo-local standing approval covers it. Ask for destructive, irreversible, ambiguous, production, secret, cost-bearing, broad existing-item, or out-of-scope changes.
|
|
12
12
|
|
|
13
|
+
# Grill With Docs
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
Run `grilling` and `domain-modeling` together: interrogate the plan one question at a time, and update the project glossary or ADRs as terms and durable decisions crystallize.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
## Process
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
1. **Load domain context.** Read `CONTEXT.md` or `CONTEXT-MAP.md` when present, plus relevant ADRs. If the answer to a question is discoverable from code, inspect the code instead of asking.
|
|
20
|
+
2. **Grill one branch at a time.** Ask one question, include your recommended answer, and wait for the user's correction before moving on.
|
|
21
|
+
3. **Update docs inline when requested.** If the user asked for docs, ADR, glossary, or CONTEXT updates, treat that as approval for bounded documentation edits during the session. If the user only asked for stress-testing, stay read-only until they ask for writes.
|
|
22
|
+
4. **Use domain-modeling as the docs SSOT.** For glossary and ADR structure, follow `../domain-modeling/CONTEXT-FORMAT.md` and `../domain-modeling/ADR-FORMAT.md`.
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
## ADR threshold
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</what-to-do>
|
|
25
|
-
|
|
26
|
-
<supporting-info>
|
|
27
|
-
|
|
28
|
-
## Domain awareness
|
|
29
|
-
|
|
30
|
-
During codebase exploration, also look for existing documentation:
|
|
31
|
-
|
|
32
|
-
### File structure
|
|
33
|
-
|
|
34
|
-
Most repos have a single context:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
/
|
|
38
|
-
├── CONTEXT.md
|
|
39
|
-
├── docs/
|
|
40
|
-
│ └── adr/
|
|
41
|
-
│ ├── 0001-event-sourced-orders.md
|
|
42
|
-
│ └── 0002-postgres-for-write-model.md
|
|
43
|
-
└── src/
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
/
|
|
50
|
-
├── CONTEXT-MAP.md
|
|
51
|
-
├── docs/
|
|
52
|
-
│ └── adr/ ← system-wide decisions
|
|
53
|
-
├── src/
|
|
54
|
-
│ ├── ordering/
|
|
55
|
-
│ │ ├── CONTEXT.md
|
|
56
|
-
│ │ └── docs/adr/ ← context-specific decisions
|
|
57
|
-
│ └── billing/
|
|
58
|
-
│ ├── CONTEXT.md
|
|
59
|
-
│ └── docs/adr/
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
63
|
-
|
|
64
|
-
## During the session
|
|
65
|
-
|
|
66
|
-
### Challenge against the glossary
|
|
67
|
-
|
|
68
|
-
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
69
|
-
|
|
70
|
-
### Sharpen fuzzy language
|
|
71
|
-
|
|
72
|
-
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."
|
|
73
|
-
|
|
74
|
-
### Discuss concrete scenarios
|
|
75
|
-
|
|
76
|
-
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
77
|
-
|
|
78
|
-
### Cross-reference with code
|
|
79
|
-
|
|
80
|
-
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?"
|
|
81
|
-
|
|
82
|
-
### Update CONTEXT.md inline
|
|
83
|
-
|
|
84
|
-
In docs-writing mode, when a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md). In read-only grilling mode, propose the wording instead of writing it.
|
|
85
|
-
|
|
86
|
-
`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
87
|
-
|
|
88
|
-
### Offer ADRs sparingly
|
|
89
|
-
|
|
90
|
-
Only offer to create an ADR when all three are true:
|
|
91
|
-
|
|
92
|
-
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
93
|
-
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
94
|
-
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
95
|
-
|
|
96
|
-
If any of the three is missing, skip the ADR. Use the format in [ADR-FORMAT.md](./ADR-FORMAT.md).
|
|
97
|
-
|
|
98
|
-
</supporting-info>
|
|
26
|
+
Offer an ADR only when the decision is hard to reverse, surprising without context, and the result of a real trade-off. Otherwise keep the conclusion in the conversation or glossary only.
|