Skip to content

Commit cfb652f

Browse files
committed
config: Make SCE command skill chains explicit in descriptions and metadata
Update canonical command bodies in shared-content.pkl to explicitly state the skill sequence, readiness gates, and stop conditions while keeping commands thin orchestration wrappers. Update command descriptions in common.pkl to mention the concrete skill chain (e.g., "Run `sce-plan-review` -> `sce-task-execution`..."). Add machine-readable skill metadata (`entry-skill`, `skills` list) to OpenCode command frontmatter for targeted SCE commands in opencode-content.pkl renderer.
1 parent 8bf0476 commit cfb652f

29 files changed

Lines changed: 329 additions & 165 deletions
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Create or update an SCE plan from a change request"
2+
description: "Use `sce-plan-authoring` to turn a change request into a scoped SCE plan"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill
44
---
55

@@ -9,9 +9,9 @@ Input change request:
99
`$ARGUMENTS`
1010

1111
Behavior:
12-
- Keep this command as thin orchestration; delegate clarification/ambiguity handling and plan-shape contracts to `sce-plan-authoring`.
13-
- Ensure plan output follows one-task/one-atomic-commit slicing through `sce-plan-authoring` task-shape rules.
14-
- Write/update `context/plans/{plan_name}.md`.
15-
- Confirm plan creation with `{plan_name}` and exact path.
16-
- Return the full ordered task list.
17-
- Prompt user to start a new session to implement `T01` and provide `/next-task {plan_name} T01`.
12+
- Keep this command as thin orchestration; detailed clarification handling, plan-shape rules, and task-writing behavior stay owned by `sce-plan-authoring`.
13+
- Run `sce-plan-authoring` to resolve whether the input targets a new or existing plan, normalize goals/constraints/success criteria, and produce an implementation-ready task stack.
14+
- Preserve the clarification gate from `sce-plan-authoring`: if blockers, ambiguity, or missing acceptance criteria remain, stop and ask the focused user questions needed to finish the plan safely.
15+
- Require one-task/one-atomic-commit slicing through `sce-plan-authoring` before any task is considered ready for implementation.
16+
- When the plan is ready, write or update `context/plans/{plan_name}.md`, confirm the resolved `{plan_name}` and exact path, and return the ordered task list.
17+
- Stop after the planning handoff by providing the exact next-session command `/next-task {plan_name} T01`.

config/.claude/commands/commit.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Propose atomic commit message(s) from staged changes"
2+
description: "Use `sce-atomic-commit` to propose atomic commit message(s) from staged changes"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill, Bash
44
---
55

@@ -11,15 +11,14 @@ Input:
1111
Behavior:
1212
- If arguments are empty, treat input as unstated and infer commit intent from staged changes only.
1313
- If arguments are provided, treat them as optional commit context to refine message proposals.
14-
- Before invoking `sce-atomic-commit`, explicitly prompt the user:
14+
- Keep this command as thin orchestration; staged-diff analysis, atomic split decisions, and message wording stay owned by `sce-atomic-commit`.
15+
- Before running `sce-atomic-commit`, explicitly stop and prompt the user:
1516

1617
"Please run `git add <files>` for all changes you want included in this commit.
1718
Atomic commits should only include intentionally staged changes.
1819
Confirm once staging is complete."
1920

2021
- After confirmation:
2122
- Classify staged diff scope (`context/`-only vs mixed `context/` + non-`context/`) and apply the context-guidance gate from `sce-atomic-commit`.
22-
- Delegate commit-message grammar, atomic split decisions, and split guidance to `sce-atomic-commit`.
23-
24-
- Do not create commits automatically.
25-
- Output only proposed commit message(s) and split guidance when needed.
23+
- Run `sce-atomic-commit` to produce commit-message proposals and any needed split guidance.
24+
- Do not create commits automatically; stop after returning proposed commit message(s) and split guidance when needed.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
description: "Analyze and report drift between context and code"
2+
description: "Run `sce-drift-analyzer` to report context-code drift before edits"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill, Bash
44
---
55

66
Load and follow the `sce-drift-analyzer` skill.
77

88
Behavior:
9-
- Collect structured signals from `context/` and code.
10-
- Analyze mismatches between documented and implemented state.
11-
- Save findings to `context/tmp/drift-analysis-YYYY-MM-DD.md`.
12-
- Ask user whether to apply fixes or keep report-only output.
9+
- Keep this command as thin orchestration; drift detection logic, evidence gathering, and report structure stay owned by `sce-drift-analyzer`.
10+
- Run `sce-drift-analyzer` to compare `context/` against code truth, summarize mismatches, and write the drift report to `context/tmp/drift-analysis-YYYY-MM-DD.md`.
11+
- Stop after the analyzer reports findings; do not apply fixes from this command.
12+
- If the user wants repairs after reviewing the report, direct the next step to `/fix-drift` so update behavior stays owned by `sce-drift-fixer`.
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
---
2-
description: "Resolve code-context drift using SCE rules"
2+
description: "Run `sce-drift-fixer` to repair context files from current code truth"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill, Bash
44
---
55

