|
| 1 | +# Project scoping tasks |
| 2 | + |
| 3 | +Companion: [PRD](prd.md). All tasks are pending. Task IDs identify dependencies, |
| 4 | +not separate agent assignments. |
| 5 | + |
| 6 | +## Delivery order |
| 7 | + |
| 8 | +| Phase | Tasks | Outcome | |
| 9 | +| --- | --- | --- | |
| 10 | +| A1 | T1–T3 | Complete ownership, Personal migration, and operations bound to their originating project. | |
| 11 | +| A2 | T4–T7 | Project selection, isolated sessions, scoped resource surfaces, and multiple chats. | |
| 12 | +| A3 | T8–T10 | Independent copying, archive and deletion, and release verification. | |
| 13 | + |
| 14 | +## T1 — Inventory ownership and resource entry points |
| 15 | + |
| 16 | +- [ ] Enumerate document types, workflows, assets and folders, entities, |
| 17 | + workspace files, threads, runs, and outputs. Record storage, ownership, |
| 18 | + references, creation paths, list/search paths, and deletion behavior. |
| 19 | +- [ ] Cover web, Electron renderer, API, agent tools, background jobs, and |
| 20 | + existing mobile consumers of affected contracts. |
| 21 | +- [ ] Classify each resource as project-owned or explicitly global using D3 |
| 22 | + and D5. Identify gaps beyond the existing project summary union. |
| 23 | +- [ ] Resolve legacy cross-project references and dependency-copy coverage |
| 24 | + (Q10, Q11), and identify existing move behavior needing constraints (Q13). |
| 25 | + |
| 26 | +Depends on: none. |
| 27 | + |
| 28 | +Acceptance: a concrete file and entry-point inventory supports AC11. Every |
| 29 | +project-owned type has a planned owner, migration path, and resource boundary. |
| 30 | + |
| 31 | +## T2 — Complete project ownership and Personal migration |
| 32 | + |
| 33 | +- [ ] Add missing ownership fields and protocol contracts for the T1 inventory. |
| 34 | + Keep backend schemas and supported database variants consistent. |
| 35 | +- [ ] Create or resolve one permanent Personal space per resource owner. |
| 36 | +- [ ] Implement an idempotent, restartable migration of unassigned resources. |
| 37 | + Preserve existing assignments, IDs, content, and references. |
| 38 | +- [ ] Preserve access to existing tabs and threads after migration. Handle |
| 39 | + malformed or dangling legacy membership explicitly without silently |
| 40 | + moving valid assigned resources. |
| 41 | +- [ ] Add scoped model operations and project ownership validation. Preserve |
| 42 | + compatibility of existing resource operations during rollout. |
| 43 | + |
| 44 | +Depends on: T1. |
| 45 | + |
| 46 | +Acceptance: AC8 and ownership portions of AC4/AC11. Verify empty accounts, |
| 47 | +mixed assigned/unassigned content, repeat startup, and interrupted migration. |
| 48 | + |
| 49 | +## T3 — Bind creation and execution to the originating project |
| 50 | + |
| 51 | +- [ ] Carry project identity through document creation, imports, uploads, |
| 52 | + generation requests, runs, and agent sessions. |
| 53 | +- [ ] Capture scope when work starts. Persist enough context for delayed |
| 54 | + completions and retries to use the original project. |
| 55 | +- [ ] Scope agent resource operations through backend contracts rather than |
| 56 | + relying on prompts or the foreground tab. |
| 57 | +- [ ] Apply project file ownership through the workspace interface on local |
| 58 | + and virtual storage. Keep global prerequisites outside project storage. |
| 59 | +- [ ] Expose project-attributed activity for the selector and navigation back |
| 60 | + to running work. |
| 61 | + |
| 62 | +Depends on: T2. |
| 63 | + |
| 64 | +Acceptance: AC4, AC5, and AC11. Start work in A, switch to B before completion, |
| 65 | +and verify writes and resource reads still belong to A. |
| 66 | + |
| 67 | +## T4 — Persist separate project sessions |
| 68 | + |
| 69 | +- [ ] Store each project's open tabs, order, active document, and selected |
| 70 | + chat independently from its full resource list. |
| 71 | +- [ ] Switch sessions without discarding drafts or reopening every document. |
| 72 | +- [ ] Define first-open overview, empty-tab state, restart restoration, and |
| 73 | + Personal fallback. |
| 74 | +- [ ] Reconcile deleted or unavailable documents without changing another |
| 75 | + project's saved session. Migrate existing persisted tab state. |
| 76 | +- [ ] Make rapid switches and failed loads leave one consistent active scope. |
| 77 | + |
| 78 | +Depends on: T2. |
| 79 | + |
| 80 | +Acceptance: AC1, AC2, and session portions of AC10. Verify switching with dirty |
| 81 | +editors and restart with multiple saved project sessions. |
| 82 | + |
| 83 | +## T5 — Put project selection above the tabs |
| 84 | + |
| 85 | +- [ ] Replace the tab-group scope control with a persistent top-level selector. |
| 86 | + Add project search, creation, management access, and Personal. |
| 87 | +- [ ] Render only the selected project's tabs and project navigation. |
| 88 | +- [ ] Show activity from T3 and link it to the owning project's work. |
| 89 | +- [ ] Resolve direct document links to their owning project before opening. |
| 90 | +- [ ] Cover loading, failure, empty project, keyboard navigation, narrow |
| 91 | + layouts, and Electron window controls using existing UI primitives. |
| 92 | + |
| 93 | +Depends on: T3, T4. |
| 94 | + |
| 95 | +Acceptance: D1, AC2, AC5, and AC10. Project identity remains visible and agrees |
| 96 | +with the tabs and content during every navigation transition. |
| 97 | + |
| 98 | +## T6 — Scope resource browsing and selection |
| 99 | + |
| 100 | +- [ ] Apply project scope to every T1 list, search, folder browser, asset |
| 101 | + picker, entity picker, mention source, and project overview resource type. |
| 102 | +- [ ] Include project identity in query/cache and selection state where |
| 103 | + required. Clear or restore panel state when switching projects. |
| 104 | +- [ ] Keep explicitly global resources available with clear scope. |
| 105 | +- [ ] Ensure entity membership and its backing/reference assets follow the |
| 106 | + agreed ownership and migration rules. |
| 107 | + |
| 108 | +Depends on: T2, T3, T5. |
| 109 | + |
| 110 | +Acceptance: AC3 and AC11. Fixtures with identically named resources in A and B |
| 111 | +prove that browsing, selection, and mentions resolve the intended resource. |
| 112 | + |
| 113 | +## T7 — Support multiple chat threads per project |
| 114 | + |
| 115 | +- [ ] Replace the single-thread assumption with project-owned thread listing, |
| 116 | + creation, selection, and history loading. |
| 117 | +- [ ] Preserve existing project conversations through migration. |
| 118 | +- [ ] Supply project context to new threads without merging thread histories. |
| 119 | +- [ ] Restore the selected chat through T4 and retain the thread's project |
| 120 | + identity through background agent turns. |
| 121 | + |
| 122 | +Depends on: T3, T4, T5. |
| 123 | + |
| 124 | +Acceptance: AC6 and chat portions of AC1/AC5. Two threads in A and one in B |
| 125 | +retain their histories, selected state, and correct resource access. |
| 126 | + |
| 127 | +## T8 — Copy documents with independent dependencies |
| 128 | + |
| 129 | +- [ ] Implement destination selection and dependency discovery from the T1 |
| 130 | + reference inventory. Resolve Q11 and Q13 before finalizing behavior. |
| 131 | +- [ ] Copy required assets and entities, assign destination ownership, and |
| 132 | + remap references. Handle repeated references and cycles without |
| 133 | + duplicating the same dependency within one operation. |
| 134 | +- [ ] Preserve independent lifetimes even if immutable storage bytes are |
| 135 | + internally deduplicated. Source deletion must not remove copied media. |
| 136 | +- [ ] Define failure and retry behavior so incomplete copies are not presented |
| 137 | + as successful. Report unavailable or unsupported dependencies clearly. |
| 138 | +- [ ] Verify dependency traversal on a large resource graph. |
| 139 | + |
| 140 | +Depends on: T3, T6. |
| 141 | + |
| 142 | +Acceptance: AC7. Edit destination copies and delete the source project, then |
| 143 | +open and use the destination document with its assets and entities intact. |
| 144 | + |
| 145 | +## T9 — Archive and delete projects |
| 146 | + |
| 147 | +- [ ] Add archive and restore actions plus archived-project discovery. |
| 148 | +- [ ] Add confirmation naming the project and explaining content deletion. |
| 149 | +- [ ] Replace the existing return-to-unassigned deletion behavior with the |
| 150 | + agreed content deletion behavior for the complete T1 inventory. |
| 151 | +- [ ] Protect Personal from deletion through both UI and backend operations. |
| 152 | +- [ ] Resolve Q12 and prevent active jobs, delayed responses, and retries from |
| 153 | + writing into a deleted project. |
| 154 | +- [ ] Reconcile selected project, sessions, and caches after deletion. Preserve |
| 155 | + independent copies and global resources. |
| 156 | + |
| 157 | +Depends on: T5, T7, T8. |
| 158 | + |
| 159 | +Acceptance: AC9 and deletion portion of AC7. Include deletion with active work, |
| 160 | +repeated deletion requests, and attempts to delete Personal. |
| 161 | + |
| 162 | +## T10 — Verify the complete project experience |
| 163 | + |
| 164 | +- [ ] Map every PRD acceptance criterion to a deterministic check or an |
| 165 | + explicit UI walkthrough. Extend the existing relevant verification |
| 166 | + surfaces and registry where needed. |
| 167 | +- [ ] Run the A/B scenario: restore A's tabs and chat, start work in A, switch |
| 168 | + to B and upload, return to A, and verify session and output ownership. |
| 169 | +- [ ] Verify migration, dependency copying followed by source deletion, |
| 170 | + archive/restore, direct links, rapid switching, and failed requests. |
| 171 | +- [ ] Check the final resource inventory for omitted types and entry points. |
| 172 | +- [ ] Perform web and Electron UI checks, including keyboard operation and |
| 173 | + narrow layouts. Verify affected mobile contracts retain ownership |
| 174 | + behavior without expanding this into a mobile navigation redesign. |
| 175 | + |
| 176 | +Depends on: T6, T7, T8, T9. |
| 177 | + |
| 178 | +Acceptance: AC1–AC11 have recorded evidence. Unresolved implementation |
| 179 | +questions are closed or explicitly returned for product decision before release. |
| 180 | + |
| 181 | +## Verification for implementation changes |
| 182 | + |
| 183 | +After each code change, run the repository's required checks: |
| 184 | + |
| 185 | +```bash |
| 186 | +npm run test:affected |
| 187 | +npm run typecheck |
| 188 | +npm run lint |
| 189 | +npm run dev:nodetool -- harness gate --base origin/main |
| 190 | +``` |
| 191 | + |
| 192 | +Use meaningful regression fixtures for the boundaries each task changes. |
| 193 | +Prove any new validator can fail with a deliberately invalid fixture, and |
| 194 | +verify inventories contain actual entries. Follow the repository's additional |
| 195 | +requirements when a change crosses a dependency seam its affected-test |
| 196 | +selection cannot detect. |
0 commit comments