@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
@@ -76,7 +76,7 @@ var init = defineCommand({
76
76
  var main = defineCommand({
77
77
  meta: {
78
78
  name: "flower",
79
- version: "0.1.3",
79
+ version: "0.1.4",
80
80
  description: "\u{1F338} flower CLI"
81
81
  },
82
82
  subCommands: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itsflower/cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "🌸 flower CLI — scaffold structured development workflows",
5
5
  "keywords": [
6
6
  "cli",
@@ -1,41 +1,40 @@
1
1
  ---
2
2
  name: flower
3
- description: Structured development workflow with 4 phases — clarify, plan, build, and review. Use when the user wants to build a feature end-to-end, fix a bug, or refactor with a structured process, or when they mention "quest", "feature", "task", or "workflow".
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]) --> P1[Clarify]
11
- P1 --> P2[Plan]
12
- P2 -- not feasible --> D1([End - plan.md rejected])
13
- P2 -- feasible --> P3[Build]
14
- P3 --> P4[Review]
15
- P4 --> D2([Done])
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 | When |
21
- | --- | ------- | ---------------------------------------------- | ------------------------------------------------------- |
22
- | 1 | Clarify | [references/clarify.md](references/clarify.md) | User describes a feature, bug, or refactor to build |
23
- | 2 | Plan | [references/plan.md](references/plan.md) | Interview is complete, requirement.md and plan.md ready |
24
- | 3 | Build | [references/build.md](references/build.md) | All tasks are done, ready for quality gate |
25
- | 4 | Review | [references/review.md](references/review.md) | All tasks are done, ready for quality gate |
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 `date +"%y%m%d-%H%M"` to generate it
34
- - `<short-description>` is a kebab-case summary generated by the agent (e.g. `add-user-auth`, `fix-login-bug`)
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 (**STRICTLY ENFORCED**)
37
+ ## Rules
38
38
 
39
- - Print `# Phase <number>: <name>` **once** before each phase. After a phase is complete, **IMMEDIATELY** begin the next phase without asking.
40
- - One quest at a time finish or park the current quest before starting another
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`, test each one, and log knowledge in the journal.
3
+ Execute tasks from `plan.md` in order. Test each one. Mark it done. Repeat.
4
4
 
5
- ## Workflow (**STRICTLY ENFORCED**)
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 in journal if noteworthy]
15
+ B4 --> B5[Log if noteworthy]
16
16
  B5 --> C2{All tasks done?}
17
17
  C2 -- no --> B1
18
- C2 -- yes --> B6[Mark plan as completed]
19
- B6 --> End([Proceed to Phase 4: Review])
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
- For each task in plan order:
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 / Verify
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
- - Run relevant testsunit, integration, or manual as appropriate
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
- ### Mark task done
45
+ **Immediately after tests pass**, check the checkbox in `plan.md`:
54
46
 
55
- Check the task checkbox in plan: `- [ ]` → `- [x]`
47
+ ```
48
+ - [ ] Task title → - [x] Task title
49
+ ```
56
50
 
57
- ### Log in journal
51
+ This tracks resumable state. A task is not done until checked.
58
52
 
59
- Template: `.flower/templates/journal.md`
53
+ ### 4. Log if noteworthy
60
54
 
61
- Only when something noteworthy happened. Skip if plan was followed exactly.
55
+ Open `.flower/journal.md` (create from `templates/journal.md` on first use).
62
56
 
63
- | Log this | Example |
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
- Do **not** log: routine implementation, standard debugging, info already in commits.
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
- **Entry format:**
65
+ Entry format:
74
66
 
75
67
  ```markdown
76
- ### [Short actionable title]
77
-
78
- - **tags**: [comma-separated domain keywords]
68
+ ### [Short title]
69
+ - **tags**: [keywords]
79
70
  - **scope**: [global | project:<name>]
80
- - **context**: [What was being worked on]
81
- - **insight**: [The decision, discovery, or deviation — focus on WHY]
71
+ - **context**: [what you were doing]
72
+ - **insight**: [why — the decision, deviation, or discovery]
82
73
  ```
83
74
 
84
- Create journal file on first entry from template.
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 done, verify:
79
+ After all tasks are checked, verify:
89
80
 
90
- - [ ] All task checkboxes checked
91
- - [ ] All task ACs verified
92
- - [ ] All tests pass (full relevant test suite)
81
+ - [ ] All checkboxes checked
82
+ - [ ] All ACs verified
83
+ - [ ] All tests pass
93
84
  - [ ] No unintended side effects
94
- - [ ] Journal captures all deviations
95
- - [ ] Any tasks added during build are also completed
85
+ - [ ] Deviations captured in journal
96
86
 
97
- If gaps exist → fix before proceeding. Then set `status: completed` in plan frontmatter.
87
+ Then set `status: completed` in plan frontmatter.
98
88
 
99
89
  ## Rules
100
90
 
101
- - **Never skip testing** — every task verified before marking done
102
- - **Don't change task scope**update the plan first, note in journal
103
- - **Add, don't expand** new work = new task in the plan
104
- - **Follow plan order** respect dependencies; only skip ahead when blocked
105
- - **Resumable state** — plan shows exactly where to resume (next unchecked task)
106
- - **Don't fix unrelated issues** — note in journal for a future quest
91
+ - Never skip testing
92
+ - Never skip marking doneit 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 (**STRICTLY ENFORCED**)
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 | Offer choices, not open-ended questions. E.g., "(a) partial, (b) exact, or (c) both?" |
45
- | Batch questions | Group related questions. Max ~5 per round. |
46
- | Be specific | Reference concrete code, files, or behaviors. |
47
- | Easy to answer | Human should answer in a few words or by picking an option. |
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** — detect keywords and research the codebase first; only ask what you cannot answer yourself
77
- - **Every word matters** — read the human's input thoroughly; do not skim or skip
78
- - **Options over open-ended** — always provide choices when asking questions
79
- - **Draft once, draft right** — documents must be accurate and complete on first draft; the Q&A phase exists to ensure this
80
- - **Problem solution** — requirement describes what's wrong, not how to fix it
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 the codebase, study external docs, decide the approach, and produce `plan.md`.
3
+ Research HOW to implement `requirement.md` — explore codebase, study docs, decide approach, produce `plan.md`.
4
4
 
5
- ## Workflow (**STRICTLY ENFORCED**)
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{Approach decided?}
13
+ P2 --> C1{Unclear / incomplete / multiple approaches?}
12
14
  C1 -- no --> P3[Ask for clarification]
13
- P3 --> P4[Create plan.md]
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
- Use goals and acceptance criteria from `requirement.md` as search targets:
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 implemented; conventions to follow
26
- - **Reuse** — what already exists vs. what must be built
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 relevant to the requirement:
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** — competing libraries or patterns that solve the same problem
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
- When approach is NOT decided ask. Do not decide alone.
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 questions |
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
@@ -0,0 +1,3 @@
1
+ from datetime import datetime
2
+
3
+ print(datetime.now().strftime("%y%m%d-%H%M"))