From 3316718df0af29e44f714e0d4c58dd651a9a970f Mon Sep 17 00:00:00 2001 From: Guilherme Moraes Date: Wed, 21 Oct 2026 13:15:58 -0300 Subject: [PATCH] chore: set up the taskflow workflow config and CLAUDE.md for this repo --- .claude-plugin/plugin.json | 2 +- .claude/workflow.json | 46 ++++++++++++++++++++++ CLAUDE.md | 79 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 .claude/workflow.json create mode 100644 CLAUDE.md diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 5bc57ce..12eb750 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "taskflow", "description": "Plan-and-task workflow: scope/tasks/questions/progress scaffolding split into pull requests under a line budget, acceptance criteria agreed up front, tests red before green, one-task-per-commit cycle, questions answered at the task that needs them, red-first bug fixes, docs-and-diagram sync, standards review.", - "version": "0.7.3", + "version": "0.7.5", "types": "./types/index.d.ts", "author": { "name": "Guilherme Moraes" }, "license": "MIT" diff --git a/.claude/workflow.json b/.claude/workflow.json new file mode 100644 index 0000000..aed0868 --- /dev/null +++ b/.claude/workflow.json @@ -0,0 +1,46 @@ +{ + "projectsDir": "docs/projects", + "planTemplates": "plugin", + "gates": { + "lint": "npm run lint && npm run format:check", + "types": "npm run typecheck" + }, + "e2eTriggerPaths": [], + "docsChecklist": [ + { + "path": "CLAUDE.md", + "owns": "the workflow, the commands, the code standards" + }, + { + "path": "README.md", + "owns": "what the plugin does, its skills and agents, and how to install and configure it" + }, + { + "path": "examples/workflow.example.json", + "owns": "the shape of .claude/workflow.json every skill reads" + } + ], + "decisions": {}, + "diagrams": { "maintain": false }, + "pullRequests": { + "maxLines": 400, + "excludeFromCount": ["package-lock.json"], + "branchPrefix": "", + "titlePrefix": "", + "labels": { + "always": [], + "byType": { + "fix": ["bug"], + "feat": ["enhancement"], + "docs": ["documentation"] + }, + "onMissing": "ask" + }, + "assignOwner": true, + "stack": null, + "parallel": false + }, + "aiSignature": false, + "commitTypes": ["feat", "fix", "refactor", "chore", "docs"], + "models": { "deep": "opus", "surface": "sonnet", "mechanical": "sonnet" } +} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..949d01a --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,79 @@ +# CLAUDE.md + +## Workflow + +Before touching code, create `SCOPE.md`, `TASKS.md`, `QUESTIONS.md` and +`PROGRESS.md` in `docs/projects//`. Run `/plan-start +` to scaffold them. + +The plan is split into pull requests - one topic each, under 400 changed lines +not counting the lockfile - and each pull request carries acceptance criteria +agreed with the repo owner before any of its tasks start. A pull request has one +branch; its first task opens it as a draft, its last marks it ready, and it +reaches the default branch only when the repo owner reviews and merges it. Its +branch prefix, title prefix, labels, assignee and stacking follow +`pullRequests` in `.claude/workflow.json`. + +One task per commit, applied and reviewed one at a time. Every task declares the +model that must take it, and its change is made by a subagent spawned on that +model. Tests come first: the task's tests are derived from the criteria, shown +to the repo owner with why each matters, and watched failing for the right +reason before the implementation is written to make them pass. A task that +changes no behaviour says so and why. + +| Symbol | Model | Scope | +| ------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- | +| 🧠 | opus | Crosses module boundaries, or touches the skill procedures and the `workflow.json` contract every skill reads. Plans, sequencing and findings also run here | +| ⚙️ | sonnet | One layer, one surface | +| 🔧 | sonnet | Mechanical, proven by the gates alone: rename, copy fix, version bump | +| 🙋 | Human | Only the repo owner can do it: a merge, a login, a credential | + +The tier binds the subagent that makes the change, and the mapping lives in +`.claude/workflow.json`. A task applied on the wrong model is a deviation for the +session log even when the diff is fine. + +Gates before every commit: `npm run lint`, `npm run format:check`, +`npm run typecheck`. There is no unit or e2e suite. The pre-commit hook runs +lint, typecheck, format check and `version:check`. + +Commit messages and pull requests carry no AI signature - no `Co-Authored-By` +trailer for an AI, no "Generated with Claude Code" line - unless +`.claude/workflow.json` sets `aiSignature: true`. + +A bug fix ships a test verified failing against the old behaviour. Deviations +from the plan go in the session log. + +Git force flags are a last resort. Try the way without force first - +`--force-with-lease`, a stash, a new branch. When force is the only way, the +command's description says why it is necessary, not what it does; the guard +hook refuses a force flag without one. + +Open questions live in `QUESTIONS.md`, each carrying a recommendation - why, a +concrete example per option, the cost, how to reverse it - and a ⬜ / 🚧 / ✅ +status that flips the moment it is answered, and sitting in `PROGRESS.md` +directly above the task it blocks. They are put to the repo owner when the run +reaches that task and not before, and an answer given ahead of time is recorded +with where it came from, rather than re-asked. Questions are for decisions only: +anything this repository can answer, the agent reads for itself. An unanswered +question blocks its task, whatever its mark. The mark sets how the question is +put: 🟦 routine goes over in a line, while ⚠️ critical - hard, unreversible, or +carrying a security consequence - leads with what the wrong answer costs. + +## Commands + +```bash +npm run lint # eslint panel types +npm run format # prettier --write +npm run format:check # prettier --check +npm run typecheck # tsc --noEmit +npm run version:check # plugin.json version bumped +npm run check # all of the above +``` + +## Which doc owns what + +| Doc | Owns | +| -------------------------------- | --------------------------------------------------------------------- | +| `CLAUDE.md` | the rules: workflow, commands, code standards | +| `README.md` | the plugin: what it does, its skills and agents, how to install it | +| `examples/workflow.example.json` | the shape of `.claude/workflow.json` every skill reads |