@mind-fold/open-flow 0.2.16 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +63 -140
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +15 -0
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/dashboard.d.ts +6 -0
  6. package/dist/commands/dashboard.d.ts.map +1 -0
  7. package/dist/commands/dashboard.js +9 -0
  8. package/dist/commands/dashboard.js.map +1 -0
  9. package/dist/templates/commands/onboard-developer.txt +219 -7
  10. package/dist/tui/components/AgentCard.d.ts +9 -0
  11. package/dist/tui/components/AgentCard.d.ts.map +1 -0
  12. package/dist/tui/components/AgentCard.js +71 -0
  13. package/dist/tui/components/AgentCard.js.map +1 -0
  14. package/dist/tui/components/AgentDashboard.d.ts +6 -0
  15. package/dist/tui/components/AgentDashboard.d.ts.map +1 -0
  16. package/dist/tui/components/AgentDashboard.js +70 -0
  17. package/dist/tui/components/AgentDashboard.js.map +1 -0
  18. package/dist/tui/components/App.d.ts +6 -0
  19. package/dist/tui/components/App.d.ts.map +1 -0
  20. package/dist/tui/components/App.js +76 -0
  21. package/dist/tui/components/App.js.map +1 -0
  22. package/dist/tui/components/FeatureCard.d.ts +8 -0
  23. package/dist/tui/components/FeatureCard.d.ts.map +1 -0
  24. package/dist/tui/components/FeatureCard.js +23 -0
  25. package/dist/tui/components/FeatureCard.js.map +1 -0
  26. package/dist/tui/components/KanbanBoard.d.ts +10 -0
  27. package/dist/tui/components/KanbanBoard.d.ts.map +1 -0
  28. package/dist/tui/components/KanbanBoard.js +11 -0
  29. package/dist/tui/components/KanbanBoard.js.map +1 -0
  30. package/dist/tui/components/StatusBar.d.ts +8 -0
  31. package/dist/tui/components/StatusBar.d.ts.map +1 -0
  32. package/dist/tui/components/StatusBar.js +6 -0
  33. package/dist/tui/components/StatusBar.js.map +1 -0
  34. package/dist/tui/hooks/useAgents.d.ts +25 -0
  35. package/dist/tui/hooks/useAgents.d.ts.map +1 -0
  36. package/dist/tui/hooks/useAgents.js +165 -0
  37. package/dist/tui/hooks/useAgents.js.map +1 -0
  38. package/dist/tui/hooks/useFeatures.d.ts +10 -0
  39. package/dist/tui/hooks/useFeatures.d.ts.map +1 -0
  40. package/dist/tui/hooks/useFeatures.js +126 -0
  41. package/dist/tui/hooks/useFeatures.js.map +1 -0
  42. package/dist/tui/index.d.ts +11 -0
  43. package/dist/tui/index.d.ts.map +1 -0
  44. package/dist/tui/index.js +12 -0
  45. package/dist/tui/index.js.map +1 -0
  46. package/dist/tui/types.d.ts +33 -0
  47. package/dist/tui/types.d.ts.map +1 -0
  48. package/dist/tui/types.js +2 -0
  49. package/dist/tui/types.js.map +1 -0
  50. package/package.json +7 -2
package/README.md CHANGED
@@ -1,183 +1,106 @@
1
1
  # open-flow
2
2
 
3
- AI-assisted development workflow initializer for Cursor, Claude Code and more.
3
+ AI-assisted development workflow system for Cursor, Claude Code and more.
4
4
 
5
- Based on Anthropic's [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents).
6
-
7
- ## Why open-flow?
8
-
9
- AI coding assistants are powerful but lack continuity across sessions. open-flow adds a lightweight workflow system that gives AI "long-term memory" through structured documentation.
10
-
11
- Key outcomes:
12
- - **Multi-developer support**: Each developer (human or AI) has independent progress tracking
13
- - **Guidelines index system**: `index.md + doc.md` two-layer structure for efficient knowledge access
14
- - **Short commands**: Pre-defined prompts for common operations
15
- - **Human-in-the-loop**: AI writes code, human reviews and commits
16
-
17
- ## Getting Started
5
+ Give your AI coding assistant "long-term memory" through structured progress tracking and project-specific guidelines.
18
6
 
