Skip to content

Commit 051a714

Browse files
authored
Merge pull request #713 from terraphim/chore/gitea-workflow-docs
docs: add Gitea PageRank workflow to CLAUDE.md and AGENTS.md
2 parents 50046eb + 7598a20 commit 051a714

2 files changed

Lines changed: 174 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ yarn e2e # End-to-end tests
8888
- Never use mocks in tests
8989
- Use IDE diagnostics to find and fix errors
9090
- Always check test coverage after implementation
91-
- Keep track of all tasks in GitHub issues using the `gh` tool
92-
- Commit every change and keep GitHub issues updated with the progress using the `gh` tool
91+
- Keep track of all tasks in Gitea issues using `gitea-robot` and `tea` CLI tools (see Gitea PageRank Workflow below)
92+
- Commit every change and keep Gitea issues updated with progress using `tea comment IDX`
9393
- Use `tmux` to spin off background tasks, read their output, and drive interaction
9494
- Use `tmux` instead of `sleep` to continue working on a project and then read log output
9595

@@ -161,6 +161,92 @@ Parse: `file:line:col` → location | 💡 → how to fix | Exit 0/1 → pass/fa
161161
````
162162
Use 'bd' for task tracking
163163

164+
<!-- GITEA_PAGERANK_WORKFLOW_START -->
165+
166+
## Gitea PageRank Workflow: Task Management and Agent Coordination
167+
168+
### Single Source of Truth
169+
170+
Gitea at `https://git.terraphim.cloud` is the authoritative system for all task management. ALL agents (human and AI) MUST use gitea-robot and tea for issue tracking.
171+
172+
### Environment
173+
174+
```bash
175+
source ~/.profile # Loads GITEA_URL and GITEA_TOKEN
176+
```
177+
178+
Required env vars (set in `~/.profile`):
179+
- `GITEA_URL=https://git.terraphim.cloud`
180+
- `GITEA_TOKEN` -- API token for authentication
181+
182+
### Tools
183+
184+
- **gitea-robot** (`/home/alex/go/bin/gitea-robot`): PageRank-based issue prioritisation
185+
- **tea** (`/home/alex/go/bin/tea`): Gitea CLI for issues, comments, PRs
186+
187+
### Task Discovery and Prioritisation
188+
189+
```bash
190+
# Get issues ranked by dependency impact (highest PageRank first)
191+
gitea-robot ready --owner terraphim --repo terraphim-ai
192+
193+
# Full triage with blocked/unblocked status
194+
gitea-robot triage --owner terraphim --repo terraphim-ai
195+
196+
# View dependency graph
197+
gitea-robot graph --owner terraphim --repo terraphim-ai
198+
199+
# Add dependency: issue X is blocked by issue Y
200+
gitea-robot add-dep --owner terraphim --repo terraphim-ai --issue X --blocks Y
201+
```
202+
203+
PageRank scores reflect how many downstream issues each task unblocks. Higher score = fix first.
204+
205+
### Issue Lifecycle
206+
207+
```bash
208+
# List open issues
209+
tea issues list --repo terraphim/terraphim-ai --state open
210+
211+
# Create issue
212+
tea issues create --title "..." --repo terraphim/terraphim-ai
213+
214+
# Comment on issue (progress updates, implementation notes)
215+
tea comment IDX "progress update" --repo terraphim/terraphim-ai
216+
217+
# Close issue
218+
tea issues close IDX --repo terraphim/terraphim-ai
219+
```
220+
221+
### Agent Workflow (Mandatory for All Agents)
222+
223+
1. **Start**: `source ~/.profile` (load Gitea env vars)
224+
2. **Pick work**: `gitea-robot ready --owner terraphim --repo terraphim-ai` -- choose highest PageRank unblocked issue
225+
3. **Branch**: `git checkout -b task/IDX-short-title`
226+
4. **Implement**: TDD, commit with `Refs #IDX`
227+
5. **Update Gitea**: `tea comment IDX "Implementation complete. Summary." --repo terraphim/terraphim-ai`
228+
6. **PR**: Push branch, create PR on GitHub referencing `Refs terraphim/terraphim-ai#IDX (Gitea)`
229+
7. **Close**: `tea issues close IDX --repo terraphim/terraphim-ai` after merge
230+
231+
### Commit Message Convention
232+
233+
```
234+
feat(module): short description Refs #IDX
235+
```
236+
237+
### Model Rules for Bigbox Agents
238+
239+
Use ONLY subscription-based models:
240+
- `kimi-for-coding/k2p5` -- Moonshot subscription (implementation)
241+
- `opencode-go/minimax-m2.5` -- MiniMax subscription
242+
- `/home/alex/.local/bin/claude --model sonnet` -- Anthropic subscription (verification)
243+
- `codex` -- ChatGPT OAuth
244+
245+
**NEVER** use `opencode/` prefix (Zen pay-per-use).
246+
**NEVER** use `github-copilot/` prefix on bigbox.
247+
248+
<!-- GITEA_PAGERANK_WORKFLOW_END -->
249+
164250
## Landing the Plane (Session Completion)
165251