66
Load and follow the `sce-drift-fixer` skill.
77

8-
Audit the `context/` and ensure it correctly describes the system as implemented
9-
10-
- treat code as authoritative
11-
- summarize each discrepancy clearly
12-
- propose exact context updates
13-
- apply updates once the user confirms (or immediately if already authorized)
14-
15-
Make updates directly in `context/` and keep files concise, current-state oriented, and linked from `context/context-map.md` when relevant.
8+
Behavior:
9+
- Keep this command as thin orchestration; drift analysis, proposed repairs, and context edits stay owned by `sce-drift-fixer`.
10+
- Run `sce-drift-fixer` to audit `context/` against implemented code, treat code as authoritative, and summarize the exact context updates needed.
11+
- Preserve the fixer confirmation gate: apply updates only after explicit user confirmation unless the user already authorized fixes in the current session.
12+
- After approved fixes are applied, stop with the updated context state and any follow-up verification notes from `sce-drift-fixer`.
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Create a structured SCE handover of the current task"
2+
description: "Run `sce-handover-writer` to capture the current task for handoff"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill
44
---
55

@@ -8,12 +8,8 @@ Load and follow the `sce-handover-writer` skill.
88
Input:
99
`$ARGUMENTS`
1010

11-
Create a new handover file in `context/handovers/` that captures:
12-
13-
- current task state
14-
- decisions made and rationale
15-
- open questions or blockers
16-
- next recommended step
17-
18-
Default naming should align with task execution handovers: `context/handovers/{plan_name}-{task_id}-{timestamp}.md`.
19-
If key details are missing, infer what you can from the current repo state and clearly label assumptions.
11+
Behavior:
12+
- Keep this command as thin orchestration; handover structure, naming, and content decisions stay owned by `sce-handover-writer`.
13+
- Run `sce-handover-writer` to gather current task state, decisions made and rationale, open questions or blockers, and the next recommended step.
14+
- Let `sce-handover-writer` create the handover in `context/handovers/`, using task-aligned naming such as `context/handovers/{plan_name}-{task_id}-{timestamp}.md` when the inputs support it.
15+
- If required details are missing, infer only from current repo state, label assumptions clearly, then stop after reporting the exact handover path.
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Review a plan and execute one SCE task from an approved plan"
2+
description: "Run `sce-plan-review` -> `sce-task-execution` -> `sce-context-sync` for one approved SCE task"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill, Bash
44
---
55

@@ -13,12 +13,12 @@ Expected arguments:
1313
- task ID (`T0X`) (optional)
1414

1515
Behavior:
16-
- Run `sce-plan-review` first to resolve plan target/task and readiness.
17-
- Apply readiness confirmation gate from `sce-plan-review`:
18-
- auto-pass only when both plan + task ID are provided and review reports no blockers/ambiguity/missing acceptance criteria
19-
- otherwise resolve open points and ask user confirmation before execution
20-
- Run `sce-task-execution`; keep mandatory implementation stop, scoped implementation, checks/lints/build, and plan status updates skill-owned.
21-
- Run `sce-context-sync` as the required done gate.
22-
- Wait for user feedback; if in-scope fixes are requested, apply fixes, rerun light checks (and a light/fast build when applicable), then run `sce-context-sync` again.
23-
- If this is the final plan task, run `sce-validation`.
24-
- If more tasks remain, prompt a new session with `/next-task {plan_name} T0X`.
16+
- Keep this command as thin orchestration; skill-owned review, implementation, validation, and context-sync details stay in the referenced skills.
17+
- Run `sce-plan-review` first to resolve the plan target, choose the task, and report readiness.
18+
- Apply the readiness confirmation gate from `sce-plan-review` before implementation:
19+
- auto-pass only when both plan + task ID are provided and review reports no blockers, ambiguity, or missing acceptance criteria
20+
- otherwise resolve the open points and ask the user to confirm the task is ready before continuing
21+
- Run `sce-task-execution` next; keep the mandatory implementation stop, scoped edits, light checks/lints/build, and plan status updates skill-owned.
22+
- After implementation, run `sce-context-sync` as the required done gate and wait for user feedback.
23+
- If feedback requires in-scope fixes, apply the fixes, rerun light checks (and a light/fast build when applicable), then run `sce-context-sync` again.
24+
- If this was the final plan task, run `sce-validation`; otherwise stop after prompting a new session with `/next-task {plan_name} T0X`.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: "Run final validation and cleanup for an SCE plan"
2+
description: "Run `sce-validation` to finish an SCE plan with validation and cleanup"
33
allowed-tools: Task, Read, Glob, Grep, Edit, Write, Question, Skill, Bash
44
---
55

@@ -9,6 +9,7 @@ Input:
99
`$ARGUMENTS`
1010

