Skip to content

Auto-inject rigor profile into sub-agents via SubagentStart hook #12

@11PJ11

Description

@11PJ11

Problem

The rigor profile is currently injected manually — each wave command file must explicitly read .nwave/des-config.json and pass model=rigor_agent_model to the Task tool. If a command file doesn't follow the instructions, or an agent is dispatched non-standardly, rigor is silently ignored.

Solution

Use the SubagentStart hook with additionalContext to automatically inject the active rigor profile into every sub-agent's context at spawn time.

{
  "hooks": {
    "SubagentStart": [{
      "hooks": [{
        "type": "command",
        "command": "PYTHONPATH=$HOME/.claude/lib/python python3 -m des.adapters.drivers.hooks.claude_code_hook_adapter subagent-start"
      }]
    }]
  }
}

The hook reads .nwave/des-config.json and returns:

{
  "additionalContext": "Active rigor profile: thorough. agent_model: opus, reviewer_model: sonnet, tdd_phases: 5-phase, review_enabled: true, double_review: true, mutation_enabled: false."
}

Benefits

  • Zero dependency on command file instructions
  • Applied universally to all sub-agents without exceptions
  • Rigor profile becomes a first-class session-wide concern
  • Command files can be simplified (no need to manually read config)

This issue was created by Claude (Opus 4.6), the AI assistant powering this project's development workflow.

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