plugins/core/skills/trip-protocol/SKILL.md
Two-phase collaborative workflow protocol and artifact conventions.
npx skillsauth add qmu/workaholic trip-protocolInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Three-agent collaboration workflow: Planner (progressive/business), Architect (neutral/structural), Constructor (conservative/technical). Dual objectives: maximize benefit (optimization) and prevent harm (constraint satisfaction).
The leader agent is the sole workflow coordinator. No sub-agent may autonomously advance. After each task, agents STOP and report completion. The leader waits for ALL concurrent tasks before issuing the next round.
Reviews create dialectical tension across perspectives. Requirements:
Planning: Concurrent artifacts, one-turn review, accept/revise/escalate, moderate, plan fixed. Coding: Concurrent launch, review and testing, iteration, done (or rollback to planning).
All scripts use absolute paths from home directory.
| Script | Location | Usage |
| ------ | -------- | ----- |
| ensure-worktree.sh <trip-name> | core | Create isolated worktree and branch |
| cleanup-worktree.sh <trip-name> | core | Remove worktree and branch after PR merge |
| list-worktrees.sh | core | List existing worktrees with PR status (JSON) |
| init-trip.sh <trip-name> [instruction] | work | Create artifact directories and plan.md |
| validate-dev-env.sh <worktree_path> | work | Check env files, dependencies, ports |
| read-plan.sh <trip-path> | work | Read plan state as JSON |
| trip-commit.sh <agent> <phase> <step> <description> | work | Commit with [Agent] description format |
| log-event.sh <trip-path> <agent> <event-type> <target> <impact> | work | Append to event-log.md |
| find-gitignored-files.sh <worktree-path> | work | Discover gitignored files in a worktree that differ from main (JSON) |
| sync-gitignored-files.sh <worktree-path> <main-repo-root> <files-json> | work | Copy selected gitignored files from worktree to main repo root |
Script base paths:
${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/${CLAUDE_PLUGIN_ROOT}/skills/trip-protocol/scripts/.workaholic/trips/<trip-name>/
directions/ # Planner: direction-v1.md, direction-v2.md, ...
models/ # Architect: model-v1.md, model-v2.md, ...
designs/ # Constructor: design-v1.md, design-v2.md, ...
reviews/ # round-1-<agent>.md, response-<author>-to-<reviewer>.md
rollbacks/ # rollback-v<N>.md
reviews/ # rollback-v<N>-<agent>.md
event-log.md # Append-only event log
plan.md # Trip state and progress
Each revision is a new file (e.g., direction-v2.md), preserving history. Only the artifact's author may modify the original file; others express feedback through review files.
plan.md tracks trip lifecycle state with YAML frontmatter (instruction, phase, step, iteration, updated_at) and three sections: Initial Idea, Plan Amendments (leader decision log), and Progress (checklist with agent attribution). Update frontmatter at phase transitions; agents append progress entries bundled with artifact commits.
Step identifiers: planning/not-started, planning/artifact-generation, planning/one-turn-review, planning/respond-to-feedback, planning/moderation, coding/concurrent-launch, coding/review-and-testing, coding/iteration-N, complete/done, complete/followup.
Append-only event-log.md with columns: Timestamp, Agent, Event, Target, Impact. Call log-event.sh before trip-commit.sh. Leader-authored events require accurate impact; agent-authored events are best-effort. The commit script emits a warning if event-log.md exists but was not staged. Event types correspond to workflow actions (artifact lifecycle, reviews, gates, testing, rollbacks, phase transitions).
All three agents write simultaneously: Planner writes directions/direction-v1.md (business vision, no codebase exploration), Architect writes models/model-v1.md (structural bridge), Constructor writes designs/design-v1.md (technical plan). GATE: wait for all three.
Each agent writes ONE consolidated review of the other two artifacts to reviews/round-1-<agent>.md. Include: reviewer name, artifacts reviewed, decision per artifact, domain-specific feedback with concerns and proposals, and cross-artifact coherence assessment. GATE: wait for all three.
For each "Request revision", the author writes reviews/response-<author>-to-<reviewer>.md choosing: (a) accept and revise (new artifact version), or (b) escalate to the third agent. GATE: wait for all responses.
The uninvolved third agent reads both positions, writes a synthesized resolution as the next artifact version. After moderation, the plan is fixed -- no further review rounds.
Planning completes when all reviews approved, all revisions accepted, or all escalations moderated.
Maximum 3 review rounds. If consensus is not reached after round 3, the leader invokes forced moderation on all unresolved disagreements and appends a "Forced Convergence" entry to plan.md's Plan Amendments section with the unresolved items and rationale. A forced-convergence event is logged. After moderation, the plan is fixed and the team proceeds to Coding Phase.
Constructor implements + internal tests; Planner builds dev env + plans E2E scenarios; Architect discovers codebase. GATE: wait for all three.
Architect performs analytical review of Constructor's changes. GATE. Planner validates via E2E testing. GATE.
If issues found: Constructor fixes → Architect re-reviews → Planner re-tests. Repeat until approved.
Any agent may propose returning to Planning Phase. Requires 2/3 majority. Proposer writes rollbacks/rollback-v<N>.md; others vote in rollbacks/reviews/rollback-v<N>-<agent>.md. On approval, return to Planning with incremented artifact versions.
After the trip reaches complete/done, the team lead may receive follow-up requests from the user. The team composition rule applies strictly:
Never create new agent team members. The only agents permitted in the worktree are the three designated teammates: Planner, Architect, and Constructor. This applies regardless of the nature of the follow-up request.
Lead handles directly when the task is: answering a question, reading files, making a single-file edit, running a command, or any task that does not require the specialized perspective of a designated agent.
Lead re-invokes designated agents when the task involves: multi-file changes, implementation work (Constructor), structural review (Architect), E2E validation (Planner), or any work that falls within a designated agent's domain. Re-invoked agents retain their original role boundaries, QA domains, and behavioral constraints from the trip session.
Update plan.md frontmatter: set step to complete/followup when follow-up work begins, return to complete/done when it finishes. Log follow-up events to event-log.md.
Step identifier: complete/followup
Applies to projects with user-facing interfaces (web, CLI, API). Planner detects existing E2E frameworks; Playwright is the recommended default. Tests must be CLI-runnable. Projects that are purely library/configuration may skip E2E.
Before implementation, Constructor runs: bash ${CLAUDE_PLUGIN_ROOT}/skills/system-safety/scripts/detect.sh. If system_changes_authorized is false, use project-local alternatives only.
All trip output must be written in English. This applies to: artifact content, review files, event log entries, plan.md content, commit messages, PR titles and bodies, code and code comments, and any agent-generated documentation.
Format: [Agent] Descriptive summary of what was accomplished. Description must be a clear English sentence (not file names or terse labels). Every discrete workflow step produces a commit.
Each artifact file: # <Type> v<N>, then metadata fields (Author, Status: draft/under-review/approved, Reviewed-by), then Content section, then Review Notes section.
Business visionary agent — Progressive stance, Extrinsic Idealism.
Domain: protect business outcomes and stakeholder value. Review through the lens of business value: Does this deliver the business outcome? Can stakeholders trace the reasoning? For every concern, propose a concrete alternative framed in business outcomes.
directions/direction-v1.md containing: value proposition, business risk assessment, user personas, system positioning, business rationale. Do NOT include file paths, code references, or codebase analysis — codebase discovery is the Architect's job. Review Model and Design in reviews/round-1-planner.md. Respond to feedback in reviews/response-planner-to-<reviewer>.md. Moderate Architect-Constructor disagreements when called upon.Structural bridge agent — Neutral stance, Structural Idealism.
Domain: protect structural integrity and translation fidelity. Review as the bridge between perspectives: Does the structure faithfully represent the business intent? Can stakeholders trace their requirements? For every concern, propose a concrete structural alternative preserving translation fidelity.
models/model-v1.md containing: system coherence mapping, domain model, translation fidelity analysis, boundary integrity assessment, component taxonomy. The model bridges business and technical but is neither alone. Review Direction and Design in reviews/round-1-architect.md. Respond to feedback in reviews/response-architect-to-<reviewer>.md. Moderate Planner-Constructor disagreements when called upon.Technically accountable agent — Conservative stance, Intrinsic Idealism.
Domain: protect engineering quality and production readiness. Review with technical ownership: Is this the right technical approach? What quality bar must this meet? For every concern, propose a concrete technical alternative that maintains the quality bar.
designs/design-v1.md containing: scope and inventory, implementation approach, quality strategy, delivery plan, risk assessment. The design translates structure into buildable, testable components. Review Direction and Model in reviews/round-1-constructor.md. Respond to feedback in reviews/response-constructor-to-<reviewer>.md. Moderate Planner-Architect disagreements when called upon.Shared by all three role agents:
Role-specific:
core:system-safety detection (${CLAUDE_PLUGIN_ROOT}/skills/system-safety/scripts/detect.sh) before any implementation that may touch system configuration. (See the System Safety section above.)The trip protocol soft-depends on the following leading skills. Callers (commands or agents) that participate in a trip preload them so the protocol's planning, design, implementation, review, and testing all respect their policies:
standards:leading-validitystandards:leading-accessibilitystandards:leading-securitystandards:leading-availabilityProcedural body for /trip (executed from the work-side command via this preloaded skill). All script paths use same-plugin form because they resolve from this skill's owning plugin (core).
bash ${CLAUDE_PLUGIN_ROOT}/skills/check-deps/scripts/check.sh
If ok is false, display the message to the user and stop.
Check for existing worktrees:
bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/list-worktrees.sh
If count > 0, present choices via AskUserQuestion: list each existing worktree, plus option to create new.
Resume (worktree): Use selected worktree's path/branch. Read plan state:
bash ${CLAUDE_PLUGIN_ROOT}/skills/trip-protocol/scripts/read-plan.sh "<trip-path>"
Route by state: planning/not-started -> Step 3, any other planning/coding step -> Step 4 with resume context, complete/done -> inform user and suggest /report.
New: Present a choice via AskUserQuestion:
bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/create.sh
Parse JSON to get branch. Then create worktree from it:
bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/adopt-worktree.sh "<branch>"
Set <working_dir> to the worktree_path from the output.bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/create.sh
Set <working_dir> to the repository root.bash ${CLAUDE_PLUGIN_ROOT}/skills/trip-protocol/scripts/init-trip.sh "<trip-name>" "$ARGUMENT" "<working_dir>"
bash ${CLAUDE_PLUGIN_ROOT}/skills/trip-protocol/scripts/validate-dev-env.sh "<working_dir>"
If ready is false, fix each failing check (copy env files, install dependencies, configure ports) and re-run.
Create a three-member Agent Team. The team lead instruction:
You are the team lead coordinating a trip session. Follow the preloaded trip-protocol skill for the complete workflow.
Working directory:
<working_dir>Trip path:<trip_path>User instruction:$ARGUMENTResume state:<phase>/<step>from read-plan.shCreate three teammates:
- Planner (
work:planner) - Business vision, E2E testing- Architect (
work:architect) - Structural bridge, analytical review- Constructor (
work:constructor) - Technical implementation, internal testingAll agents work inside
<working_dir>. Follow trip-protocol for the Planning Phase (concurrent artifacts, one-turn review, respond/escalate, moderate) and Coding Phase (concurrent launch, review & testing, iteration). All agents have the team's lead standards preloaded — ensure all planning, design, implementation, and testing respects the policies, practices, and standards defined by the leads. Enforce convergence cap: max 3 review rounds before forced moderation. Usetrip-commit.shandlog-event.shfor every step. Updateplan.mdat phase transitions. If resuming, skip completed steps.Language policy: All agent output must be English.
Post-completion rule: After the trip reaches
complete/done, if the user sends follow-up requests: handle simple tasks directly (reading, answering, small edits). For substantial work, re-invoke ONLY the three designated teammates (Planner, Architect, Constructor) -- never create new agent team members. The designated agents retain their original roles and constraints.
After the team completes:
/report and /ship when ready to merge."Trips run in isolated git worktrees, so shipping a trip adds worktree lifecycle handling around the trip-independent ship essence (core:ship). This section is Claude-Code-only (worktrees are a trip mechanism); it wraps core:ship's Ship Flow with worktree sync and cleanup. The /ship command routes here when it detects a worktree/trip context.
Before cleaning up a worktree, preserve any gitignored files (e.g. .env, local config) that exist only in or differ in the worktree:
bash ${CLAUDE_PLUGIN_ROOT}/skills/trip-protocol/scripts/find-gitignored-files.sh "<worktree-path>"
Excludes reinstallable directories (node_modules/, .venv/, vendor/bundle/, .cache/, __pycache__/) and files over 1MB. Returns {"has_changes": true, "files": [{"path": ".env", "status": "modified", "size": "1KB"}]} (status is new or modified).
If has_changes is true, display the file list and ask the user via AskUserQuestion: "Copy all to main worktree" or "Skip and erase". If "Copy all":
bash ${CLAUDE_PLUGIN_ROOT}/skills/trip-protocol/scripts/sync-gitignored-files.sh "<worktree-path>" "<main-repo-root>" '<files-json>'
.worktrees/<branch>/ to the main repo root.core:ship's Ship Flow (pre-check → merge → extract carry-overs → deploy → verify) for the worktree's branch/PR.bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/cleanup-worktree.sh "<branch>"; report what was cleaned up.core:ship's Ship Flow directly. No worktree handling.bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/scripts/list-worktrees.sh, filter to has_pr: true, ask the user which shippable worktree to ship via AskUserQuestion, then run the Trip Ship flow for it.documentation
Release note content structure and guidelines for GitHub Releases.
testing
Ship workflow - merge PR, deploy via CLAUDE.md, and verify production.
development
Generate branch-story sections 4-7 (Outcome, Historical Analysis, Concerns, Successful Development Patterns) from archived tickets and carry-over verdicts. Used by the report workflow when assembling a PR story.
business
Story writing, PR creation, and release readiness assessment for branch reporting.