Skip to content

Commit dc04a55

Browse files
chore: require issue-first workflow, remove plans directory (#76)
Closes #75 - AGENTS.md: add issue-first rule for feat/fix PRs, document label safety to avoid automation conflicts, remove plans/ references - conventions.md: add PR Workflow section with issue-first pattern and label safety guidance - .agents/README.md: remove plans/ rows - Delete .agents/plans/ (empty, redundant with GitHub Issues) Co-authored-by: Ona <no-reply@ona.com>
1 parent 20163c7 commit dc04a55

5 files changed

Lines changed: 31 additions & 7 deletions

File tree

.agents/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Agents: start with AGENTS.md, then read the relevant file here before working.
1313
| `conventions.md` | Coding patterns with examples | Before writing any new code |
1414
| `design.md` | Visual design spec — colors, typography, spacing, components, interactions | Before implementing or reviewing any UI |
1515
| `quality.md` | Quality grades per domain, known gaps | When deciding what to improve |
16-
| `plans/active/` | Current feature plans | Before picking up work |
17-
| `plans/completed/` | Done plans (context on past decisions) | When you need to understand why something was built a certain way |
1816

1917
## How Agents Should Use This
2018

@@ -23,12 +21,10 @@ Agents: start with AGENTS.md, then read the relevant file here before working.
2321
3. Read `design.md` before implementing or reviewing any UI.
2422
4. Read `conventions.md` for coding patterns and examples.
2523
5. Check `quality.md` to understand current state and known gaps.
26-
6. Check `plans/active/` for current work in progress.
2724

2825
## How to update these files
2926

3027
- `architecture.md` — update when adding new system components, changing data model, or making infrastructure decisions
3128
- `conventions.md` — update when a new coding pattern emerges that should be replicated, or when an anti-pattern is discovered
3229
- `design.md` — update when introducing a new UI pattern, component variant, or interaction pattern not covered by the existing spec
3330
- `quality.md` — updated weekly by the Automation Auditor, or manually after significant changes
34-
- Plans move from `active/` to `completed/` when all issues in the plan are closed

.agents/conventions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,29 @@ test("editor loads on page", async ({ authenticatedPage: page }) => {
373373
- Authenticated tests require `TEST_USER_EMAIL` and `TEST_USER_PASSWORD` env vars
374374
- Run before pushing: `pnpm lint && pnpm typecheck && pnpm test && pnpm test:e2e`
375375

376+
## PR Workflow
377+
378+
### Issue-first rule
379+
380+
For `feat` or `fix` PRs, create (or find) a GitHub issue before opening the PR.
381+
382+
```bash
383+
# Create the issue with status:in-progress so automations don't pick it up
384+
gh issue create --title "Short description" \
385+
--body "## Problem\n\n...\n\n## Acceptance Criteria\n\n- [ ] ..." \
386+
--label "feature,status:in-progress"
387+
388+
# Reference it in the PR description
389+
# First line of PR body: Closes #N
390+
```
391+
392+
### Label safety
393+
394+
- Use `status:in-progress` on issues you are actively working on.
395+
- Use `status:backlog` only for issues intended for automation pickup (Feature Builder, Bug Fixer).
396+
- Never label an issue `status:backlog` if you plan to work on it yourself — the Feature Builder or Bug Fixer may claim it first.
397+
- Chore PRs (metrics, docs, deps) do not require an issue.
398+
376399
## Imports
377400

378401
- Use `@/` path alias for all project imports

.agents/plans/active/.gitkeep

Whitespace-only changes.

.agents/plans/completed/.gitkeep

Whitespace-only changes.

AGENTS.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ src/components/ui/ → shadcn/ui components (do not edit)
1919
src/lib/ → Utilities, types, constants
2020
src/lib/supabase/ → Supabase clients (client.ts, server.ts, proxy.ts)
2121
supabase/migrations/ → Database migrations
22-
.agents/ → Agent knowledge base (architecture, conventions, design, plans)
22+
.agents/ → Agent knowledge base (architecture, conventions, design)
2323
.ona/ → Automation definitions and skills
2424
docs/ → Product spec, decisions
2525
metrics/ → Daily/weekly metrics snapshots
@@ -35,6 +35,7 @@ metrics/ → Daily/weekly metrics snapshots
3535
- Named exports only. No default exports.
3636
- Conventional commits: `feat|fix|chore|docs|test|refactor(scope): description`
3737
- PRs with type `feat` or `fix` must reference an issue: `Closes #N`. Chore PRs (metrics, docs, deps) do not require an issue.
38+
- **Issue-first workflow:** Before creating a `feat` or `fix` PR, create a GitHub issue first (or find an existing one). Label it `status:in-progress` immediately. Add `Closes #N` to the PR description. This prevents the PR Reviewer from blocking the merge.
3839
- Database changes require a migration: `npx supabase migration new <name>`
3940
- Environment variables: `NEXT_PUBLIC_` prefix only for browser-safe values.
4041

@@ -82,14 +83,18 @@ Issues use labels for status, priority, and flags:
8283

8384
Label lifecycle: `status:backlog``status:in-progress``status:in-review``status:done`
8485

86+
### Label rules to avoid automation conflicts
87+
88+
- `status:backlog`**only** for issues you want automations (Feature Builder, Bug Fixer) to pick up. These automations poll for `status:backlog` issues on a cron schedule.
89+
- `status:in-progress` — use when creating an issue for work you are already doing. This prevents automations from picking it up.
90+
- Never create an issue with `status:backlog` if you intend to work on it yourself — use `status:in-progress` instead.
91+
8592
## Where to Find Details
8693

8794
- Architecture and data flow: `.agents/architecture.md`
8895
- Design spec (colors, typography, spacing, components, interactions): `.agents/design.md`
8996
- Coding patterns and conventions: `.agents/conventions.md`
9097
- Quality status per domain: `.agents/quality.md`
91-
- Active plans: `.agents/plans/active/`
92-
- Completed plans: `.agents/plans/completed/`
9398
- Product specification: `docs/product-spec.md`
9499

95100
## Next.js

0 commit comments

Comments
 (0)