docs: add AGENTS.md and document issue-driven workflow
- Add AGENTS.md as the cross-agent entry point (lean; points to .gooserules and docs/AI_* for detail) - Document the Forgejo issue-driven workflow (report → triage → implement → close) and API patterns in .gooserules - Add Forgejo step to the pre-change checklist - Gitignore .forgejo-token
This commit is contained in:
parent
147d722570
commit
6a569da3b1
3 changed files with 123 additions and 2 deletions
43
.gooserules
43
.gooserules
|
|
@ -76,12 +76,51 @@ cd web/normogen-web && npm test
|
|||
- Auth: JWT with middleware on protected routes
|
||||
- Testing: cargo test, npm test, integration scripts
|
||||
|
||||
## Issue-Driven Workflow
|
||||
|
||||
The Forgejo issue tracker at `https://gitea.soliverez.com.ar/alvaro/normogen`
|
||||
is the source of truth for bugs and features. The API token lives in
|
||||
`.forgejo-token` (gitignored; never commit or echo its value).
|
||||
|
||||
### Lifecycle
|
||||
1. **Reporting** — the user files issues as they encounter bugs or conceive
|
||||
features, either directly in Forgejo or by describing them in chat (then the
|
||||
agent creates the issue). Aim for one concern per issue.
|
||||
2. **Triage** — when picking up work, the agent lists open issues
|
||||
(`GET /api/v1/repos/alvaro/normogen/issues`), reads them, asks clarifying
|
||||
questions as needed, and proposes a plan in the issue (or chat for small
|
||||
items) before writing code.
|
||||
3. **Implementation** — work in chunks tied to issues. Reference the issue
|
||||
number in branch names (`fix/123-...`, `feat/456-...`) and commit messages
|
||||
(`fix(medication): ... (#123)`). Push progress as comments on the issue for
|
||||
anything non-trivial or spanning multiple sessions.
|
||||
4. **Closure** — close the issue with a comment summarizing what was done and
|
||||
pointing at the relevant commits/PR. Don't close until the change is
|
||||
verified (tests pass) and merged/pushed.
|
||||
|
||||
### API usage patterns
|
||||
- Auth header: `Authorization: token $(cat .forgejo-token)`
|
||||
- Create issue: `POST /api/v1/repos/alvaro/normogen/issues` with JSON
|
||||
`{title, body, labels}` (labels must exist first; create via
|
||||
`POST /api/v1/repos/alvaro/normogen/labels`).
|
||||
- Add a comment: `POST /api/v1/repos/alvaro/normogen/issues/{index}/comments`
|
||||
- Close an issue: `PATCH /api/v1/repos/alvaro/normogen/issues/{index}` with
|
||||
`{"state": "closed"}` (ideally after a summary comment).
|
||||
|
||||
### Conventions
|
||||
- Use conventional-commit prefixes in titles where natural
|
||||
(`fix:`, `feat:`), but keep titles human-readable.
|
||||
- Add the `bug` / `feature` / `enhancement` label when creating issues if those
|
||||
labels exist; otherwise leave unlabelled rather than failing.
|
||||
- Never paste the token into commit messages, issue bodies, comments, or chat.
|
||||
|
||||
## Before Making Changes
|
||||
|
||||
1. Read [AI_QUICK_REFERENCE.md](docs/AI_QUICK_REFERENCE.md)
|
||||
2. Check [product/STATUS.md](docs/product/STATUS.md) for current progress
|
||||
3. Review existing code patterns
|
||||
4. Plan your approach
|
||||
3. **Check open Forgejo issues** for the current task and its discussion
|
||||
4. Review existing code patterns
|
||||
5. Plan your approach
|
||||
|
||||
## Common Workflows
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue