gunk-dev/the-valley

issues.md

source7d68f2d207ddmain's published tip history
4.3 KiB · Rendered
1# Issues
2
3**Status: placeholder.** Initial framing and open questions; not yet designed in detail.
4
5This document will define a minimal issue-tracking system — bugs, feature ideas, tasks, agent prompts — that is equally consumable by humans and by AI agents. The driving constraints are: structured data (machine-queryable), git-native (no separate platform), and small (no Jira-shaped surface area).
6
7## In scope
8
9- **Data model.** What an "issue" is: fields, statuses, links, attribution.
10- **Storage.** Where issues live and how they sync.
11- **Event model.** How issue activity flows into the bus and into threads (per [feedback](./feedback.md)).
12- **Human interface.** Probably a small TUI plus a static web view generated from the structured data. Not a full PM tool.
13- **Agent interface.** Structured query and structured write. Agents must be able to ask "what's blocked on me?" and "what depends on this commit?" without scraping HTML.
14
15## Initial framing
16
17Borrow shape from beads (Steve Yegge's agent-first issue tracker):
18
19- Issues are structured data with hash-based IDs (e.g., `bd-a3f2`).
20- A dependency graph with typed links: `blocks`, `blocked-by`, `related-to`, `supersedes`, `closes`, `referenced-by`.
21- Status is explicit and bounded: `open`, `in-progress`, `blocked`, `resolved`, `won't-fix`, etc.
22- Issues hold the *minimum* metadata: title, body (markdown), status, links, owner (optional), labels (optional), attestable activity log.
23
24Divergences from beads:
25
26- **No Dolt dependency.** Issues are just git-tracked data — JSONL files in a `.the-valley/issues/` directory, or content-addressed blobs under a `refs/the-valley/issues/*` namespace. Structured queries are over the JSONL or a periodically-rebuilt index.
27- **First-class on the bus.** Issue events (`issue-opened`, `issue-commented`, `issue-status-changed`, `issue-linked`) flow into the same event substrate as code events. Threads can scope to an issue exactly as they scope to a commit or a change.
28- **Attribution via attestation, not just commit messages.** A commit's attestation can include a `closes: [bd-a3f2, bd-9c1d]` field; the integrator's success event triggers the issue's status transition.
29
30## Why git-native + structured + event-driven
31
32- **Distributable.** Clone the repo and you have the issues. No platform API to scrape, no migration story when changing forges.
33- **Auditable.** Issue history is git history. Forensics work the same way as for code.
34- **Equally usable by humans and agents.** Same data, two interfaces. Agents query JSONL or the bus; humans use a TUI or web view over the same files. No "official" interface that agents have to scrape.
35- **Composable with the rest of the architecture.** Issues participate in threads, attestations, integrator events, the priority router — same machinery.
36
37## Open questions
38
39- **Identity for issue authors.** Same SSH keys as for commits, presumably. A `signed comment` is just a signed JSON object.
40- **Body storage.** Markdown inline in the JSON, or as separate content-addressed blobs referenced by hash? Inline is simpler; blob is cleaner for large bodies and binary attachments.
41- **Cross-repo issues.** A bug in `repo-a` blocking work in `repo-b`. Defer: v1 is per-repo; cross-repo linking can come later via stable issue IDs that include a repo namespace.
42- **Search and indexing.** Terminal grep over JSONL works at small scale. For larger scale, a periodically-rebuilt SQLite or similar, treated as a derived projection (rebuildable from the source-of-truth JSONL).
43- **Agent-author etiquette.** When an agent files an issue from observation (e.g., "I noticed test X is flaky"), it should attest its identity and its source signal. Probably the same attestation machinery as for commits.
44- **Notifications and routing.** Issue events feed the priority router exactly as other events do. The "I'm watching this issue" semantics are subscriptions on the bus, not a separate watchlist table.
45- **Migration from existing trackers.** GitHub Issues, Linear, etc. Out of scope for v1; doable later via importer that emits historical events.
46- **Beads compatibility.** If we use beads' field shape (hash IDs, link types), an agent fluent in beads is fluent in this system with no retraining. Worth deliberately staying compatible at the data-model level even if we don't depend on the beads binary.