1111
Behavior:
12-
- Run full validation checks.
13-
- Capture evidence.
14-
- Report pass/fail and any residual risks.
12+
- Keep this command as thin orchestration; validation scope, command selection, cleanup, and evidence formatting stay owned by `sce-validation`.
13+
- Run `sce-validation` to execute the full validation phase for the targeted plan or change, including required checks, evidence capture, and cleanup expected by the skill.
14+
- Let `sce-validation` decide pass/fail status and record any residual risks or unmet criteria.
15+
- Stop after reporting the validation outcome and the location of any written validation evidence.
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
2-
description: "Create or update an SCE plan from a change request"
2+
description: "Use `sce-plan-authoring` to turn a change request into a scoped SCE plan"
33
agent: "Shared Context Plan"
4+
entry-skill: "sce-plan-authoring"
5+
skills:
6+
- "sce-plan-authoring"
47
---
58

69
Load and follow the `sce-plan-authoring` skill.
@@ -9,9 +12,9 @@ Input change request:
912
`$ARGUMENTS`
1013

1114
Behavior:
12-
- Keep this command as thin orchestration; delegate clarification/ambiguity handling and plan-shape contracts to `sce-plan-authoring`.
13-
- Ensure plan output follows one-task/one-atomic-commit slicing through `sce-plan-authoring` task-shape rules.
14-
- Write/update `context/plans/{plan_name}.md`.
15-
- Confirm plan creation with `{plan_name}` and exact path.
16-
- Return the full ordered task list.
17-
- Prompt user to start a new session to implement `T01` and provide `/next-task {plan_name} T01`.
15+
- Keep this command as thin orchestration; detailed clarification handling, plan-shape rules, and task-writing behavior stay owned by `sce-plan-authoring`.
16+
- Run `sce-plan-authoring` to resolve whether the input targets a new or existing plan, normalize goals/constraints/success criteria, and produce an implementation-ready task stack.
17+
- Preserve the clarification gate from `sce-plan-authoring`: if blockers, ambiguity, or missing acceptance criteria remain, stop and ask the focused user questions needed to finish the plan safely.
18+
- Require one-task/one-atomic-commit slicing through `sce-plan-authoring` before any task is considered ready for implementation.
19+
- When the plan is ready, write or update `context/plans/{plan_name}.md`, confirm the resolved `{plan_name}` and exact path, and return the ordered task list.
20+
- Stop after the planning handoff by providing the exact next-session command `/next-task {plan_name} T01`.

config/.opencode/command/commit.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
2-
description: "Propose atomic commit message(s) from staged changes"
2+
description: "Use `sce-atomic-commit` to propose atomic commit message(s) from staged changes"
33
agent: "Shared Context Code"
4+
entry-skill: "sce-atomic-commit"
5+
skills:
6+
- "sce-atomic-commit"
47
---
58

69
Load and follow the `sce-atomic-commit` skill.
@@ -11,15 +14,14 @@ Input:
1114
Behavior:
1215
- If arguments are empty, treat input as unstated and infer commit intent from staged changes only.
1316
- If arguments are provided, treat them as optional commit context to refine message proposals.
14-
- Before invoking `sce-atomic-commit`, explicitly prompt the user:
17+
- Keep this command as thin orchestration; staged-diff analysis, atomic split decisions, and message wording stay owned by `sce-atomic-commit`.
18+
- Before running `sce-atomic-commit`, explicitly stop and prompt the user:
1519

1620
"Please run `git add <files>` for all changes you want included in this commit.
1721
Atomic commits should only include intentionally staged changes.
1822
Confirm once staging is complete."
1923

2024
- After confirmation:
2125
- Classify staged diff scope (`context/`-only vs mixed `context/` + non-`context/`) and apply the context-guidance gate from `sce-atomic-commit`.
22-
- Delegate commit-message grammar, atomic split decisions, and split guidance to `sce-atomic-commit`.
23-
24-
- Do not create commits automatically.
25-
- Output only proposed commit message(s) and split guidance when needed.
26+
- Run `sce-atomic-commit` to produce commit-message proposals and any needed split guidance.
27+
- Do not create commits automatically; stop after returning proposed commit message(s) and split guidance when needed.
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
---
2-
description: "Analyze and report drift between context and code"
2+
description: "Run `sce-drift-analyzer` to report context-code drift before edits"
33
agent: "Shared Context Drift"
4+
entry-skill: "sce-drift-analyzer"
5+
skills:
6+
- "sce-drift-analyzer"
47
---
58

69
Load and follow the `sce-drift-analyzer` skill.
710

811
Behavior:
9-
- Collect structured signals from `context/` and code.
10-
- Analyze mismatches between documented and implemented state.
11-
- Save findings to `context/tmp/drift-analysis-YYYY-MM-DD.md`.
12-
- Ask user whether to apply fixes or keep report-only output.
12+
- Keep this command as thin orchestration; drift detection logic, evidence gathering, and report structure stay owned by `sce-drift-analyzer`.
13+
- Run `sce-drift-analyzer` to compare `context/` against code truth, summarize mismatches, and write the drift report to `context/tmp/drift-analysis-YYYY-MM-DD.md`.
14+
- Stop after the analyzer reports findings; do not apply fixes from this command.
15+
- If the user wants repairs after reviewing the report, direct the next step to `/fix-drift` so update behavior stays owned by `sce-drift-fixer`.

0 commit comments

Comments
 (0)