jhste-skills 0.3.2 → 0.3.4

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.4 - 2026-06-26
4
+
5
+ ### Changed
6
+ - Shifted groundwork and red-team review guidance away from fixed checklist axes and toward context-based failure-mode review of the changed execution path.
7
+ - Tightened DB/API and code-quality skill guidance around caller-appropriate response shapes, storage-backed invariants, authorization/data-isolation paths, and understandable failure behavior without turning those examples into a mandatory checklist.
8
+ - Clarified red-team review versus red-team questioning/interrogation triggers while preserving the red-team wording and intent.
9
+ - Clarified architecture, PRD, issue-slicing, and triage skill trigger boundaries to reduce accidental over-triggering.
10
+
11
+ ### Added
12
+ - Added `sync`/`update --skills-only` to refresh installed skill files without touching repository profiles, bridge blocks, hooks, or deep-scan outputs.
13
+
14
+ ## 0.3.3 - 2026-06-26
15
+
16
+ ### Removed
17
+ - Removed the global npm `postinstall` auto-sync. Updating the npm package no longer requires install-script approval or a persistent user-level `allow-scripts` npm config; run `jhste-skills update --yes --skip-hooks` explicitly when you want to refresh managed local skill copies.
3
18
 
4
19
  ## 0.3.2 - 2026-06-26
5
20
 
package/README.ja.md CHANGED
@@ -36,6 +36,7 @@ AI コーディングエージェントは高速ですが、失敗パターン
36
36
  ```text
37
37
  non-trivial code change の前:
38
38
  goal、premise、ownership boundary、data contract、failure path、SOLID-informed review lens を確認
39
+ 固定 checklist を埋めるのではなく、changed execution path で本当に重要な failure mode を文脈に合わせて確認
39
40
 
40
41
  編集中:
41
42
  repo-local instructions を権威として扱う
@@ -107,6 +108,12 @@ changed-file guard を手動で実行するには:
107
108
  jhste-skills guard --scope changed --format text --fail-on error
108
109
  ```
109
110
 
111
+ このリポジトリを最新化した後、プロジェクトの bridge、profile、hook、scan output には触れず、インストール済み skill ファイルだけを更新するには:
112
+
113
+ ```bash
114
+ jhste-skills update --yes --skills-only
115
+ ```
116
+
110
117
  任意で repo-wide advisory scan を実行するには:
111
118
 
112
119
  ```bash
package/README.ko.md CHANGED
@@ -37,6 +37,7 @@ AI 코딩 에이전트는 빠르지만, 반복적으로 비슷한 방식으로
37
37
  ```text
38
38
  non-trivial code change 전:
39
39
  목표, 전제, ownership boundary, data contract, failure path, final behavior predicate, SOLID-informed review lens 확인
40
+ 고정 체크리스트를 채우기보다 변경된 실행 경로에서 실제로 중요한 실패 모드를 맥락에 맞게 확인
40
41
 
41
42
  수정 중:
42
43
  repo-local instructions를 권위로 취급
@@ -108,6 +109,12 @@ npx jhste-skills install --skill-set core
108
109
  jhste-skills guard --scope changed --format text --fail-on error
109
110
  ```
110
111
 
112
+ 이 저장소를 최신으로 당긴 뒤 프로젝트 bridge, profile, hook, scan output은 건드리지 않고 설치된 skill 파일만 새로고침하려면:
113
+
114
+ ```bash
115
+ jhste-skills update --yes --skills-only
116
+ ```
117
+
111
118
  선택적으로 repo-wide advisory scan을 실행하려면:
112
119
 
113
120
  ```bash
package/README.md CHANGED
@@ -37,6 +37,7 @@ AI coding agents are fast, but they fail in predictable ways:
37
37
  ```text
38
38
  Before a non-trivial code change:
39
39
  check the goal, premise, ownership boundary, data contract, failure path, final behavior predicates, and SOLID-informed review lens
40
+ identify the failure modes that matter for the changed execution path instead of filling out a fixed checklist
40
41
 
41
42
  While editing:
42
43
  treat repo-local instructions as the authority
@@ -108,6 +109,12 @@ To run the changed-file guard manually:
108
109
  jhste-skills guard --scope changed --format text --fail-on error
109
110
  ```
110
111
 
112
+ To refresh only the installed skill files after pulling this repository, without touching a project bridge, profile, hook, or scan output:
113
+
114
+ ```bash
115
+ jhste-skills update --yes --skills-only
116
+ ```
117
+
111
118
  To run an optional repo-wide advisory scan:
