Skip to content

Add action: interactive_skill recipe step type; migrate chart-course to split recipe #730

@Trecek

Description

@Trecek

Summary

Add a new recipe step type, action: interactive_skill, that the Tier 1 orchestrator handles in its own session rather than spawning a headless subprocess. Follows the existing action: confirm precedent. First consumer: convert the project-local chart-course skill into a family recipe at .autoskillit/recipes/chart-course/ with three component skills.

Problem

chart-course is a monolithic interactive skill that runs entirely in one session. This causes three structural issues:

  1. No thesis grounding before analysis. The skill launches parallel subagents before deriving the project's constraints, so findings are unfiltered by the project's own stated goals.
  2. No phase isolation. All phases share one context window. Arch-lens sub-skill loads cascade across the entire survey instead of being scoped per-direction.
  3. No resumability. If context exhausts mid-run, all progress is lost. Phase artifacts should be durable files on disk.

Converting to a recipe solves all three — each phase is its own step with its own context, files on disk are the handoff, and the thesis derivation gates everything downstream. However, Phase 4 (direction exploration) is an open-ended multi-turn conversation that cannot run as a headless subprocess. This requires a new step type.

Approach

New step type: action: interactive_skill

steps:
  explore_directions:
    action: interactive_skill
    skill: chart-course-directions
    inputs:
      thesis: "${{ context.phase2_thesis_path }}"
      state: "${{ context.phase3_state_path }}"
    outputs_dir: "${{ context.run_dir }}/phase4/"
    on_success: relationships
    on_failure: escalate_stop

When the orchestrator reaches this step, it invokes the named skill via the native Skill tool in its own session — no subprocess, no run_skill call. The user has a normal conversation with the orchestrator. The skill writes outputs to the configured directory. When done, the orchestrator proceeds to the next step.

Tiering invariant: the skill named in an interactive_skill step MUST be declared in the recipe's skill dependencies. This plugs into the existing workspace/session_skills.py activation mechanism. The recipe validator enforces this as a HIGH-severity rule. No changes to the tiering system.

Chart-course as a family recipe

Three component skills, one recipe YAML at .autoskillit/recipes/chart-course/chart-course.yaml. Component skills under .claude/skills/chart-course-*/.

  1. chart-course-landscape (headless, tool: run_skill) — Phases 0–3: onboarding read, flow tracing, thesis derivation, current state. Writes phase files to the run directory.

  2. chart-course-directions (interactive, action: interactive_skill) — Phase 4: direction exploration. Reads thesis and state files. User describes directions conversationally. Writes direction_N.md files. Arch-lens loads scoped per-direction.

  3. chart-course-compass (headless, tool: run_skill) — Phases 5–7: relationship mapping, trajectory, compass assembly. Reads direction files, writes compass.md via plan-apply.

Engine-side changes

  • recipe/schema.py — new step type discriminator with fields: skill, inputs, outputs_dir, outputs, on_success, on_failure
  • recipe/io.py — parser handles the new fields; _PARSE_STEP_HANDLED_FIELDS stays in sync
  • recipe/validator.py — new rule: interactive_skill skill reference must resolve to a declared dependency (HIGH severity)
  • recipe/_analysis.py — dataflow graph includes interactive_skill steps; routing edges extracted
  • recipe/rules_*.py — new dataflow and skill-reference rules for the step type
  • recipe/contracts.py — contract card format gains awareness of interactive_skill steps
  • server/tools_recipe.pyload_recipe docstring gains behavioral instructions for interactive_skill handling
  • workspace/session_skills.py — ephemeral activation resolves interactive_skill references same as run_skill

Non-scope

  • Pending-input mechanism (%%NEED_INPUT%%, --resume in headless, Channel B resume race). Separate future ticket if needed.
  • Promoting to bundled recipe. Stays family recipe until proven on a second project.
  • --quick chart-course mode. Use /investigate instead.

Acceptance criteria

  • action: interactive_skill is a valid step type; parse/serialize tests pass
  • Validator rejects undeclared interactive_skill references (HIGH severity)
  • Dataflow analyzer tracks file inputs/outputs across interactive_skill steps
  • load_recipe docstring describes interactive_skill handling unambiguously
  • Chart-course recipe loads, validates, and runs end-to-end
  • task test-check passes
  • Stability invariant: zero diffs in src/autoskillit/execution/, tools_execution.py::run_skill, process monitoring, session.py adjudication
  • Tiering invariant: interactive_skill references resolve through existing session_skills activation; no new privilege surface

Risks

  1. Tiering bypass. The validator rule enforcing declared skill dependencies is load-bearing. Without it, a recipe could reference arbitrary skills. Must test both happy and rejection paths.
  2. Orchestrator context during Phase 4. Long direction explorations balloon context. Mitigated by writing direction_N.md to disk per-direction and dropping details from working memory. Context exhaustion recovers by re-entering the interactive_skill step and reading existing files.
  3. session_skills activation. Must include interactive_skill-referenced skills in the ephemeral directory. If missed, the Skill tool won't find them at step-entry time.
  4. Existing chart-course disposition. Keep .claude/skills/chart-course/SKILL.md until the recipe passes dogfood. Remove after.

References

  • Current chart-course skill: .claude/skills/chart-course/SKILL.md
  • Precedent: action: confirm in recipe/schema.py, recipes/merge-prs/merge-prs.yaml:122-129
  • Session skills: workspace/session_skills.py
  • load_recipe spec: server/tools_recipe.py

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions