summaryrefslogtreecommitdiff
path: root/SESSION_STATE.md
diff options
context:
space:
mode:
Diffstat (limited to 'SESSION_STATE.md')
-rw-r--r--SESSION_STATE.md86
1 files changed, 49 insertions, 37 deletions
diff --git a/SESSION_STATE.md b/SESSION_STATE.md
index 6d599f1..6fb8033 100644
--- a/SESSION_STATE.md
+++ b/SESSION_STATE.md
@@ -1,9 +1,9 @@
# SESSION_STATE.md
## Current Task Goal
-Add `project` field to tasks — allow tasks to carry a project label displayed in the UI.
+ADR-007 implementation: Epic→Story→Task→Subtask hierarchy, project registry, Doot integration
-## Status: COMPLETED
+## Status: IN_PROGRESS
---
@@ -11,50 +11,62 @@ Add `project` field to tasks — allow tasks to carry a project label displayed
| Step | Description | Test / Verification |
|------|-------------|---------------------|
-| 1 | Add `Project` field to `Task` struct and YAML parsing (`internal/task/task.go:77`) | `TestTask_ParseFile` (existing, passing) |
-| 2 | Add `project` column to SQLite schema and all CRUD queries (`internal/storage/db.go`) | `TestDB_*` suite in `internal/storage` — all passing |
-| 3 | Expose `project` in REST API create/list/get endpoints (`internal/api/`) | `internal/api` suite — all passing |
-| 4 | Expose `project` in CLI (`internal/cli/`) | `internal/cli` suite — all passing |
-| 5 | Display `project` badge on task cards in web UI (`web/app.js:159-163`) | Visual; `grep -n project web/app.js` confirms presence |
-
-### Commits
-```
-054ec8b feat: add Project field to Task struct and YAML parsing
-072652f feat: add project column to storage
-26dc313 feat: expose project field in API and CLI
-b838150 feat: display project field in web UI
-```
+| Phase 1 | Doot dead code removal: Bug struct, BugToAtom, bug store methods, bug handlers, bug routes, bugs.html template, TypeNote, AddMealToPlanner stub | `go test ./...` in /workspace/doot — all pass (2 pre-existing failures unrelated) |
+| Phase 2 | Claudomator project registry: `task.Project` type, storage CRUD + UpsertProject, seed.go, API endpoints (GET/POST /api/projects, GET/PUT /api/projects/{id}), legacy AgentConfig.ProjectDir/RepositoryURL/SkipPlanning fields removed, container.go fallback removed, fallbackGitInit removed, processResult changestats extraction removed (pool-side only) | `TestCreateProject`, `TestListProjects`, `TestUpdateProject`, `TestProjects_CRUD` — all pass |
---
-## Test Suite Results (2026-03-16)
+## Next Steps (Claudomator tasks created)
-```
-ok internal/api 5.664s
-ok internal/cli 6.136s
-ok internal/config 1.023s
-ok internal/notify 1.024s
-ok internal/reporter 1.017s
-ok internal/storage 1.421s
-ok internal/task 1.022s
-FAIL internal/executor 1.391s ← PRE-EXISTING failures (unrelated)
-```
+Phases 3–6 are queued as Claudomator tasks. See `ct task list` or the web UI.
-### Pre-existing failures in `internal/executor` (not caused by this feature)
+| Task ID | Phase | Status | Depends On |
+|---------|-------|--------|------------|
+| f8829d6f-b8b6-4ff2-9c1a-e55dd3ab300e | Phase 3: Stories data model | PENDING | — |
+| c8a0dc6c-0605-4acb-a789-1155ad8824cb | Phase 4: Story execution and deploy | PENDING | Phase 3 |
+| faf5a371-8f1c-46a3-bb74-b0df1f062dee | Phase 5: Story elaboration | PENDING | Phase 3 |
+| f39af70f-72c5-4ac1-9522-83c2e11b37c9 | Phase 6: Doot — Claudomator integration | PENDING | Phase 3 |
-- `TestTeardownSandbox_AutocommitsChanges` — `git log in bare repo: exit status 128`
-- `TestTeardownSandbox_BuildSuccess_ProceedsToAutocommit` — `git log in bare repo: exit status 128`
-- `TestPool_RecoverStaleRunning` — `execution status: want FAILED, got [...]`
+Instruction files: `scripts/.claude/phase{3,4,5,6}-*-instructions.txt`
-These fail on commits predating the project field feature (verified by running tests against `local/master`).
+### Phase 3: Stories data model (claudomator repo)
+- `internal/task/story.go` — Story struct + ValidStoryTransition
+- `internal/storage/db.go` — stories table + story_id on tasks, CRUD + ListTasksByStory
+- `internal/api/stories.go` — story API endpoints
+- Tests: ValidStoryTransition, CRUD, depends_on auto-wire
----
+### Phase 4: Story execution and deploy (claudomator repo, depends Phase 3)
+- `internal/executor/executor.go` — checkStoryCompletion → SHIPPABLE
+- `internal/executor/container.go` — checkout story branch after clone
+- `internal/api/stories.go` — POST /api/stories/{id}/branch
+
+### Phase 5: Story elaboration (claudomator repo, depends Phase 3)
+- `internal/api/elaborate.go` — POST /api/stories/elaborate + approve
+- SeedProjects called at server startup
-## Next Steps
-None — feature is complete. Pre-existing executor failures are tracked separately.
+### Phase 6: Doot — Claudomator integration (doot repo, depends Phase 3)
+- `internal/api/claudomator.go` — ClaudomatorClient
+- `internal/models/atom.go` — StoryToAtom, SourceClaudomator
+- `internal/handlers/atoms.go` — BuildUnifiedAtomList extended
+- `cmd/dashboard/main.go` — wire ClaudomatorURL config
---
-## Process Notes
-- Schema migration uses `ALTER TABLE tasks ADD COLUMN project TEXT` (idempotent via existing migration guard).
-- `scanTask` uses `sql.NullString` for backward compatibility with existing rows that have no project value.
+## Key Files Changed (Phases 1-2)
+
+### Claudomator
+- `internal/task/project.go` — new Project struct
+- `internal/task/task.go` — removed Agent.ProjectDir, Agent.RepositoryURL, Agent.SkipPlanning
+- `internal/storage/db.go` — projects table migration + CRUD
+- `internal/storage/seed.go` — SeedProjects upserts claudomator + nav on startup
+- `internal/api/projects.go` — project CRUD handlers
+- `internal/api/server.go` — project routes; processResult no longer extracts changestats
+- `internal/api/deployment.go` + `task_view.go` — use tk.RepositoryURL (was tk.Agent.ProjectDir)
+- `internal/executor/container.go` — fallback logic removed; requires t.RepositoryURL
+
+### Doot
+- Bug feature removed entirely (models, handlers, store, routes, template, migration)
+- `migrations/018_drop_bugs.sql` — DROP TABLE IF EXISTS bugs
+- `internal/api/interfaces.go` — AddMealToPlanner removed from PlanToEatAPI
+- `internal/api/plantoeat.go` — AddMealToPlanner stub removed
+- `internal/models/atom.go` — SourceBug, TypeBug, TypeNote, BugToAtom removed