jhste-skills 0.4.0 → 0.4.1

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.ja.md +10 -8
  3. package/README.ko.md +10 -8
  4. package/README.md +9 -10
  5. package/README.zh.md +10 -8
  6. package/adapters/codex/README.md +4 -14
  7. package/cli/install-actions/skill-migrations.mjs +22 -0
  8. package/cli/install-actions/skills.mjs +1 -10
  9. package/cli/shared/templates.mjs +8 -25
  10. package/cli/sync-core.mjs +7 -4
  11. package/docs/ACCEPTANCE_CHECK.md +8 -7
  12. package/docs/CLI.md +1 -1
  13. package/docs/CONFLICT_RESOLUTION.md +5 -15
  14. package/package.json +1 -1
  15. package/scripts/docs-check/bridge-and-retired.mjs +35 -0
  16. package/scripts/docs-check-data.mjs +52 -9
  17. package/scripts/docs-check.mjs +56 -19
  18. package/scripts/release-gates-test.mjs +1 -1
  19. package/scripts/smoke/connect-scenarios.mjs +2 -2
  20. package/scripts/smoke/global-scenarios.mjs +7 -5
  21. package/scripts/smoke/guard-and-hook-scenarios.mjs +1 -1
  22. package/scripts/smoke/install-scenarios.mjs +27 -20
  23. package/scripts/smoke/mode-scenarios.mjs +2 -2
  24. package/scripts/smoke/pre-reform-migration-scenario.mjs +59 -0
  25. package/skills/_shared/core-loop.md +16 -0
  26. package/skills/_shared/evidence-discipline.md +1 -1
  27. package/skills/_shared/issue-candidate.md +1 -1
  28. package/skills/{jhste-db-api-boundary/references/db-api-boundary.md → _shared/review-cards/api-db.md} +8 -6
  29. package/skills/{jhste-architecture-review/references/architecture-review.md → _shared/review-cards/architecture.md} +4 -15
  30. package/skills/{jhste-crawler-automation/references/crawler-automation.md → _shared/review-cards/automation.md} +8 -2
  31. package/skills/{jhste-code-quality/references → _shared/review-cards}/code-quality.md +6 -16
  32. package/skills/_shared/scope-discipline.md +1 -1
  33. package/skills/_shared/side-effect-policy.md +26 -0
  34. package/skills/_shared/solid-lens.md +1 -1
  35. package/skills/ask-jhste/SKILL.md +34 -22
  36. package/skills/codebase-design/SKILL.md +1 -1
  37. package/skills/diagnosing-bugs/SKILL.md +1 -1
  38. package/skills/domain-modeling/SKILL.md +1 -1
  39. package/skills/grill-me/SKILL.md +1 -1
  40. package/skills/grill-with-docs/SKILL.md +1 -1
  41. package/skills/grilling/SKILL.md +2 -2
  42. package/skills/handoff/SKILL.md +1 -1
  43. package/skills/implement/SKILL.md +3 -3
  44. package/skills/improve-codebase-architecture/SKILL.md +1 -1
  45. package/skills/jhste-change-review/SKILL.md +54 -0
  46. package/skills/jhste-crawler-automation/SKILL.md +22 -11
  47. package/skills/jhste-db-api-boundary/SKILL.md +24 -16
  48. package/skills/jhste-preflight/SKILL.md +52 -0
  49. package/skills/jhste-redteam/SKILL.md +43 -0
  50. package/skills/jhste-workstate/SKILL.md +46 -0
  51. package/skills/prototype/SKILL.md +1 -1
  52. package/skills/to-issues/SKILL.md +1 -1
  53. package/skills/to-prd/SKILL.md +1 -1
  54. package/skills/triage/SKILL.md +1 -1
  55. package/skills/writing-great-skills/SKILL.md +1 -1
  56. package/skills/jhste-architecture-review/SKILL.md +0 -35
  57. package/skills/jhste-code-quality/SKILL.md +0 -53
  58. package/skills/jhste-engineering-groundwork/SKILL.md +0 -42
  59. package/skills/jhste-long-running-work-loop/SKILL.md +0 -55
  60. package/skills/jhste-red-team-review/SKILL.md +0 -51
  61. /package/skills/{jhste-engineering-groundwork → jhste-preflight}/references/structure-templates.md +0 -0
  62. /package/skills/{jhste-red-team-review → jhste-redteam}/references/red-team-review.md +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.4.1 - 2026-07-01
6
+
7
+ ### Changed (breaking: personal-use topology reform)
8
+ - Reformed the jhste skill topology so most workflow policy lives in installed skills and `_shared` docs, while `AGENTS.md` and the bridge templates stay minimal and route through `ask-jhste`.
9
+ - Renamed skills: `jhste-engineering-groundwork` → `jhste-preflight`, `jhste-red-team-review` → `jhste-redteam`, `jhste-long-running-work-loop` → `jhste-workstate`.
10
+ - Merged `jhste-code-quality` and `jhste-architecture-review` into `jhste-change-review`, which selects domain review cards; kept `jhste-db-api-boundary` and `jhste-crawler-automation` as thin trigger skills so their safety checks keep firing reliably.
11
+ - Dropped back-compat skill aliases while keeping a migration-only replacement map for `sync`/`update`, so existing managed installs select the new replacement skills before retired directories are pruned.
12
+ - Minimized `AGENTS.md` and both bridge templates to a router pointer, a one-line trigger anchor, and an approval headline; moved the full loop, approval boundaries, and cross-cutting doctrine into `skills/_shared/`.
13
+
14
+ ### Added
15
+ - Added `skills/_shared/core-loop.md` (single source for the common coding loop) and `skills/_shared/side-effect-policy.md` (approval boundaries), plus `skills/_shared/review-cards/` (`code-quality`, `architecture`, `api-db`, `automation`).
16
+ - Added `docs-check` anti-bloat protections: a model-facing description length cap, required shared-doctrine references, a core-loop delegation/no-restate guard, a review-card restate guard, and a retired-skill-name check across skills, `AGENTS.md`, and bridge templates.
17
+
18
+ ### Validation
19
+ - `npm test` passed (12 stages). `jhste-skills guard --scope changed --format text --fail-on warning` passed with 0 warnings/errors.
20
+
3
21
  ## 0.4.0 - 2026-07-01
4
22
 
5
23
  ### Added
package/README.ja.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Languages: [English](README.md) · [한국어](README.ko.md) · [中文](README.zh.md) · [日本語](README.ja.md)
4
4
 
5
+ > このドキュメントは翻訳版です。正本は [README.md](README.md) であり、個人向けトポロジー改編後は翻訳が遅れる場合があります。
6
+
5
7
  AI コーディングエージェントが、あなたの定義したエンジニアリング基準を一貫して守るための、インストール可能な作業ルールキットです。
6
8
 
7
9
  `jhste-skills` は Codex、Claude Code などの AI コーディングエージェントに、共通のエンジニアリング作業フローを提供します。コードを変更する前に前提を検証し、リポジトリ内の既存指示を優先し、API/database/automation の境界を明確に保ち、SOLID-informed coding discipline と design review lens を適用し、changed-file guard を実行し、完了を宣言する前に red-team code review を行うよう支援します。guard finding は自動的な SOLID 証明ではなく review candidate です。
@@ -18,7 +20,7 @@ AI コーディングエージェントが、あなたの定義したエンジ
18
20
 
