Skip to content

feat(engine): stage skill: property — programmatic plugin skill binding#119

Closed
iamcxa wants to merge 2 commits into
spacedock-dev:mainfrom
iamcxa:feat/stage-skill-binding
Closed

feat(engine): stage skill: property — programmatic plugin skill binding#119
iamcxa wants to merge 2 commits into
spacedock-dev:mainfrom
iamcxa:feat/stage-skill-binding

Conversation

@iamcxa
Copy link
Copy Markdown
Contributor

@iamcxa iamcxa commented Apr 17, 2026

Problem

Workflow plugins (like ship-flow) provide stage-specific skills, but there's no structured way for the engine to tell an ensign which plugin skill to load for a given stage. Currently ensigns improvise from README prose — unreliable for complex stages.

Solution

Three small changes that enable structured skill binding:

1. Commission template: skill: stage property

- name: plan
  skill: ship-flow:ship-plan   # ← new
  model: sonnet

Commission now documents skill: alongside existing properties (worktree, gate, agent, model).

2. Status parser: preserve skill: in stage dict

# bin/status line 261
for optional_field in ('feedback-to', 'agent', 'fresh', 'model', 'skill'):

One field added to the optional list.

3. claude-team build: inject Skill() into ensign prompt

stage_skill = stage_meta.get('skill')
if stage_skill:
    prompt_parts.append(
        f'**Before starting work**, invoke `Skill("{stage_skill}")` to load '
        f'the stage skill. Follow its instructions for this stage.\n'
    )

Ensign prompt now gets a structured Skill() instruction before the stage definition.

Verified

Tested against a live ship-flow workflow (4 stages: sharp/plan/execute/ship). All 4 stages correctly inject their Skill() call into the ensign prompt with the matching model dispatch.

Diff

  • skills/commission/SKILL.md: +3 lines (skill: property in template + prose instruction)
  • skills/commission/bin/status: +1 field in optional_fields list
  • skills/commission/bin/claude-team: +6 lines (skill injection in prompt assembly)

Total: 10 insertions, 2 deletions.

iamcxa added 2 commits April 18, 2026 00:11
- Frontmatter template: skill: {plugin:skill-name} for stages with plugin-provided skills
- Stage prose template: 'Load skill: Invoke Skill(...)' instruction when skill: is present
- Enables workflow plugins to bind stage skills that ensign loads at dispatch time
- model: was already supported; skill: completes the per-stage plugin binding
- status parser: add 'skill' to optional_fields so it's preserved in stage dict
- claude-team build: inject Skill() loading instruction into ensign prompt
  when stage has skill: property (component 1.5, between header and stage def)
- commission SKILL.md: document skill: property in stage template + prose template

Enables workflow plugins to bind stage-specific skills that ensign loads
automatically at dispatch time. Previously skill loading relied on ensign
reading README prose — now it's programmatic via claude-team build.

Verified: all 4 ship-flow stages (sharp/plan/execute/ship) get correct
Skill() injection with matching model dispatch.
@iamcxa
Copy link
Copy Markdown
Contributor Author

iamcxa commented Apr 20, 2026

Re-audited this PR's scope per your feedback on other PRs in this batch:

  • Commits: 2 (c73ab9be programmatic skill binding + 000163df commission skill: property)
  • Files: skills/commission/bin/claude-team, skills/commission/bin/status, skills/commission/SKILL.md
  • All in-scope for the title — no infrastructure noise from other feature branches.

Ready for review when you get a chance. #134 and #135 have now been rebased independently (each containing only their claimed scope). #130 still pending a separate scope decision (your suggestion to move it to its own skill).

@clkao
Copy link
Copy Markdown
Collaborator

clkao commented Jun 2, 2026

can you see if referencing the skill in the stage definition works?

@clkao clkao closed this Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants