---
name: workflow
description: "Runs multi step work the way a careful senior engineer would: triage before code, a PRD in prds/, task.md kept current, docs synced after, and lessons recorded when a mistake repeats. Hands PRD writing to create-prd and the docs sync to update-project-docs. Use when a task spans several files or steps, changes architecture, needs a plan the user can review, or when the user says plan this, track this in task.md, or what did we learn."
title: workflow
canonical_url: https://skilld.dev/gh/waynesutton/builder-skills/workflow
last_updated: 2026-11-12T12:13:49.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/waynesutton/builder-skills/workflow/agents/openai.yaml), [assets/large-logo.png](https://skilld.dev/api/skills-raw/waynesutton/builder-skills/workflow/assets/large-logo.png), [assets/small-logo.svg](https://skilld.dev/api/skills-raw/waynesutton/builder-skills/workflow/assets/small-logo.svg).
>
> If the user asked to install this Skill, run `npx skilld install waynesutton/builder-skills/workflow`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/workflow`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/waynesutton/builder-skills/workflow) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/workflow`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/workflow --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/workflow --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Workflow

One loop for any task bigger than a typo. Triage, plan in a PRD, track in `task.md`, sync docs when done, and write down what went wrong so it does not repeat.

Skip this for one file fixes: a typo, a copy change, a single obvious bug. Just fix those.

## The loop

1. **Triage.** Read the request and the code before touching anything.
2. **PRD.** Load `create-prd` and write `prds/<slug>.md`. Share it when the plan has a real choice in it.
3. **Track.** Add the work to `task.md` under `## To Do`. Move items as they land.
4. **Build.** Small steps. Verify each one.
5. **Sync docs.** Load `update-project-docs` to update `task.md`, `changelog.md`, and `files.md`, then print the commit message.
6. **Learn.** If the user corrected the same thing twice, add a line to `prds/lessons.md`.

Related skills, load them when the step comes up:

| Step | Skill |
| --- | --- |
| Writing the PRD | `create-prd` |
| Syncing docs after a change | `update-project-docs` |
| Any git command that could discard work | `git-safety` |
| Scope starts to drift | `avoid-feature-creep` |
| Blocked on the user, or the next step needs them | `what-i-need-from-you` |
| Before a deploy or a public repo | `sec-check` |

## Triage

Before writing code, answer these in a few lines:

- What is missing, broken, or incomplete?
- What are two or three likely causes or approaches?
- Which one is most likely, and why?
- What is still unclear enough to ask about?

If the last answer is not empty, ask. One question, not five. Then wait.

For bugs, name the root cause before proposing the fix. A fix without a root cause is a guess.

## When a PRD is needed

Write one when any of these hold:

- three or more files will change
- the schema changes
- an architectural choice is being made (auth, hosting, data model)
- a bug took real investigation to diagnose
- the work will be referenced later as a guide

Skip it for a single file fix that is obvious from logs or types, a typo, a CSS tweak, or a copy change.

## Task tracking

`task.md` has three sections: `## To Do`, `## In Progress`, `## Completed`.

- New work goes under To Do with a link to its PRD.
- Keep one item In Progress at a time when possible.
- An item moves to Completed after verification, not after the edit.
- Completed entries carry a `YYYY-MM-DD HH:mm UTC` timestamp, the files touched, and the verification command or outcome.

Good entry:

```
- [x] 2026-09-15 18:40 UTC Fix duplicate heartbeat writes. prds/heartbeat-dedup.md. convex/stats.ts, src/hooks/usePageTracking.ts. Verified: npx convex dev clean, no OCC retries in dashboard for 10 min.
```

Bad entry:

```
- [x] fixed heartbeat
```

## Docs sync

After each feature or fix, `task.md`, `changelog.md`, and `files.md` have to agree with the code. `update-project-docs` has the rules. In short:

- `changelog.md` follows Keep a Changelog. Dates come from `git log --date=short`, never from memory.
- `files.md` gets new files added and stale descriptions fixed.
- Claims about what shipped come from the diff, not from the plan.

Trigger it with `/update`, `@update`, or "update project docs".

## Execution style

- Keep the change set tight. The request sets the scope. Extra ideas go in the summary, not the diff.
- Use one subagent per research question when the task is big enough to benefit. Do not run parallel edits on the same file.
- Stop and re plan if the work stops making sense. Update the PRD, then continue.
- Before calling it done, ask: would a staff engineer approve this diff as is?

## Learning loop

`prds/lessons.md` is a flat list. One line per lesson, newest at the bottom:

```
- 2026-09-15 Do not add returns validators that duplicate the schema doc shape; share a validator constant instead.
```

Add a lesson when:

- the user corrects the same pattern a second time
- a verification step catches something the plan missed
- a tool or API behaved differently from the docs

Read `prds/lessons.md` at the start of any session in that repo.

## Never

- Deploy, publish, commit, or push. The user does those.
- Mark a task done without running the verification step in the PRD.
- Invent a date. Run `git log` or use the current UTC time.
- Write a PRD for a one line change.