19
- ### Prerequisites
20
-
21
- - Node.js >= 18.0.0
7
+ Based on Anthropic's [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents).
22
8
 
23
- ### Install
9
+ ## Install
24
10
 
25
11
  ```bash
26
- npm install -g open-flow
12
+ npm install -g @mind-fold/open-flow
27
13
  ```
28
14
 
29
- ### Initialize in your project
15
+ ## Initialize
30
16
 
31
17
  ```bash
32
- cd my-project
33
- open-flow init
18
+ cd your-project
19
+
20
+ # Initialize workflow system
21
+ of init
22
+ # or: open-flow init
23
+
24
+ # Set your developer identity (use your git name)
25
+ of init -u your-git-name
26
+ # or: open-flow init -u your-git-name
34
27
  ```
35
28
 
36
29
  You'll be prompted to select AI tools to configure:
37
30
  - Cursor
38
31
  - Claude Code
39
32
 
40
- ### What gets created
33
+ ## Learn the Workflow
41
34
 
42
- ```
43
- your-project/
44
- ├── .cursor/commands/ # Cursor short commands
45
- │ ├── init-agent.md
46
- │ ├── check-frontend.md
47
- │ ├── check-backend.md
48
- │ ├── record-agent-flow.md
49
- │ └── onboard-developer.md
50
- ├── .claude/commands/ # Claude Code short commands
51
- ├── workflow/
52
- │ ├── scripts/
53
- │ │ ├── init-developer.sh
54
- │ │ └── get-developer.sh
55
- │ ├── agent-progress/
56
- │ │ └── index.md
57
- │ ├── structure/
58
- │ │ ├── frontend/
59
- │ │ │ ├── index.md
60
- │ │ │ └── doc.md
61
- │ │ └── backend/
62
- │ │ ├── index.md
63
- │ │ └── doc.md
64
- │ ├── feature.json
65
- │ └── flow.md
66
- ├── init-agent.md
67
- └── AGENTS.md
68
- ```
69
-
70
- ## Short Commands
35
+ After initialization, open your AI IDE (Cursor or Claude Code) and run:
71
36
 
