@caiqueoak/flow 0.6.0 → 0.7.0
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 +2 -2
- package/package.json +1 -1
- package/skills/flow/SKILL.md +2 -2
- package/skills/flow/build/step-01-execute-task.md +1 -1
- package/skills/flow/discovery/step-01-project.md +1 -1
- package/skills/flow/engineering/step-02-synthesize.md +1 -1
- package/skills/flow/planning/step-01-plan-work-item.md +1 -1
- package/skills/flow/planning/step-02-prepare-plan.md +1 -1
- package/skills/flow/review/step-01-review-work-item.md +1 -1
- package/src/commands/route.mjs +6 -1
package/README.md
CHANGED
|
@@ -30,9 +30,9 @@ PRD, engineering and plans use YAML frontmatter with `schema_version: 1`, `statu
|
|
|
30
30
|
## Canonical artifacts
|
|
31
31
|
|
|
32
32
|
- `config.yaml`: runtime/bootstrap preferences; installed package metadata owns version.
|
|
33
|
-
- `docs/prd.md`: product truth; `docs/engineering.md`: approved
|
|
33
|
+
- `docs/prd.md`: global, cross-work-item product truth and learner-visible constraints; `docs/engineering.md`: approved global technical/code/infra truth.
|
|
34
34
|
- `backlog.yaml`: schema 2, W### IDs, W###-kebab-case folders, kinds, priority, dependency DAG and lifecycle.
|
|
35
|
-
- `work-items/W###-slug/spec.md`: bounded scope and
|
|
35
|
+
- `work-items/W###-slug/spec.md`: bounded scope, delivery decisions, and acceptance for one work item; it references applicable PRD rules without redefining them. `tasks.yaml`: schema 1, work_item, local T### task DAG.
|
|
36
36
|
- `implementation-plan.md`: human-approved implementation approach.
|
|
37
37
|
- `state.yaml`: resume cursor and migration reconciliation status.
|
|
38
38
|
- `gates.yaml`: schema 1, command/builtin checks only; qualitative judgment remains review instructions.
|
package/package.json
CHANGED
package/skills/flow/SKILL.md
CHANGED
|
@@ -10,12 +10,12 @@ description: Repository-resumable software delivery through discovery, approved
|
|
|
10
10
|
Read invariants.md once per invocation. All Flow CLI commands MUST use the project-local installation: `npx --no-install flow`. If unavailable, stop and ask for local installation; never use a global executable or fetch a different package automatically.
|
|
11
11
|
|
|
12
12
|
1. Run `npx --no-install flow route --json`.
|
|
13
|
-
2. Read the returned instruction from this installed skill and every returned required_context file. Planning, implementation and review require rereading the FULL
|
|
13
|
+
2. Read the returned instruction from this installed skill and every returned required_context file. Planning, implementation and review require rereading the FULL `.flow/docs/engineering.md` immediately before that step, including after resumption. For a selected work item, use the PRD only for applicable global product rules and use its spec for the bounded delivery scope.
|
|
14
14
|
3. Execute only the routed step, persist canonical artifacts and run its required checks.
|
|
15
15
|
4. Route again. Continue until an actual human decision, external action, unrecoverable blocker or completion.
|
|
16
16
|
|
|
17
17
|
If stopped for approval, present the exact proposal and ask explicitly. Never approve your own work or treat silence as consent. Human approval must be persisted with status: approved and approved_at: ISO timestamp in the approved document. Clear state.stop_reason only when the current message resolves its decision. Revisions require a new approval, not copying an old approved_at.
|
|
18
18
|
|
|
19
|
-
Artifact owners: docs/prd.md product; docs/engineering.md
|
|
19
|
+
Artifact owners: `docs/prd.md` owns global, cross-work-item product rules and learner-visible constraints; `docs/engineering.md` owns global technical, code, infrastructure, and pattern constraints; `backlog.yaml` owns the work-item DAG; `work-items/W###-slug/spec.md` owns only bounded scope, acceptance, and decisions for that work item, referencing applicable PRD rules without redefining them; `tasks.yaml` owns the task DAG; `implementation-plan.md` owns the approved approach; `state.yaml` owns the cursor; `gates.yaml` owns mechanical checks; `docs/graph.md` is derived. Preserve completed history; changed completed scope becomes new maintenance work.
|
|
20
20
|
|
|
21
21
|
Engineering changes go through reconcile/step-01-reconcile.md: propose the change, obtain approval and invalidate affected plans. A profile is bootstrap input, never a second policy engine competing with approved engineering.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Build — execute one approved task
|
|
2
2
|
|
|
3
|
-
Read the FULL engineering.md, spec, tasks and approved current implementation plan. Verify current route and approval hashes before application edits. Persist both selected work item and task in_progress; no other mutating task may be active.
|
|
3
|
+
Read the applicable global PRD rules, the FULL engineering.md, spec, tasks and approved current implementation plan. Verify current route and approval hashes before application edits. Persist both selected work item and task in_progress; no other mutating task may be active.
|
|
4
4
|
|
|
5
5
|
Implement the bounded approved change for readability: semantic naming, mandatory SRP, low coupling, high cohesion, locality and justified complexity. If the approach must change materially, revise the plan and ask approval before continuing.
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Discovery — define product
|
|
2
2
|
|
|
3
|
-
Read current intent and existing product evidence. Create
|
|
3
|
+
Read current intent and existing product evidence. Create `.flow/docs/prd.md` as a coherent proposal for global, cross-work-item product rules and learner-visible constraints, not architecture or work-item implementation detail. Frontmatter: schema_version: 1, status: draft. Headings: # Product Requirements; ## Purpose; ## Users; ## Scope; ## Requirements; ## Constraints; ## Non-goals.
|
|
4
4
|
|
|
5
5
|
Create state.yaml with schema_version: 1, execution.phase: discovery, active.work_item/task: null, stop_reason: null, migration.status: not_required. Do not create incomplete work-item folders or implement code. Present scope and ask PRD approval through the next routed step.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Read the approved PRD, config, full existing engineering evidence, repository tooling/contracts, profiles/readability-first.md and technology-defaults.md. Use existing_code_policy improve to critique accidental structure while preserving behavior; preserve gives consistent patterns stronger weight. Neither authorizes refactoring.
|
|
4
4
|
|
|
5
|
-
Recommend a complete but proportional contract. Frontmatter: schema_version: 1, status: draft, baseline.profile: flow/readability-first@1, baseline.existing_code_policy: improve|preserve|not_applicable. Include exact headings:
|
|
5
|
+
Recommend a complete but proportional technical contract. Keep global product behavior in the PRD and bounded delivery behavior in work-item specs; engineering records only the technical/code/infra constraints that realize them. Frontmatter: schema_version: 1, status: draft, baseline.profile: flow/readability-first@1, baseline.existing_code_policy: improve|preserve|not_applicable. Include exact headings:
|
|
6
6
|
|
|
7
7
|
# Engineering
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Reread the FULL approved engineering.md and PRD. Decompose all known approved scope into bounded work items and dependencies; do not invent future scope. Create backlog.yaml schema_version: 2, work_items with id W###, folder W###-kebab-case, kind feature|technical|maintenance, title, state pending, priority positive integer, depends_on and blockers.
|
|
4
4
|
|
|
5
|
-
Create EVERY known work-item folder with spec.md and tasks.yaml before implementation. Existing completed artifacts stay intact. Specs include ## Status, ## Goal, ## Scope, ## Non-goals, ## Requirements, ## Acceptance criteria, ## Decisions, ## Implementation, ## Final outcome, ## Validation and ## Follow-up. Tasks: schema_version: 1, work_item: W###, tasks with local T### IDs, title, state pending, depends_on, implementation commit|none. Preserve already completed task history.
|
|
5
|
+
Create EVERY known work-item folder with spec.md and tasks.yaml before implementation. Existing completed artifacts stay intact. Each spec owns only its bounded scope, delivery decisions, and acceptance; reference applicable global PRD rules rather than copying or redefining them. Specs include ## Status, ## Goal, ## Scope, ## Non-goals, ## Requirements, ## Acceptance criteria, ## Decisions, ## Implementation, ## Final outcome, ## Validation and ## Follow-up. Tasks: schema_version: 1, work_item: W###, tasks with local T### IDs, title, state pending, depends_on, implementation commit|none. Preserve already completed task history.
|
|
6
6
|
|
|
7
7
|
Structured blockers: id stable-kebab-case, type external_action|consequential_decision, description, status unresolved|resolved. Do not encode dependencies as external blockers.
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Planning — draft an implementation plan
|
|
2
2
|
|
|
3
|
-
Reread the FULL approved engineering.md, selected spec/tasks, affected code and tests. Write implementation-plan.md BEFORE application edits. Frontmatter: schema_version: 1, work_item: W###, status: draft, engineering_revision and spec_revision SHA256 of the exact UTF-8 files. Calculate with Node crypto; never guess.
|
|
3
|
+
Reread the applicable global PRD rules, the FULL approved engineering.md, selected spec/tasks, affected code and tests. The PRD supplies product constraints; the spec supplies only this work item's bounded delivery scope. Write implementation-plan.md BEFORE application edits. Frontmatter: schema_version: 1, work_item: W###, status: draft, engineering_revision and spec_revision SHA256 of the exact UTF-8 files. Calculate with Node crypto; never guess.
|
|
4
4
|
|
|
5
5
|
Use exact headings:
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Review — verify delivery
|
|
2
2
|
|
|
3
|
-
Reread FULL engineering.md, frozen scope, tasks and approved plan. Review acceptance, regressions, SRP, semantic naming, low coupling/high cohesion, vertical-slice locality and complexity ROI. Explain concrete defects, not stylistic alternatives. Run actual tests and npx --no-install flow validate; never write fake gate evidence.
|
|
3
|
+
Reread applicable global PRD rules, FULL engineering.md, frozen scope, tasks and approved plan. Review acceptance, regressions, SRP, semantic naming, low coupling/high cohesion, vertical-slice locality and complexity ROI. Explain concrete defects, not stylistic alternatives. Run actual tests and npx --no-install flow validate; never write fake gate evidence.
|
|
4
4
|
|
|
5
5
|
Defects become new fix tasks. Material approach changes require revised plan approval; never rewrite completed task history. Complete only after all tasks, acceptance, gates, qualitative review and traceability pass. Populate spec outcome/implementation/validation; synchronize backlog/state/graph, validate and route again.
|
package/src/commands/route.mjs
CHANGED
|
@@ -94,7 +94,12 @@ export function routeProject(root) {
|
|
|
94
94
|
reason: backlog.work_items.every((item) => item.state === 'completed') ? 'finished' : 'external_action'
|
|
95
95
|
};
|
|
96
96
|
const base = `work-items/${item.folder}`;
|
|
97
|
-
const context = [
|
|
97
|
+
const context = [
|
|
98
|
+
'.flow/docs/prd.md',
|
|
99
|
+
'.flow/docs/engineering.md',
|
|
100
|
+
`.flow/${base}/spec.md`,
|
|
101
|
+
`.flow/${base}/tasks.yaml`
|
|
102
|
+
];
|
|
98
103
|
const tasks = parseTasks(read(`${base}/tasks.yaml`), { expectedWorkItem: item.id });
|
|
99
104
|
const extra = { work_item: item.id, required_context: context };
|
|
100
105
|
const prepare = () => step('work_item_plan_approval', 'planning/step-02-prepare-plan.md', extra);
|