
pagent
Install
/plugin install pagent@pluginsRun it inside Claude Code after adding the marketplace with /plugin marketplace add tuannvm/plugins.
Contents
Discovered from sourceCommands 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:
-
Remove the pipeline state:
rm .claude/pagent-pipeline.json rm -rf .claude/prompts -
Report cancellation:
⚠️ Cancelling pagent pipeline at stage: {STAGE} The pipeline will stop. Outputs created so far are preserved. -
Show what was created:
Preserved outputs: - architecture.md (or not created yet) - test-plan.md (or not created yet) - ... -
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:
- Validate the PRD file
- Create
.claude/pagent-pipeline.jsonwith pipeline state - Output the initial architect prompt
The stop hook automatically handles all subsequent stage transitions.
Pipeline Stages
The pipeline progresses through 5 stages sequentially:
- architect → Creates
architecture.md(technical specs) - qa → Creates
test-plan.md(test strategy) - security → Creates
security-assessment.md(security review) - implementer → Creates
src/(complete codebase) - verifier → Creates
verification-report.mdand outputs<promise>DONE</promise>
Notes
- Files are created in the same directory as the PRD
- Use
/pagent-statusto check progress - Use
/pagent-cancelto 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