112
119
 
113
120
  ```bash
package/README.zh.md CHANGED
@@ -36,6 +36,7 @@ AI 编程代理很快,但经常以可预测的方式失败:
36
36
  ```text
37
37
  在 non-trivial code change 前:
38
38
  检查目标、前提、ownership boundary、data contract、failure path、SOLID-informed review lens
39
+ 不填写固定 checklist,而是根据 changed execution path 找出真正重要的 failure mode
39
40
 
40
41
  修改过程中:
41
42
  将 repo-local instructions 视为权威
@@ -107,6 +108,12 @@ npx jhste-skills install --skill-set core
107
108
  jhste-skills guard --scope changed --format text --fail-on error
108
109
  ```
109
110
 
111
+ 拉取本仓库最新内容后,如果只想刷新已安装的 skill 文件,不触碰项目 bridge、profile、hook 或 scan output:
112
+
113
+ ```bash
114
+ jhste-skills update --yes --skills-only
115
+ ```
116
+
110
117
  选择性运行 repo-wide advisory scan:
111
118
 
112
119
  ```bash
package/cli/sync-core.mjs CHANGED
@@ -22,11 +22,13 @@ function usage(command = 'sync') {
22
22
  console.log(`jhste-skills ${command}
23
23
  Usage:
24
24
  jhste-skills ${command} [--repo <path>] [--skills-dir <path>] [--yes] [--force]
25
+ jhste-skills ${command} [--skills-only] [--skills-dir <path>] [--yes]
25
26
  jhste-skills ${command} [--skill-set core|vendor|all] [--skip-hooks] [--no-bridge] [--allow-profile-overwrite]
26
27
  Notes:
27
28
  ${command} reconciles installed skills and already-managed repo outputs using the current local jhste-skills source.
28
29
  It does not self-update the jhste-skills source or run git pull automatically.
29
30
  Installed skill directories are refreshed by default when they differ from the current source.
31
+ --skills-only refreshes installed skills without touching repo profile, bridge files, hooks, or deep-scan outputs.
30
32
  --force refreshes generated/managed profiles; modified profiles need --force --allow-profile-overwrite.
31
33
  Unmanaged skill directories require --allow-unmanaged-skill-overwrite.
32
34
  `);
@@ -52,7 +54,7 @@ function normalizeSyncOptions(argv, cwd) {
52
54
  const args = parseArgs(argv);
53
55
  if (args.help || args.h) return { help: true, errors: [] };
54
56
  const errors = [];
55
- const supported = new Set(['repo', 'skills-dir', 'yes', 'y', 'force', 'skill-set', 'skip-hooks', 'no-bridge', 'allow-unmanaged-skill-overwrite', 'allow-profile-overwrite', 'help', 'h', '_']);
57
+ const supported = new Set(['repo', 'skills-dir', 'yes', 'y', 'force', 'skill-set', 'skills-only', 'skip-hooks', 'no-bridge', 'allow-unmanaged-skill-overwrite', 'allow-profile-overwrite', 'help', 'h', '_']);
56
58
  for (const key of Object.keys(args)) {
57
59
  if (!supported.has(key)) errors.push(`unknown option --${key}.`);
58
60
  }
@@ -60,6 +62,7 @@ function normalizeSyncOptions(argv, cwd) {
60
62
 
61
63
  const force = readBooleanOption(args, 'force', errors);
62
64
  const yes = readBooleanOption(args, 'yes', errors) || readBooleanOption(args, 'y', errors);
65
+ const skillsOnly = readBooleanOption(args, 'skills-only', errors);
63
66
  const skipHooks = readBooleanOption(args, 'skip-hooks', errors);
64
67
  const noBridge = readBooleanOption(args, 'no-bridge', errors);
65
68
  const allowUnmanagedSkillOverwrite = readBooleanOption(args, 'allow-unmanaged-skill-overwrite', errors);
@@ -95,6 +98,7 @@ function normalizeSyncOptions(argv, cwd) {
95
98
  repoInfo: findGitRootInfo(repoStart),
96
99
  repoStart,
97
100
  skipHooks,
101
+ skillsOnly,
98
102
  skillSet,
99
103
  skillsDir,
100
104
  yes,
@@ -177,8 +181,8 @@ function buildSyncPlan(options, command) {
177
181
  ? skillNamesForSet(options.skillSet)
178
182
  : (installedSkills.length > 0 ? installedSkills : skillNamesForSet('all'));
179
183
  const repoRoot = options.repoInfo.isGitRepo ? options.repoInfo.repoRoot : null;
180
- const managedRepo = repoLooksManaged(repoRoot);
181
- const hooks = detectSyncHooks(repoRoot, options.skipHooks);
184
+ const managedRepo = !options.skillsOnly && repoLooksManaged(repoRoot);
185
+ const hooks = options.skillsOnly ? [] : detectSyncHooks(repoRoot, options.skipHooks);
182
186
 
183
187
  const plan = {
184
188
  command,
@@ -190,7 +194,7 @@ function buildSyncPlan(options, command) {
190
194
  allowProfileOverwrite: options.allowProfileOverwrite,
191
195
  forceSkills: true,
192
196
  installMissing: false,
193
- overrides: [],
197
+ overrides: options.skillsOnly ? ['--skills-only'] : [],
194
198
  skillSet: options.skillSet || (installedSkills.length > 0 ? 'detected' : 'all'),
195
199
  skillNames,
196
200
  installSkills: true,
@@ -200,7 +204,7 @@ function buildSyncPlan(options, command) {
200
204
  repoInfo: options.repoInfo,
201
205
  repoRoot,
202
206
  connectRepo: managedRepo,
203
- repoSkippedReason: managedRepo ? null : 'not managed by jhste-skills yet',
207
+ repoSkippedReason: options.skillsOnly ? 'skills-only requested; not touching repo outputs' : (managedRepo ? null : 'not managed by jhste-skills yet'),
204
208
  writeProfile: managedRepo,
205
209
  writeBridge: managedRepo && !options.noBridge,
206
210
  hooks,
package/docs/CLI.md CHANGED
@@ -88,6 +88,7 @@ Safety contract:
88
88
  ```bash
89
89
  jhste-skills sync --yes --repo /path/to/repo
90
90
  jhste-skills sync --yes --repo /path/to/repo --skills-dir /path/to/skills
91
+ jhste-skills sync --yes --skills-only
91
92
  jhste-skills sync --yes --skill-set all
92
93
  jhste-skills sync --yes --force --allow-profile-overwrite
93
94
  ```
@@ -98,6 +99,7 @@ Stable contract:
98
99
  - only refreshes repo outputs that already look managed by jhste-skills (generated/legacy-generated `.jhste/profile.yaml`, managed bridge markers, or managed hooks);
99
100
  - does not bootstrap unmanaged repositories; use `install` or `connect` for first-time setup;
100
101
  - preserves non-managed hooks and does not touch source files, CI, `package.json`, or lockfiles;
102
+ - `--skills-only` refreshes installed skills only and never writes repo profile, bridge blocks, hooks, or deep-scan outputs, even when `--repo` points at a managed repo;
101
103
  - `--force` refreshes generated/managed profiles but does not overwrite modified profiles unless `--allow-profile-overwrite` is also passed; unmanaged differing skill directories require `--allow-unmanaged-skill-overwrite`;
102
104
  - `sync`/`update` may adopt additional known jhste skills into an already managed skills directory and refresh them without the extra overwrite flag.
103
105
 
@@ -107,9 +109,11 @@ Stable contract:
107
109
 
108
110
  ```bash
109
111
  jhste-skills update --yes --repo /path/to/repo
112
+ jhste-skills update --yes --skills-only
110
113
  ```
111
114
 
112
115
  It is meant for the common workflow of pulling the latest `jhste-skills` source first, then reconciling local installed copies and managed repo outputs. It does not self-update the package or run `git pull` for you.
116
+ Use `--skills-only` when you want the latest skill files in the local skills directory but do not want to touch the current repository's managed profile, bridge block, hooks, or deep-scan outputs.
113
117
 
114
118
  ## `deep-scan`
115
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jhste-skills",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Installable engineering guardrails and workflow skills for AI coding agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,7 +34,6 @@
34
34
  "LICENSE"
35
35
  ],
36
36
  "scripts": {
37
- "postinstall": "node cli/postinstall-sync.mjs",
38
37
  "test": "npm run syntax:check && npm run docs:check && npm run vendor:check && npm run public-safety:check && npm run public-safety-fixtures:test && npm run profile-fixtures:test && npm run guard-fixtures:test && npm run responsibility-budget-fixtures:test && npm run single-responsibility-fixtures:test && npm run solid-design-fixtures:test && npm run smoke:test && npm run release:gates",
39
38
  "syntax:check": "node scripts/syntax-check.mjs",
40
39
  "docs:check": "node scripts/docs-check.mjs",
@@ -74,7 +74,7 @@ export const recipeRequirements = {
74
74
  'skills/grilling/SKILL.md': ['read-only by default'],
75
75
  'skills/grill-me/SKILL.md': ['read-only by default'],
76
76
  'skills/improve-codebase-architecture/SKILL.md': ['Default to a concise Markdown architecture review', 'HTML/Tailwind/Mermaid report only when requested'],
77
- 'skills/jhste-engineering-groundwork/SKILL.md': ['Senior-quality pre-edit gate', 'partial-failure or rollback path', 'Adjacent-code scope creep', 'Changed responsibility', 'bounded fix', 'Final behavior predicates'],
77
+ 'skills/jhste-engineering-groundwork/SKILL.md': ['Senior-quality pre-edit gate', 'recovery or rollback expectation', 'Adjacent-code scope creep', 'Changed responsibility', 'bounded fix', 'Final behavior predicates'],
78
78
  'skills/jhste-red-team-review/SKILL.md': ['Severity rubric and path tracing', 'changed execution path', 'changes required', 'actual consumer', 'residual risk'],
79
79
  'skills/jhste-red-team-review/references/red-team-review.md': ['Severity rubric', 'Trace at least one changed execution path', 'one main reason to change', 'Current proof'],
80
80
  };
@@ -171,7 +171,33 @@ run_jhste_skills guard --scope staged --format text --fail-on warning
171
171
 
172
172
  const managedManifest = readManagedSkillsManifest(skillsDir);
173
173
  if (!managedManifest.skills?.[adoptedSkillName]?.digest) fail('update did not record adopted known skill in manifest');
174
-
174
+ const profilePath = path.join(repo, '.jhste', 'profile.yaml');
175
+ const profileBeforeSkillsOnly = fs.readFileSync(profilePath, 'utf8');
176
+ fs.writeFileSync(skillPath, '# stale local copy for skills-only\n');
177
+ fs.writeFileSync(agentsPath, updatedAgents.replace(
178
+ 'Repo-local instructions in this file remain authoritative.',
179
+ 'Bridge text that skills-only must not replace.',
180
+ ));
181
+ fs.writeFileSync(preCommitPath, `#!/usr/bin/env sh
182
+ # jhste-skills managed hook start
183
+ # mode=blocking hook=pre-commit scope=staged
184
+ echo "skills-only must not replace hook"
185
+ run_jhste_skills guard --scope staged --format text --fail-on warning
186
+ # jhste-skills managed hook end
187
+ `, { mode: 0o755 });
188
+ run(process.execPath, [path.join(root, 'cli/update.mjs'), '--yes', '--repo', repo, '--skills-dir', skillsDir, '--skills-only'], { cwd: repo });
189
+ if (fs.readFileSync(skillPath, 'utf8') !== fs.readFileSync(sourceSkillPath, 'utf8')) {
190
+ fail('update --skills-only did not refresh an installed skill');
191
+ }
192
+ if (!fs.readFileSync(agentsPath, 'utf8').includes('Bridge text that skills-only must not replace.')) {
193
+ fail('update --skills-only rewrote a managed bridge block');
194
+ }
195
+ if (!fs.readFileSync(preCommitPath, 'utf8').includes('skills-only must not replace hook')) {
196
+ fail('update --skills-only rewrote a managed hook');
197
+ }
198
+ if (fs.readFileSync(profilePath, 'utf8') !== profileBeforeSkillsOnly) {
199
+ fail('update --skills-only rewrote a managed profile');
200
+ }
175
201
  let migratedManifest = assertLegacySkillRenameMigration({
176
202
  root, repo, skillsDir, manifest: managedManifest, legacyName: 'diagnose', canonicalName: 'diagnosing-bugs', digest: 'legacy-digest',
177
203
  });
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: codebase-design
3
- description: Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a boundary goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
3
+ description: Shared vocabulary for designing deep modules and module interfaces. Use when designing or improving a module interface, deciding where a boundary goes, making code more testable or AI-navigable, or when another skill needs deep-module vocabulary. For repo-wide refactor candidate discovery, use improve-codebase-architecture.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: grill-me
3
- description: Direct personal grilling mode for stress-testing the user's own plan or reasoning. Use when the user asks to be grilled, challenged, pressure-tested, or questioned aggressively about their plan.
3
+ description: Direct red-team interrogation of the user's own plan or reasoning. Use when the user asks to be grilled, challenged, pressure-tested, red-teamed, or questioned aggressively about their plan. Not for reviewing an already-changed code diff; use jhste-red-team-review for that.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: grill-with-docs
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.
3
+ description: Red-team questioning of a plan against project domain language, then recording resulting decisions in CONTEXT.md or ADRs. Use when the user wants grilling plus documentation, ADR, glossary, or CONTEXT updates. Not for reviewing an already-changed code diff; use jhste-red-team-review for that.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: grilling
3
- description: General plan/design stress-test interview. Use when the user asks to challenge, pressure-test, red-team, grill, or find gaps in a plan before building, without requesting documentation updates.
3
+ description: Red-team questioning for plans and designs before implementation. Use when the user asks to challenge, pressure-test, red-team, grill, interrogate, or find gaps in a plan, without requesting documentation updates. Not for reviewing an already-changed code diff; use jhste-red-team-review for that.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: improve-codebase-architecture
3
- description: Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
3
+ description: Repo-wide or area-wide architecture review to find deepening/refactoring opportunities, informed by CONTEXT.md and docs/adr/. Use when the user wants broad architecture improvement, refactoring opportunities, consolidation of tightly-coupled modules, or better testability and AI-navigability. Not for every local code change; use jhste-architecture-review for the current diff.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jhste-architecture-review
3
- description: Advisory architecture review guidance for module boundaries, SOLID-informed design review, side effects, and pass-through abstraction. Use when changing module boundaries, app structure, side-effect placement, or responsibility splits.
3
+ description: Advisory architecture review for current code changes touching module boundaries, app structure, side-effect placement, responsibility splits, or pass-through abstraction. Use during or after local code changes; for repo-wide architecture improvement use improve-codebase-architecture, and for module interface vocabulary use codebase-design.
4
4
  ---
5
5
 
6
6
  # jhste-architecture-review
@@ -23,7 +23,7 @@ When reviewing a proposed change, ask:
23
23
 
24
24
  - Bad: `route.ts` performs auth, schema parsing, business rules, database queries, error mapping, and response DTO shaping inline.
25
25
  - Better: route/controller does request parsing and response mapping; a usecase owns business invariants; a repository/query owns persistence; errors are mapped through a small public-error boundary.
26
- - Why: caller contracts, authorization, partial-failure handling, and test boundaries are easier to inspect from entrypoint to side effect.
26
+ - Why: caller contracts, authorization, failure behavior, and test boundaries are easier to inspect from entrypoint to side effect.
27
27
 
28
28
  ### React client path split
29
29
 
@@ -82,4 +82,3 @@ Change adjacent code only when it sits on the changed execution path and leaving
82
82
  - Bad: a caller accepts a broad config, interface, or props bag while using only a small slice, creating unrelated coupling.
83
83
  - Better: depend on the smallest useful contract, while keeping cohesive public contracts together when they are read and changed together.
84
84
  - Why: ISP should reduce coupling, not fragment a contract that always moves as one unit.
85
-
@@ -16,6 +16,7 @@ Use repo-local instructions first. Treat this skill as shared advisory guidance
16
16
  - Do not log secrets, tokens, passwords, cookies, authorization headers, sessions, or raw sensitive payloads.
17
17
  - Tests should verify observable behavior through the module interface, not implementation details, function-name existence, or incidental strings.
18
18
  - Do not stop at happy-path-only coverage for changed behavior; include the most relevant edge, failure, side-effect, idempotency, or regression case.
19
+ - For code with side effects or multi-step work, make the failure behavior understandable to callers and users; do not let the code silently imply success when the changed path did not complete safely.
19
20
  - Mock external boundaries, not internal collaborators you control.
20
21
  - Before adding a new helper, type, or shape, check for the existing source of truth.
21
22
  - Use SOLID-informed coding discipline as advisory guidance for concrete maintenance and failure risks: one responsibility, extension boundaries only when variants force repeated edits, stable caller contracts, right-sized interfaces, and visible side-effect dependencies. Do not add abstraction only to satisfy a SOLID label.
@@ -48,8 +48,8 @@ When code crosses async UI, env, or persistence paths, be skeptical of fragile a
48
48
  ### Mutation write safety
49
49
 
50
50
  - Bad: a route loops over writes and returns success after the first non-throwing path.
51
- - Better: define the idempotency key or dedupe rule, use a transaction/batch/upsert where needed, check affected rows, and report partial failure explicitly.
52
- - Why: duplicate execution, retry, and rollback behavior are observable instead of assumed.
51
+ - Better: define the write rule at the layer that can enforce it, check the outcome that matters to callers, and report unsafe or incomplete results instead of implying success.
52
+ - Why: duplicate execution, retry, and recovery behavior are observable instead of assumed.
53
53
 
54
54
  ### Import/ops script
55
55
 
@@ -7,5 +7,5 @@ Routine validation should use fixtures, dry runs, or focused smoke checks. Live
7
7
  ## Producer / consumer recipe
8
8
 
9
9
  - Bad: a crawler fetches pages, normalizes fields, deduplicates, writes the database, and sends notifications in one loop.
10
- - Better: the producer emits a versioned artifact; the consumer validates, deduplicates, persists, and reports partial failures with a resumable cursor.
10
+ - Better: the producer emits a versioned artifact; the consumer validates, deduplicates, persists, and reports write outcomes with a resumable cursor.
11
11
  - Why: flaky network behavior is separated from write safety, fixtures can replay artifacts, and duplicate writes are easier to prevent.
@@ -15,7 +15,9 @@ Use this skill for API and persistence boundary changes. Repo-local API contract
15
15
  - Use parameter binding or a safe query abstraction for SQL.
16
16
  - Keep request and response contracts explicit enough that caller drift is visible before runtime.
17
17
  - Validate database rows or third-party records before treating them as domain objects when shape matters.
18
- - Make write safety visible for repeated execution, batch mutation, or idempotent retry paths.
18
+ - Map storage rows to response shapes that match the caller's permission and purpose; do not let internal or higher-privilege data leak through convenient reuse.
19
+ - Make write safety visible at the layer that actually preserves the rule; do not rely on app-side checks alone when storage behavior can contradict them.
20
+ - For authorization or data-isolation changes, inspect the actual policy and execution path instead of trusting a single route, role, or helper as proof.
19
21
  - Return public-safe errors; do not leak raw database, stack, or secret-like details.
20
22
  - For API or persistence changes, verification should prefer the actual contract surface when feasible: route handler behavior, request/response shape, auth or tenant scoping, SQL binding behavior, migration/application path, or service boundary used by callers.
21
23
 
@@ -43,7 +43,9 @@ For non-trivial code changes, check these before editing:
43
43
  10. **Verification plan** — tests, guards, builds, or manual checks to run, plus any checks likely to be skipped.
44
44
  11. **Final behavior predicates** — concrete public behavior that must change, public/API/DB/UI shape that must not change, expected error behavior, persistence or side-effect expectations, and backward-compatibility constraints.
45
45
 
46
- Keep these items available as internal review evidence, but do not make the user read the full evidence block every time. User-facing output should usually be one or two plain sentences covering:
46
+ For changes touching user data, API/DB, permissions, files, external calls, batch writes, async UI actions, exports, or lifecycle state, do not reduce review to a fixed checklist. Follow the changed execution path and use repo-local rules, domain invariants, caller expectations, persistence behavior, side effects, user-visible states, operational impact, and verification evidence to identify the failure modes that matter for this change. Prefer concrete risk statements over named frameworks or exhaustive lists.
47
+
48
+ Keep the full evidence available internally, but do not make the user read it every time. User-facing output should usually be one or two plain sentences covering:
47
49
 
48
50
  - scope checked;
49
51
  - main risks;
@@ -82,7 +84,7 @@ Avoid: "Should I create an issue?" without supporting reasoning.
82
84
 
83
85
  ## Senior-quality pre-edit gate
84
86
 
85
- For non-trivial code changes, compare at least two plausible shapes before editing: the smallest local patch and one cleaner boundary-preserving alternative. State the invariant that must remain true, the changed class/module/function responsibility, the caller contract entering and leaving the boundary, the test boundary that will prove behavior, the rejected alternative, and the partial-failure or rollback path. Keep this quiet for docs-only, comment-only, formatting-only, and trivial rename-only work.
87
+ For non-trivial code changes, compare at least two plausible shapes before editing: the smallest local patch and one cleaner boundary-preserving alternative. State the invariant that must remain true, the changed class/module/function responsibility, the caller contract entering and leaving the boundary, the test boundary that will prove behavior, the rejected alternative, and the recovery or rollback expectation for failure after a side effect. Keep this quiet for docs-only, comment-only, formatting-only, and trivial rename-only work.
86
88
 
87
89
  Adjacent-code scope creep is allowed only when the adjacent code is on the changed execution path and leaving it untouched creates a concrete failure mode. Otherwise emit an Issue candidate rather than widening the change.
88
90
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: jhste-red-team-review
3
- description: Read-only completion-time red-team review and issue-candidate handoff for non-trivial code changes. Use before declaring code work complete.
3
+ description: Read-only red-team code review for actual diffs or changed files after implementation, with issue-candidate handoff for residual risks. Use before declaring non-trivial code work complete. For pre-implementation red-team questioning or interrogation of a plan, use grilling, grill-me, or grill-with-docs.
4
4
  ---
5
5
 
6
6
  # jhste-red-team-review
7
7
 
8
- Use this skill after non-trivial code changes and before reporting completion. Repo-local instructions remain authoritative.
8
+ Use this skill after non-trivial code changes and before reporting completion. This is red-team code review for changed code, not plan interrogation. Repo-local instructions remain authoritative.
9
9
 
10
10
  ## Automation and side effects
11
11
 
@@ -37,7 +37,7 @@ Perform the changed-code review, inspect guard/test output, and run bounded fix/
37
37
 
38
38
  ## Severity rubric and path tracing
39
39
 
40
- For non-trivial code changes, name the main responsibility of changed classes/modules/functions, apply the SOLID-informed review lens where relevant, trace at least one changed execution path from entrypoint through validation/auth/state to the side effect or result, and state any changed paths not checked. Use `changes required` for new guard or review warnings on changed files that can be fixed within the changed execution path, and for P0/P1 issues that can cause data loss, security/privacy exposure, misleading success, broken runtime behavior, or failed documented acceptance. Use `residual risk` when the bounded review completed but lower-severity, heuristic, environmental, or out-of-scope risks remain. Use `pass` only after inspecting the relevant diff and finding no material follow-up, with current proof for the changed public behavior or a clear explanation of why consumer-path proof was not feasible.
40
+ For non-trivial code changes, name the main responsibility of changed classes/modules/functions, apply the SOLID-informed review lens where relevant, trace at least one changed execution path from entrypoint through validation/auth/state to the side effect or result, and state any changed paths not checked. Do not stop at a fixed checklist; attack the changed path in the way most likely to reveal real failures for this repo, domain, caller, and runtime. Use `changes required` for new guard or review warnings on changed files that can be fixed within the changed execution path, and for P0/P1 issues that can cause data loss, security/privacy exposure, misleading success, broken runtime behavior, or failed documented acceptance. Use `residual risk` when the bounded review completed but lower-severity, heuristic, environmental, or out-of-scope risks remain. Use `pass` only after inspecting the relevant diff and finding no material follow-up, with current proof for the changed public behavior or a clear explanation of why consumer-path proof was not feasible.
41
41
 
42
42
  ## Issue candidate protocol
43
43
 
@@ -13,7 +13,10 @@ Use an objective red-team checklist. Prefer concrete findings over broad praise.
13
13
  - Failure handling is observable and does not silently pretend success.
14
14
  - Type expectations, API contracts, and caller assumptions still line up after the change.
15
15
  - Auth, permission, and user-data isolation risks are called out when relevant.
16
+ - API and persistence contracts are checked through the public shape and caller expectations that matter for the changed path.
16
17
  - Create/update/delete paths do not appear vulnerable to data loss, duplicate writes, or misleading success states.
18
+ - Mutation and side-effect safety are reviewed through the real write path, including what callers and users see if the path is repeated, interrupted, or only partly succeeds.
19
+ - State transitions are reviewed where stale or inconsistent state would mislead users, leak access, or break the domain rule.
17
20
  - Build, import, env, route, and runtime assumptions that could break deployment are called out when relevant.
18
21
  - Actual consumer-path proof is preferred when feasible: public API route, CLI command, UI route, worker/scheduler path, service entrypoint, fresh-client flow, or documented acceptance path.
19
22
  - Performance risks such as duplicate requests, avoidable rerenders, or obviously heavy work on hot paths are called out when relevant.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: to-issues
3
- description: Break a plan, spec, or PRD into issue-ready vertical slices. Use when the user wants implementation tickets or work breakdown; create tracker issues when directly requested or when repo-local workflow gives standing approval for ticket creation.
3
+ description: Break an existing plan, spec, or PRD into issue-ready vertical implementation slices. Use when the user wants implementation tickets, issue breakdown, or work breakdown from known requirements. For drafting product requirements from conversation context, use to-prd; create tracker issues only when directly requested or when repo-local workflow gives standing approval.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: to-prd
3
- description: Draft a PRD from the current conversation context and make it ready for the project's normal PRD workflow. Use when the user wants a PRD; publish/create tracker items when directly requested or when repo-local workflow gives standing approval for PRD tracker writes.
3
+ description: Draft a PRD from the current conversation context and make it ready for the project's normal PRD workflow. Use when the user asks for a PRD or product requirements document. For issue-ready implementation slices from an existing plan or PRD, use to-issues; publish/create tracker items only when directly requested or when repo-local workflow gives standing approval.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: triage
3
- description: Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.
3
+ description: Triage existing or newly requested issues through a state machine driven by triage roles. Use when the user wants to create a specific issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow. For PRDs use to-prd; for bulk implementation slice generation from a plan use to-issues.
4
4
  ---
5
5
 
6
6
  ## jhste compatibility
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env node
2
- import fs from 'node:fs';
3
- import os from 'node:os';
4
- import path from 'node:path';
5
- import { spawnSync } from 'node:child_process';
6
- import { fileURLToPath } from 'node:url';
7
-
8
- const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
9
- const manifestName = '.jhste-skills-manifest.json';
10
- const runtimeEnv = process.env;
11
-
12
- function envValue(name, fallback = '') {
13
- return runtimeEnv[name] ?? fallback;
14
- }
15
-
16
- function envFlag(name) {
17
- return Boolean(envValue(name));
18
- }
19
-
20
- function log(message) {
21
- console.log(`jhste-skills postinstall: ${message}`);
22
- }
23
-
24
- function isGlobalInstall() {
25
- return envValue('npm_config_global') === 'true' || envValue('npm_config_location') === 'global';
26
- }
27
-
28
- function main() {
29
- if (envFlag('JHSTE_SKILLS_SKIP_POSTINSTALL_SYNC')) {
30
- log('skipped because JHSTE_SKILLS_SKIP_POSTINSTALL_SYNC is set.');
31
- return;
32
- }
33
- if (!isGlobalInstall()) return;
34
-
35
- if (typeof process.getuid === 'function' && process.getuid() === 0 && envValue('SUDO_USER') && envValue('SUDO_USER') !== 'root') {
36
- log('skipped managed skill sync during sudo global install to avoid root-owned user files. Run `jhste-skills update --yes --skip-hooks` as the target user.');
37
- return;
38
- }
39
-
40
- const home = os.homedir();
41
- const skillsDir = path.join(home, '.jhste', 'skills');
42
- const manifestPath = path.join(skillsDir, manifestName);
43
- if (!fs.existsSync(manifestPath)) {
44
- log(`no managed skills manifest at ${manifestPath}; nothing to sync.`);
45
- return;
46
- }
47
-
48
- let manifest;
49
- try {
50
- manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
51
- } catch {
52
- log(`managed skill sync skipped because ${manifestPath} is not valid JSON.`);
53
- return;
54
- }
55
- if (manifest?.managed_by !== 'jhste-skills') {
56
- log(`managed skill sync skipped because ${manifestPath} is not owned by jhste-skills.`);
57
- return;
58
- }
59
-
60
- const cli = path.join(root, 'cli', 'index.mjs');
61
- const result = spawnSync(process.execPath, [cli, 'update', '--yes', '--skip-hooks', '--no-bridge', '--skills-dir', skillsDir], {
62
- cwd: home,
63
- env: { ...runtimeEnv, JHSTE_SKILLS_POSTINSTALL_SYNC: '1' },
64
- stdio: 'inherit',
65
- });
66
- if (result.error) {
67
- log(`managed skill sync skipped after spawn failure: ${result.error.message}`);
68
- return;
69
- }
70
- if (result.status) {
71
- log(`managed skill sync exited with ${result.status}; run \`jhste-skills update --yes --skip-hooks\` manually.`);
72
- }
73
- }
74
-
75
- main();