diff --git a/docs/superpowers/plans/2026-04-13-orchai-phase1-foundation.md b/docs/superpowers/plans/2026-04-13-orchai-phase1-foundation.md index 4bbe356..2f6ab16 100644 --- a/docs/superpowers/plans/2026-04-13-orchai-phase1-foundation.md +++ b/docs/superpowers/plans/2026-04-13-orchai-phase1-foundation.md @@ -1,6 +1,6 @@ # Orchai Phase 1: Foundation Implementation Plan -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [x]`) syntax for tracking. **Goal:** Get a working Tauri 2 desktop app with SQLite storage and full Project CRUD (create from local path or clone URL, list, edit, delete) with a React UI. @@ -78,7 +78,7 @@ orchai/ - Create: entire project scaffold via CLI - Preserve: `docs/`, `.git/` -- [ ] **Step 1: Save existing repo contents** +- [x] **Step 1: Save existing repo contents** ```bash cd /home/leclere/Projets @@ -86,7 +86,7 @@ cp -r orchai/docs /tmp/orchai-docs-backup cp -r orchai/.git /tmp/orchai-git-backup ``` -- [ ] **Step 2: Scaffold Tauri 2 project** +- [x] **Step 2: Scaffold Tauri 2 project** ```bash cd /home/leclere/Projets @@ -102,7 +102,7 @@ When prompted, select: - UI template: `React` - UI flavor: `TypeScript` -- [ ] **Step 3: Restore repo history and docs** +- [x] **Step 3: Restore repo history and docs** ```bash cd /home/leclere/Projets/orchai @@ -112,7 +112,7 @@ cp -r /tmp/orchai-docs-backup docs rm -rf /tmp/orchai-docs-backup /tmp/orchai-git-backup ``` -- [ ] **Step 4: Install dependencies and verify** +- [x] **Step 4: Install dependencies and verify** ```bash cd /home/leclere/Projets/orchai @@ -123,7 +123,7 @@ cd .. Expected: build succeeds with no errors. -- [ ] **Step 5: Verify dev server starts** +- [x] **Step 5: Verify dev server starts** ```bash npm run tauri dev @@ -131,7 +131,7 @@ npm run tauri dev Expected: Tauri window opens with the default React starter page. Close it after verifying. -- [ ] **Step 6: Commit** +- [x] **Step 6: Commit** ```bash git add -A @@ -147,14 +147,14 @@ git commit -m "scaffold: Tauri 2 + React + TypeScript via create-tauri-app" - Modify: `src/index.css`, `package.json`, `src-tauri/tauri.conf.json` - Delete: `src/App.css` -- [ ] **Step 1: Install Tailwind** +- [x] **Step 1: Install Tailwind** ```bash cd /home/leclere/Projets/orchai npm install -D tailwindcss @tailwindcss/vite ``` -- [ ] **Step 2: Add Tailwind to Vite config** +- [x] **Step 2: Add Tailwind to Vite config** Replace the contents of `vite.config.ts`: @@ -186,7 +186,7 @@ export default defineConfig(async () => ({ })); ``` -- [ ] **Step 3: Replace index.css with Tailwind directives** +- [x] **Step 3: Replace index.css with Tailwind directives** Replace the contents of `src/index.css`: @@ -194,7 +194,7 @@ Replace the contents of `src/index.css`: @import "tailwindcss"; ``` -- [ ] **Step 4: Delete App.css and clean up App.tsx** +- [x] **Step 4: Delete App.css and clean up App.tsx** Delete `src/App.css`. @@ -212,7 +212,7 @@ function App() { export default App; ``` -- [ ] **Step 5: Update Tauri config** +- [x] **Step 5: Update Tauri config** In `src-tauri/tauri.conf.json`, update the `app` section: @@ -244,7 +244,7 @@ In `src-tauri/tauri.conf.json`, update the `app` section: } ``` -- [ ] **Step 6: Verify Tailwind works** +- [x] **Step 6: Verify Tailwind works** ```bash npm run tauri dev @@ -252,7 +252,7 @@ npm run tauri dev Expected: window opens, "Orchai" heading rendered with Tailwind styling (bold, large). Close after verifying. -- [ ] **Step 7: Commit** +- [x] **Step 7: Commit** ```bash git add -A @@ -270,7 +270,7 @@ git commit -m "configure: Tailwind CSS + app metadata" - Create: `src-tauri/src/error.rs` - Modify: `src-tauri/src/lib.rs` -- [ ] **Step 1: Write the failing test for db initialization** +- [x] **Step 1: Write the failing test for db initialization** Add dependencies to `src-tauri/Cargo.toml` under `[dependencies]`: @@ -344,7 +344,7 @@ mod tests { } ``` -- [ ] **Step 2: Run tests to verify they fail** +- [x] **Step 2: Run tests to verify they fail** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -353,7 +353,7 @@ cargo test db::tests Expected: 3 failures with `not yet implemented`. -- [ ] **Step 3: Create migration SQL** +- [x] **Step 3: Create migration SQL** Create `src-tauri/migrations/001_init.sql`: @@ -421,7 +421,7 @@ CREATE TABLE IF NOT EXISTS notifications ( ); ``` -- [ ] **Step 4: Implement db::init and db::init_in_memory** +- [x] **Step 4: Implement db::init and db::init_in_memory** Replace the `todo!()` implementations in `src-tauri/src/db.rs`: @@ -463,7 +463,7 @@ fn migrate(conn: &Connection) -> Result<()> { } ``` -- [ ] **Step 5: Run tests to verify they pass** +- [x] **Step 5: Run tests to verify they pass** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -489,7 +489,7 @@ Replace the WAL test assertion: Re-run tests. Expected: 3 pass. -- [ ] **Step 6: Create error type** +- [x] **Step 6: Create error type** Create `src-tauri/src/error.rs`: @@ -530,7 +530,7 @@ impl std::fmt::Display for AppError { } ``` -- [ ] **Step 7: Wire up db module in lib.rs** +- [x] **Step 7: Wire up db module in lib.rs** Replace `src-tauri/src/lib.rs`: @@ -562,7 +562,7 @@ pub fn run() { } ``` -- [ ] **Step 8: Verify it compiles and runs** +- [x] **Step 8: Verify it compiles and runs** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -571,7 +571,7 @@ cargo build Expected: compiles with no errors. -- [ ] **Step 9: Commit** +- [x] **Step 9: Commit** ```bash git add -A @@ -587,7 +587,7 @@ git commit -m "feat: SQLite database with migration system and full schema" - Create: `src-tauri/src/models/project.rs` - Modify: `src-tauri/src/lib.rs` (add `mod models`) -- [ ] **Step 1: Write failing tests for Project CRUD** +- [x] **Step 1: Write failing tests for Project CRUD** Create `src-tauri/src/models/mod.rs`: @@ -740,7 +740,7 @@ mod tests { Add `mod models;` to `src-tauri/src/lib.rs` (after `mod error;`). -- [ ] **Step 2: Run tests to verify they fail** +- [x] **Step 2: Run tests to verify they fail** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -749,7 +749,7 @@ cargo test models::project::tests Expected: 8 failures with `not yet implemented`. -- [ ] **Step 3: Implement Project CRUD** +- [x] **Step 3: Implement Project CRUD** Replace the `todo!()` implementations in `src-tauri/src/models/project.rs`: @@ -833,7 +833,7 @@ Add the missing imports at the top of the file: use chrono; ``` -- [ ] **Step 4: Run tests to verify they pass** +- [x] **Step 4: Run tests to verify they pass** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -842,7 +842,7 @@ cargo test models::project::tests Expected: 8 tests pass. -- [ ] **Step 5: Commit** +- [x] **Step 5: Commit** ```bash git add -A @@ -859,7 +859,7 @@ git commit -m "feat: Project model with CRUD operations and tests" - Modify: `src-tauri/src/lib.rs` - Modify: `src-tauri/Cargo.toml` (add tauri-plugin-dialog) -- [ ] **Step 1: Add dialog plugin dependency** +- [x] **Step 1: Add dialog plugin dependency** Add to `src-tauri/Cargo.toml` under `[dependencies]`: @@ -873,7 +873,7 @@ Add to the `capabilities/default.json` permissions array: "dialog:default" ``` -- [ ] **Step 2: Create commands module** +- [x] **Step 2: Create commands module** Create `src-tauri/src/commands/mod.rs`: @@ -966,7 +966,7 @@ pub fn delete_project(state: State<'_, AppState>, id: String) -> Result<(), AppE } ``` -- [ ] **Step 3: Add `dirs` dependency** +- [x] **Step 3: Add `dirs` dependency** Add to `src-tauri/Cargo.toml` under `[dependencies]`: @@ -974,7 +974,7 @@ Add to `src-tauri/Cargo.toml` under `[dependencies]`: dirs = "5" ``` -- [ ] **Step 4: Wire up commands in lib.rs** +- [x] **Step 4: Wire up commands in lib.rs** Replace `src-tauri/src/lib.rs`: @@ -1016,7 +1016,7 @@ pub fn run() { } ``` -- [ ] **Step 5: Verify it compiles** +- [x] **Step 5: Verify it compiles** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -1025,7 +1025,7 @@ cargo build Expected: compiles with no errors. -- [ ] **Step 6: Commit** +- [x] **Step 6: Commit** ```bash git add -A @@ -1040,7 +1040,7 @@ git commit -m "feat: Tauri commands for project CRUD with git clone support" - Create: `src/lib/types.ts` - Create: `src/lib/api.ts` -- [ ] **Step 1: Install frontend dependencies** +- [x] **Step 1: Install frontend dependencies** ```bash cd /home/leclere/Projets/orchai @@ -1048,7 +1048,7 @@ npm install react-router-dom npm install @tauri-apps/plugin-dialog ``` -- [ ] **Step 2: Create TypeScript types** +- [x] **Step 2: Create TypeScript types** Create `src/lib/types.ts`: @@ -1063,7 +1063,7 @@ export interface Project { } ``` -- [ ] **Step 3: Create API wrapper** +- [x] **Step 3: Create API wrapper** Create `src/lib/api.ts`: @@ -1104,7 +1104,7 @@ export async function deleteProject(id: string): Promise { } ``` -- [ ] **Step 4: Commit** +- [x] **Step 4: Commit** ```bash git add -A @@ -1120,7 +1120,7 @@ git commit -m "feat: TypeScript types and Tauri API wrappers for project CRUD" - Create: `src/components/layout/AppLayout.tsx` - Create: `src/components/layout/Sidebar.tsx` -- [ ] **Step 1: Create Sidebar component** +- [x] **Step 1: Create Sidebar component** Create directory structure: @@ -1196,7 +1196,7 @@ export default function Sidebar() { } ``` -- [ ] **Step 2: Create AppLayout component** +- [x] **Step 2: Create AppLayout component** Create `src/components/layout/AppLayout.tsx`: @@ -1216,7 +1216,7 @@ export default function AppLayout() { } ``` -- [ ] **Step 3: Set up router in App.tsx** +- [x] **Step 3: Set up router in App.tsx** Replace `src/App.tsx`: @@ -1251,7 +1251,7 @@ function App() { export default App; ``` -- [ ] **Step 4: Verify the shell renders** +- [x] **Step 4: Verify the shell renders** ```bash npm run tauri dev @@ -1259,7 +1259,7 @@ npm run tauri dev Expected: window opens with dark sidebar on the left showing "Orchai" header, "Projects" section with "No projects yet" message, and a "+" button. Main area shows "Select a project or create a new one". Close after verifying. -- [ ] **Step 5: Commit** +- [x] **Step 5: Commit** ```bash git add -A @@ -1275,7 +1275,7 @@ git commit -m "feat: React app shell with router, sidebar layout" - Create: `src/components/projects/ProjectDashboard.tsx` - Modify: `src/App.tsx` -- [ ] **Step 1: Create ProjectForm component** +- [x] **Step 1: Create ProjectForm component** Create `src/components/projects/ProjectForm.tsx`: @@ -1456,7 +1456,7 @@ export default function ProjectForm() { } ``` -- [ ] **Step 2: Create ProjectDashboard placeholder** +- [x] **Step 2: Create ProjectDashboard placeholder** Create `src/components/projects/ProjectDashboard.tsx`: @@ -1539,7 +1539,7 @@ export default function ProjectDashboard() { } ``` -- [ ] **Step 3: Wire up routes in App.tsx** +- [x] **Step 3: Wire up routes in App.tsx** Replace `src/App.tsx`: @@ -1576,7 +1576,7 @@ function App() { export default App; ``` -- [ ] **Step 4: Verify the full flow in the browser** +- [x] **Step 4: Verify the full flow in the browser** ```bash npm run tauri dev @@ -1590,7 +1590,7 @@ Test the following: 5. Click "Edit" -- form pre-fills with project data 6. Click "Delete" -- project removed from sidebar -- [ ] **Step 5: Commit** +- [x] **Step 5: Commit** ```bash git add -A @@ -1605,7 +1605,7 @@ git commit -m "feat: project create/edit/delete UI with folder picker and git cl - Verify all tests pass - Clean up any scaffold files not needed -- [ ] **Step 1: Run all Rust tests** +- [x] **Step 1: Run all Rust tests** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -1614,7 +1614,7 @@ cargo test Expected: all tests pass (8 model tests + 3 db tests = 11 tests). -- [ ] **Step 2: Run Rust clippy** +- [x] **Step 2: Run Rust clippy** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -1623,7 +1623,7 @@ cargo clippy -- -D warnings Expected: no warnings. If there are warnings, fix them. -- [ ] **Step 3: Verify frontend builds** +- [x] **Step 3: Verify frontend builds** ```bash cd /home/leclere/Projets/orchai @@ -1632,13 +1632,13 @@ npm run build Expected: Vite build succeeds. -- [ ] **Step 4: Clean up scaffold files** +- [x] **Step 4: Clean up scaffold files** Remove any remaining scaffold assets that are not needed: - `src/assets/react.svg` (if still present) - Any other default scaffold content -- [ ] **Step 5: Final integration test** +- [x] **Step 5: Final integration test** ```bash npm run tauri dev @@ -1652,7 +1652,7 @@ Test the complete flow one more time: 5. Delete the project 6. Verify sidebar is empty again -- [ ] **Step 6: Commit** +- [x] **Step 6: Commit** ```bash git add -A diff --git a/docs/superpowers/plans/2026-04-13-orchai-phase2-tuleap-integration.md b/docs/superpowers/plans/2026-04-13-orchai-phase2-tuleap-integration.md index 55499b0..f28289d 100644 --- a/docs/superpowers/plans/2026-04-13-orchai-phase2-tuleap-integration.md +++ b/docs/superpowers/plans/2026-04-13-orchai-phase2-tuleap-integration.md @@ -1,6 +1,6 @@ # Orchai Phase 2: Tuleap Integration Implementation Plan -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [x]`) syntax for tracking. **Goal:** Connect Orchai to Tuleap -- store credentials securely, configure watched trackers with AND/OR filters, poll for new tickets on a timer, and detect new artifacts. @@ -77,7 +77,7 @@ src/ - Modify: `src-tauri/src/error.rs` - Modify: `src-tauri/src/lib.rs` -- [ ] **Step 1: Add dependencies to Cargo.toml** +- [x] **Step 1: Add dependencies to Cargo.toml** Add under `[dependencies]` in `src-tauri/Cargo.toml`: @@ -89,7 +89,7 @@ rand = "0.8" base64 = "0.22" ``` -- [ ] **Step 2: Create migration 002** +- [x] **Step 2: Create migration 002** Create `src-tauri/migrations/002_add_last_polled.sql`: @@ -98,7 +98,7 @@ ALTER TABLE watched_trackers ADD COLUMN last_polled_at TEXT; ALTER TABLE watched_trackers ADD COLUMN enabled INTEGER NOT NULL DEFAULT 1; ``` -- [ ] **Step 3: Update db.rs to run migration 002** +- [x] **Step 3: Update db.rs to run migration 002** In `src-tauri/src/db.rs`, add the new migration constant and update the `migrate` function: @@ -159,7 +159,7 @@ Update the test `test_migration_is_idempotent` to check for version 2: } ``` -- [ ] **Step 4: Add From to error.rs** +- [x] **Step 4: Add From to error.rs** Add to `src-tauri/src/error.rs`: @@ -173,7 +173,7 @@ impl From for AppError { } ``` -- [ ] **Step 5: Update AppState to use Arc> and add new fields** +- [x] **Step 5: Update AppState to use Arc> and add new fields** Replace `src-tauri/src/lib.rs`: @@ -249,7 +249,7 @@ fn load_or_generate_key(path: &std::path::Path) -> Result<[u8; 32], Box AppState" - Create: `src-tauri/src/services/crypto.rs` - Modify: `src-tauri/src/lib.rs` (add `mod services`) -- [ ] **Step 1: Write failing tests for crypto** +- [x] **Step 1: Write failing tests for crypto** Create `src-tauri/src/services/mod.rs`: @@ -373,7 +373,7 @@ mod tests { Add `mod services;` to `src-tauri/src/lib.rs` (after `mod models;`). -- [ ] **Step 2: Run tests to verify they fail** +- [x] **Step 2: Run tests to verify they fail** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -382,7 +382,7 @@ PKG_CONFIG_PATH="/tmp/mypc:$PKG_CONFIG_PATH" cargo test services::crypto::tests Expected: 7 failures with `not yet implemented`. -- [ ] **Step 3: Implement encrypt and decrypt** +- [x] **Step 3: Implement encrypt and decrypt** Replace the `todo!()` stubs in `src-tauri/src/services/crypto.rs`: @@ -423,7 +423,7 @@ pub fn decrypt(key: &[u8; 32], encrypted: &str) -> Result { } ``` -- [ ] **Step 4: Run tests to verify they pass** +- [x] **Step 4: Run tests to verify they pass** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -432,7 +432,7 @@ PKG_CONFIG_PATH="/tmp/mypc:$PKG_CONFIG_PATH" cargo test services::crypto::tests Expected: 7 tests pass. -- [ ] **Step 5: Commit** +- [x] **Step 5: Commit** ```bash git add -A @@ -450,7 +450,7 @@ git commit -m "feat: AES-256-GCM crypto service for credential encryption" - Modify: `src-tauri/src/commands/mod.rs` - Modify: `src-tauri/src/lib.rs` (register commands) -- [ ] **Step 1: Write failing tests for TuleapCredentials model** +- [x] **Step 1: Write failing tests for TuleapCredentials model** Create `src-tauri/src/models/credential.rs`: @@ -553,7 +553,7 @@ mod tests { Add `pub mod credential;` to `src-tauri/src/models/mod.rs`. -- [ ] **Step 2: Run tests to verify they fail** +- [x] **Step 2: Run tests to verify they fail** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -562,7 +562,7 @@ PKG_CONFIG_PATH="/tmp/mypc:$PKG_CONFIG_PATH" cargo test models::credential::test Expected: 5 failures. -- [ ] **Step 3: Implement TuleapCredentials CRUD** +- [x] **Step 3: Implement TuleapCredentials CRUD** Replace stubs in `src-tauri/src/models/credential.rs`: @@ -612,7 +612,7 @@ Replace stubs in `src-tauri/src/models/credential.rs`: } ``` -- [ ] **Step 4: Run tests to verify they pass** +- [x] **Step 4: Run tests to verify they pass** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -621,7 +621,7 @@ PKG_CONFIG_PATH="/tmp/mypc:$PKG_CONFIG_PATH" cargo test models::credential::test Expected: 5 pass. -- [ ] **Step 5: Create credential Tauri commands** +- [x] **Step 5: Create credential Tauri commands** Create `src-tauri/src/commands/credential.rs`: @@ -703,7 +703,7 @@ pub async fn test_tuleap_connection(state: State<'_, AppState>) -> Result) -> Result ``` -- [ ] **Step 5: Verify TypeScript compiles and frontend builds** +- [x] **Step 5: Verify TypeScript compiles and frontend builds** ```bash cd /home/leclere/Projets/orchai @@ -2722,7 +2722,7 @@ npm run build Expected: both succeed. -- [ ] **Step 6: Commit** +- [x] **Step 6: Commit** ```bash git add -A @@ -2739,7 +2739,7 @@ git commit -m "feat: frontend types, API wrappers, and Settings page for Tuleap - Create: `src/components/trackers/FilterBuilder.tsx` - Modify: `src/App.tsx` (add tracker routes) -- [ ] **Step 1: Create FilterBuilder component** +- [x] **Step 1: Create FilterBuilder component** Create `src/components/trackers/FilterBuilder.tsx`: @@ -2905,7 +2905,7 @@ export default function FilterBuilder({ groups, onChange, availableFields }: Pro } ``` -- [ ] **Step 2: Create TrackerConfig component** +- [x] **Step 2: Create TrackerConfig component** Create `src/components/trackers/TrackerConfig.tsx`: @@ -3083,7 +3083,7 @@ export default function TrackerConfig() { } ``` -- [ ] **Step 3: Create TrackerList component** +- [x] **Step 3: Create TrackerList component** Create `src/components/trackers/TrackerList.tsx`: @@ -3197,7 +3197,7 @@ export default function TrackerList({ trackers, projectId, onRefresh }: Props) { } ``` -- [ ] **Step 4: Add tracker routes in App.tsx** +- [x] **Step 4: Add tracker routes in App.tsx** Add import: @@ -3211,7 +3211,7 @@ Add route inside `}>`: } /> ``` -- [ ] **Step 5: Verify frontend builds** +- [x] **Step 5: Verify frontend builds** ```bash cd /home/leclere/Projets/orchai @@ -3219,7 +3219,7 @@ npx tsc --noEmit npm run build ``` -- [ ] **Step 6: Commit** +- [x] **Step 6: Commit** ```bash git add -A @@ -3233,7 +3233,7 @@ git commit -m "feat: tracker config UI with visual AND/OR filter builder" **Files:** - Modify: `src/components/projects/ProjectDashboard.tsx` -- [ ] **Step 1: Update ProjectDashboard to show trackers and recent tickets** +- [x] **Step 1: Update ProjectDashboard to show trackers and recent tickets** Replace `src/components/projects/ProjectDashboard.tsx`: @@ -3344,7 +3344,7 @@ export default function ProjectDashboard() { } ``` -- [ ] **Step 2: Run all Rust tests** +- [x] **Step 2: Run all Rust tests** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -3353,7 +3353,7 @@ PKG_CONFIG_PATH="/tmp/mypc:$PKG_CONFIG_PATH" cargo test Expected: all tests pass (11 Phase 1 + 7 crypto + 5 credential + 7 tuleap_client + 7 tracker + 7 filter + 5 ticket = 49 tests). -- [ ] **Step 3: Run clippy** +- [x] **Step 3: Run clippy** ```bash cd /home/leclere/Projets/orchai/src-tauri @@ -3362,7 +3362,7 @@ PKG_CONFIG_PATH="/tmp/mypc:$PKG_CONFIG_PATH" cargo clippy -- -D warnings Fix any warnings. -- [ ] **Step 4: Verify frontend builds** +- [x] **Step 4: Verify frontend builds** ```bash cd /home/leclere/Projets/orchai @@ -3370,7 +3370,7 @@ npx tsc --noEmit npm run build ``` -- [ ] **Step 5: Commit** +- [x] **Step 5: Commit** ```bash git add -A