72
- | Command | Purpose |
73
- |---------|---------|
74
- | `/init-agent` | Initialize AI session, read context and guidelines |
75
- | `/before-frontend-dev` | Read frontend guidelines before starting development |
76
- | `/before-backend-dev` | Read backend guidelines before starting development |
77
- | `/check-frontend` | Check frontend code against guidelines |
78
- | `/check-backend` | Check backend code against guidelines |
79
- | `/record-agent-flow` | Record work progress (after human commits) |
80
- | `/record-question` | Document a solved problem for future reference |
81
- | `/onboard-developer` | Guide new developer through setup |
82
- | `/update-frontend-structure` | Update frontend guidelines if new patterns found |
83
- | `/update-backend-structure` | Update backend guidelines if new patterns found |
84
- | `/create-command` | Create a new slash command in both `.cursor/` and `.claude/` directories |
85
-
86
- ## Workflow
87
-
88
- ### 1. Initialize Developer Identity
89
-
90
- ```bash
91
- ./workflow/scripts/init-developer.sh <your-name>
37
+ ```
38
+ /onboard-developer
92
39
  ```
93
40
 
94
- ### 2. Start AI Session
95
-
96
- Use `/init-agent` command in your AI tool.
97
-
98
- ### 3. Development
99
-
100
- 1. AI reads guidelines from `workflow/structure/`
101
- 2. AI writes code following the guidelines
102
- 3. Human reviews and tests
103
- 4. Human commits the code
104
- 5. Use `/record-agent-flow` to record progress
105
-
106
- ### 4. Customize Guidelines
107
-
108
- Fill in your project-specific guidelines in:
109
- - `workflow/structure/frontend/doc.md`
110
- - `workflow/structure/backend/doc.md`
111
-
112
- **Requirements**:
113
- - Write all documentation in **English**
114
- - Add section markers: `@@@section:kebab-case-id` and `@@@/section:kebab-case-id`
115
- - Update `index.md` files with section IDs for quick navigation
116
-
117
- ## Key Concepts
118
-
119
- ### index.md + doc.md Structure
120
-
121
- Instead of reading entire guideline documents (which can be 1000+ lines), AI:
122
- 1. Reads the lightweight `index.md` (navigation table with section IDs)
123
- 2. Finds relevant section ID for the task
124
- 3. Extracts only the needed section: `sed -n '/@@@section:ID/,/@@@\/section:ID/p' doc.md`
41
+ The AI will explain in detail:
42
+ - **Core Philosophy**: Why this workflow exists, what problems it solves
43
+ - **System Structure**: What each directory does
44
+ - **Command Deep Dive**: Each command's purpose, mechanism, and importance
45
+ - **Real-World Examples**: 5 complete workflow scenarios with step-by-step explanations
125
46
 
126
- Section markers (`@@@section:id`) ensure references don't break when content is added or removed.
47
+ ## Quick Reference
127
48
 
128
- This saves tokens and improves focus.
49
+ ### Core Workflow Commands
129
50
 
130
- ### Multi-Developer Progress Tracking
51
+ | Command | When to Use |
52
+ |---------|-------------|
53
+ | `/init-agent` | Start of every session |
54
+ | `/before-frontend-dev` | Before writing frontend code |
55
+ | `/before-backend-dev` | Before writing backend code |
56
+ | `/check-frontend` | After writing frontend code |
57
+ | `/check-backend` | After writing backend code |
58
+ | `/check-cross-layer` | After changes spanning multiple layers |
59
+ | `/finish-work` | Before human commits |
60
+ | `/record-agent-flow` | After human commits |
61
+ | `/break-loop` | End debugging/investigation |
131
62
 
132
- ```
133
- workflow/agent-progress/
134
- ├── index.md # Main index
135
- └── {developer}/ # Per-developer directory
136
- ├── index.md # Personal index
137
- └── progress-N.md # Progress files (max 2000 lines each)
138
- ```
63
+ ### Customization Commands
139
64
 
140
- Each developer has independent progress files that don't conflict during collaboration.
65
+ | Command | Purpose |
66
+ |---------|---------|
67
+ | `/generate-frontend-structure` | Auto-scan project and generate frontend guidelines |
68
+ | `/generate-backend-structure` | Auto-scan project and generate backend guidelines |
69
+ | `/extract-to-rules` | Extract knowledge from docs into guidelines |
141
70
 
142
- ### Human-in-the-Loop
71
+ ### Utility Commands
143
72
 
144
- AI should NOT execute `git commit`. The workflow is:
145
- 1. AI writes code
146
- 2. Human tests locally
147
- 3. Human reviews code
148
- 4. Human commits
149
- 5. AI records progress with commit hash
73
+ | Command | Purpose |
74
+ |---------|---------|
75
+ | `/onboard-developer` | Learn the complete workflow system |
76
+ | `/create-command` | Create new slash command |
77
+ | `/record-question` | Document solved problems |
150
78
 
151
- ## Commands
79
+ ## CLI Commands
152
80
 
153
81
  ```bash
154
- open-flow init # Initialize in current project
155
- open-flow update # Update configuration (coming soon)
156
- open-flow --version # Show version
157
- open-flow --help # Show help
158
- ```
82
+ of init # Initialize in current project
83
+ of init -u <name> # Initialize with developer identity
84
+ of --version # Show version
85
+ of --help # Show help
159
86
 
160
- ## Comparison with OpenSpec
87
+ # 'open-flow' works the same as 'of'
88
+ open-flow init
89
+ open-flow init -u <name>
90
+ ```
161
91
 
162
- | Aspect | OpenSpec | open-flow |
163
- |--------|----------|-----------|
164
- | Focus | Spec-driven development | Memory-driven workflow |
165
- | Main feature | Change proposals & specs | Progress tracking & guidelines |
166
- | Collaboration | Single change flow | Multi-developer directories |
167
- | Guidelines | N/A | index.md + doc.md system |
92
+ ## Key Principles
168
93
 
