335b0bbd54
Replace fetch_issue.py with four scripts around a flat, greppable cache in tmp/issues/. Planning stays offline and issues reach Gitea in one push: - issue_get.py: fetch by key or by filter (--milestone/--label/-q). The list endpoint carries issue bodies, so a whole milestone costs one request per 50 issues. Gitea silently ignores an unresolvable milestones= filter and returns the entire backlog, so the milestone is resolved up front and every returned issue is re-checked locally. --deps walks the dependency graph downwards via the structured sections plus native dependencies and writes tree-<slug>.md. - issue_push.py: validate a local draft against the canonical format, create missing labels with the right colors and exclusivity, POST, delete the draft. - issue_list.py: discovery to stdout, writes nothing. - issue_index.py: rebuild INDEX.md from what is on disk. Files use one metadata field per line with inline lists so plain grep works without a parser. This is a cache and a drafting area, not a mirror: no drift tracking, no sync back. Projects are not fetchable — the projects API is 404 on Gitea 1.26; documented alongside the milestone caveat. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
AGENTS.md
Project goals
- Unify and systematize issue workflow for the development team with minimal context usage. Issue operations (create, fetch, format) are wrapped in scripts so agents spend tokens on the task, not on re-deriving commands and formats.
- Route all Gitea interaction through the
teaCLI via scripts instead of direct ad-hoc calls wherever possible. Scripts give deterministic, reviewable behavior; thetea-guardhook enforces that everyteainvocation runs under the operator-pinned login.
Repo layout
skills/auth— pin the Gitea login used bytea(/tea:auth)skills/use—teaCLI reference, loaded on demand (/tea:use);references/holds command docs and the canonical issue format;scripts/holds the issue scripts:issue_get.py— fetch issue(s) into the local grep cachetmp/issues/, by key or by filter (--milestone,--label,-q; one request per 50 issues);--depswalks the dependency graph and writestree-<slug>.mdissue_push.py— validate a local draft, create missing labels, POST it, delete the draftissue_list.py— discovery to stdout;issue_index.py— rebuildtmp/issues/INDEX.md;_tea.py— shared login/api/format helpers
skills/issue— draft an issue locally in the canonical format, then push it (/tea:issue)
Local issue cache
tmp/issues/ (gitignored) is a cache and a drafting area, not a mirror: no
drift tracking, no sync back. Fetched issues are flat greppable markdown with
one metadata field per line; drafts live in tmp/issues/drafts/ until
issue_push.py creates them in Gitea and removes the local file.
hooks/— PreToolUse hooks:tea-guardblocks or rewritesteainvocations that don't use the pinned login;agents-synckeeps every directory canonical (AGENTS.mdreal file,CLAUDE.mdsymlink to it)