@caiqueoak/flow 0.3.1 → 0.3.2

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/README.md CHANGED
@@ -38,7 +38,7 @@ Flow internally loads only the guidance needed for discovery, planning, build, r
38
38
 
39
39
  When authorized, Flow keeps a concise artifact model: product truth in `PRD.md`, engineering truth in `ENGINEERING.md`, decisions in `DECISIONS.md`, execution context in `STATE.md`, the canonical work-item DAG in `BACKLOG.yaml`, and a human-readable derived projection in `GRAPH.md`. Work items use `SPEC.md` plus `TASKS.yaml`. `SUMMARY.md` is not part of the model.
40
40
 
41
- In `GRAPH.md`, work-item states are consistent: complete is green, in progress is blue, blocked is red when unfinished dependencies remain, and pending is yellow when all dependencies are complete and the item is ready to execute.
41
+ In `GRAPH.md`, work-item states are consistent: complete is green, in progress is blue, blocked is red when unfinished dependencies remain, and pending is yellow when all dependencies are complete and the item is ready to execute. Each Mermaid card contains only the work-item ID and canonical title. Every dependency arrow goes from dependency to dependent item and uses the color and line style of its source card.
42
42
 
43
43
  ## Update
44
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caiqueoak/flow",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Readability-first, agent-agnostic software development workflow for coding agents.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -47,7 +47,7 @@ Graph/control data is YAML:
47
47
 
48
48
  Do not create `SUMMARY.md`, completion logs, ad-hoc progress documents, handoff documents, reports, or any other new project artifact unless the developer explicitly requests or authorizes them. Completed `SPEC.md` files retain concise Overview and Validation sections.
49
49
 
50
- `GRAPH.md` is derived only. It must never become an independent source of truth and must be reconciled whenever work-item existence, dependencies, or status change. Preserve its established visual style and conventions while updating it.
50
+ `GRAPH.md` is derived only. It must never become an independent source of truth and must be reconciled whenever work-item existence, title, dependencies, or status change. Before creating or changing it, read `references/graph.md` and follow that contract exactly; do not preserve an established style that conflicts with it.
51
51
 
52
52
  ## Work item model
53
53
 
@@ -121,6 +121,7 @@ Load only the reference needed for current state:
121
121
  - Ready planned tasks: `references/build.md`
122
122
  - Completed implementation awaiting validation: `references/review.md`
123
123
  - Decision impact or inconsistent artifacts: `references/reconcile.md`
124
+ - Creating or updating `GRAPH.md`: additionally load `references/graph.md`
124
125
 
125
126
  ## Orchestration loop
126
127
 
@@ -0,0 +1,62 @@
1
+ # `GRAPH.md` Rules
2
+
3
+ Every Flow `GRAPH.md` must be a derived, human-readable projection of
4
+ `.flow/BACKLOG.yaml`. It never becomes an independent source of truth.
5
+
6
+ ## Card content
7
+
8
+ Each Mermaid card contains exactly two lines:
9
+
10
+ ```text
11
+ <work-item ID>
12
+ <work-item title>
13
+ ```
14
+
15
+ Do not include status, priority, folder, dependency lists, or explanatory
16
+ prose inside a card. The title is the canonical `title` value from
17
+ `BACKLOG.yaml`.
18
+
19
+ ## Status derivation and colors
20
+
21
+ Derive status from the backlog and dependencies after every meaningful state
22
+ transition.
23
+
24
+ | Status | Meaning | Card color | Outgoing arrow style |
25
+ | --- | --- | --- | --- |
26
+ | Complete | Work item is accepted and complete. | Green (`#16a34a`) | Solid green |
27
+ | In progress | Work item has active execution. | Blue (`#2563eb`) | Solid blue, thicker |
28
+ | Pending | Every dependency is complete and the item is ready to start. | Yellow (`#d97706`) | Dashed yellow |
29
+ | Blocked | The item is neither complete nor in progress and one or more dependencies are incomplete. | Red (`#dc2626`) | Dotted red |
30
+
31
+ Use matching fill, stroke, and readable text colors for cards. Every graph
32
+ must include a titled status legend using these colors.
33
+
34
+ ## Dependencies and arrows
35
+
36
+ - Draw one arrow for every `depends_on` relationship in `BACKLOG.yaml`.
37
+ - The arrow goes from dependency to dependent item.
38
+ - Every outgoing arrow inherits the color and line style of its source card.
39
+ - Recalculate Mermaid `linkStyle` indexes whenever edges change; do not leave
40
+ a stale style assignment behind.
41
+ - Do not add visual-only dependency edges to force layout.
42
+
43
+ ## Parallelism and layout
44
+
45
+ - Items on the same vertical rank must have no dependency on one another and
46
+ are candidates for parallel work.
47
+ - Keep independent, ready items on the same vertical rank where Mermaid can
48
+ represent the real dependency graph without artificial edges.
49
+ - Do not represent blocked items as pending merely because they are planned;
50
+ dependency readiness determines their graph status.
51
+
52
+ ## Synchronization checklist
53
+
54
+ When work-item state, existence, title, or dependencies change:
55
+
56
+ 1. Update `BACKLOG.yaml` first.
57
+ 2. Recompute derived statuses using the definitions above.
58
+ 3. Update `GRAPH.md`, including cards, arrows, styles, legend, and parallel
59
+ layout.
60
+ 4. Update `STATE.md` when the active path or next ready work changes.
61
+ 5. Verify that every backlog item appears exactly once and every dependency
62
+ appears exactly once in the graph.