19
21
  このツールはプロジェクトを乗っ取りません。リポジトリ内の `AGENTS.md`、`CLAUDE.md`、docs が常に権威です。デフォルト設定は advisory モードで、marker-managed 方式で管理され、低リスクで試せるように設計されています。
20
22
 
21
- Skills は、必要な状況でエージェントが自動的に使うことを想定しています。たとえば API コードを変更する場合は API/database boundary skill を、完了直前には red-team review skill を使うよう促します。ユーザーが明示的に skill を呼び出すこともできます。例: `use jhste-engineering-groundwork to review this change premise`、`run jhste-red-team-review on this diff`。
23
+ Skills は、必要な状況でエージェントが自動的に使うことを想定しています。たとえば API コードを変更する場合は API/database boundary skill を、完了直前には red-team review skill を使うよう促します。ユーザーが明示的に skill を呼び出すこともできます。例: `use jhste-preflight to review this change premise`、`run jhste-redteam on this diff`。
22
24
 
23
25
  ## なぜインストールするのか?
24
26
 
@@ -176,13 +178,13 @@ Custom - 効果ベースの質問でセットアップ範囲を選択
176
178
  |---|---|---|
177
179
  | [`setup`](skills/setup/SKILL.md)<br>install/connect/update が既存プロジェクト指示を上書きしないようにする安全セットアップ skill | kit をインストール、またはリポジトリに接続するとき | Unsafe overwrite, unmanaged hook conflict, repo instruction replacement |
178
180
  | [`ask-jhste`](skills/ask-jhste/SKILL.md)<br>適切な jhste skill や workflow を選ぶ user-invoked router | 次にどの jhste skill/workflow を使うべきか迷うとき | Wrong workflow selection, unnecessary always-on context, accidental side effects from routing |
