retro: Session 2 — Forgejo issues/milestones/project board, Gitea MCP setup

Jeff Smith 2026-04-06 16:43:09 -06:00
parent e471122c6a
commit 897e22f262
2 changed files with 84 additions and 0 deletions

83
Session2.md Normal file

@ -0,0 +1,83 @@
# Session 2
**Date:** 2026-04-06
**Focus:** Project planning infrastructure — Forgejo issues, milestones, project board, Gitea MCP setup
**Duration estimate:** ~2 hours
---
## What Was Done
### Forgejo Project Infrastructure
Created the full issue/milestone/project structure on Forgejo to track the PLAN.md roadmap:
**9 milestones** created (IDs 1119), one per phase:
- Phase 1: Confidence Tracking
- Phase 2: Survey Pass
- Phase 3: Investigation Planning
- Phase 4: External Knowledge Tools
- Phase 5: Scale-Tiered Synthesis
- Phase 6: Multi-Level Synthesis
- Phase 7: Hypothesis-Driven Synthesis
- Phase 8: Refinement Pass
- Phase 9: Dynamic Report Structure
**36 issues** created (#1#36), each with full descriptions drawn from PLAN.md:
- #1#3: Phase 1 (confidence fields, prompt updates, cache query)
- #4#7: Phase 2 (survey prompt, `_run_survey()`, wiring, size threshold)
- #8#11: Phase 3 (planning prompt, `_run_planning()`, dynamic turns, cache persistence)
- #12#17: Phase 4 (search API decision, `search.py`, package_lookup, fetch_url, ask_user, --no-external)
- #18#20: Phase 5 (tier classification, small-tier synthesis, depth prompts)
- #21#22: Phase 6 (grouping pass, two-level xlarge grouping)
- #23#24: Phase 7 (hypothesis synthesis prompt, think tool)
- #25#27: Phase 8 (refinement pass, --refine-depth, confidence prioritization)
- #28#29: Phase 9 (superset output fields, dynamic report renderer)
- #30#36: Backlog suggestions (config file, structured logging, --security, output formats, --model, watch+AI, PDF readers)
**Project board** ("Agentic Investigation Engine") created via web UI simulation (the Forgejo 9.0.3 API doesn't expose a projects endpoint). Used login session + CSRF token to POST the form directly. Board has 4 columns: Backlog / To Do / In Progress / Done. All 36 issues added to Backlog.
### Gitea MCP Setup
Discovered the official `gitea-mcp` server (v1.1.0). Installed to `~/.local/bin/gitea-mcp`. Registered globally via `claude mcp add -s user` which writes to `~/.claude.json` (not `settings.json` — important distinction). Patched env vars (`GITEA_HOST`, `GITEA_ACCESS_TOKEN`) directly into `~/.claude.json` since `claude mcp add` doesn't accept `-e KEY=value` when `--` separator is used.
Uses `forgejo_mcp_token` (the `claude-code` user's token), not the `archeious` personal token.
Confirmed working: `claude mcp list` shows `gitea: ✓ Connected`. MCP tools verified live against Forgejo.
---
## Discoveries and Observations
- Forgejo 9.0.3's REST API (`/api/v1/repos/{owner}/{repo}/projects`) returns 404 — project boards are UI-only in this version. Web simulation (login → CSRF → POST form) was the only path.
- `claude mcp add` stores config in `~/.claude.json`, not `~/.claude/settings.json`. Manually editing `settings.json` with `mcpServers` is ignored by the CLI.
- The `-e KEY=value` flag for `claude mcp add` breaks when a `--` separator is also present. Workaround: pass env vars in shell environment for the add command, then patch `~/.claude.json` directly.
- Wiki operations stay file-based (`docs/wiki/`) per CLAUDE.md — `mcp__gitea__wiki_read/write` should not be used.
---
## Decisions Made
- **forgejo_mcp_token for MCP, not archeious token** — the tfvars had a dedicated `claude-code` user token; using that keeps MCP operations under a distinct identity.
- **Backlog issues have no milestone** — the 7 "Additional Suggestions" issues (#30#36) are intentionally milestone-free so they don't inflate phase progress counts.
- **4-column board kept as-is** — Basic kanban template gave Backlog/To Do/In Progress/Done, which is better than the originally planned 3 columns.
---
## Raw Thinking
The project board issue was interesting — the API returning 404 while `has_projects: true` is a common Forgejo/Gitea gap. The web simulation approach (grab CSRF, POST form) is fragile but it worked. Worth noting that future Forgejo upgrades may expose the API properly.
The MCP setup was messier than expected. The `claude mcp add` CLI has a flag parsing quirk where `-e KEY=value` conflicts with `--` separator. This is worth documenting for future setups. The fix (patch JSON directly) works but isn't ideal.
Phase 1 (#1#3) is genuinely the right starting point — it's pure instrumentation (add fields, update a prompt, add a cache method), no behavior change, and it unlocks the confidence-aware features in Phases 5 and 8. The 3 issues are each ~1530 minute tasks, well-sized for a focused session.
The hypothesis-driven synthesis change (Phase 7, #23) is probably the highest leverage single change in the whole plan — small prompt diff, large output quality difference. Worth considering doing it earlier than Phase 7 suggests, since it doesn't depend on any prior phase.
---
## What's Next
- **Phase 1 is ready to start** — branch `feat/confidence-tracking`, work through #1#2#3 in order
- After Phase 1: Phase 2 (survey pass) is the most architecturally interesting next step
- Consider pulling Phase 7 (#23 hypothesis-driven synthesis) forward — it's self-contained and high-leverage

@ -3,6 +3,7 @@
| Session | Date | Summary | | Session | Date | Summary |
|---|---|---| |---|---|---|
| [Session 1](Session1) | 2026-04-06 | Project setup, scan improvements, Forgejo repo, wiki, development practices | | [Session 1](Session1) | 2026-04-06 | Project setup, scan improvements, Forgejo repo, wiki, development practices |
| [Session 2](Session2) | 2026-04-06 | Forgejo milestones, issues, project board (36 issues, 9 milestones), Gitea MCP setup |
--- ---