@baldurpan/create-ai-workflow 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/dist/agents-block.js +70 -0
- package/dist/bin.js +14 -0
- package/dist/check/markdown.js +47 -0
- package/dist/check/parse.js +113 -0
- package/dist/check/rules.js +245 -0
- package/dist/cli.js +109 -0
- package/dist/commands/check.js +41 -0
- package/dist/commands/install.js +76 -0
- package/dist/commands/standards-add.js +145 -0
- package/dist/commands/update.js +214 -0
- package/dist/layout.js +115 -0
- package/dist/log.js +20 -0
- package/dist/manifest.js +53 -0
- package/dist/paths.js +41 -0
- package/package.json +37 -0
- package/templates/blocks/agents-block.md +30 -0
- package/templates/claude/agents/planner.agent.md +60 -0
- package/templates/claude/agents/reviewer.agent.md +77 -0
- package/templates/context/README.md +81 -0
- package/templates/context/plan-template.md +69 -0
- package/templates/context/plan-template.notes.md +55 -0
- package/templates/context/roles/coder.md +76 -0
- package/templates/context/workflow.md +143 -0
- package/templates/skills/feature-close/SKILL.md +102 -0
- package/templates/skills/feature-implement/SKILL.md +142 -0
- package/templates/skills/feature-plan/SKILL.md +138 -0
- package/templates/skills/feature-status/SKILL.md +86 -0
- package/templates/skills/onboard/SKILL.md +122 -0
- package/templates/skills/orchestrate/SKILL.md +92 -0
- package/templates/skills/roadmap/SKILL.md +97 -0
- package/templates/standards/.source +8 -0
- package/templates/standards/README.md +104 -0
- package/templates/standards/architecture/api-design.md +212 -0
- package/templates/standards/architecture/dependency-boundaries.md +104 -0
- package/templates/standards/architecture/feature-driven.md +102 -0
- package/templates/standards/architecture/folder-structure.md +108 -0
- package/templates/standards/architecture/monorepos.md +107 -0
- package/templates/standards/architecture/refactoring.md +97 -0
- package/templates/standards/architecture/shared-code.md +81 -0
- package/templates/standards/docs/PHP-SPEC.md +1195 -0
- package/templates/standards/docs/SPEC.md +540 -0
- package/templates/standards/examples/bad/data-fetching.tsx +52 -0
- package/templates/standards/examples/bad/derived-state.tsx +60 -0
- package/templates/standards/examples/bad/feature-component.tsx +80 -0
- package/templates/standards/examples/bad/prop-drilling.tsx +70 -0
- package/templates/standards/examples/good/data-fetching.tsx +53 -0
- package/templates/standards/examples/good/derived-state.tsx +52 -0
- package/templates/standards/examples/good/feature-component.tsx +141 -0
- package/templates/standards/examples/good/invoice.schema.ts +20 -0
- package/templates/standards/examples/good/prop-drilling.tsx +83 -0
- package/templates/standards/philosophy/ai-agent-behavior.md +93 -0
- package/templates/standards/philosophy/core-principles.md +49 -0
- package/templates/standards/philosophy/incremental-abstraction.md +56 -0
- package/templates/standards/philosophy/maintainability.md +66 -0
- package/templates/standards/philosophy/readability.md +87 -0
- package/templates/standards/php/README.md +62 -0
- package/templates/standards/php/anti-patterns.md +259 -0
- package/templates/standards/php/architecture.md +241 -0
- package/templates/standards/php/frameworks.md +197 -0
- package/templates/standards/php/rules.md +205 -0
- package/templates/standards/php/security.md +190 -0
- package/templates/standards/php/testing.md +139 -0
- package/templates/standards/php/tooling.md +245 -0
- package/templates/standards/react/accessibility.md +130 -0
- package/templates/standards/react/anti-patterns.md +187 -0
- package/templates/standards/react/component-design.md +139 -0
- package/templates/standards/react/error-boundaries.md +195 -0
- package/templates/standards/react/forms.md +147 -0
- package/templates/standards/react/hooks.md +88 -0
- package/templates/standards/react/memoization.md +87 -0
- package/templates/standards/react/state-management.md +123 -0
- package/templates/standards/react/testing.md +118 -0
- package/templates/standards/react/use-effect.md +110 -0
- package/templates/standards/security/api-security.md +136 -0
- package/templates/standards/security/auth.md +112 -0
- package/templates/standards/security/secrets.md +105 -0
- package/templates/standards/security/validation.md +89 -0
- package/templates/standards/templates/.editorconfig +16 -0
- package/templates/standards/templates/.nvmrc +1 -0
- package/templates/standards/templates/AGENTS.md +46 -0
- package/templates/standards/templates/CLAUDE.md +3 -0
- package/templates/standards/templates/_dot_gitignore +50 -0
- package/templates/standards/templates/biome.json +53 -0
- package/templates/standards/templates/eslint.config.js +61 -0
- package/templates/standards/templates/project-readme.md +76 -0
- package/templates/standards/templates/pull-request-template.md +46 -0
- package/templates/standards/templates/tsconfig.json +35 -0
- package/templates/standards/tooling/biome.md +92 -0
- package/templates/standards/tooling/ci.md +128 -0
- package/templates/standards/tooling/dates.md +194 -0
- package/templates/standards/tooling/dependencies.md +90 -0
- package/templates/standards/tooling/nx.md +113 -0
- package/templates/standards/tooling/observability.md +183 -0
- package/templates/standards/tooling/prisma.md +152 -0
- package/templates/standards/tooling/shadcn.md +115 -0
- package/templates/standards/tooling/tailwind.md +135 -0
- package/templates/standards/tooling/tanstack-query.md +214 -0
- package/templates/standards/tooling/tanstack-router.md +365 -0
- package/templates/standards/tooling/tanstack.md +31 -0
- package/templates/standards/tooling/vite.md +135 -0
- package/templates/standards/typescript/anti-patterns.md +107 -0
- package/templates/standards/typescript/error-handling.md +216 -0
- package/templates/standards/typescript/naming.md +78 -0
- package/templates/standards/typescript/rules.md +159 -0
- package/templates/standards/typescript/tsconfig/base.json +32 -0
- package/templates/standards/typescript/tsconfig/nextjs.json +12 -0
- package/templates/standards/typescript/tsconfig/react.json +9 -0
- package/templates/standards/typescript/validation.md +104 -0
- package/templates/stubs/executors.md +49 -0
- package/templates/stubs/findings.md +40 -0
- package/templates/stubs/history.md +13 -0
- package/templates/stubs/roadmap.md +29 -0
- package/templates/stubs/stack.md +35 -0
- package/templates/stubs/verify.md +48 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature-status
|
|
3
|
+
description: "Read-only report of where the active feature stands — its plan's phase ledger, open findings, and git state — ending with exactly one next action. Explicit invocation only — run this when the user types /feature-status. Do NOT match on 'what's the status', 'where are we', or general progress questions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /feature-status
|
|
7
|
+
|
|
8
|
+
The read-only "where do things stand" view. **It writes nothing, commits nothing, and invokes no other
|
|
9
|
+
agent.**
|
|
10
|
+
|
|
11
|
+
**It is never a prerequisite.** Every other command resolves its own starting point — nobody has to run
|
|
12
|
+
this first. It exists for when *you* want to know.
|
|
13
|
+
|
|
14
|
+
Read [`context/workflow.md`](../../../context/workflow.md) for the tier model.
|
|
15
|
+
|
|
16
|
+
## 1. Read, in this order
|
|
17
|
+
|
|
18
|
+
1. `context/roadmap.md` — which entry is `active`, and what each entry's **Doc** points at.
|
|
19
|
+
2. That plan document's **status ledger**, and each phase's **Files:** line.
|
|
20
|
+
3. `context/findings.md` — open findings, and which phase each is tied to.
|
|
21
|
+
4. Git state — `git status --short` and the last few commits.
|
|
22
|
+
|
|
23
|
+
**Nothing is cached and nothing is parsed by a script.** Read the ledger every time. That is the property
|
|
24
|
+
that makes hand-editing a row change this command's answer immediately, with no regeneration step.
|
|
25
|
+
|
|
26
|
+
## 2. Reconcile before trusting the ledger
|
|
27
|
+
|
|
28
|
+
Report and **stop** on any of these:
|
|
29
|
+
|
|
30
|
+
- A phase marked `done` whose **Files:** or commits do not exist.
|
|
31
|
+
- A phase marked `not started` whose work is plainly already in the tree.
|
|
32
|
+
- An entry marked `active` pointing at a document that does not exist.
|
|
33
|
+
- An entry marked `active` for a feature that already has a `context/history.md` row.
|
|
34
|
+
- **A document in `context/plans/` that no roadmap entry points at.**
|
|
35
|
+
|
|
36
|
+
Do not resolve a discrepancy yourself, and do not pick a next action off a ledger you have just shown to be
|
|
37
|
+
stale. That is the exact failure this workflow exists to prevent.
|
|
38
|
+
|
|
39
|
+
**Two things that are not discrepancies:**
|
|
40
|
+
|
|
41
|
+
- Every phase `done` while the entry still reads `active` — that is the normal state before
|
|
42
|
+
`/feature-close`. Next action 5 handles it.
|
|
43
|
+
- A `done` row with its changes still in the working tree — a phase finished but not committed. Name it in
|
|
44
|
+
the report; do not stop on it.
|
|
45
|
+
|
|
46
|
+
## 3. Report
|
|
47
|
+
|
|
48
|
+
Keep it short. The user is asking a question, not reading a document.
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Feature: <name> — <marker> (or: none active)
|
|
52
|
+
Plan: <path>
|
|
53
|
+
Phases: <n> done · <n> in progress · <n> blocked · <n> not started
|
|
54
|
+
Findings: <n> open (<severities>) (or: none open)
|
|
55
|
+
|
|
56
|
+
Next: <exactly one action>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Under the header, list only the phases that are **not** `done`, one line each with their Note. Do not
|
|
60
|
+
re-print the whole ledger.
|
|
61
|
+
|
|
62
|
+
## 4. Name exactly one next action
|
|
63
|
+
|
|
64
|
+
In priority order — take the **first** that applies and name only it:
|
|
65
|
+
|
|
66
|
+
1. An open `P0` or `P1` → fix it. Quote the finding's id and its closing condition.
|
|
67
|
+
2. A phase **`in progress`** → resume it, quoting its Note. Do not restart it.
|
|
68
|
+
3. A phase **`blocked`** with every other phase `done` → report the blocker; the next action is the user's.
|
|
69
|
+
4. A phase `done` with a next **unblocked** phase → `/feature-implement`, naming the phase it will pick.
|
|
70
|
+
5. **Every** phase in the active plan `done` → `/feature-close`.
|
|
71
|
+
6. **No active feature, but at least one entry has a plan** → `/feature-implement`, which ranks the planned
|
|
72
|
+
entries and asks.
|
|
73
|
+
7. **No plans, at least one `pending` entry** → `/feature-plan`. **Do not pick a candidate yourself** —
|
|
74
|
+
that command ranks the backlog and asks, and naming one here would either duplicate its ranking or
|
|
75
|
+
contradict it.
|
|
76
|
+
8. **Nothing at all** → `/roadmap "some idea"`.
|
|
77
|
+
|
|
78
|
+
"Exactly one" is the point. A list of three things to consider is what this command exists to replace.
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
|
|
82
|
+
- **Read-only. No exceptions.** Not the ledger, not the roadmap, not a finding, not a "quick fix while I'm
|
|
83
|
+
here". If you spot something that needs changing, name it as the next action and let the user decide.
|
|
84
|
+
- **Never invoke another agent.**
|
|
85
|
+
- **Never mark anything.** Reporting that a phase looks finished is not marking it `done`; only
|
|
86
|
+
`/feature-implement` does that, on gate evidence.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: onboard
|
|
3
|
+
description: "Fill in this project's own workflow stubs — context/verify.md, context/executors.md and context/stack.md — by asking, and by running each candidate verification command and keeping only the ones that pass. Explicit invocation only — run this when the user types /onboard. Do NOT match on 'set up the project', 'get started', or general setup requests."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /onboard
|
|
7
|
+
|
|
8
|
+
Fills the project-owned stubs the installer deliberately left empty. **Re-runnable** — run it again after
|
|
9
|
+
the stack changes, and it re-proposes against what is there now.
|
|
10
|
+
|
|
11
|
+
**Asking is not guessing.** The installer could have detected a test command and written it in; that is
|
|
12
|
+
exactly how a file ends up naming a command that has never run. This command asks, and where it can, it
|
|
13
|
+
*checks*.
|
|
14
|
+
|
|
15
|
+
Read [`context/workflow.md`](../../../context/workflow.md) for the tier model.
|
|
16
|
+
|
|
17
|
+
## What it writes
|
|
18
|
+
|
|
19
|
+
| File | Gets |
|
|
20
|
+
|---|---|
|
|
21
|
+
| [`context/verify.md`](../../../context/verify.md) | the real Lint / Typecheck / Build / Test commands — **only ones that exited 0** |
|
|
22
|
+
| [`context/executors.md`](../../../context/executors.md) | how this project dispatches a coder and a reviewer |
|
|
23
|
+
| [`context/stack.md`](../../../context/stack.md) | runtime, layout, conventions |
|
|
24
|
+
|
|
25
|
+
Show every proposed edit before writing it, and **do not commit.** The user reviews and commits.
|
|
26
|
+
|
|
27
|
+
## Step 1 — Coder dispatch
|
|
28
|
+
|
|
29
|
+
Ask whether implementation runs **in-host** or is **offloaded** to an external coder CLI.
|
|
30
|
+
|
|
31
|
+
- **In-host** is the default, and a valid configuration rather than a gap. Leave the Coder section of
|
|
32
|
+
`context/executors.md` saying so.
|
|
33
|
+
- **Offloaded** — the user names the invocation. Write it into `context/executors.md` verbatim, including
|
|
34
|
+
any directory or permission scoping it needs on this machine. Its system prompt is
|
|
35
|
+
[`context/roles/coder.md`](../../../context/roles/coder.md).
|
|
36
|
+
|
|
37
|
+
If an external coder is named, **test one assumption before writing it down**: that it can read this
|
|
38
|
+
repository unaided. Briefs cite paths rather than pasting file contents, so everything downstream depends
|
|
39
|
+
on that being true, and it is true of some executors and not others.
|
|
40
|
+
|
|
41
|
+
1. Pick a fact only available by opening a file here — a heading partway down `context/workflow.md` does.
|
|
42
|
+
2. Send a one-line brief that cites the path and asks for that fact. Nothing else.
|
|
43
|
+
3. If the fact comes back, record in `context/executors.md` that repository reads were verified, and when.
|
|
44
|
+
4. If it comes back empty, guessed, or refused, record that **this executor needs content inline** — the
|
|
45
|
+
one case where a brief carries file contents instead of paths.
|
|
46
|
+
|
|
47
|
+
Never write down an invocation you have not run. This is the same rule as Step 4, for the same reason.
|
|
48
|
+
|
|
49
|
+
## Step 2 — Reviewer dispatch
|
|
50
|
+
|
|
51
|
+
Ask how Gate 2 should get a review:
|
|
52
|
+
|
|
53
|
+
- **The host reviews the diff itself** against the plan's review checklist and the standards. That is the
|
|
54
|
+
default. It is weaker than an independent reviewer, and any command that runs the gate must say which one
|
|
55
|
+
it ran.
|
|
56
|
+
- **An external reviewer** — the user names the invocation. Write it into `context/executors.md` verbatim,
|
|
57
|
+
including any scoping it needs on this machine.
|
|
58
|
+
|
|
59
|
+
A host that offers review usually offers more than one shape of it — a review subcommand, a review skill it
|
|
60
|
+
can be asked to run, or both — and they do not review alike. **Find out what this host actually provides
|
|
61
|
+
rather than assuming**, show the user what you found, and let them choose. Nothing shipped here names a
|
|
62
|
+
winner: it differs per host and changes underneath you. What ships is the contract, not the command.
|
|
63
|
+
|
|
64
|
+
Whatever is chosen, that contract stands: a review happens, every blocking finding carries a `P0`–`P3`
|
|
65
|
+
severity, and a `FAIL` writes a finding before the loopback.
|
|
66
|
+
|
|
67
|
+
## Step 3 — Standards source
|
|
68
|
+
|
|
69
|
+
`context/standards/` ships with a bundled default. Ask whether that is right for this project.
|
|
70
|
+
|
|
71
|
+
- **Keep it** — nothing to do. It stays tool-owned and updates with the tool.
|
|
72
|
+
- **Swap it** — the user gives a git URL, and the swap is
|
|
73
|
+
`npx @baldurpan/create-ai-workflow standards add <git-url>`. Tell them that command rather than cloning
|
|
74
|
+
it yourself: it validates that the tree has a usable conditional-loading table, and whatever lands
|
|
75
|
+
becomes project-owned from that point.
|
|
76
|
+
|
|
77
|
+
Say plainly what the default is and that a wrong set is not inert — agents load from that README's
|
|
78
|
+
conditional table unprompted, on every task.
|
|
79
|
+
|
|
80
|
+
## Step 4 — Verification commands
|
|
81
|
+
|
|
82
|
+
**This is the most valuable step in this command.** Do it properly.
|
|
83
|
+
|
|
84
|
+
1. **Propose candidates.** Read `package.json` scripts, or the stack's equivalent — `Makefile`,
|
|
85
|
+
`composer.json`, `pyproject.toml`, `Cargo.toml`, the CI workflow. The CI config is the best source
|
|
86
|
+
available: it lists commands that demonstrably run in a clean checkout.
|
|
87
|
+
2. **Show the candidates and ask** which belong in Lint, Typecheck, Build and Test, and whether anything is
|
|
88
|
+
missing. Ask about prerequisites too — a package manager version, an install step, a service that must
|
|
89
|
+
be up.
|
|
90
|
+
3. **Run each one.** Actually run it, from the repo root.
|
|
91
|
+
4. **Write only the commands that exited 0.** For each one that failed, show the output and ask: fix it,
|
|
92
|
+
replace it, or leave that section empty. **Never write a command that has not passed.** An empty section
|
|
93
|
+
is skipped by Gate 1 and says so; a wrong command fails a gate on every task until someone notices.
|
|
94
|
+
5. Put anything that needs Docker, a cloud account or a deploy target under **Not run by Gate 1**, so
|
|
95
|
+
nobody promotes it into a gate section by mistake.
|
|
96
|
+
|
|
97
|
+
Explain what you are doing: this turns `verify.md` from someone's guess into something verified at install
|
|
98
|
+
time, which is the one moment it is cheap to catch.
|
|
99
|
+
|
|
100
|
+
## Step 5 — Stack
|
|
101
|
+
|
|
102
|
+
A few questions, then write `context/stack.md`:
|
|
103
|
+
|
|
104
|
+
- What does this project do, in a paragraph — and anything about its history that explains its shape.
|
|
105
|
+
- Runtime, package manager, database, storage, hosting.
|
|
106
|
+
- The directories that matter, one line each.
|
|
107
|
+
- **The conventions that would not be guessed** — what breaks in this runtime, what is deliberately kept
|
|
108
|
+
separate, where local secrets live, what must never be run against production. This section is the one
|
|
109
|
+
that earns its keep; the rest is discoverable.
|
|
110
|
+
|
|
111
|
+
Point out that anything else added under `context/` should be indexed in `stack.md`, not in
|
|
112
|
+
`context/README.md`, which is tool-owned and replaced on update.
|
|
113
|
+
|
|
114
|
+
## Rules
|
|
115
|
+
|
|
116
|
+
- **Never write a credential.** Write `$SENTRY_DSN`-style placeholders and name where the real value lives
|
|
117
|
+
— this command collects shell commands, which is the most likely place a token appears inline. See the
|
|
118
|
+
standing rule in [`context/workflow.md`](../../../context/workflow.md).
|
|
119
|
+
- **Never write a command you have not run.**
|
|
120
|
+
- **Never touch a tool-owned file.** `README.md`, `workflow.md`, `plan-template*.md` and `roles/` are
|
|
121
|
+
replaced on the next update; an edit there is an edit lost.
|
|
122
|
+
- **Do not commit.**
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrate
|
|
3
|
+
description: "Run one ad-hoc, commit-sized change through the same verification and review gates the feature loop uses, without a roadmap entry or a phase ledger. Explicit invocation only — run this when the user types /orchestrate. Do NOT match on 'build X', 'implement X', 'orchestrate the work', or any request that belongs to a planned feature."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /orchestrate
|
|
7
|
+
|
|
8
|
+
A gated one-shot pass over a scope you name. No roadmap entry, no ledger, **no tier boundary crossed.**
|
|
9
|
+
|
|
10
|
+
It exists because the valuable part of the loop is the **gate machinery** — Gate 1 reading `verify.md`,
|
|
11
|
+
Gate 2's reviewer, failures landing in `findings.md` before the loopback — and that is worth having for
|
|
12
|
+
unplanned work too, arguably most of all, since that is where fixes get cowboyed. Without it, the only
|
|
13
|
+
route to a verified, reviewed change is to file a roadmap entry, and people will route around the workflow
|
|
14
|
+
for small things.
|
|
15
|
+
|
|
16
|
+
Read [`context/workflow.md`](../../../context/workflow.md) for the gate contract and the feature/task rule.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
/orchestrate "<what to do>"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 0. Sweep first
|
|
25
|
+
|
|
26
|
+
Move every **closed** finding tied to `ad-hoc` out of `context/findings.md`. Those belong to no feature, so
|
|
27
|
+
nothing else would ever retire them and the file would grow forever. Say what you swept.
|
|
28
|
+
|
|
29
|
+
## 1. Refuse, before anything else
|
|
30
|
+
|
|
31
|
+
Two guards, or this becomes the way to skip planning:
|
|
32
|
+
|
|
33
|
+
1. **Refuse anything that is not commit-sized.** A commit-sized unit has one checkable outcome. A category
|
|
34
|
+
of activity ("add tests", "improve error handling", "refactor the API layer") is not one. Say what the
|
|
35
|
+
scope would need to be split into, and name `/roadmap`.
|
|
36
|
+
2. **Refuse anything an existing roadmap entry already covers.** Read `context/roadmap.md` and check. If
|
|
37
|
+
one covers it, say which, and name `/feature-plan` and `/feature-implement`.
|
|
38
|
+
|
|
39
|
+
Apply the standing test from [`context/workflow.md`](../../../context/workflow.md): *if you would want a
|
|
40
|
+
`history.md` row for it, it is a feature.* Ask that question out loud and answer it before proceeding.
|
|
41
|
+
|
|
42
|
+
A refusal here is the workflow working.
|
|
43
|
+
|
|
44
|
+
## 2. Do the work
|
|
45
|
+
|
|
46
|
+
Read `context/stack.md` and load `context/standards/README.md` per its conditional table.
|
|
47
|
+
|
|
48
|
+
Delegate to a coder per [`context/executors.md`](../../../context/executors.md) if one is configured;
|
|
49
|
+
otherwise implement in-host. The coder's system prompt is
|
|
50
|
+
[`context/roles/coder.md`](../../../context/roles/coder.md). The brief **cites paths, it does not paste
|
|
51
|
+
files.** Describe what needs to happen, never how to code it.
|
|
52
|
+
|
|
53
|
+
## 3. Gate 1 — verification
|
|
54
|
+
|
|
55
|
+
Read [`context/verify.md`](../../../context/verify.md) and run its sections in order: Lint → Typecheck →
|
|
56
|
+
Build → Test. **Never carry a copy of these commands here and never invent one.** A missing section is
|
|
57
|
+
skipped and said so, never faked. Exit 0 is the verdict regardless of summary text. If `verify.md` does not
|
|
58
|
+
exist or has no filled-in section, stop and say so. Docs-only changes run Lint plus a read of the diff.
|
|
59
|
+
|
|
60
|
+
## 4. Gate 2 — review
|
|
61
|
+
|
|
62
|
+
Dispatch per [`context/executors.md`](../../../context/executors.md). With no independent reviewer
|
|
63
|
+
configured, review the diff yourself against the standards — weaker, and **say which one you ran.**
|
|
64
|
+
|
|
65
|
+
Require concrete evidence — file paths, command output — for every verdict, and a `P0`–`P3` severity on
|
|
66
|
+
every blocking finding.
|
|
67
|
+
|
|
68
|
+
- `PASS` or `PASS WITH NOTES` → done.
|
|
69
|
+
- `FAIL` → **write it to [`context/findings.md`](../../../context/findings.md) first, then** loop back.
|
|
70
|
+
|
|
71
|
+
Findings raised here are recorded with **`Tied to: ad-hoc`**.
|
|
72
|
+
|
|
73
|
+
## 5. Loopback
|
|
74
|
+
|
|
75
|
+
Cap: **two loops per gate.** Re-brief with the prior implementation and the validator's feedback
|
|
76
|
+
**verbatim**, plus the instruction to address only the failing items, refactor nothing that passes, and
|
|
77
|
+
expand no scope.
|
|
78
|
+
|
|
79
|
+
At the cap: write a finding (`P1` for a Gate 1 cap-out), then escalate with the current state and the last
|
|
80
|
+
feedback. **Escalating is not a substitute for recording.**
|
|
81
|
+
|
|
82
|
+
## 6. Report
|
|
83
|
+
|
|
84
|
+
What changed, the Gate 1 output, the Gate 2 verdict, any loopbacks, and any findings written, closed or
|
|
85
|
+
swept — by id.
|
|
86
|
+
|
|
87
|
+
## Rules
|
|
88
|
+
|
|
89
|
+
- **No ledger row is touched.** This command has no phase and does not belong to a feature.
|
|
90
|
+
- **No roadmap entry is created, activated or retired.** If the work turns out to be a feature, stop and
|
|
91
|
+
say so; the user runs `/roadmap`.
|
|
92
|
+
- **Never skip Gate 1 to save time.** The gates are the entire reason this command exists.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: roadmap
|
|
3
|
+
description: "Print the Tier-1 feature backlog in context/roadmap.md, or append one new pending entry to it. Explicit invocation only — run this when the user types /roadmap. Do NOT match on general planning talk, 'what should we build next', or any request to design, plan, or implement a feature."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /roadmap
|
|
7
|
+
|
|
8
|
+
Maintains **Tier 1** — the backlog in `context/roadmap.md`. It never promotes anything, never writes a
|
|
9
|
+
plan, never marks anything `active`, and never removes an entry.
|
|
10
|
+
|
|
11
|
+
It *may* write a **draft** in `context/drafts/` — raw reference material the user supplied, which
|
|
12
|
+
`/feature-plan` later turns into a plan. Keep that line straight: capturing what someone told you is not
|
|
13
|
+
designing.
|
|
14
|
+
|
|
15
|
+
Read [`context/workflow.md`](../../../context/workflow.md) for the tier model.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/roadmap # print the backlog — read-only
|
|
21
|
+
/roadmap "some idea" # append one pending entry
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## No arguments — print the backlog
|
|
25
|
+
|
|
26
|
+
1. Read `context/roadmap.md`.
|
|
27
|
+
2. Print every entry: name, marker, size, the one-line why, and what its **Doc** field points at.
|
|
28
|
+
3. Say which entries have a plan (**Doc** into `plans/`) and which do not. Those are different facts from
|
|
29
|
+
the `pending`/`active` marker, and reporting them as one is the mistake the two fields exist to prevent.
|
|
30
|
+
4. If nothing is `active`, name `/feature-plan` as the way to get there. **Do not pick a candidate** — that
|
|
31
|
+
command ranks the backlog and asks.
|
|
32
|
+
|
|
33
|
+
**Do not** read a plan's ledger or report phase status. That is `/feature-status`. This command answers
|
|
34
|
+
"what is on the list", not "what is next".
|
|
35
|
+
|
|
36
|
+
## With an argument — append an entry
|
|
37
|
+
|
|
38
|
+
1. Read `context/roadmap.md` for the existing entries and the format already in the file.
|
|
39
|
+
2. **Check for an entry that already covers the idea.** If one exists, say so, show it, and stop — do not
|
|
40
|
+
add a near-duplicate. Also check `context/history.md`: an idea previously `dropped` has a recorded
|
|
41
|
+
reason, and re-proposing it needs that reason addressed, not ignored.
|
|
42
|
+
3. Derive a **kebab-case name**. It becomes the entry's identity and is what `/feature-plan`,
|
|
43
|
+
`/feature-implement` and `/feature-close` are given later, so make it specific and stable.
|
|
44
|
+
4. Append to the end of the **Features** list, matching the file's format. It is always `pending` — the
|
|
45
|
+
marker in the heading is the entry's status, and this command never sets any other value:
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
### <kebab-case-name> — `pending`
|
|
49
|
+
|
|
50
|
+
<One or two lines: the problem, or what becomes possible. Not a design.>
|
|
51
|
+
|
|
52
|
+
- **Size:** <small | medium | large> — <what drives the size, a few words>
|
|
53
|
+
- **Doc:** none yet
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
5. **If the user supplied reference material, capture it** — see below. Otherwise leave `**Doc:** none yet`.
|
|
57
|
+
6. Show the appended entry, and the draft if you wrote one, then stop.
|
|
58
|
+
|
|
59
|
+
### Capturing reference material
|
|
60
|
+
|
|
61
|
+
**Capture beats summarise.** When the user gives you more than the idea — a screenshot of documentation, a
|
|
62
|
+
pasted setup guide, a URL, an error dump, a long explanation of how they want it to work — that material
|
|
63
|
+
does not go in the entry and must not be thrown away. Write it to `context/drafts/<NAME>.md` and point the
|
|
64
|
+
entry's **Doc** field at it:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
- **Doc:** [`drafts/<NAME>.md`](drafts/<NAME>.md) — <what it is, a few words>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`drafts/` is the right directory and `plans/` is not. A draft is notes: no ledger, no template sections,
|
|
71
|
+
nothing executable. `/feature-plan` moves it into `plans/` when it writes the plan, which is also why you
|
|
72
|
+
never write directly into `plans/` from here.
|
|
73
|
+
|
|
74
|
+
What to write in it:
|
|
75
|
+
|
|
76
|
+
- **The specifics that are expensive to re-derive** — exact package names, version or compatibility
|
|
77
|
+
requirements, config keys, the shape of an API call, the wording of an error.
|
|
78
|
+
- **Where it came from, and when.** A screenshot of vendor docs on a date is worth more than the same facts
|
|
79
|
+
with no provenance, because docs move.
|
|
80
|
+
- **What it means for *this* repo.** Check the relevant config or source and say what already holds and
|
|
81
|
+
what would have to change. This is the part a screenshot cannot tell you, and the part that rots slowest.
|
|
82
|
+
- **Never transcribe a credential.** See the standing rule in
|
|
83
|
+
[`context/workflow.md`](../../../context/workflow.md): a DSN, token or key gets described and pointed at
|
|
84
|
+
the secret store, never copied into a tracked file.
|
|
85
|
+
|
|
86
|
+
Keep the entry itself one or two lines regardless.
|
|
87
|
+
|
|
88
|
+
## Rules
|
|
89
|
+
|
|
90
|
+
- **One or two lines of why. No more.** If you find yourself writing a third paragraph, that is a signal the
|
|
91
|
+
idea is ready for `/feature-plan`, not that the entry should be longer.
|
|
92
|
+
- **Never guess at a design.** The entry records that a thing is wanted, not how it would work.
|
|
93
|
+
- **Never mark anything `active`.** Only `/feature-plan --activate` and `/feature-implement` do that.
|
|
94
|
+
- **Never remove an entry.** Entries leave only via `/feature-close`, which records why. Deleting one loses
|
|
95
|
+
the reason it was dropped, which is the whole point of `history.md`.
|
|
96
|
+
- If the idea is really several ideas, say so and offer to add them as separate entries rather than writing
|
|
97
|
+
one vague entry covering all of them.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Origin of this standards tree, recorded so `update` can report when upstream has moved.
|
|
2
|
+
# Managed by @baldurpan/create-ai-workflow. Replace this whole directory with:
|
|
3
|
+
# npx @baldurpan/create-ai-workflow standards add <git-url>
|
|
4
|
+
# Vendored verbatim, with one mechanical rename: npm cannot publish a file called `.gitignore`, so it
|
|
5
|
+
# ships as `templates/_dot_gitignore` and is written back with its leading dot at install time.
|
|
6
|
+
origin=https://github.com/baldurpan/ai-engineering-standards
|
|
7
|
+
ref=dd8b7e206ff46d7555aabb2522c792d9272510b9
|
|
8
|
+
vendored=2026-05-19T22:07:27+00:00
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# AI Engineering Standards
|
|
2
|
+
|
|
3
|
+
Personal AI-native engineering standards for TypeScript and React projects. Optimized for AI agent consumption while remaining readable for humans.
|
|
4
|
+
|
|
5
|
+
**Source:** `https://github.com/baldurpan/ai-engineering-standards`
|
|
6
|
+
|
|
7
|
+
**Primary stack:** TypeScript on Node.js, React on the frontend. All standards in `philosophy/`, `typescript/`, `react/`, `architecture/`, `tooling/`, and `security/` apply to this stack.
|
|
8
|
+
|
|
9
|
+
**Secondary stack:** PHP, supported in [`php/`](php/), only when the task is explicitly PHP. Do not suggest PHP for a new project, a Node-friendly task, or a TypeScript codebase.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## For Humans — How to Use This Repo
|
|
14
|
+
|
|
15
|
+
In your project, create an `AGENTS.md` that references this repo:
|
|
16
|
+
|
|
17
|
+
```md
|
|
18
|
+
# AGENTS.md
|
|
19
|
+
|
|
20
|
+
This project follows [AI Engineering Standards](https://github.com/baldurpan/ai-engineering-standards).
|
|
21
|
+
Load that repo's `README.md` and follow its conditional-loading guidance.
|
|
22
|
+
|
|
23
|
+
## Project / Stack / Commands
|
|
24
|
+
[your project-specific content]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Copy [`templates/AGENTS.md`](templates/AGENTS.md) as a starting point. Optionally add a `CLAUDE.md` that points at your `AGENTS.md` ([`templates/CLAUDE.md`](templates/CLAUDE.md)).
|
|
28
|
+
|
|
29
|
+
Everything below this line is for the AI agent.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## For AI Agents — Standards Index
|
|
34
|
+
|
|
35
|
+
You are working inside a project that references this standards repository. Load only the sections relevant to the current task. All paths below are relative to the repository root (`https://github.com/baldurpan/ai-engineering-standards`).
|
|
36
|
+
|
|
37
|
+
### Conditional Loading
|
|
38
|
+
|
|
39
|
+
| If the task involves… | Load… |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Any task (always) | [`philosophy/ai-agent-behavior.md`](philosophy/ai-agent-behavior.md), [`philosophy/core-principles.md`](philosophy/core-principles.md) |
|
|
42
|
+
| TypeScript code | [`typescript/rules.md`](typescript/rules.md), [`typescript/anti-patterns.md`](typescript/anti-patterns.md) |
|
|
43
|
+
| Validation / schemas | [`typescript/validation.md`](typescript/validation.md), [`security/validation.md`](security/validation.md) |
|
|
44
|
+
| Naming | [`typescript/naming.md`](typescript/naming.md) |
|
|
45
|
+
| Errors | [`typescript/error-handling.md`](typescript/error-handling.md) |
|
|
46
|
+
| React components or hooks | [`react/component-design.md`](react/component-design.md), [`react/hooks.md`](react/hooks.md), [`react/use-effect.md`](react/use-effect.md) |
|
|
47
|
+
| State management | [`react/state-management.md`](react/state-management.md) |
|
|
48
|
+
| Forms | [`react/forms.md`](react/forms.md) |
|
|
49
|
+
| Accessibility | [`react/accessibility.md`](react/accessibility.md) |
|
|
50
|
+
| Performance / memoization | [`react/memoization.md`](react/memoization.md) |
|
|
51
|
+
| Error boundaries / Suspense / loading states | [`react/error-boundaries.md`](react/error-boundaries.md) |
|
|
52
|
+
| Testing | [`react/testing.md`](react/testing.md) |
|
|
53
|
+
| Refactoring | [`architecture/refactoring.md`](architecture/refactoring.md), [`philosophy/incremental-abstraction.md`](philosophy/incremental-abstraction.md) |
|
|
54
|
+
| Folder structure / new module | [`architecture/feature-driven.md`](architecture/feature-driven.md), [`architecture/folder-structure.md`](architecture/folder-structure.md), [`architecture/dependency-boundaries.md`](architecture/dependency-boundaries.md) |
|
|
55
|
+
| Shared code decisions | [`architecture/shared-code.md`](architecture/shared-code.md) |
|
|
56
|
+
| Monorepo work | [`architecture/monorepos.md`](architecture/monorepos.md) |
|
|
57
|
+
| API client / contract design | [`architecture/api-design.md`](architecture/api-design.md) |
|
|
58
|
+
| Date / time / timezone handling | [`tooling/dates.md`](tooling/dates.md) |
|
|
59
|
+
| Tooling — TanStack (overview) | [`tooling/tanstack.md`](tooling/tanstack.md) |
|
|
60
|
+
| Tooling — TanStack Router (deep) | [`tooling/tanstack-router.md`](tooling/tanstack-router.md) |
|
|
61
|
+
| Tooling — TanStack Query (deep) | [`tooling/tanstack-query.md`](tooling/tanstack-query.md) |
|
|
62
|
+
| Tooling — Vite | [`tooling/vite.md`](tooling/vite.md) |
|
|
63
|
+
| Tooling — Biome | [`tooling/biome.md`](tooling/biome.md) |
|
|
64
|
+
| Tooling — Tailwind | [`tooling/tailwind.md`](tooling/tailwind.md) |
|
|
65
|
+
| Tooling — shadcn/ui | [`tooling/shadcn.md`](tooling/shadcn.md) |
|
|
66
|
+
| Tooling — Prisma | [`tooling/prisma.md`](tooling/prisma.md) |
|
|
67
|
+
| Tooling — Nx | [`tooling/nx.md`](tooling/nx.md) |
|
|
68
|
+
| Adding a dependency | [`tooling/dependencies.md`](tooling/dependencies.md) |
|
|
69
|
+
| CI / PRs / merge strategy | [`tooling/ci.md`](tooling/ci.md) |
|
|
70
|
+
| Logging, metrics, error monitoring | [`tooling/observability.md`](tooling/observability.md) |
|
|
71
|
+
| Security — auth | [`security/auth.md`](security/auth.md) |
|
|
72
|
+
| Security — secrets | [`security/secrets.md`](security/secrets.md) |
|
|
73
|
+
| Security — API design | [`security/api-security.md`](security/api-security.md) |
|
|
74
|
+
| Concrete examples | [`examples/good/`](examples/good/), [`examples/bad/`](examples/bad/) |
|
|
75
|
+
| **Task is explicitly PHP** | [`php/README.md`](php/README.md) (load first — it has its own conditional table) |
|
|
76
|
+
|
|
77
|
+
### Repository Map
|
|
78
|
+
|
|
79
|
+
| Directory | Purpose |
|
|
80
|
+
|---|---|
|
|
81
|
+
| [`philosophy/`](philosophy/) | Core principles and AI agent behavior rules |
|
|
82
|
+
| [`typescript/`](typescript/) | TypeScript rules, anti-patterns, validation, naming, error handling |
|
|
83
|
+
| [`typescript/tsconfig/`](typescript/tsconfig/) | Reference tsconfig presets (base, React, Next.js) |
|
|
84
|
+
| [`react/`](react/) | Component design, hooks, state, forms, a11y, testing |
|
|
85
|
+
| [`architecture/`](architecture/) | Feature-driven structure, monorepos, refactoring, dependency rules |
|
|
86
|
+
| [`tooling/`](tooling/) | TanStack, Nx, Vite, Biome, Tailwind, shadcn, Prisma |
|
|
87
|
+
| [`security/`](security/) | Validation, secrets, auth, API security |
|
|
88
|
+
| [`examples/`](examples/) | Concrete good and bad code examples |
|
|
89
|
+
| [`templates/`](templates/) | Drop-in starter files — `CLAUDE.md`, `AGENTS.md`, `tsconfig.json`, `biome.json`, `eslint.config.js`, `.gitignore`, `.editorconfig`, `.nvmrc`, project README, PR template |
|
|
90
|
+
| [`php/`](php/) | **Secondary stack.** PHP standards — only when the task is explicitly PHP |
|
|
91
|
+
|
|
92
|
+
### Core Philosophy
|
|
93
|
+
|
|
94
|
+
> Prefer explicit, composable, feature-oriented architecture over generalized abstractions and centralized complexity.
|
|
95
|
+
|
|
96
|
+
See [`philosophy/core-principles.md`](philosophy/core-principles.md) for the full architectural values.
|
|
97
|
+
|
|
98
|
+
### Documentation Style
|
|
99
|
+
|
|
100
|
+
All docs are directive and concise. Expect:
|
|
101
|
+
- `## DO` / `## DO NOT` / `## PRIORITY` sections
|
|
102
|
+
- Side-by-side good and bad code examples
|
|
103
|
+
- Hierarchical headings, no prose essays
|
|
104
|
+
- Cross-references via relative links
|