169
- Both can be used together - OpenSpec for specs, open-flow for workflow.
94
+ 1. **AI Never Commits** - AI prepares code, human tests and commits
95
+ 2. **Guidelines Before Code** - Read project conventions before writing
96
+ 3. **Check After Code** - Verify against guidelines before commit
97
+ 4. **Record Everything** - Persist session context for future sessions
170
98
 
171
99
  ## Contributing
172
100
 
173
101
  ```bash
174
- # Install dependencies
175
102
  npm install
176
-
177
- # Build
178
103
  npm run build
179
-
180
- # Development
181
104
  npm run dev
182
105
  ```
183
106
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO,KAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,OAAO,KAAsB,CAAC"}
package/dist/cli/index.js CHANGED
@@ -4,6 +4,7 @@ import { fileURLToPath } from "node:url";
4
4
  import chalk from "chalk";
5
5
  import { Command } from "commander";
6
6
  import { init } from "../commands/init.js";
7
+ import { dashboard } from "../commands/dashboard.js";
7
8
  // Read version from package.json
8
9
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
9
10
  const packageJsonPath = path.resolve(__dirname, "../../package.json");
@@ -38,5 +39,19 @@ program
38
39
  .action(async () => {
39
40
  console.log(chalk.yellow("Coming soon: update command"));
40
41
  });
42
+ program
43
+ .command("dashboard")
44
+ .alias("db")
45
+ .description("Open the TUI dashboard to view feature status")
46
+ .option("-p, --path <path>", "Path to the workflow directory")
47
+ .action(async (options) => {
48
+ try {
49
+ await dashboard(options);
50
+ }
51
+ catch (error) {
52
+ console.error(chalk.red("Error:"), error instanceof Error ? error.message : error);
53
+ process.exit(1);
54
+ }
55
+ });
41
56
  program.parse();
42
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","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AA6B,CAAC,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEL,OAAO;KACJ,OAAO,CAAC,WAAW,CAAC;KACpB,KAAK,CAAC,IAAI,CAAC;KACX,WAAW,CAAC,+CAA+C,CAAC;KAC5D,MAAM,CAAC,mBAAmB,EAAE,gCAAgC,CAAC;KAC7D,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,IAAI,CAAC;QACH,MAAM,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EACnB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAC/C,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface DashboardOptions {
2
+ path?: string;
3
+ }
4
+ export declare function dashboard(options: DashboardOptions): Promise<void>;
5
+ export {};
6
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/commands/dashboard.ts"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAQxE"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { render } from "ink";
3
+ import { AgentDashboard } from "../tui/components/AgentDashboard.js";
4
+ export async function dashboard(options) {
5
+ const workflowPath = options.path || process.cwd();
6
+ const { waitUntilExit } = render(React.createElement(AgentDashboard, { workflowPath }));
7
+ await waitUntilExit();
8
+ }
9
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/commands/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAMrE,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,OAAyB;IACvD,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAEnD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAC9B,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE,EAAE,YAAY,EAAE,CAAC,CACtD,CAAC;IAEF,MAAM,aAAa,EAAE,CAAC;AACxB,CAAC"}
@@ -4,7 +4,7 @@ YOUR ROLE: Be a mentor and teacher. Don't just list steps - EXPLAIN the underlyi
4
4
 
5
5
  ## CRITICAL INSTRUCTION - YOU MUST COMPLETE ALL SECTIONS
6
6
 
7
- This onboarding has TWO equally important parts:
7
+ This onboarding has THREE equally important parts:
8
8
 
9
9
  **PART 1: Core Concepts** (Sections: CORE PHILOSOPHY, SYSTEM STRUCTURE, COMMAND DEEP DIVE)
10
10
  - Explain WHY this workflow exists
@@ -17,9 +17,18 @@ This onboarding has TWO equally important parts:
17
17
  - WHAT HAPPENS: What the command actually does