179
- | [`jhste-engineering-groundwork`](skills/jhste-engineering-groundwork/SKILL.md)<br>コード変更前に goal、premise、scope、boundary、failure path を検証する pre-change groundwork skill | non-trivial code change の前 | Blind agreement, scope creep, unverified assumption, unclear boundary |
180
- | [`jhste-code-quality`](skills/jhste-code-quality/SKILL.md)<br>input validation、observable failure handling、secret-safe logging、oversized-file review の skill | external input、failure handling、logging、env/config、code-quality review path を触るとき | Unvalidated input, silent failure, secret logging, oversized file |
181
- | [`jhste-architecture-review`](skills/jhste-architecture-review/SKILL.md)<br>module boundary、side-effect placement、SOLID-informed design risk を確認する architecture review skill | module boundary、app structure、side-effect placement、responsibility split を変更するとき | Pass-through abstraction, mixed responsibility, side-effect leakage |
181
+ | [`jhste-preflight`](skills/jhste-preflight/SKILL.md)<br>コード変更前に goal、premise、scope、boundary、failure path を検証する pre-change groundwork skill | non-trivial code change の前 | Blind agreement, scope creep, unverified assumption, unclear boundary |
182
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>input validation、observable failure handling、secret-safe logging、oversized-file review の skill | external input、failure handling、logging、env/config、code-quality review path を触るとき | Unvalidated input, silent failure, secret logging, oversized file |
183
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>module boundary、side-effect placement、SOLID-informed design risk を確認する architecture review skill | module boundary、app structure、side-effect placement、responsibility split を変更するとき | Pass-through abstraction, mixed responsibility, side-effect leakage |
182
184
  | [`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 |
183
185
  | [`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 |
184
- | [`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 |
185
- | [`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 |
186
+ | [`jhste-redteam`](skills/jhste-redteam/SKILL.md)<br>完了前に変更コードを攻撃的に再確認する read-only red-team code review skill | non-trivial code work の完了宣言前 | Premature “done”, missed null/auth/env/write/API/performance risk |
187
+ | [`jhste-workstate`](skills/jhste-workstate/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 |
186
188
 
187
189
  ## Bundled workflow skills
188
190
 
@@ -243,8 +245,8 @@ jhste-skills uninstall
243
245
  2. 最初は advisory hook を維持します。commit-time check が不要なら `--skip-hooks` を使い、blocking mode は noise と false positive を十分確認してから有効にします。
244
246
  3. まずデフォルトの 300-line advisory limit を使います。チームが warning-level hook enforcement を受け入れられるようになってから `--line-limit-mode blocking` を使います。
245
247
  4. コード変更中は `guard --scope changed --format text --fail-on error` を手動で実行します。
246
- 5. non-trivial code change の前に、`jhste-engineering-groundwork` で scope、boundary、failure path、data contract、assumption、changed class/module/function の SOLID-informed review lens を確認します。
247
- 6. non-trivial code work の完了宣言前に `jhste-red-team-review` を使います。docs-only、comment-only、formatting-only、trivial rename-only の変更はスキップします。
248
+ 5. non-trivial code change の前に、`jhste-preflight` で scope、boundary、failure path、data contract、assumption、changed class/module/function の SOLID-informed review lens を確認します。
249
+ 6. non-trivial code work の完了宣言前に `jhste-redteam` を使います。docs-only、comment-only、formatting-only、trivial rename-only の変更はスキップします。
248
250
  7. fix + re-review は最大 2 サイクルまでにし、無限ループせず残りの risk を報告します。
249
251
  8. baseline は existing debt をレビューした後にだけ作成します。Baseline は known-issues ledger として扱い、scanner failure を隠すのではなく、ratchet で new debt を防ぐために使います。
250
252
 
package/README.ko.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Languages: [English](README.md) · [한국어](README.ko.md) · [中文](README.zh.md) · [日本語](README.ja.md)
4
4
 
5
+ > 이 문서는 번역본입니다. 최신 정본은 [README.md](README.md)이며, 개인용 토폴로지 개편 이후 번역이 늦어질 수 있습니다.
6
+
5
7
  AI 코딩 에이전트가 설정한 코딩 기준을 일관되게 따르도록 만드는 설치형 작업 규칙 세트입니다.
6
8
 
7
9
  `jhste-skills`는 Codex, Claude Code 같은 AI 코딩 에이전트에게 공통된 엔지니어링 작업 루프를 제공합니다. 코드를 바꾸기 전에 전제를 확인하고, 레포의 기존 지침을 우선시하고, API/database/automation 경계를 지키고, SOLID-informed coding discipline과 design review lens를 적용하고, 변경 파일 guard를 실행하고, 완료를 선언하기 전에 red-team code review를 거치도록 돕습니다. guard finding은 자동 SOLID 증명이 아니라 review candidate이며, 완료 보고는 current proof, 실행하지 않은 check, residual risk를 분리해야 합니다.
@@ -18,7 +20,7 @@ AI 코딩 에이전트가 설정한 코딩 기준을 일관되게 따르도록
18
20
 
19
21
  이 도구는 프로젝트를 장악하지 않습니다. 레포 안의 `AGENTS.md`, `CLAUDE.md`, docs가 항상 우선입니다. 기본 설정은 advisory 모드이며, marker-managed 방식으로 동작하고, 부담 없이 시도할 수 있도록 설계되어 있습니다.
20
22
 
21
- 스킬은 필요한 상황에서 에이전트가 자동으로 사용하도록 설계되어 있습니다. 예를 들어 API 코드를 수정하면 API/database boundary 스킬을, 완료 직전에는 red-team review 스킬을 사용하도록 안내합니다. 사용자가 직접 특정 스킬을 호출할 수도 있습니다. 예: `jhste-engineering-groundwork를 사용해서 이 변경 전제를 검토해줘`, `jhste-red-team-review로 이 diff를 리뷰해줘`.
23
+ 스킬은 필요한 상황에서 에이전트가 자동으로 사용하도록 설계되어 있습니다. 예를 들어 API 코드를 수정하면 API/database boundary 스킬을, 완료 직전에는 red-team review 스킬을 사용하도록 안내합니다. 사용자가 직접 특정 스킬을 호출할 수도 있습니다. 예: `jhste-preflight를 사용해서 이 변경 전제를 검토해줘`, `jhste-redteam로 이 diff를 리뷰해줘`.
22
24
 
23
25
  ## 왜 설치해야 하나요?
24
26
 
@@ -179,13 +181,13 @@ Custom - 효과 중심 질문을 통해 설치 범위를 직접 선택
179
181
  |---|---|---|
180
182
  | [`setup`](skills/setup/SKILL.md)<br>설치, 연결, 업데이트가 기존 프로젝트 지침을 덮어쓰지 않도록 하는 안전 설치 스킬 | kit를 설치하거나 레포에 연결할 때 | unsafe overwrite, unmanaged hook conflict, repo instruction replacement |
181
183
  | [`ask-jhste`](skills/ask-jhste/SKILL.md)<br>적절한 jhste skill이나 workflow를 고르는 user-invoked router | 다음에 어떤 jhste skill/workflow를 써야 할지 확실하지 않을 때 | wrong workflow selection, unnecessary always-on context, accidental side effects from routing |
182
- | [`jhste-engineering-groundwork`](skills/jhste-engineering-groundwork/SKILL.md)<br>코드 변경 전 목표, 전제, scope, boundary, failure path, final behavior predicate를 검증하는 pre-change groundwork 스킬 | non-trivial code change 전 | blind agreement, scope creep, unverified assumption, unclear boundary |
183
- | [`jhste-code-quality`](skills/jhste-code-quality/SKILL.md)<br>입력 검증, 관측 가능한 실패 처리, secret-safe logging, oversized-file review 스킬 | external input, failure handling, logging, env/config, cleanup/search-replace, code-quality review path를 만질 때 | unvalidated input, silent failure, secret logging, unsafe broad cleanup, oversized file |
184
- | [`jhste-architecture-review`](skills/jhste-architecture-review/SKILL.md)<br>모듈 경계, side effect 위치, SOLID-informed design risk를 검토하는 아키텍처 리뷰 스킬 | module boundary, app structure, side-effect placement, responsibility split 변경 시 | pass-through abstraction, mixed responsibility, side-effect leakage |
184
+ | [`jhste-preflight`](skills/jhste-preflight/SKILL.md)<br>코드 변경 전 목표, 전제, scope, boundary, failure path, final behavior predicate를 검증하는 pre-change groundwork 스킬 | non-trivial code change 전 | blind agreement, scope creep, unverified assumption, unclear boundary |
185
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>입력 검증, 관측 가능한 실패 처리, secret-safe logging, oversized-file review 스킬 | external input, failure handling, logging, env/config, cleanup/search-replace, code-quality review path를 만질 때 | unvalidated input, silent failure, secret logging, unsafe broad cleanup, oversized file |
186
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>모듈 경계, side effect 위치, SOLID-informed design risk를 검토하는 아키텍처 리뷰 스킬 | module boundary, app structure, side-effect placement, responsibility split 변경 시 | pass-through abstraction, mixed responsibility, side-effect leakage |
185
187
  | [`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 |
186
188
  | [`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 |
187
- | [`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 |
188
- | [`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 |
189
+ | [`jhste-redteam`](skills/jhste-redteam/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 |
190
+ | [`jhste-workstate`](skills/jhste-workstate/SKILL.md)<br>세션, 대기 상태, durable decision 사이의 작업 상태를 보존하는 좁은 orchestration 스킬 | 상태 손실이 잘못된 작업, 중복 작업, unsafe resume, 재개 어려움으로 이어질 수 있을 때: 여러 세션 작업, 반복 리뷰, 당일 또는 다일 외부 대기 상태, 여러 repo 영향, PRD→issue→구현→리뷰 흐름, durable decision | lost context, stale scratchpad, unclear approval boundary, unsafe resume point |
189
191
 
190
192
  ## Bundled workflow skills
191
193
 
@@ -246,8 +248,8 @@ jhste-skills uninstall
246
248
  2. 처음에는 advisory hook을 유지합니다. commit-time check를 원하지 않으면 `--skip-hooks`를 사용하고, blocking mode는 noise와 false positive를 충분히 확인한 뒤 켭니다.
247
249
  3. 기본 300-line advisory limit을 먼저 사용합니다. warning-level hook enforcement를 팀이 받아들일 준비가 되었을 때만 `--line-limit-mode blocking`을 사용합니다.
248
250
  4. 코드 변경 중에는 `guard --scope changed --format text --fail-on error`를 수동으로 실행합니다.
249
- 5. non-trivial code change 전에는 `jhste-engineering-groundwork`로 scope, boundary, failure path, data contract, assumption, changed class/module/function의 SOLID-informed review lens를 확인합니다.
250
- 6. non-trivial code work 완료 선언 전에는 `jhste-red-team-review`를 사용합니다. docs-only, comment-only, formatting-only, trivial rename-only 변경은 건너뜁니다.
251
+ 5. non-trivial code change 전에는 `jhste-preflight`로 scope, boundary, failure path, data contract, assumption, changed class/module/function의 SOLID-informed review lens를 확인합니다.
252
+ 6. non-trivial code work 완료 선언 전에는 `jhste-redteam`를 사용합니다. docs-only, comment-only, formatting-only, trivial rename-only 변경은 건너뜁니다.
251
253
  7. fix + re-review는 최대 두 번까지만 반복하고, 무한 review loop 대신 남은 risk를 보고합니다.
252
254
  8. 기존 debt를 검토한 뒤에만 baseline을 생성합니다. Baseline은 known-issues ledger로 취급하고, scanner failure를 숨기는 용도가 아니라 new debt를 막는 ratchet 용도로 사용합니다.
253
255
 
package/README.md CHANGED
@@ -18,7 +18,7 @@ SOLID is used here as a design review lens for concrete maintenance and failure
18
18
 
19
19
  This tool does **not** take over your project. Repo-local `AGENTS.md`, `CLAUDE.md`, and docs remain authoritative. The default setup is advisory, marker-managed, and designed to be low-risk to try.
20
20
 
21
- Skills are designed to be used automatically when the situation calls for them. For example, when an agent edits API code, it is guided to use the API/database boundary skill; before completion, it is guided to use the red-team review skill. You can also call a skill directly, for example: `use jhste-engineering-groundwork to review this change premise`, or `run jhste-red-team-review on this diff`.
21
+ Skills are designed to be used automatically when the situation calls for them. For example, when an agent edits API code, it is guided to use `jhste-db-api-boundary`; before completion, it is guided to use `jhste-redteam`. When unsure which skill fits, route through `ask-jhste`. You can also call a skill directly, for example: `use jhste-preflight to review this change premise`, or `run jhste-redteam on this diff`.
22
22
 
23
23
  ## Why install this?
24
24
 
@@ -179,13 +179,12 @@ These are the jhste-authored guardrail skills. They are installed by default as
179
179
  |---|---|---|
180
180
  | [`setup`](skills/setup/SKILL.md)<br>A safe setup skill that prevents install/connect/update flows from overwriting existing project instructions | Installing or connecting the kit to a repository | Unsafe overwrite, unmanaged hook conflict, repo instruction replacement |
181
181
  | [`ask-jhste`](skills/ask-jhste/SKILL.md)<br>A user-invoked router for choosing the right jhste skill or workflow | You are not sure which jhste skill or workflow to use next | Wrong workflow selection, unnecessary always-on context, accidental side effects from routing |
182
- | [`jhste-engineering-groundwork`](skills/jhste-engineering-groundwork/SKILL.md)<br>A pre-change groundwork skill that verifies goal, premise, scope, boundary, failure path, and final behavior predicates before code edits | Before non-trivial code changes | Blind agreement, scope creep, unverified assumptions, unclear boundaries |
183
- | [`jhste-code-quality`](skills/jhste-code-quality/SKILL.md)<br>A code-quality skill for input validation, observable failure handling, secret-safe logging, and oversized-file review | Touching external input, failure handling, logging, env/config, cleanup/search-replace, or code-quality review paths | Unvalidated input, silent failure, secret logging, unsafe broad cleanup, oversized files |
184
- | [`jhste-architecture-review`](skills/jhste-architecture-review/SKILL.md)<br>An architecture review skill for module boundaries, side-effect placement, and SOLID-informed design risks | Changing module boundaries, app structure, side-effect placement, or responsibility splits | Pass-through abstraction, mixed responsibility, side-effect leakage |
182
+ | [`jhste-preflight`](skills/jhste-preflight/SKILL.md)<br>Pre-edit groundwork that verifies goal, premise, scope, boundary, failure path, and final behavior predicates before code edits | Before non-trivial code changes | Blind agreement, scope creep, unverified assumptions, unclear boundaries |
183
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>Changed-path quality and design review that selects code-quality and architecture review cards from the touched files | After editing non-trivial code, alongside guard | Unvalidated input, silent failure, secret logging, pass-through abstraction, mixed responsibility |
185
184
  | [`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 |
186
185
  | [`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 |
187
- | [`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 |
188
- | [`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 |
186
+ | [`jhste-redteam`](skills/jhste-redteam/SKILL.md)<br>A read-only red-team code review skill that 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 |
187
+ | [`jhste-workstate`](skills/jhste-workstate/SKILL.md)<br>A narrow orchestration skill for preserving work state across sessions, wait states, and durable decisions | Losing state could make multi-session, wait-state, or multi-repo work wrong, duplicated, or unsafe | Lost context, stale scratchpads, unclear approval boundaries, unsafe resume points |
189
188
 
190
189
  ## Bundled workflow skills
191
190
 
@@ -246,8 +245,8 @@ See [`docs/CLI.md`](docs/CLI.md) for detailed command behavior.
246
245
  2. Keep advisory hooks at first. Use `--skip-hooks` if you do not want commit-time checks, and enable blocking mode only after reviewing noise and false positives.
247
246
  3. Start with the default 300-line advisory limit. Use `--line-limit-mode blocking` only when the team is ready for warning-level hook enforcement.
248
247
  4. During code changes, run `guard --scope changed --format text --fail-on error` manually.
249
- 5. Before non-trivial code changes, use `jhste-engineering-groundwork` to check scope, boundary, failure path, data contract, assumptions, and the SOLID-informed review lens for changed classes/modules/functions.
250
- 6. Before declaring non-trivial code work complete, use `jhste-red-team-review`. Skip docs-only, comment-only, formatting-only, and trivial rename-only changes.
248
+ 5. Before non-trivial code changes, use `jhste-preflight` to check scope, boundary, failure path, data contract, assumptions, and the SOLID-informed review lens for changed classes/modules/functions.
249
+ 6. During and after the change, use `jhste-change-review` on the changed path, and `jhste-redteam` before declaring non-trivial code work complete. Skip docs-only, comment-only, formatting-only, and trivial rename-only changes.
251
250
  7. Limit fix + re-review loops to two cycles, then report remaining risks instead of looping indefinitely.
252
251
  8. Create a baseline only after reviewing existing debt. Treat the baseline as a known-issues ledger and use ratchet behavior to stop new debt, not to hide scanner failures.
253
252
 
@@ -288,6 +287,6 @@ See [`docs/ACCEPTANCE_CHECK.md`](docs/ACCEPTANCE_CHECK.md) for release acceptanc
288
287
 
289
288
  Fast agents need guardrails. `jhste-skills` gives them a repo-respecting engineering workflow.
290
289
 
291
- Skills share cross-cutting doctrine (SOLID lens, evidence discipline, issue-candidate protocol, scope discipline) from `skills/_shared/`. Directories under `skills/` whose name starts with `_` are shared companion resources, not skills: they are excluded from skill listing, selection, and missing-skill checks, but are copied alongside the skills whenever any skill is installed so cross-skill `../_shared/...` references never dangle in the installed artifact.
290
+ Skills share cross-cutting doctrine — the core loop, SOLID lens, evidence discipline, scope discipline, side-effect/approval policy, and issue-candidate protocol — from `skills/_shared/`, plus domain review cards under `skills/_shared/review-cards/`. Each skill references this doctrine instead of restating it, so `ask-jhste` and a minimal bridge can stay small. Directories under `skills/` whose name starts with `_` are shared companion resources, not skills: they are excluded from skill listing, selection, and missing-skill checks, but are copied alongside the skills whenever any skill is installed so cross-skill `../_shared/...` references never dangle in the installed artifact.
292
291
 
293
- 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.
292
+ 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. Retired and renamed skills are pruned rather than exposed as installable aliases during `sync` and `update`: when an old managed name is detected, the matching replacement skill is selected for refresh, then the retired directory is removed. This covers the pre-reform `jhste-engineering-groundwork`, `jhste-code-quality`, `jhste-architecture-review`, `jhste-red-team-review`, and `jhste-long-running-work-loop`, plus the older `diagnose`, `jhste-engineering-judgment`, and `write-a-skill` names.
package/README.zh.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Languages: [English](README.md) · [한국어](README.ko.md) · [中文](README.zh.md) · [日本語](README.ja.md)
4
4
 
5
+ > 本文档为翻译版本。权威来源以 [README.md](README.md) 为准;个人化拓扑改版后,翻译可能滞后。
6
+
5
7
  一套可安装的工作规则工具包,帮助 AI 编程代理稳定遵循你设定的工程标准。
6
8
 
7
9
  `jhste-skills` 为 Codex、Claude Code 等 AI 编程代理提供一套共享的工程工作流。它帮助代理在修改代码前验证前提,优先遵循仓库本地说明,保持 API/database/automation 边界清晰,应用 SOLID-informed coding discipline 和 design review lens,运行 changed-file guard,并在声明完成前执行 red-team code review。guard finding 是 review candidate,不是自动 SOLID 证明。
@@ -18,7 +20,7 @@ Languages: [English](README.md) · [한국어](README.ko.md) · [中文](README.
18
20
 
19
21
  这个工具不会接管你的项目。仓库内的 `AGENTS.md`、`CLAUDE.md` 和 docs 始终是权威来源。默认设置是 advisory 模式,使用 marker-managed 方式管理变更,设计目标是低风险、容易试用。
20
22
 
21
- Skills 设计为在需要时由代理自动使用。例如,代理修改 API 代码时会被引导使用 API/database boundary skill;在完成前会被引导使用 red-team review skill。你也可以直接调用某个 skill,例如:`use jhste-engineering-groundwork to review this change premise`,或 `run jhste-red-team-review on this diff`。
23
+ Skills 设计为在需要时由代理自动使用。例如,代理修改 API 代码时会被引导使用 API/database boundary skill;在完成前会被引导使用 red-team review skill。你也可以直接调用某个 skill,例如:`use jhste-preflight to review this change premise`,或 `run jhste-redteam on this diff`。
22
24
 
23
25
  ## 为什么要安装?
24
26
 
@@ -176,13 +178,13 @@ Custom - 通过面向效果的问题自定义安装范围
176
178
  |---|---|---|
177
179
  | [`setup`](skills/setup/SKILL.md)<br>安全安装 skill,避免 install/connect/update 覆盖现有项目说明 | 安装 kit 或连接仓库时 | Unsafe overwrite, unmanaged hook conflict, repo instruction replacement |
178
180
  | [`ask-jhste`](skills/ask-jhste/SKILL.md)<br>用于选择正确 jhste skill 或 workflow 的 user-invoked router | 不确定下一步该用哪个 jhste skill/workflow 时 | Wrong workflow selection, unnecessary always-on context, accidental side effects from routing |
179
- | [`jhste-engineering-groundwork`](skills/jhste-engineering-groundwork/SKILL.md)<br>pre-change groundwork skill,在改代码前验证目标、前提、scope、boundary 和 failure path | non-trivial code change 前 | Blind agreement, scope creep, unverified assumption, unclear boundary |
180
- | [`jhste-code-quality`](skills/jhste-code-quality/SKILL.md)<br>检查 input validation、observable failure handling、secret-safe logging 和 oversized-file review 的 skill | 触及 external input、failure handling、logging、env/config 或 code-quality review path 时 | Unvalidated input, silent failure, secret logging, oversized file |
181
- | [`jhste-architecture-review`](skills/jhste-architecture-review/SKILL.md)<br>检查 module boundary、side-effect placement 和 SOLID-informed design risk 的架构 review skill | 修改 module boundary、app structure、side-effect placement 或 responsibility split 时 | Pass-through abstraction, mixed responsibility, side-effect leakage |
181
+ | [`jhste-preflight`](skills/jhste-preflight/SKILL.md)<br>pre-change groundwork skill,在改代码前验证目标、前提、scope、boundary 和 failure path | non-trivial code change 前 | Blind agreement, scope creep, unverified assumption, unclear boundary |
182
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>检查 input validation、observable failure handling、secret-safe logging 和 oversized-file review 的 skill | 触及 external input、failure handling、logging、env/config 或 code-quality review path 时 | Unvalidated input, silent failure, secret logging, oversized file |
183
+ | [`jhste-change-review`](skills/jhste-change-review/SKILL.md)<br>检查 module boundary、side-effect placement 和 SOLID-informed design risk 的架构 review skill | 修改 module boundary、app structure、side-effect placement 或 responsibility split 时 | Pass-through abstraction, mixed responsibility, side-effect leakage |
182
184
  | [`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 |
183
185
  | [`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 |
184
- | [`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 |
185
- | [`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 |
186
+ | [`jhste-redteam`](skills/jhste-redteam/SKILL.md)<br>read-only red-team code review skill,在完成前主动攻击性复查变更代码 | non-trivial code work 完成声明前 | Premature “done”, missed null/auth/env/write/API/performance risk |
187
+ | [`jhste-workstate`](skills/jhste-workstate/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 |
186
188
 
187
189
  ## Bundled workflow skills
188
190
 
@@ -243,8 +245,8 @@ jhste-skills uninstall
243
245
  2. 一开始保留 advisory hook。如果不想要 commit-time check,使用 `--skip-hooks`;只有在充分检查 noise 和 false positive 后才启用 blocking mode。
244
246
  3. 先使用默认 300-line advisory limit。只有团队准备接受 warning-level hook enforcement 时,才使用 `--line-limit-mode blocking`。
245
247
  4. 修改代码时,手动运行 `guard --scope changed --format text --fail-on error`。
246
- 5. non-trivial code change 前,用 `jhste-engineering-groundwork` 检查 scope、boundary、failure path、data contract、assumption,以及 changed class/module/function 的 SOLID-informed review lens。
247
- 6. non-trivial code work 完成声明前,使用 `jhste-red-team-review`。跳过 docs-only、comment-only、formatting-only、trivial rename-only 变更。
248
+ 5. non-trivial code change 前,用 `jhste-preflight` 检查 scope、boundary、failure path、data contract、assumption,以及 changed class/module/function 的 SOLID-informed review lens。
249
+ 6. non-trivial code work 完成声明前,使用 `jhste-redteam`。跳过 docs-only、comment-only、formatting-only、trivial rename-only 变更。
248
250
  7. fix + re-review 最多重复两轮,然后报告剩余 risk,避免无限循环。
249
251
  8. 只有在审查 existing debt 后才创建 baseline。将 baseline 视为 known-issues ledger,用 ratchet 阻止 new debt,而不是隐藏 scanner failure。
250
252
 
@@ -6,22 +6,12 @@ Bridge block:
6
6
 
7
7
  ```md
8
8
  ## Agent skills
9
- This repo uses jhste skills as shared guidance.
9
+ This repo uses jhste skills as installed workflow guidance.
10
10
  Repo-local instructions in this file remain authoritative.
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.
12
- Ask for destructive, irreversible, ambiguous, production, secret, cost-bearing, broad existing-item, or out-of-scope changes.
13
- For reversible in-scope choices, make a reasonable assumption, proceed, and report it in the final summary.
11
+ Use `ask-jhste` as the router for jhste coding, review, setup, and workstate workflows; detailed policy lives in the installed skills and their `_shared` docs, not this block.
12
+ For non-trivial code changes: run `jhste-preflight` before editing, `jhste-skills guard --scope changed` and `jhste-change-review` on the changed path, then `jhste-redteam` before completion.
13
+ Before destructive, irreversible, production, secret-bearing, cost-bearing, commit, push, release, publish, or broad out-of-scope actions, follow repo-local instructions and the side-effect policy in the installed skills directory's `_shared/side-effect-policy.md`.
14
14
  See `.jhste/profile.yaml` for local skill preferences.
15
- Before non-trivial code changes, use the `jhste-engineering-groundwork` skill to check scope, boundaries, failure paths, final behavior predicates, and assumptions.
16
- For changed code, name the one main responsibility of each changed class, module, and function, and reject adjacent responsibilities unless they are on the changed execution path and prevent a concrete failure.
17
- Use SOLID-informed coding discipline as a clean-code review lens for concrete failure modes, not a compliance claim or automatic abstraction trigger; guard findings are review candidates, not proof.
18
- After code changes, run `jhste-skills guard --scope changed --format text --fail-on error` when available.
19
- Report guard warnings/errors; do not treat guard runtime/config failures as validation success.
20
- Treat guard output as review evidence, not proof by itself; completion review should separate current proof, skipped/not-run checks, consumer-path proof when feasible, and residual risk.
21
- If guard or red-team review reports new warnings on changed files, attempt a bounded fix before declaring completion, then rerun guard. Do not commit automatically.
22
- Before declaring non-trivial code work complete, use the `jhste-red-team-review` skill.
23
- Skip red-team review for docs-only, comment-only, formatting-only, or trivial rename-only changes.
24
- Do not enter an unbounded fix/review loop; stop after at most two fix + re-review cycles and report remaining risks.
25
15
  ```
26
16
 
27
17
  Default install copies skills to a kit-managed skill directory and does not delete or rewrite existing Codex skills.
@@ -0,0 +1,22 @@
1
+ // Personal-use topology reform keeps no back-compat aliases for direct skill
2
+ // selection: retired names are not installable aliases. `sync`/`update` still use
3
+ // this migration-only replacement map so existing managed installs select the new
4
+ // workflow skills before pruning old directories.
5
+ export const LEGACY_SKILL_RENAMES = Object.freeze({});
6
+
7
+ export const RETIRED_SKILL_REPLACEMENTS = Object.freeze({
8
+ 'write-a-skill': ['writing-great-skills'],
9
+ diagnose: ['diagnosing-bugs'],
10
+ 'jhste-engineering-judgment': ['jhste-preflight'],
11
+ 'jhste-engineering-groundwork': ['jhste-preflight'],
12
+ 'jhste-code-quality': ['jhste-change-review'],
13
+ 'jhste-architecture-review': ['jhste-change-review'],
14
+ 'jhste-red-team-review': ['jhste-redteam'],
15
+ 'jhste-long-running-work-loop': ['jhste-workstate'],
16
+ });
17
+
18
+ export const DELETED_MANAGED_SKILLS = Object.freeze(Object.keys(RETIRED_SKILL_REPLACEMENTS));
19
+
20
+ export function canonicalSkillName(name) {
21
+ return LEGACY_SKILL_RENAMES[name] || name;
22
+ }
@@ -2,19 +2,10 @@ import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { directoryDigest, ensureDir, KIT_ROOT, listSharedResourceNames, listSkillDirectories, nowIso } from '../shared.mjs';
4
4
  import { readJsonFile, validateJsonObject, validateStringArray } from '../json-file.mjs';
5
+ import { DELETED_MANAGED_SKILLS, LEGACY_SKILL_RENAMES, canonicalSkillName } from './skill-migrations.mjs';
5
6
 
6
7
  export const SKILLS_MANIFEST_NAME = '.jhste-skills-manifest.json';
7
8
  export const MANIFEST_MANAGED_BY = 'jhste-skills';
8
- export const LEGACY_SKILL_RENAMES = Object.freeze({
9
- diagnose: 'diagnosing-bugs',
10
- 'jhste-engineering-judgment': 'jhste-engineering-groundwork',
11
- });
12
-
13
- export const DELETED_MANAGED_SKILLS = Object.freeze(['write-a-skill']);
14
-
15
- export function canonicalSkillName(name) {
16
- return LEGACY_SKILL_RENAMES[name] || name;
17
- }
18
9
 
19
10
  function vendoredSkillNames() {
20
11
  const allowlistPath = path.join(KIT_ROOT, 'vendor', 'matt-pocock', 'allowlist.json');
@@ -7,22 +7,12 @@ export const BRIDGE_START = '<!-- jhste-skills:start -->';
7
7
  export const BRIDGE_END = '<!-- jhste-skills:end -->';
8
8
 
9
9
  export const BRIDGE_BLOCK = `## Agent skills
10
- This repo uses jhste skills as shared guidance.
10
+ This repo uses jhste skills as installed workflow guidance.
11
11
  Repo-local instructions in this file remain authoritative.
12
- 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.
13
- Ask for destructive, irreversible, ambiguous, production, secret, cost-bearing, broad existing-item, or out-of-scope changes.
14
- For reversible in-scope choices, make a reasonable assumption, proceed, and report it in the final summary.
15
- See \`.jhste/profile.yaml\` for local skill preferences.
16
- Before non-trivial code changes, use the \`jhste-engineering-groundwork\` skill to check scope, boundaries, failure paths, final behavior predicates, and assumptions.
17
- For changed code, name the one main responsibility of each changed class, module, and function, and reject adjacent responsibilities unless they are on the changed execution path and prevent a concrete failure.
18
- Use SOLID-informed coding discipline as a clean-code review lens for concrete failure modes, not a compliance claim or automatic abstraction trigger; guard findings are review candidates, not proof.
19
- After code changes, run \`jhste-skills guard --scope changed --format text --fail-on error\` when available.
20
- Report guard warnings/errors; do not treat guard runtime/config failures as validation success.
21
- Treat guard output as review evidence, not proof by itself; completion review should separate current proof, skipped/not-run checks, consumer-path proof when feasible, and residual risk.
22
- If guard or red-team review reports new warnings on changed files, attempt a bounded fix before declaring completion, then rerun guard. Do not commit automatically.
23
- Before declaring non-trivial code work complete, use the \`jhste-red-team-review\` skill.
24
- Skip red-team review for docs-only, comment-only, formatting-only, or trivial rename-only changes.
25
- Do not enter an unbounded fix/review loop; stop after at most two fix + re-review cycles and report remaining risks.`;
12
+ Use \`ask-jhste\` as the router for jhste coding, review, setup, and workstate workflows; detailed policy lives in the installed skills and their \`_shared\` docs, not this block.
13
+ For non-trivial code changes: run \`jhste-preflight\` before editing, \`jhste-skills guard --scope changed\` and \`jhste-change-review\` on the changed path, then \`jhste-redteam\` before completion.
14
+ Before destructive, irreversible, production, secret-bearing, cost-bearing, commit, push, release, publish, or broad out-of-scope actions, follow repo-local instructions and the side-effect policy in the installed skills directory's \`_shared/side-effect-policy.md\`.
15
+ See \`.jhste/profile.yaml\` for local skill preferences.`;
26
16
 
27
17
  export const MANAGED_BRIDGE_BLOCK = `${BRIDGE_START}\n${BRIDGE_BLOCK}\n${BRIDGE_END}`;
28
18
 
@@ -34,16 +24,9 @@ export const MANAGED_BRIDGE_BLOCK = `${BRIDGE_START}\n${BRIDGE_BLOCK}\n${BRIDGE_
34
24
  export const GLOBAL_BRIDGE_BLOCK = `## Agent skills (jhste, global)
35
25
  jhste skills are installed globally as shared engineering guidance for this agent.
36
26
  Repo-local AGENTS.md, CLAUDE.md, and docs remain authoritative when present.
37
- 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.
38
- Ask for destructive, irreversible, ambiguous, production, secret, cost-bearing, broad existing-item, or out-of-scope changes.
39
- For reversible in-scope choices, make a reasonable assumption, proceed, and report it in the final summary.
40
- Before non-trivial code changes, use the \`jhste-engineering-groundwork\` skill to check scope, boundaries, failure paths, final behavior predicates, and assumptions.
41
- For changed code, name the one main responsibility of each changed class, module, and function, and reject adjacent responsibilities unless they are on the changed execution path and prevent a concrete failure.
42
- Use SOLID-informed coding discipline as a clean-code review lens for concrete failure modes, not a compliance claim or automatic abstraction trigger; guard findings are review candidates, not proof.
43
- After code changes, run \`jhste-skills guard --scope changed --format text --fail-on warning\` when available; treat guard output as advisory review evidence, not proof.
44
- Before declaring non-trivial code work complete, use the \`jhste-red-team-review\` skill.
45
- Skip red-team review for docs-only, comment-only, formatting-only, or trivial rename-only changes.
46
- Do not enter an unbounded fix/review loop; stop after at most two fix + re-review cycles and report remaining risks.`;
27
+ Use \`ask-jhste\` as the router for jhste coding, review, setup, and workstate workflows; detailed policy lives in the installed skills and their \`_shared\` docs.
28
+ For non-trivial code changes: run \`jhste-preflight\` before editing, \`jhste-skills guard --scope changed\` (advisory) and \`jhste-change-review\` on the changed path, then \`jhste-redteam\` before completion.
29
+ Before destructive, irreversible, production, secret-bearing, cost-bearing, commit, push, release, publish, or broad out-of-scope actions, follow repo-local instructions and the side-effect policy in the installed skills directory's \`_shared/side-effect-policy.md\`.`;
47
30
 
48
31
  export const MANAGED_GLOBAL_BRIDGE_BLOCK = `${BRIDGE_START}\n${GLOBAL_BRIDGE_BLOCK}\n${BRIDGE_END}`;
49
32
 
package/cli/sync-core.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  readIfExists,
15
15
  } from './shared.mjs';
16
16
  import { applyPlan, preflightPlan, printApplyResult } from './install-actions.mjs';
17
- import { LEGACY_SKILL_RENAMES, canonicalSkillName } from './install-actions/skills.mjs';
17
+ import { LEGACY_SKILL_RENAMES, RETIRED_SKILL_REPLACEMENTS, canonicalSkillName } from './install-actions/skill-migrations.mjs';
18
18
  import { gitHooksDir, HOOKS, isManagedHook } from './hook-utils.mjs';
19
19
  import { printConfigErrors, printPlanSummary } from './install-flow/output.mjs';
20
20
  import { readJsonFile, validateStringArray } from './json-file.mjs';
@@ -113,11 +113,14 @@ function sourceSkillNames() {
113
113
  function detectInstalledSkillNames(skillsDir) {
114
114
  const known = new Set(sourceSkillNames());
115
115
  const detected = new Set();
116
+ function addKnown(name) {
117
+ if (known.has(name)) detected.add(name);
118
+ }
116
119
  for (const name of listDirectories(skillsDir)) {
117
120
  const canonicalName = canonicalSkillName(name);
118
- if (known.has(canonicalName) || Object.prototype.hasOwnProperty.call(LEGACY_SKILL_RENAMES, name)) {
119
- detected.add(canonicalName);
120
- }
121
+ addKnown(canonicalName);
122
+ if (Object.prototype.hasOwnProperty.call(LEGACY_SKILL_RENAMES, name)) addKnown(canonicalName);
123
+ for (const replacementName of RETIRED_SKILL_REPLACEMENTS[name] || []) addKnown(replacementName);
121
124
  }
122
125
  return [...detected];
123
126
  }
@@ -9,16 +9,17 @@ Implemented directories: `skills/`, `rules/`, `packs/`, `adapters/`, `cli/`, `ve
9
9
  Core skills implemented:
10
10
 
11
11
  - `skills/setup/SKILL.md`
12
- - `skills/jhste-engineering-groundwork/SKILL.md`
13
- - `skills/jhste-code-quality/SKILL.md`
14
- - `skills/jhste-architecture-review/SKILL.md`
12
+ - `skills/ask-jhste/SKILL.md`
13
+ - `skills/jhste-preflight/SKILL.md`
14
+ - `skills/jhste-change-review/SKILL.md`
15
15
  - `skills/jhste-db-api-boundary/SKILL.md`
16
16
  - `skills/jhste-crawler-automation/SKILL.md`
17
- - `skills/jhste-red-team-review/SKILL.md`
17
+ - `skills/jhste-redteam/SKILL.md`
18
+ - `skills/jhste-workstate/SKILL.md`
18
19
 
19
20
  ## Fast setup
20
21
 
21
- `cli/install.mjs` implements mode-based setup (`Minimal`, `Normal`, `Full`, `Custom`), creates `.jhste/profile.yaml` when project connection is enabled, keeps mode advisory by default, asks for a source-file line limit in interactive repo setup, defaults non-interactive setup to a 300-line advisory policy, uses marker-managed bridge blocks idempotently, and does not touch target CI, `package.json`, lockfiles, or source code. Skill installs write a managed manifest with digests and refuse unmanaged differing overwrites unless a separate explicit override is supplied. Hook automation installs a managed advisory pre-commit hook in Normal and advisory pre-commit/pre-push hooks in Full, with `--skip-hooks` as opt-out and blocking mode as explicit opt-in. `cli/connect.mjs` connects additional git repositories to an existing install without silently mutating global skills unless `--install-missing` is explicit. Installed bridge/profile guidance points agents at `jhste-engineering-groundwork` before non-trivial code changes and `jhste-red-team-review` before non-trivial code work is declared complete.
22
+ `cli/install.mjs` implements mode-based setup (`Minimal`, `Normal`, `Full`, `Custom`), creates `.jhste/profile.yaml` when project connection is enabled, keeps mode advisory by default, asks for a source-file line limit in interactive repo setup, defaults non-interactive setup to a 300-line advisory policy, uses marker-managed bridge blocks idempotently, and does not touch target CI, `package.json`, lockfiles, or source code. Skill installs write a managed manifest with digests and refuse unmanaged differing overwrites unless a separate explicit override is supplied. Hook automation installs a managed advisory pre-commit hook in Normal and advisory pre-commit/pre-push hooks in Full, with `--skip-hooks` as opt-out and blocking mode as explicit opt-in. `cli/connect.mjs` connects additional git repositories to an existing install without silently mutating global skills unless `--install-missing` is explicit. Installed bridge/profile guidance routes agents through `ask-jhste` and points at `jhste-preflight` before non-trivial code changes and `jhste-redteam` before non-trivial code work is declared complete.
22
23
 
23
24
  ## Deep scan
24
25
 
@@ -41,7 +42,7 @@ Rule modes are documented in `docs/RULES.md`, example profile defaults to adviso
41
42
  Skill guidance now requires these completion and safety properties:
42
43
 
43
44
  - Red-team review requires current proof and separates checks run, consumer-path proof when feasible, checks not run, checks intentionally skipped, and residual risk.
44
- - Engineering groundwork records final behavior predicates for non-trivial code changes.
45
+ - Preflight (`jhste-preflight`) records final behavior predicates for non-trivial code changes.
45
46
  - Cleanup/search-replace guidance requires editable `EDIT_PATHS` vs protected `PROTECTED_PATHS` classification before writes.
46
47
  - Grilling remains read-only by default; docs or tracker writes route to explicit writing workflows such as `grill-with-docs`, `domain-modeling`, `to-issues`, or `triage`.
47
48
  - Architecture improvement defaults to Markdown reporting, with HTML visual reports only when requested or materially useful.
@@ -64,7 +65,7 @@ Record actual command output in release notes before publishing a release.
64
65
 
65
66
  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
67
 
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
+ - Verify `sync`/`update` prunes managed copies of retired or renamed skills without leaving duplicate directories, including the pre-reform jhste skills and the older `diagnose`, `jhste-engineering-judgment`, and `write-a-skill` names.
68
69
 
69
70
  ## npm trusted publishing
70
71
 
package/docs/CLI.md CHANGED
@@ -44,7 +44,7 @@ Safety and compatibility:
44
44
  - existing profile is created when missing; generated/managed profiles can be refreshed with `--force`; modified profiles are preserved unless `--force --allow-profile-overwrite` is explicit; user source, CI, package files, lockfiles, non-managed hooks, and unmanaged differing skill directories are not overwritten; unmanaged skill overwrite requires `--allow-unmanaged-skill-overwrite` after review;
45
45
  - `AGENTS.md` and `CLAUDE.md` bridge blocks use `<!-- jhste-skills:start -->` / `<!-- jhste-skills:end -->` markers; only that managed block is updated on later runs;
46
46
  - CI, target `package.json`, and lockfiles are not changed. A local advisory pre-commit hook is installed by default in Normal, unless `--skip-hooks` is passed or an existing non-managed hook prevents safe install;
47
- - installed bridge/profile guidance tells agents to record final behavior predicates during groundwork and run `jhste-red-team-review` before declaring non-trivial code work complete, while skipping docs-only, comment-only, formatting-only, and trivial rename-only changes.
47
+ - installed bridge/profile guidance tells agents to record final behavior predicates during `jhste-preflight` and run `jhste-redteam` before declaring non-trivial code work complete, while skipping docs-only, comment-only, formatting-only, and trivial rename-only changes.
48
48
  - guard text output includes short `Meaning` and `Next` guidance for warning/info findings so users can understand and address candidates from hook output. Guard output remains review evidence, not completion proof; completion reports should separate current proof, consumer-path proof when feasible, skipped or not-run checks, and residual risk.
49
49
 
50
50
  Repo detection:
@@ -36,22 +36,12 @@ Managed block content:
36
36
  ```md
37
37
  <!-- jhste-skills:start -->
38
38
  ## Agent skills
39
- This repo uses jhste skills as shared guidance.
39
+ This repo uses jhste skills as installed workflow guidance.
40
40
  Repo-local instructions in this file remain authoritative.
41
- 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.
42
- Ask for destructive, irreversible, ambiguous, production, secret, cost-bearing, broad existing-item, or out-of-scope changes.
43
- For reversible in-scope choices, make a reasonable assumption, proceed, and report it in the final summary.
41
+ Use `ask-jhste` as the router for jhste coding, review, setup, and workstate workflows; detailed policy lives in the installed skills and their `_shared` docs, not this block.
42
+ For non-trivial code changes: run `jhste-preflight` before editing, `jhste-skills guard --scope changed` and `jhste-change-review` on the changed path, then `jhste-redteam` before completion.
43
+ Before destructive, irreversible, production, secret-bearing, cost-bearing, commit, push, release, publish, or broad out-of-scope actions, follow repo-local instructions and the side-effect policy in the installed skills directory's `_shared/side-effect-policy.md`.
44
44
  See `.jhste/profile.yaml` for local skill preferences.
45
- Before non-trivial code changes, use the `jhste-engineering-groundwork` skill to check scope, boundaries, failure paths, final behavior predicates, and assumptions.
46
- For changed code, name the one main responsibility of each changed class, module, and function, and reject adjacent responsibilities unless they are on the changed execution path and prevent a concrete failure.
47
- Use SOLID-informed coding discipline as a clean-code review lens for concrete failure modes, not a compliance claim or automatic abstraction trigger; guard findings are review candidates, not proof.
48
- After code changes, run `jhste-skills guard --scope changed --format text --fail-on error` when available.
49
- Report guard warnings/errors; do not treat guard runtime/config failures as validation success.
50
- Treat guard output as review evidence, not proof by itself; completion review should separate current proof, skipped/not-run checks, consumer-path proof when feasible, and residual risk.
51
- If guard or red-team review reports new warnings on changed files, attempt a bounded fix before declaring completion, then rerun guard. Do not commit automatically.
52
- Before declaring non-trivial code work complete, use the `jhste-red-team-review` skill.
53
- Skip red-team review for docs-only, comment-only, formatting-only, or trivial rename-only changes.
54
- Do not enter an unbounded fix/review loop; stop after at most two fix + re-review cycles and report remaining risks.
55
45
  <!-- jhste-skills:end -->
56
46
  ```
57
47
 
@@ -61,4 +51,4 @@ If a similar section exists, the installer prints the snippet instead of editing
61
51
 
62
52
  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
53
 
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.
54
+ Retired and renamed skills are pruned, not aliased. During `sync` and `update`, managed copies of skills the kit no longer ships — including the pre-reform `jhste-engineering-groundwork`, `jhste-code-quality`, `jhste-architecture-review`, `jhste-red-team-review`, and `jhste-long-running-work-loop`, plus the older `diagnose`, `jhste-engineering-judgment`, and `write-a-skill` names — are removed, and the current skills install fresh, so the skills directory does not keep duplicate or removed names.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jhste-skills",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Installable engineering guardrails and workflow skills for AI coding agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,35 @@
1
+ import path from 'node:path';
2
+
3
+ export function assertBridgeAndRetiredNames({ root, read, walk, relPath, fail, retiredSkillNames, fullLoopSentinels }) {
4
+ const bridgeText = 'Repo-local instructions in this file remain authoritative.';
5
+ for (const rel of ['adapters/codex/README.md', 'docs/CONFLICT_RESOLUTION.md', 'cli/shared/templates.mjs']) {
6
+ const text = read(rel);
7
+ if (!text.includes(bridgeText)) fail(`${rel} must include authoritative repo-local bridge wording`);
8
+ for (const requiredText of ['ask-jhste', 'jhste-preflight', 'jhste-redteam']) {
9
+ if (!text.includes(requiredText)) fail(`${rel} must mention ${requiredText} in shared workflow guidance`);
10
+ }
11
+ if (/approval boundary in \\?`_shared\/side-effect-policy\.md\\?`/.test(text)) fail(`${rel} must not point bridge readers at a bare _shared side-effect policy path`);
12
+ if (!text.includes("installed skills directory's") || !text.includes('_shared/side-effect-policy.md')) fail(`${rel} must point bridge readers at the installed skills directory side-effect policy`);
13
+ for (const sentinel of fullLoopSentinels) {
14
+ if (text.includes(sentinel)) fail(`${rel} bridge must delegate the core loop to skills/_shared/core-loop.md, not restate it ("${sentinel}")`);
15
+ }
16
+ }
17
+
18
+ const rootAgents = read('AGENTS.md');
19
+ for (const requiredText of ['ask-jhste', 'jhste-preflight', 'jhste-redteam', 'side-effect-policy.md']) {
20
+ if (!rootAgents.includes(requiredText)) fail(`AGENTS.md must mention ${requiredText}`);
21
+ }
22
+ if (/approval boundary in `_shared\/side-effect-policy\.md`/.test(rootAgents)) fail('AGENTS.md must not point bridge readers at a bare _shared side-effect policy path');
23
+ for (const sentinel of fullLoopSentinels) {
24
+ if (rootAgents.includes(sentinel)) fail(`AGENTS.md must delegate the core loop to the installed skills, not restate it ("${sentinel}")`);
25
+ }
26
+
27
+ const retiredNameSurfaces = walk(path.join(root, 'skills'), (file) => file.endsWith('.md')).map(relPath);
28
+ retiredNameSurfaces.push('AGENTS.md', 'cli/shared/templates.mjs');
29
+ for (const rel of retiredNameSurfaces) {
30
+ const text = read(rel);
31
+ for (const oldName of retiredSkillNames) {
32
+ if (text.includes(oldName)) fail(`${rel} references retired skill name ${oldName}; update it to the current topology`);
33
+ }
34
+ }
35
+ }