AGENT SKILL

myflow

Use when starting or navigating work that should follow the MyFlow five-stage, artifact-led development workflow

License 许可
MIT
所属仓库
don-smith/myflow
最近更新
2026-10-23
Stars
★ 0
Forks
0

01 前言 Front Matter

name
myflow
description
Use when starting or navigating work that should follow the MyFlow five-stage, artifact-led development workflow

02 资源文件 19

03 SKILL.md 正文

MyFlow

MyFlow is a five-stage workflow for AI-assisted software development. Each stage has one canonical orchestrator, produces or updates a state artifact, and identifies the next action. The workflow adapts its depth to the size and risk of the work; it does not require every specialist skill for every task.

Use this skill when

  • starting a new piece of work
  • resuming work when the current stage is unclear
  • deciding which stage or specialist skill should run next
  • onboarding a repository to the workflow
  • checking the relationship between stages, artifacts, and cross-cutting skills
  • telling the story of a repository → use story for artifact-backed pages and dated question chapters

Invoking a skill

MyFlow writes a next action as "the plan skill with <path>", because each agent spells the invocation differently:

Agent Invocation
Claude Code /myflow:<skill>
Codex $<skill>
Cursor, OpenCode /<skill>
Pi /skill:<skill>
Kilo Code name the skill

This table is the only place a host's own syntax belongs. Elsewhere skills name the capability they need, not the tool that provides it: references/capabilities.md defines structured questions, fresh context, parallel work, and read-only exploration, and the fallback each one takes where the host does not offer it.

Scripts are named by a path relative to the skill that runs them, such as ../myflow/scripts/resolve-repository-map.mjs from a stage skill. Resolve them against the installed skill folder, not the target repository.

Collaboration model

  • Scope and Plan: collaborate with the developer; resolve intent, trade-offs, scope, and architecture together.
  • Implement: after the plan is accepted and a fresh session begins, operate autonomously against the plan.
  • Verify: run automated validation and code review autonomously, then return control for manual verification where required.
  • Close: involve the developer throughout closeout, especially for documentation, learnings, commits, and integration decisions.

The five stages

1. Scope → 2. Plan → 3. Implement → 4. Verify → 5. Close

1. Scope

Orchestrator: scope

Determine the intent, size, ambiguity, risk, and appropriate depth of the work. Select specialists only when needed:

  • discover for deeper requirements extraction
  • grill-me for a decision that needs collaborative questioning and may sharpen domain language or record an ADR
  • research for codebase or external research
  • prototype for difficult behavior or UI questions

Artifact: alignment artifact, with research artifacts when research is selected.

2. Plan

Orchestrator: plan, with design as the collaborative design step

Resolve the solution shape, architectural decisions, implementation slices, ordering, and verification criteria. Use domain-modeling, prototype, or the canonical tdd skill when the work requires them.

Every non-trivial workstream has an executable plan. Its design disposition says whether work is locked into existing architecture, needs localized design recorded in the plan, or requires a linked standalone design artifact. A truly trivial, uninterrupted change may keep this agreement in-session; if it expands or pauses, write a lightweight plan before continuing.

Artifacts: design artifact where needed, implementation plan, and rehydration manifest.

3. Implement

Orchestrator: implement

Execute the accepted plan autonomously. Follow its test-first slices and verification map; use the canonical tdd skill again only if a design gap appears. After every completed plan phase whose automated criteria and required checks are green, invoke commit to create one atomic phase commit. Update the implementation checkpoint with the commit hash and any outstanding manual verification. After the final phase, the same parent session loads the installed verify skill and executes it immediately; invoking verify by hand is recovery/rehydration guidance, not a user-operated gate.

When failed Verify returns an implementation defect after all original phases are complete, create one bounded corrective phase from the linked findings. A fresh-context implementation subagent owns the corrective phase. The parent delegates it fresh; after the corrective phase is green, commit it, update the plan and workstream checkpoints, and immediately rerun complete Verify.

Artifact: implementation checkpoint or updated plan state, plus the working tree.

4. Verify

Orchestrator: verify

Verify the implementation against the plan and its success criteria. Run automated checks, inspect the implementation, and load and execute the installed sibling code-review skill in the current run with the exact implementation scope and accepted plan. Persist its provenance and result as a separate review artifact. When the work has human-facing or external behavior, prepare a manual-verification brief for the developer.

Artifact: validation report and any repository-specific review evidence.

5. Close

Orchestrator: close

Leave the workstream in a clean, understandable, low-debt state. Close begins only after inspecting a fresh passing Verify report and linked passing review evidence whose plan and implementation-range provenance matches; a journal pass or a top-level validation pass alone is insufficient. With the developer, select only applicable documentation, status, learning, and delivery actions from Verify evidence and repository policy. Record every unresolved follow-up with a destination rather than forcing it into the current closeout. If applicable closeout changes exist, make a separate final closeout commit and determine integration without inferring a policy.