18
18
  - IF SKIPPED: What goes wrong without it
19
19
 
20
- DO NOT skip Part 2. The examples are NOT optional - they are the most important part for understanding how the workflow works in practice. A developer cannot truly understand the system without seeing real workflow examples.
20
+ **PART 3: Customize Your Development Guidelines** (Section: CUSTOMIZE YOUR DEVELOPMENT GUIDELINES)
21
+ - Check if project guidelines are still default templates
22
+ - If default, guide the developer to customize them
23
+ - Show feature.json structure for systematic customization
24
+ - Explain the customization workflow
21
25
 
22
- After completing BOTH parts, ask the developer about their first task.
26
+ DO NOT skip any part. All three parts are essential:
27
+ - Part 1 teaches the concepts
28
+ - Part 2 shows how concepts work in practice
29
+ - Part 3 ensures the project has proper guidelines for AI to follow
30
+
31
+ After completing ALL THREE parts, ask the developer about their first task.
23
32
 
24
33
  ---
25
34
 
@@ -533,8 +542,211 @@ Debugging and investigation can spiral - AI keeps trying things without concludi
533
542
 
534
543
  ---
535
544
 
536
- After explaining, ask the developer:
537
- 1. What kind of work will they be doing? (frontend/backend/full-stack)
538
- 2. Do they have a specific task to start with?
545
+ # PART 3: Customize Your Development Guidelines
546
+
547
+ After explaining Part 1 and Part 2, check if the project's development guidelines need customization.
548
+
549
+ ## Step 1: Check Current Guidelines Status
550
+
551
+ Check if `workflow/structure/` contains default templates or customized guidelines:
552
+
553
+ ```bash
554
+ # Check if files are still templates (look for placeholder text)
555
+ grep -l "TODO" workflow/structure/backend/*.md 2>/dev/null | head -5
556
+ grep -l "your project" workflow/structure/frontend/*.md 2>/dev/null | head -5
557
+
558
+ # Also check the project's actual tech stack
559
+ cat package.json 2>/dev/null | head -30
560
+ ls -la src/ 2>/dev/null || ls -la apps/ 2>/dev/null
561
+ ```
562
+
563
+ ## Step 2: Explain Guidelines Status (Adjust Tone Based on Situation)
564
+
565
+ **Situation A: First time using open-flow in this project**
566
+
567
+ If this appears to be a new open-flow setup (guidelines are default templates), explain warmly:
568
+
569
+ "I see that the development guidelines in `workflow/structure/` are still the default templates that come with open-flow. This is completely normal if you've just set up the workflow system!
570
+
571
+ The default templates use generic examples (React, TypeScript, Drizzle ORM, etc.) that may not match your actual tech stack. To make `/before-*-dev` commands truly useful, you'll want to customize these guidelines with YOUR project's patterns.
572
+
573
+ This is a great opportunity - let's set up a task to customize your guidelines. I'll show you how to use **feature.json** for complex tasks like this."
574
+
575
+ **Situation B: Existing open-flow setup, new team member**
576
+
577
+ If guidelines appear customized (project-specific examples found), explain:
578
+
579
+ "Great news! Your team has already customized the development guidelines. You can start using `/before-*-dev` commands right away to learn your project's conventions.
580
+
581
+ I recommend reading through `workflow/structure/` to familiarize yourself with the team's coding standards."
582
+
583
+ ## Step 3: Create Feature for Guidelines Customization (If Needed)
584
+
585
+ If guidelines need customization, DO THIS IN THE CURRENT SESSION:
586
+
587
+ **First, explain the concept of feature.json**:
588
+
589
+ "For complex tasks with multiple subtasks, we use **feature.json** to track progress. This is important because:
590
+ - Complex tasks often span multiple AI sessions
591
+ - Each session has limited context
592
+ - feature.json persists the task breakdown across sessions
593
+ - Future sessions can read feature.json to continue where you left off
594
+
595
+ Let me create one for you now, and this will also teach you how to create feature.json for your own complex tasks in the future."
596
+
597
+ **Then create the feature**:
598
+
599
+ ```bash
600
+ ./workflow/scripts/feature.sh create customize-guidelines
601
+ ```
602
+
603
+ **Now fill in the feature.json based on the project's actual tech stack**:
604
+
605
+ Analyze the project's tech stack and create appropriate subtasks. Example for a typical project:
606
+
607
+ ```json
608
+ {
609
+ "name": "customize-guidelines",
610
+ "description": "Customize development guidelines to match this project's actual tech stack and patterns",
611
+ "created": "[current-date]",
612
+ "status": "in-progress",
613
+ "subtasks": [
614
+ {
615
+ "id": "analyze-tech-stack",
616
+ "title": "Analyze Project Tech Stack",
617
+ "description": "Identify frameworks, libraries, and patterns used in this project",
618
+ "status": "completed",
619
+ "notes": "Analyzed in onboard session: [list findings]"
620
+ },
621
+ {
622
+ "id": "backend-database",
623
+ "title": "Backend: Database Guidelines",
624
+ "description": "Analyze database patterns and rewrite workflow/structure/backend/database-guidelines.md",
625
+ "status": "pending"
626
+ },
627
+ {
628
+ "id": "backend-directory",
629
+ "title": "Backend: Directory Structure",
630
+ "description": "Document backend directory organization in workflow/structure/backend/directory-structure.md",
631
+ "status": "pending"
632
+ },
633
+ {
634
+ "id": "backend-error-handling",
635
+ "title": "Backend: Error Handling",
636
+ "description": "Document error handling patterns in workflow/structure/backend/error-handling.md",
637
+ "status": "pending"
638
+ },
639
+ {
640
+ "id": "frontend-components",
641
+ "title": "Frontend: Component Guidelines",
642
+ "description": "Analyze component patterns and rewrite workflow/structure/frontend/component-guidelines.md",
643
+ "status": "pending"
644
+ },
645
+ {
646
+ "id": "frontend-state",
647
+ "title": "Frontend: State Management",
648
+ "description": "Document state management approach in workflow/structure/frontend/state-management.md",
649
+ "status": "pending"
650
+ },
651
+ {
652
+ "id": "frontend-directory",
653
+ "title": "Frontend: Directory Structure",
654
+ "description": "Document frontend directory organization in workflow/structure/frontend/directory-structure.md",
655
+ "status": "pending"
656
+ }
657
+ ]
658
+ }
659
+ ```
660
+
661
+ **Adapt subtasks based on actual tech stack**:
662
+ - If no database -> remove database subtask
663
+ - If no React -> change component guidelines to vanilla JS patterns
664
+ - If Rust backend -> change to Rust-specific guidelines
665
+ - Add project-specific subtasks as needed
666
+
667
+ ## Step 4: Teach User How to Use Feature.json for Future Tasks
668
+
669
+ Explain to the developer:
670
+
671
+ "Now you've seen how feature.json works. In the future, when you have complex tasks, you can create your own feature.json by telling AI:
672
+
673
+ **How to ask AI to create a feature.json**:
674
+
675
+ > 'I need to [describe complex task]. This seems like a multi-session task. Can you help me:
676
+ > 1. Create a feature with `./workflow/scripts/feature.sh create [feature-name]`
677
+ > 2. Break it down into subtasks in feature.json
678
+ > 3. Mark the first subtask as in-progress'
679
+
680
+ **When to use feature.json**:
681
+ - Task has 3+ distinct steps
682
+ - Task might span multiple sessions
683
+ - Task has dependencies between steps
684
+ - You want to track progress systematically
685
+
686
+ **Feature.json lifecycle**:
687
+ 1. Create feature -> feature.json created with subtasks
688
+ 2. Work on subtasks -> update status in feature.json
689
+ 3. Human commits -> git commit the changes
690
+ 4. Record session -> /record-agent-flow captures progress
691
+ 5. New session -> AI reads feature.json, continues from where you left off
692
+ 6. Complete all subtasks -> archive feature"
693
+
694
+ ## Step 5: Complete This Session
695
+
696
+ Guide the developer to complete the onboard session properly:
697
+
698
+ "Let's wrap up this onboard session:
699
+
700
+ 1. **Review the feature.json** I created - does it capture the right subtasks for your project?
701
+
702
+ 2. **Commit the feature.json**:
703
+ ```bash
704
+ git add workflow/features/customize-guidelines/feature.json
705
+ git commit -m 'feat(workflow): add customize-guidelines feature'
706
+ ```
707
+
708
+ 3. **Record this session**:
709
+ Use `/record-agent-flow` to record what we did in this onboard session.
710
+
711
+ 4. **Start customization in a new session**:
712
+ - Open a new conversation window
713
+ - Run `/init-agent` - AI will see the customize-guidelines feature
714
+ - AI will read feature.json and ask which subtask to work on
715
+ - Work through subtasks one by one"
716
+
717
+ ## Step 6: Show Example of Continuing in Next Session
718
+
719
+ "In your next session, after `/init-agent`, you can say:
720
+
721
+ > 'I want to continue the customize-guidelines feature. Let's work on the backend-database subtask. Please:
722
+ > 1. Analyze my project's database code
723
+ > 2. Identify the ORM, query patterns, transaction handling
724
+ > 3. Rewrite workflow/structure/backend/database-guidelines.md with examples from MY codebase'
725
+
726
+ The AI will read the feature.json, understand the context, and help you complete that subtask."
727
+
728
+ ## Customization Commands Reference
729
+
730
+ These commands can help with guidelines customization:
731
+
732
+ | Command | Purpose |
733
+ |---------|---------|
734
+ | `/generate-frontend-structure` | Auto-scan project and generate frontend guidelines |
735
+ | `/generate-backend-structure` | Auto-scan project and generate backend guidelines |
736
+ | `/extract-to-rules` | Extract knowledge from a document into guidelines |
737
+
738
+ ---
739
+
740
+ After completing all three parts, summarize and ask:
741
+
742
+ "You're now onboarded to the workflow system! Here's what we covered:
743
+ - Part 1: Core concepts (why this workflow exists)
744
+ - Part 2: Real-world examples (how to apply the workflow)
745
+ - Part 3: Guidelines customization (created feature.json if needed)
746
+
747
+ **Next steps**:
748
+ 1. Commit the feature.json (if created)
749
+ 2. Use `/record-agent-flow` to record this session
750
+ 3. Start a new session to begin customizing guidelines (or your actual development work)
539
751
 