166252
**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.

CLAUDE.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,92 @@ Async Ecosystem
8787
- **Never use timeout command** - This command doesn't exist on macOS
8888
- **Never use mocks in tests** - Use real implementations or integration tests
8989

90+
<!-- GITEA_PAGERANK_WORKFLOW_START -->
91+
92+
## Gitea PageRank Workflow: Task Management and Agent Coordination
93+
94+
### Single Source of Truth
95+
96+
Gitea at `https://git.terraphim.cloud` is the authoritative system for all task management. ALL agents (human and AI) MUST use gitea-robot and tea for issue tracking.
97+
98+
### Environment
99+
100+
```bash
101+
source ~/.profile # Loads GITEA_URL and GITEA_TOKEN
102+
```
103+
104+
Required env vars (set in `~/.profile`):
105+
- `GITEA_URL=https://git.terraphim.cloud`
106+
- `GITEA_TOKEN` -- API token for authentication
107+
108+
### Tools
109+
110+
- **gitea-robot** (`/home/alex/go/bin/gitea-robot`): PageRank-based issue prioritisation
111+
- **tea** (`/home/alex/go/bin/tea`): Gitea CLI for issues, comments, PRs
112+
113+
### Task Discovery and Prioritisation
114+
115+
```bash
116+
# Get issues ranked by dependency impact (highest PageRank first)
117+
gitea-robot ready --owner terraphim --repo terraphim-ai
118+
119+
# Full triage with blocked/unblocked status
120+
gitea-robot triage --owner terraphim --repo terraphim-ai
121+
122+
# View dependency graph
123+
gitea-robot graph --owner terraphim --repo terraphim-ai
124+
125+
# Add dependency: issue X is blocked by issue Y
126+
gitea-robot add-dep --owner terraphim --repo terraphim-ai --issue X --blocks Y
127+
```
128+
129+
PageRank scores reflect how many downstream issues each task unblocks. Higher score = fix first.
130+
131+
### Issue Lifecycle
132+
133+
```bash
134+
# List open issues
135+
tea issues list --repo terraphim/terraphim-ai --state open
136+
137+
# Create issue
138+
tea issues create --title "..." --repo terraphim/terraphim-ai
139+
140+
# Comment on issue (progress updates, implementation notes)
141+
tea comment IDX "progress update" --repo terraphim/terraphim-ai
142+
143+
# Close issue
144+
tea issues close IDX --repo terraphim/terraphim-ai
145+
```
146+
147+
### Agent Workflow (Mandatory for All Agents)
148+
149+
1. **Start**: `source ~/.profile` (load Gitea env vars)
150+
2. **Pick work**: `gitea-robot ready --owner terraphim --repo terraphim-ai` -- choose highest PageRank unblocked issue
151+
3. **Branch**: `git checkout -b task/IDX-short-title`
152+
4. **Implement**: TDD, commit with `Refs #IDX`
153+
5. **Update Gitea**: `tea comment IDX "Implementation complete. Summary." --repo terraphim/terraphim-ai`
154+
6. **PR**: Push branch, create PR on GitHub referencing `Refs terraphim/terraphim-ai#IDX (Gitea)`
155+
7. **Close**: `tea issues close IDX --repo terraphim/terraphim-ai` after merge
156+
157+
### Commit Message Convention
158+
159+
```
160+
feat(module): short description Refs #IDX
161+
```
162+
163+
### Model Rules for Bigbox Agents
164+
165+
Use ONLY subscription-based models:
166+
- `kimi-for-coding/k2p5` -- Moonshot subscription (implementation)
167+
- `opencode-go/minimax-m2.5` -- MiniMax subscription
168+
- `/home/alex/.local/bin/claude --model sonnet` -- Anthropic subscription (verification)
169+
- `codex` -- ChatGPT OAuth
170+
171+
**NEVER** use `opencode/` prefix (Zen pay-per-use).
172+
**NEVER** use `github-copilot/` prefix on bigbox.
173+
174+
<!-- GITEA_PAGERANK_WORKFLOW_END -->
175+
90176
## Terraphim Hooks for AI Coding Agents
91177

92178
Terraphim provides hooks to automatically enforce code standards and attribution through knowledge graph-based text replacement.

0 commit comments

Comments
 (0)