Artifacts: repository-specific closeout updates and a resumable closeout summary when decisions, manual evidence, or follow-ups need to persist.

Lifecycle and stage pulse

For durable workstreams, scripts/stage-boundary.mjs records stage entry, accepted artifacts, stage exit, and optional findings. The command derives idempotency keys, writes the private stage pulse, and syncs the workstream. Never write journal JSONL or invent keys. Stage artifacts govern decisions; the journal records history, not permission to do work. scripts/lifecycle-journal.mjs records blocks and verification results when available. See references/stage-boundary.md for commands and recovery guidance.

Corrections return to their owner: changed outcomes to Scope, architecture to Plan/design, plans to Plan/planning, and implementation defects to Implement. Record the finding and evidence in the workstream artifact, then enter the owning stage as often as needed. The command ends a different open attempt as superseded; use --new-attempt to revisit the stage just completed. Preserve earlier artifacts and attempts. Re-run affected downstream work and fresh Verify before Close. Check the passing review evidence there. A journal error is visible audit debt, never permission to stop legitimate work; do not claim a missing event exists. Historical correction episodes remain readable but are not required for new work.

Each eligible completed attempt gets one private stage pulse, asked once, immediately before exit. references/stage-boundary.md holds the exact question, its four choices, the Implement deferral, and the failure rules; references/capabilities.md says how to ask it. Ratings and optional notes stay in the workstream's feedback/ folder; the lifecycle journal receives only coverage status and a private reference. The pulse is non-blocking. If Implement has no live developer interaction, record it as pending. Pending Implement feedback is requested once at Verify entry.

The shared templates/stage-context-checkpoint.md in this skill folder defines what every stage keeps in its checkpoint, including the lifecycle receipt and the feedback coverage.

Cross-cutting skills

These skills can be invoked at any suitable point:

  • handoff — exceptional mid-stage or mid-slice recovery, in write and resume modes
  • grill-me — the decision-tree interview technique other skills use for collaborative questioning
  • domain-modeling — establish or sharpen domain language
  • diagnosing-bugs — resolve bugs, failures, flaky behavior, and performance regressions
  • technical-writing — write or revise documentation the workstream produces

TDD is already consolidated: tdd is the canonical skill. Use it primarily during Plan/design to shape seams and the verification map; implementation follows the accepted plan unless a design gap appears.

Debugging is already consolidated: diagnosing-bugs is the canonical skill. It requires an evidence-first feedback loop before a durable fix; systematic-debugging is retired.

Questioning is consolidated: grill-me is the one interview skill. It is model-invocable, so a skill that needs collaborative decision-making runs its rounds rather than inventing another interview, and it is also the developer's explicit front door for a decision that is not tied to a workstream at all. For a repository-scoped decision it composes with domain-modeling and design when domain language or an ADR needs maintenance.

Questioning supplements rather than replaces the Scope artifact: record settled scope, trade-offs, requirements, and next action in the alignment artifact even when they are neither glossary terms nor ADRs. It must use the repository paths discovered during onboarding, not assume CONTEXT.md or docs/adr/.

Onboarding

Before using MyFlow seriously in a repository, run onboard. It uses scripts/resolve-repository-map.mjs to select an existing repository-local map or personal global map, then creates or refreshes the appropriate repository-policy index. Skills run the resolver before guessing conventional paths; only maps/onboarding records are global, while active workstream artifacts remain local.

onboard also writes a run report and pending evaluation record. It is discovery, not an architecture assessment: it inspects first, asks only material unresolved questions, and can leave a repository provisional when unknowns do not prevent safe low-risk work.

Optional onboarding specialists remain separate:

  • domain-modeling for the repository glossary and important domain decisions

Artifact and session rules

The artifact and stage-boundary contract defines canonical paths, resolver lookup, the common artifact interface, planning depths, and corrective loops. The resolver-selected repository map overrides its defaults.

Stage artifacts are the primary handoff mechanism. Each should make the current state and next action discoverable without conversation history. At minimum, record:

  • workstream and stage
  • status
  • completed work
  • decisions
  • open questions
  • evidence and verification state
  • relevant files and artifact paths
  • next action and next-session command
  • rehydration information

Use a fresh session at a natural stage boundary. Use handoff only for an exceptional interruption inside a stage or slice: its write mode records the pause and its resume mode recovers it. The handoff should point to the authoritative stage artifact rather than duplicate it.

Continuous improvement

MyFlow improves through one loop:

stage feedback → evaluation → workflow improvement

Each completed stage attempt offers one private pulse. The ratings and notes stay in the workstream's feedback/ folder, and only coverage status reaches the lifecycle journal.

Quick reference

Need Start with
Establish or refresh repository conventions onboard
Start or classify work scope
Resolve fuzzy requirements discover or grill-me
Research reality research
Design and sequence design → plan
Execute accepted work implement
Verify implementation verify → code-review
Close the workstream close
Pause mid-stage, or resume such a pause handoff

04 同仓库更多 Skills