@itsflower/cli 0.1.3 → 0.1.4
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.
package/dist/main.js
CHANGED
package/package.json
CHANGED
package/skills/flower/SKILL.md
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flower
|
|
3
|
-
description:
|
|
3
|
+
description: 4-phase structured development workflow. Use only when user mentions "flower workflow"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
# flower workflow
|
|
7
|
+
|
|
6
8
|
## Workflow
|
|
7
9
|
|
|
8
10
|
```mermaid
|
|
9
11
|
flowchart TD
|
|
10
|
-
Start([User input]) -->
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
Start([User input]) --> F1[1. Clarify]
|
|
13
|
+
F1 --> F2[2. Plan]
|
|
14
|
+
F2 -- not feasible --> E1([End - rejected])
|
|
15
|
+
F2 -- feasible --> F3[3. Build]
|
|
16
|
+
F3 --> F4[4. Review]
|
|
17
|
+
F4 --> E2([End - completed])
|
|
16
18
|
```
|
|
17
19
|
|
|
18
20
|
## Phases
|
|
19
21
|
|
|
20
|
-
| # | Phase | Reference |
|
|
21
|
-
| --- | ------- | ---------------------------------------------- |
|
|
22
|
-
| 1 | Clarify | [references/clarify.md](references/clarify.md) |
|
|
23
|
-
| 2 | Plan | [references/plan.md](references/plan.md) |
|
|
24
|
-
| 3 | Build | [references/build.md](references/build.md) |
|
|
25
|
-
| 4 | Review | [references/review.md](references/review.md) |
|
|
26
|
-
|
|
27
|
-
Load only the reference file for the current phase. Do not read ahead.
|
|
22
|
+
| # | Phase | Reference |
|
|
23
|
+
| --- | ------- | ---------------------------------------------- |
|
|
24
|
+
| 1 | Clarify | [references/clarify.md](references/clarify.md) |
|
|
25
|
+
| 2 | Plan | [references/plan.md](references/plan.md) |
|
|
26
|
+
| 3 | Build | [references/build.md](references/build.md) |
|
|
27
|
+
| 4 | Review | [references/review.md](references/review.md) |
|
|
28
28
|
|
|
29
29
|
## Document Convention
|
|
30
30
|
|
|
31
31
|
Create a folder `.flower/quests/<datetime>--<short-description>/` when starting a new quest.
|
|
32
32
|
|
|
33
|
-
- `<datetime>` uses `YYMMDD-HHmm` format — run `
|
|
34
|
-
- `<short-description>` is a kebab-case summary generated by the agent
|
|
33
|
+
- `<datetime>` uses `YYMMDD-HHmm` format — run `uv run scripts/current_datetime.py` to generate it
|
|
34
|
+
- `<short-description>` is a kebab-case summary generated by the agent
|
|
35
35
|
- Folder contains `requirement.md`, `plan.md`, `journal.md`, and `review.md` based on templates in `.flower/templates/`.
|
|
36
36
|
|
|
37
|
-
## Rules
|
|
37
|
+
## Rules
|
|
38
38
|
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- Do not skip phases
|
|
39
|
+
- When a phase begins, print `Phase <number>:<name>` for the user to easily follow
|
|
40
|
+
- Follow the workflow steps strictly. Do not skip or reorder steps.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Phase 3: Build
|
|
2
2
|
|
|
3
|
-
Execute tasks from `plan.md
|
|
3
|
+
Execute tasks from `plan.md` in order. Test each one. Mark it done. Repeat.
|
|
4
4
|
|
|
5
|
-
## Workflow
|
|
5
|
+
## Workflow
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart TD
|
|
@@ -10,13 +10,13 @@ flowchart TD
|
|
|
10
10
|
B1 --> B2[Test / Verify]
|
|
11
11
|
B2 --> C1{Pass?}
|
|
12
12
|
C1 -- no --> B3[Fix issue]
|
|
13
|
-
C1 -- yes --> B4[Mark task done]
|
|
13
|
+
C1 -- yes --> B4[Mark task done ✓]
|
|
14
14
|
B3 --> B2
|
|
15
|
-
B4 --> B5[Log
|
|
15
|
+
B4 --> B5[Log if noteworthy]
|
|
16
16
|
B5 --> C2{All tasks done?}
|
|
17
17
|
C2 -- no --> B1
|
|
18
|
-
C2 -- yes --> B6[Mark plan
|
|
19
|
-
B6 --> End([
|
|
18
|
+
C2 -- yes --> B6[Mark plan completed]
|
|
19
|
+
B6 --> End([Phase 4: Review])
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
## Input
|
|
@@ -26,16 +26,9 @@ flowchart TD
|
|
|
26
26
|
|
|
27
27
|
## Steps
|
|
28
28
|
|
|
29
|
-
### Execute task
|
|
29
|
+
### 1. Execute task
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- Read the task's Description, AC, and Approach
|
|
34
|
-
- Investigate relevant code before changing it
|
|
35
|
-
- Implement following codebase conventions
|
|
36
|
-
- One logical change per task, as scoped in the plan
|
|
37
|
-
|
|
38
|
-
**Scale guidance:**
|
|
31
|
+
Read the task's Description, AC, and Approach. Investigate relevant code. Implement. Stay in scope.
|
|
39
32
|
|
|
40
33
|
| Complexity | Investigation | Implementation | Testing |
|
|
41
34
|
| ------------ | ------------------- | ----------------------- | ------------------------ |
|
|
@@ -43,64 +36,61 @@ For each task in plan order:
|
|
|
43
36
|
| **Standard** | Read related files | Follow approach in plan | Related test suite |
|
|
44
37
|
| **Complex** | Deep codebase study | Incremental changes | Full test suite + manual |
|
|
45
38
|
|
|
46
|
-
### Test
|
|
39
|
+
### 2. Test
|
|
40
|
+
|
|
41
|
+
Run relevant tests. Verify every AC passes. Fix failures before moving on. If unrelated tests were already failing, note in journal and leave them.
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
- Verify every AC for this task passes
|
|
50
|
-
- If tests fail → fix and re-verify; do not move on
|
|
51
|
-
- If unrelated tests were already failing → note in journal, do not fix
|
|
43
|
+
### 3. Mark task done — do not skip
|
|
52
44
|
|
|
53
|
-
|
|
45
|
+
**Immediately after tests pass**, check the checkbox in `plan.md`:
|
|
54
46
|
|
|
55
|
-
|
|
47
|
+
```
|
|
48
|
+
- [ ] Task title → - [x] Task title
|
|
49
|
+
```
|
|
56
50
|
|
|
57
|
-
|
|
51
|
+
This tracks resumable state. A task is not done until checked.
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
### 4. Log if noteworthy
|
|
60
54
|
|
|
61
|
-
|
|
55
|
+
Open `.flower/journal.md` (create from `templates/journal.md` on first use).
|
|
62
56
|
|
|
63
|
-
|
|
64
|
-
| -------------------- | ------------------------------------------------------------ |
|
|
65
|
-
| Deviation from plan | "Used library X instead of Y because Y doesn't support Z" |
|
|
66
|
-
| Non-obvious decision | "Chose eager loading — dataset is always small" |
|
|
67
|
-
| Problem & resolution | "Circular dep between A and B — extracted C" |
|
|
68
|
-
| Discovery | "Found existing utility that handles 80% — reused it" |
|
|
69
|
-
| New task added | "Added task 4b: migrate old data — discovered during task 4" |
|
|
57
|
+
Log only when the plan was **not** followed exactly:
|
|
70
58
|
|
|
71
|
-
|
|
59
|
+
- Deviated from the planned approach
|
|
60
|
+
- Made a non-obvious decision
|
|
61
|
+
- Hit a problem and resolved it
|
|
62
|
+
- Discovered something reusable
|
|
63
|
+
- Added a new task
|
|
72
64
|
|
|
73
|
-
|
|
65
|
+
Entry format:
|
|
74
66
|
|
|
75
67
|
```markdown
|
|
76
|
-
### [Short
|
|
77
|
-
|
|
78
|
-
- **tags**: [comma-separated domain keywords]
|
|
68
|
+
### [Short title]
|
|
69
|
+
- **tags**: [keywords]
|
|
79
70
|
- **scope**: [global | project:<name>]
|
|
80
|
-
- **context**: [
|
|
81
|
-
- **insight**: [
|
|
71
|
+
- **context**: [what you were doing]
|
|
72
|
+
- **insight**: [why — the decision, deviation, or discovery]
|
|
82
73
|
```
|
|
83
74
|
|
|
84
|
-
|
|
75
|
+
Skip if the plan was followed exactly with no surprises.
|
|
85
76
|
|
|
86
|
-
### Mark plan as completed
|
|
77
|
+
### 5. Mark plan as completed
|
|
87
78
|
|
|
88
|
-
After all tasks are
|
|
79
|
+
After all tasks are checked, verify:
|
|
89
80
|
|
|
90
|
-
- [ ] All
|
|
91
|
-
- [ ] All
|
|
92
|
-
- [ ] All tests pass
|
|
81
|
+
- [ ] All checkboxes checked
|
|
82
|
+
- [ ] All ACs verified
|
|
83
|
+
- [ ] All tests pass
|
|
93
84
|
- [ ] No unintended side effects
|
|
94
|
-
- [ ]
|
|
95
|
-
- [ ] Any tasks added during build are also completed
|
|
85
|
+
- [ ] Deviations captured in journal
|
|
96
86
|
|
|
97
|
-
|
|
87
|
+
Then set `status: completed` in plan frontmatter.
|
|
98
88
|
|
|
99
89
|
## Rules
|
|
100
90
|
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
91
|
+
- Never skip testing
|
|
92
|
+
- Never skip marking done — it tracks where to resume
|
|
93
|
+
- One task at a time; don't expand scope mid-task
|
|
94
|
+
- New work = new task in the plan, not an expansion of the current one
|
|
95
|
+
- Follow plan order; skip ahead only when blocked
|
|
96
|
+
- Don't fix unrelated issues — note them for a future quest
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Clarify user requirements, clearly describing WHAT and WHY, **not** HOW.
|
|
4
4
|
|
|
5
|
-
## Workflow
|
|
5
|
+
## Workflow
|
|
6
6
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart TD
|
|
@@ -15,6 +15,8 @@ flowchart TD
|
|
|
15
15
|
C5 --> End([Proceed to Phase 2: Plan])
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
For each step, follow the instructions below **strictly**
|
|
19
|
+
|
|
18
20
|
## Steps
|
|
19
21
|
|
|
20
22
|
### Analyze
|
|
@@ -39,13 +41,13 @@ Use extracted keywords to investigate before asking:
|
|
|
39
41
|
|
|
40
42
|
Only if ambiguities remain after research:
|
|
41
43
|
|
|
42
|
-
| Rule | Detail
|
|
43
|
-
| --------------- |
|
|
44
|
-
| Provide options |
|
|
45
|
-
| Batch questions | Group related questions. Max
|
|
46
|
-
| Be specific | Reference concrete code, files, or behaviors.
|
|
47
|
-
| Easy to answer | Human
|
|
48
|
-
| Show research | Share what you found to give context to your question.
|
|
44
|
+
| Rule | Detail |
|
|
45
|
+
| --------------- | ------------------------------------------------------ |
|
|
46
|
+
| Provide options | Prefer choices, not open questions. |
|
|
47
|
+
| Batch questions | Group related questions. Max 5 per round. |
|
|
48
|
+
| Be specific | Reference concrete code, files, or behaviors. |
|
|
49
|
+
| Easy to answer | Human answers in few words or picks option. |
|
|
50
|
+
| Show research | Share what you found to give context to your question. |
|
|
49
51
|
|
|
50
52
|
After each response, restart: analyze → research based on new info → evaluate remaining ambiguities, gaps.
|
|
51
53
|
|
|
@@ -73,11 +75,10 @@ Template in `.flower/templates/requirement.md`.
|
|
|
73
75
|
|
|
74
76
|
## Rules
|
|
75
77
|
|
|
76
|
-
- **Read before asking** —
|
|
77
|
-
- **Every word matters** — read
|
|
78
|
-
- **Options over open-ended** — always
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
81
|
-
- **Non-Goals prevent scope creep** — invest effort here
|
|
78
|
+
- **Read before asking** — research first, ask only what you can't answer
|
|
79
|
+
- **Every word matters** — read input thoroughly, don't skip anything
|
|
80
|
+
- **Options over open-ended** — prefer always giving choices when asking
|
|
81
|
+
- **Problem ≠ solution** — describe what's wrong, not how to fix it
|
|
82
|
+
- **Non-Goals prevent scope creep** — put effort here
|
|
82
83
|
- **Self-contained but concise** — a reader must understand the problem and success criteria without reading the codebase
|
|
83
84
|
- **No assumptions** — ambiguities must be resolved through research or Q&A, never assumed
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
# Phase 2: Plan
|
|
2
2
|
|
|
3
|
-
Research HOW to implement `requirement.md` — explore
|
|
3
|
+
Research HOW to implement `requirement.md` — explore codebase, study docs, decide approach, produce `plan.md`.
|
|
4
4
|
|
|
5
|
-
## Workflow
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
Execute steps in order. Do not skip. Do not create `plan.md` until the condition is met.
|
|
6
8
|
|
|
7
9
|
```mermaid
|
|
8
10
|
flowchart TD
|
|
9
11
|
Start([requirement.md]) --> P1[Codebase explore]
|
|
10
12
|
P1 --> P2[Research external]
|
|
11
|
-
P2 --> C1{
|
|
13
|
+
P2 --> C1{Unclear / incomplete / multiple approaches?}
|
|
12
14
|
C1 -- no --> P3[Ask for clarification]
|
|
13
|
-
P3 -->
|
|
14
|
-
C1 -- yes --> P4
|
|
15
|
+
P3 --> P1
|
|
16
|
+
C1 -- yes --> P4[Create plan.md]
|
|
15
17
|
P4 --> End([Proceed to Phase 3: Build])
|
|
16
18
|
```
|
|
17
19
|
|
|
@@ -19,27 +21,29 @@ flowchart TD
|
|
|
19
21
|
|
|
20
22
|
### Codebase explore
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
Search with goals and acceptance criteria from `requirement.md` as targets:
|
|
23
25
|
|
|
24
26
|
- **Architecture** — modules, layers, data flow relevant to the requirement
|
|
25
|
-
- **Patterns** — how similar features are
|
|
26
|
-
- **Reuse** — what
|
|
27
|
+
- **Patterns** — how similar features are built; conventions to follow
|
|
28
|
+
- **Reuse** — what exists vs. what must be built
|
|
27
29
|
|
|
28
30
|
Tools: grep, glob, read files, `repomix`.
|
|
29
31
|
|
|
30
32
|
### Research external
|
|
31
33
|
|
|
32
|
-
For every technology, library, or pattern
|
|
34
|
+
For every technology, library, or pattern in scope:
|
|
33
35
|
|
|
34
36
|
- **Docs** — capabilities, limitations, API surface
|
|
35
37
|
- **Best practices** — recommended approaches, common pitfalls
|
|
36
|
-
- **Alternatives** —
|
|
38
|
+
- **Alternatives** — other libraries or patterns solving the same problem
|
|
37
39
|
|
|
38
40
|
Tools: `context7`, fetch, web search.
|
|
39
41
|
|
|
40
42
|
### Ask for clarification
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
Triggered when the approach is unclear, incomplete, or has multiple valid paths. **Do not decide alone.**
|
|
45
|
+
|
|
46
|
+
After receiving answers, loop back to **Codebase explore** to validate the clarified approach before proceeding.
|
|
43
47
|
|
|
44
48
|
| Trigger | What to present |
|
|
45
49
|
| ------------------------- | -------------------------------------- |
|
|
@@ -47,15 +51,17 @@ When approach is NOT decided — ask. Do not decide alone.
|
|
|
47
51
|
| New library or dependency | What it does, why needed, alternatives |
|
|
48
52
|
| Significant tradeoff | What is gained vs. given up |
|
|
49
53
|
|
|
50
|
-
| Rule | Detail
|
|
51
|
-
| --------------- |
|
|
52
|
-
| Provide options | Offer choices with tradeoffs, not open-ended
|
|
53
|
-
| Show research | Share findings to give context
|
|
54
|
-
| Batch questions | Group related decisions. Max ~5 per round
|
|
55
|
-
| Be specific | Reference concrete code, libraries, or behaviors
|
|
54
|
+
| Rule | Detail |
|
|
55
|
+
| --------------- | ---------------------------------------------------- |
|
|
56
|
+
| Provide options | Offer choices with tradeoffs, not open-ended queries |
|
|
57
|
+
| Show research | Share findings to give context |
|
|
58
|
+
| Batch questions | Group related decisions. Max ~5 per round |
|
|
59
|
+
| Be specific | Reference concrete code, libraries, or behaviors |
|
|
56
60
|
|
|
57
61
|
### Create `plan.md`
|
|
58
62
|
|
|
63
|
+
Only proceed here when the approach is fully decided, covers 100% of requirements, and has a single clear path.
|
|
64
|
+
|
|
59
65
|
Template in `.flower/templates/plan.md`. Set `status: in-progress`.
|
|
60
66
|
|
|
61
67
|
| Section | Content |
|
|
@@ -88,7 +94,9 @@ If no viable approach exists → set `status: rejected`, fill `## Rejection Reas
|
|
|
88
94
|
|
|
89
95
|
## Rules
|
|
90
96
|
|
|
97
|
+
- **Follow the workflow** — never skip steps or reorder them
|
|
91
98
|
- **Research before deciding** — explore codebase and docs before forming an approach
|
|
99
|
+
- **Loop on uncertainty** — if unclear after research, ask for clarification then re-explore; repeat until resolved
|
|
92
100
|
- **Surface choices** — when multiple approaches exist, present them with tradeoffs; never pick silently
|
|
93
101
|
- **New deps need approval** — never add a library to the plan without asking
|
|
94
102
|
- **Decisions in the document** — every choice from Q&A must appear in Technical Decisions
|