diff --git a/.gitea/ISSUE_TEMPLATE.md b/.gitea/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..a97b7b3 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE.md @@ -0,0 +1,15 @@ +## Problem + +What is broken or missing, and the evidence for it. + +## Scope + +The intended change, bounded to what one reviewed pull request can carry. + +## Acceptance Criteria + +- Observable completion criteria, each checkable on the candidate revision. + +## Dependencies + +Issues that must complete first, if any. diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..68218fe --- /dev/null +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,57 @@ +## Summary + + + +## Evidence + +- **Before:** the screenshot, output, symptom, or failing test run. +- **After:** the screenshot, output, corrected behavior, or passing test run. + + + +### Checks run + +- `the exact command already run` — observed result. + +## Documentation disposition + +updated / not_required / deferred / blocked — which one, and why in one line. + + + +## Merge Danger + +**Door:** one-way or two-way — why the change is or is not cheap to reverse. + +**Blast Radius:** the affected subsystem, consumers, or behavior. + +**Rollback:** the exact rollback path, including any state it cannot restore. + +## Reviewer prerequisites + +- Required runtime, services, credentials or profiles, operating system, + fixtures, clean-state conditions, duration, and meaningful cost; or `None`. + +## Manual Test Plan + + + +1. [ ] **Action:** the exact reviewer action, command, route, control label, + field value, or UI interaction. Put every command in a copyable fenced block. + + **Expected:** the observable evidence that the step passed, and any + condition that requires the reviewer to stop. + +## Post-Merge Cleanup + +```sh +git switch main +git pull --ff-only origin main +git branch -d ISSUE- +git push origin --delete ISSUE- +``` diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..ab03976 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +## Agent skills + +### Issue tracker + +Gitea issues, driven by the `gitea-issues` helpers. +See `docs/agents/issue-tracker.md`. + +### Domain docs + +single layout: CONTEXT.md and ADRs live per `docs/agents/domain.md`. + +### Work queue + +Priority lives in the `type/roadmap` issue's ordered queue; see `docs/agents/queue.md`. + +### Working standards + +Docs and tests are first-class artifacts; the tracker is the queue, repository +documents the durable memory. Read the issue's epic and related issues +before planning; build test-first at the spec's pre-agreed seams; record each +change's documentation disposition and the evidence behind its merge; commands +presented as runnable must be ready to run as written. See +`docs/agents/standards.md`. + +### Focused checks + +`python3 -m unittest discover -s tests -v` + +Run on the exact current head during implementation and review follow-ups; +any later change makes this evidence stale. + +### Epic gate + +`python3 -m unittest discover -s tests -v` + +The complete gate, reserved for final epic acceptance — run once on the exact +integrated commit. diff --git a/docs/agents/domain.md b/docs/agents/domain.md new file mode 100644 index 0000000..03d3484 --- /dev/null +++ b/docs/agents/domain.md @@ -0,0 +1,56 @@ +# Domain Docs + +How the engineering skills should consume this repo's domain documentation when exploring the codebase. + +## Before exploring, read these + +- **`CONTEXT.md`** at the repo root, or +- **`CONTEXT-MAP.md`** at the repo root if it exists: it points at one `CONTEXT.md` per context. Read each one relevant to the topic. +- **`docs/authoritative/adr/`**: read ADRs that touch the area you're about to work in. In multi-context repos, also check `src//docs/authoritative/adr/` for context-scoped decisions. The rest of `docs/authoritative/` holds current product design, contracts, and constraints. +- **`docs/evidence/`**: curated observations that inform a foundational design decision. Read a record when you need to understand or challenge the decision it supports; it informs that decision but never overrides the authoritative document. Its `README.md` sets what qualifies. +- **`docs/historical/`**: superseded designs, archived handoffs, and development records, including one issue's retained work under `docs/historical/issue-notes//`. Read these to understand how the project arrived at its current state — never as current behavior. + +If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The `/domain-modeling` skill (reached via `/grill-with-docs` and `/improve-codebase-architecture`) creates them lazily when terms or decisions actually get resolved; `/cleanup`-bound work moves superseded context into `docs/historical/` per `docs/agents/standards.md`. + +## File structure + +Single-context repo (most repos): + +``` +/ +├── CONTEXT.md +├── docs/ +│ ├── authoritative/adr/ +│ │ ├── 0001-event-sourced-orders.md +│ │ └── 0002-postgres-for-write-model.md +│ ├── evidence/ ← foundational design evidence +│ └── historical/issue-notes/186/ ← one issue's retained records +└── src/ +``` + +Multi-context repo (presence of `CONTEXT-MAP.md` at the root): + +``` +/ +├── CONTEXT-MAP.md +├── docs/authoritative/adr/ ← system-wide decisions +└── src/ + ├── ordering/ + │ ├── CONTEXT.md + │ └── docs/authoritative/adr/ ← context-specific decisions + └── billing/ + ├── CONTEXT.md + └── docs/authoritative/adr/ +``` + +## Use the glossary's vocabulary + +When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids. + +If the concept you need isn't in the glossary yet, that's a signal: either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/domain-modeling`). + +## Flag ADR conflicts + +If your output contradicts an existing ADR, surface it explicitly rather than silently overriding: + +> _Contradicts ADR-0007 (event-sourced orders), but worth reopening because…_ diff --git a/docs/agents/issue-board.toml b/docs/agents/issue-board.toml new file mode 100644 index 0000000..13a47bf --- /dev/null +++ b/docs/agents/issue-board.toml @@ -0,0 +1,2 @@ +[status_board] +project_id = 12 diff --git a/docs/agents/issue-tracker.md b/docs/agents/issue-tracker.md new file mode 100644 index 0000000..54ad582 --- /dev/null +++ b/docs/agents/issue-tracker.md @@ -0,0 +1,135 @@ +# Issue tracker: Gitea + +Issues, specs, and pull requests for this repo live on its Gitea host. Use the +deterministic helpers from the `gitea-issues` skill for every operation — never +hand-write API calls. Resolve `` from the installed skill path. + +## Conventions + +- **Read an issue**: `python /scripts/gitea.py issue read --issue --comments` +- **Rename an issue**: `issue update-title --issue --title "New title"` (optionally `--expected-title "Old title"` or `--expected-content-version `) +- **List issues**: `python /scripts/gitea.py issue list --state open` (add `--label` / `--exclude-label` filters, `--output json` for structure) +- **Create an issue**: `issue create --title "..." --body-file - --label status/ready-for-agent` with the body on standard input, using the `## Problem` / `## Scope` / `## Acceptance Criteria` structure +- **Comment**: `issue comment --issue --body "..."` +- **Change status**: `issue set-status --issue --status status/` +- **Edit classification**: `issue edit-labels --issue --add