540
- Then guide them through their first task using the appropriate workflow.
752
+ What would you like to do first?"
@@ -0,0 +1,9 @@
1
+ import type { Agent } from "../hooks/useAgents.js";
2
+ interface AgentCardProps {
3
+ agent: Agent;
4
+ isSelected: boolean;
5
+ compact?: boolean;
6
+ }
7
+ export declare function AgentCard({ agent, isSelected, compact }: AgentCardProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=AgentCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentCard.d.ts","sourceRoot":"","sources":["../../../src/tui/components/AgentCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,UAAU,cAAc;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAsBD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,cAAc,2CA8GvE"}
@@ -0,0 +1,71 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from "ink";
3
+ const statusColors = {
4
+ running: "green",
5
+ in_progress: "green",
6
+ blocked: "yellow",
7
+ review: "magenta",
8
+ completed: "cyan",
9
+ failed: "red",
10
+ stopped: "gray",
11
+ };
12
+ const statusIcons = {
13
+ running: "●",
14
+ in_progress: "●",
15
+ blocked: "◐",
16
+ review: "◉",
17
+ completed: "✓",
18
+ failed: "✗",
19
+ stopped: "○",
20
+ };
21
+ export function AgentCard({ agent, isSelected, compact }) {
22
+ const statusColor = statusColors[agent.status] || "white";
23
+ const statusIcon = statusIcons[agent.status] || "?";
24
+ // Format elapsed time
25
+ const elapsed = getElapsedTime(agent.started_at);
26
+ // Compact mode for kanban columns
27
+ if (compact) {
28
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: isSelected ? "bold" : "single", borderColor: isSelected ? "cyan" : "gray", paddingX: 1, marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: statusColor, children: [statusIcon, " "] }), _jsx(Text, { bold: isSelected, wrap: "truncate", children: truncate(agent.name, 15) }), !agent.is_alive &&
29
+ (agent.status === "running" || agent.status === "in_progress") && (_jsx(Text, { color: "red", children: " !" }))] }), _jsxs(Text, { color: "gray", dimColor: true, children: ["P", agent.current_phase, " | ", elapsed] }), agent.error && _jsxs(Text, { color: "red", children: ["\u26A0 ", truncate(agent.error, 12)] })] }));
30
+ }
31
+ // Full mode
32
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: isSelected ? "double" : "single", borderColor: isSelected ? "cyan" : "gray", paddingX: 1, marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: statusColor, children: [statusIcon, " "] }), _jsx(Text, { bold: isSelected, wrap: "truncate", children: agent.name })] }), agent.branch && (_jsx(Text, { color: "gray", dimColor: true, children: agent.branch })), _jsxs(Box, { children: [_jsxs(Text, { color: "blue", children: ["Phase ", agent.current_phase] }), _jsx(Text, { color: "gray", children: " | " }), _jsx(Text, { color: statusColor, children: agent.status }), !agent.is_alive &&
33
+ (agent.status === "running" || agent.status === "in_progress") && (_jsx(Text, { color: "red", children: " (dead)" }))] }), _jsxs(Box, { children: [_jsx(Text, { color: "gray", dimColor: true, children: elapsed }), _jsxs(Text, { color: "gray", children: [" | PID: ", agent.pid] })] }), agent.last_log_lines && agent.last_log_lines.length > 0 && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, wrap: "truncate", children: truncate(cleanLogLine(agent.last_log_lines[agent.last_log_lines.length - 1]), 60) }) })), agent.error && (_jsx(Text, { color: "red", wrap: "truncate", children: truncate(agent.error, 50) })), agent.pr_url && (_jsxs(Text, { color: "green", children: ["PR: ", truncate(agent.pr_url, 50)] }))] }));
34
+ }
35
+ function getElapsedTime(startedAt) {
36
+ try {
37
+ const start = new Date(startedAt);
38
+ const now = new Date();
39
+ const diffMs = now.getTime() - start.getTime();
40
+ const seconds = Math.floor(diffMs / 1000);
41
+ const minutes = Math.floor(seconds / 60);
42
+ const hours = Math.floor(minutes / 60);
43
+ if (hours > 0) {
44
+ return `${hours}h ${minutes % 60}m`;
45
+ }
46
+ else if (minutes > 0) {
47
+ return `${minutes}m ${seconds % 60}s`;
48
+ }
49
+ else {
50
+ return `${seconds}s`;
51
+ }
52
+ }
53
+ catch {
54
+ return "unknown";
55
+ }
56
+ }
57
+ function truncate(str, maxLen) {
58
+ if (!str)
59
+ return "";
60
+ if (str.length <= maxLen)
61
+ return str;
62
+ return str.slice(0, maxLen - 3) + "...";
63
+ }
64
+ function cleanLogLine(line) {
65
+ // Remove ANSI color codes and JSON formatting
66
+ return line
67
+ .replace(/\x1b\[[0-9;]*m/g, "")
68
+ .replace(/^\s*\{.*\}\s*$/, "[JSON output]")
69
+ .trim();
70
+ }
71
+ //# sourceMappingURL=AgentCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentCard.js","sourceRoot":"","sources":["../../../src/tui/components/AgentCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAShC,MAAM,YAAY,GAA2B;IAC3C,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,QAAQ;IACjB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,MAAM;IACjB,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,MAAM;CAChB,CAAC;AAEF,MAAM,WAAW,GAA2B;IAC1C,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,GAAG;IAChB,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,GAAG;IACX,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;CACb,CAAC;AAEF,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAkB;IACtE,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC;IAC1D,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;IAEpD,sBAAsB;IACtB,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;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