Install

/plugin install pagent@plugins

Run it inside Claude Code after adding the marketplace with /plugin marketplace add tuannvm/plugins.

Contents

Discovered from source

Commands 3

Pagent Cancel

Cancel the active pipeline:

if [ -f .claude/pagent-pipeline.json ]; then
  echo "FOUND=true"
  STAGE=$(jq -r '.stage' .claude/pagent-pipeline.json)
  echo "STAGE=$STAGE"
else
  echo "FOUND=false"
fi

Handle the Result

If FOUND=false:

No active pagent pipeline to cancel.

If FOUND=true:

  1. Remove the pipeline state:

    rm .claude/pagent-pipeline.json
    rm -rf .claude/prompts
    
  2. Report cancellation:

    ⚠️  Cancelling pagent pipeline at stage: {STAGE}
    
    The pipeline will stop. Outputs created so far are preserved.
    
  3. Show what was created:

    Preserved outputs:
    - architecture.md (or not created yet)
    - test-plan.md (or not created yet)
    - ...
    
  4. Offer restart:

    To resume, run: /pagent-run <prd-file>
    

Pagent Run

Execute the setup script to initialize the pagent pipeline:

"${CLAUDE_PLUGIN_ROOT}/scripts/setup-pipeline.sh" $ARGUMENTS

The script will:

  1. Validate the PRD file
  2. Create .claude/pagent-pipeline.json with pipeline state
  3. Output the initial architect prompt

The stop hook automatically handles all subsequent stage transitions.

Pipeline Stages

The pipeline progresses through 5 stages sequentially:

  1. architect → Creates architecture.md (technical specs)
  2. qa → Creates test-plan.md (test strategy)
  3. security → Creates security-assessment.md (security review)
  4. implementer → Creates src/ (complete codebase)
  5. verifier → Creates verification-report.md and outputs <promise>DONE</promise>

Notes

  • Files are created in the same directory as the PRD
  • Use /pagent-status to check progress
  • Use /pagent-cancel to stop the pipeline

Pagent Status

Check pipeline status:

if [ -f .claude/pagent-pipeline.json ]; then
  echo "ACTIVE=true"
  STAGE=$(jq -r '.stage' .claude/pagent-pipeline.json)
  STARTED=$(jq -r '.started_at' .claude/pagent-pipeline.json)
  PRD=$(jq -r '.prd_file // "unknown"' .claude/pagent-pipeline.json)
  TOTAL=$(jq '.stages | length' .claude/pagent-pipeline.json)
  CURRENT_INDEX=$(jq -r ".stages | to_entries | map(select(.value.name == \"$STAGE\"))[0].key // 0" .claude/pagent-pipeline.json)

  if [ "$STAGE" == "complete" ]; then
    COMPLETED=$TOTAL
  else
    COMPLETED=$CURRENT_INDEX
  fi

  echo "STAGE=$STAGE"
  echo "STARTED=$STARTED"
  echo "PRD=$PRD"
  echo "COMPLETED=$COMPLETED"
  echo "TOTAL=$TOTAL"

  # List outputs
  [ -f architecture.md ] && echo "OUTPUT_architecture=$(wc -l < architecture.md)"
  [ -f test-plan.md ] && echo "OUTPUT_test_plan=$(wc -l < test-plan.md)"
  [ -f security-assessment.md ] && echo "OUTPUT_security=$(wc -l < security-assessment.md)"
  [ -d src ] && echo "OUTPUT_src=$(find src -type f | wc -l) files"
  [ -f verification-report.md ] && echo "OUTPUT_verification=$(wc -l < verification-report.md)"
else
  echo "ACTIVE=false"
fi

Display the Status

If ACTIVE=false:

No active pagent pipeline.

Start one with: /pagent-run <prd-file>

If ACTIVE=true:

🤖 Pagent Pipeline Status

Stage: {STAGE} ({COMPLETED}/{TOTAL} complete)
Started: {STARTED}
PRD: {PRD}

Outputs:
- architecture.md ({OUTPUT_architecture} lines)
- test-plan.md ({OUTPUT_test_plan} lines)
...

If STAGE=complete:

✅ Pipeline complete!

All {TOTAL} stages finished successfully.

Hooks 1

Sponsors

Details

Marketplace
tuannvm/plugins
Source
plugins/pagent
Category
Community

More from tuannvm/plugins

All 4