feature-factory 0.9.0 → 0.9.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/WORKFLOW.md +6 -1
- package/agents/backend-builder.md +10 -0
- package/agents/frontend-builder.md +10 -0
- package/agents/story-writer.md +8 -0
- package/agents/work-reviewer.md +15 -0
- package/package.json +1 -1
package/WORKFLOW.md
CHANGED
|
@@ -1393,9 +1393,14 @@ Per slice:
|
|
|
1393
1393
|
$ factory slice "$R" "$SLICE_ID" review --evidence-ref "evidence/$SLICE_ID.json" \
|
|
1394
1394
|
--review-ref "reviews/$SLICE_ID.json" --repo "$RUN_REPO"
|
|
1395
1395
|
```
|
|
1396
|
-
- On REJECT, before spending an attempt, identify the
|
|
1396
|
+
- On REJECT, before spending an attempt, identify the cause of the remaining failures. If the fix would
|
|
1397
1397
|
violate an approved story or brief constraint, or repeated findings trace to the same unresolved
|
|
1398
1398
|
design choice, stop and escalate the smallest decision needed rather than burning attempts.
|
|
1399
|
+
When repeated reviews leave substantial acceptance gaps, review prior verified progress and identify
|
|
1400
|
+
a bounded, achievable remediation target for the next attempt, even when the design is fully decided.
|
|
1401
|
+
If no such target can be identified, park through the existing parked-stop procedure for replanning
|
|
1402
|
+
or operator clarification; preserve the work and do not silently change approved acceptance criteria.
|
|
1403
|
+
Unchanged finding counts alone are not a stall: progress can occur within a category that remains open.
|
|
1399
1404
|
Otherwise route the fixes back to that builder and re-observe. After `max_retries`, mark the slice
|
|
1400
1405
|
`blocked` and stop dispatching its dependents.
|
|
1401
1406
|
5. **Merge (you, serially)** — on APPROVE, merge the slice branch into the feature branch one at a
|
|
@@ -45,6 +45,16 @@ introducing a shape the repo does not use.
|
|
|
45
45
|
|
|
46
46
|
## Verify before reporting
|
|
47
47
|
|
|
48
|
+
Before expanding a class-wide behavioral test matrix, run one representative negative control
|
|
49
|
+
within your slice's owned paths. Change production behavior without changing the tests or preventing
|
|
50
|
+
execution. Confirm the mapped test passes before the mutation, fails on the expected behavioral
|
|
51
|
+
assertion with the mutation, and passes after restoration. A syntax, import, discovery, or unrelated
|
|
52
|
+
failure does not count. Restore the mutation before committing or reporting.
|
|
53
|
+
In your narrative report, name the inventory row, production symbol and mutation, exact test command,
|
|
54
|
+
observed assertion failure, and restoration result. Mark an unperformed control as **not run** with
|
|
55
|
+
the reason; never infer a result. This is diagnostic instruction, not a new claim-schema field or a
|
|
56
|
+
replacement for the ratified test run.
|
|
57
|
+
|
|
48
58
|
From the worktree, compile and run the narrowest relevant tests:
|
|
49
59
|
Use the repo's own build and test commands, scoped as narrowly as they allow — a compile or
|
|
50
60
|
type-check step, then the specific test class or file you touched, not the full suite. If the
|
|
@@ -48,6 +48,16 @@ and the repo's agent instructions (`AGENTS.md` or `CLAUDE.md`) name the concrete
|
|
|
48
48
|
|
|
49
49
|
## Verify before reporting
|
|
50
50
|
|
|
51
|
+
Before expanding a class-wide behavioral test matrix, run one representative negative control
|
|
52
|
+
within your slice's owned paths. Change production behavior without changing the tests or preventing
|
|
53
|
+
execution. Confirm the mapped test passes before the mutation, fails on the expected behavioral
|
|
54
|
+
assertion with the mutation, and passes after restoration. A syntax, import, discovery, or unrelated
|
|
55
|
+
failure does not count. Restore the mutation before committing or reporting.
|
|
56
|
+
In your narrative report, name the inventory row, production symbol and mutation, exact test command,
|
|
57
|
+
observed assertion failure, and restoration result. Mark an unperformed control as **not run** with
|
|
58
|
+
the reason; never infer a result. This is diagnostic instruction, not a new claim-schema field or a
|
|
59
|
+
replacement for the ratified test run.
|
|
60
|
+
|
|
51
61
|
A fresh worktree may share the main repo's installed dependencies via a link the orchestrator created. If they are missing, run the repo's install command via `bash -c "cd $WT && <install"` once before building.
|
|
52
62
|
|
|
53
63
|
Use the repo's own build or type-check command, run inside `$WT`.
|
package/agents/story-writer.md
CHANGED
|
@@ -26,6 +26,14 @@ A feature idea in the engineer's words, plus (optionally) a research map from co
|
|
|
26
26
|
- Acceptance criteria are **testable**: each one is something test-verifier could later assert. "Works well" is not a criterion; "Auditor sees a disabled Save button until all required fields are filled" is.
|
|
27
27
|
- State what's **out of scope** explicitly — it's the cheapest way to prevent scope creep downstream.
|
|
28
28
|
- Keep it product-level. No file paths, no class names — that's the spec-writer's job.
|
|
29
|
+
- Each acceptance criterion must support the requested outcome or a necessary correctness/safety condition.
|
|
30
|
+
Label additional capabilities and broad architectural requirements as proposed scope additions,
|
|
31
|
+
explain why they are needed, and obtain explicit approval at the existing story gate before
|
|
32
|
+
incorporating them into accepted scope. Do not silently turn implementation preferences into requirements.
|
|
33
|
+
This is not a criterion-count limit or a reason to omit necessary reliability or safety behavior.
|
|
34
|
+
- Scope correctness and safety criteria to the requested behavior. When addressing known defects,
|
|
35
|
+
name the failure scenarios to prevent rather than silently generalizing them into a subsystem-wide guarantee.
|
|
36
|
+
If a broader guarantee is necessary, explain its scope and proof obligations before approval.
|
|
29
37
|
|
|
30
38
|
## Output contract
|
|
31
39
|
|
package/agents/work-reviewer.md
CHANGED
|
@@ -62,6 +62,16 @@ producer for anything it could supply.
|
|
|
62
62
|
|
|
63
63
|
When the subject is a **class-wide** requirement — one that **cannot be established by a bounded witness**, so proving it means checking every in-scope member and the set has to be enumerated first. `all`/`every`/`centralize`/`across` and a whole vulnerability or behavior class are the obvious markers, but the words are instances and not the test: an absence ("no module constructs the runtime"), a preserved property ("behaviour remains unchanged") and a global capability ("the installed artifact works") each require checking every member without using any of them, and the rules below are what make such a claim reviewable at all. An existential claim is the opposite and must **not** be treated as class-wide: "a module constructs the runtime" or "the daemon accepts a connection" is settled by one witness, so demanding an exhaustive inventory for it is over-rejection:
|
|
64
64
|
- The spec must carry a finite source→sink inventory with a per-call-site policy, explicit compatibility/exclusion decisions, and mapped tests. A class-wide spec lacking any of these is a **BLOCKER** — reject it as missing targeted research rather than letting an open-ended "apply everywhere" reach builders.
|
|
65
|
+
For a class-wide behavioral criterion, each inventory row must map to an executable test that
|
|
66
|
+
invokes the relevant production boundary and asserts its required effect or exclusion. The spec
|
|
67
|
+
must name that test approach; build review checks its implementation. Shared parameterized tests
|
|
68
|
+
are valid; separate tests per member are not required.
|
|
69
|
+
AST references and test names prove enumeration, not behavior.
|
|
70
|
+
- Treat the builder's negative-control report as self-reported diagnostic information,
|
|
71
|
+
not independent evidence or proof of coverage for every inventory row. Check whether the named
|
|
72
|
+
mutation tests behavior and the reported failure is the expected behavioral assertion, not a
|
|
73
|
+
syntax, import, discovery, or unrelated failure. Missing attestation alone is not a blocker;
|
|
74
|
+
inadequate behavioral coverage is. Do not approve on the attestation alone.
|
|
65
75
|
- On the first review of a class-wide **spec**, enumerate in one pass **every dimension of under-specification** — not just each same-class instance and call site, but every unresolved contract, policy, migration/grant, auth-gating, state, and test seam — and consolidate them all into one `required_fixes` list. A category surfaced in a later round that was discoverable in the first review is a first-pass miss to record once in `required_fixes` and carry forward until observed fixed — it stays blocking (see the precedence rule below), but do not spawn a duplicate finding or a fresh rejection cycle for it.
|
|
66
76
|
- When you reject a class-wide build, make `required_fixes` **exhaustive for the class** as of the current evidence: consolidate every discoverable in-scope same-class instance and affected call site into this review. Do not cite one example while withholding equivalent findings for a later round — drip-feeding one sink per round (each fix triggering the next rejection) is exactly the churn this rule prevents.
|
|
67
77
|
- **Acceptance bar (do not over-reject):** approve a class-wide spec once its inventory is finite, every in-scope sink carries a decided policy, and every row maps to a test — even if some contracts could be specified in more depth. A deferral or exclusion is legitimate **only when the approved story or scope authorizes it**; never waive, defer, or leave undecided an in-scope sink that falls under an `all`/`every`/`across` criterion. A **bounded residual** may be left to build-time remediation only when it is mechanical implementation detail whose behavior, compatibility, security, auth-gating, migration, and state policy are already decided in the brief — an unresolved behavioral or design decision is not a residual and must be decided before approval, never shipped to builders as an open choice. Reject only for a genuinely missing sink, policy, compatibility decision, or test, not for achievable-but-absent depth.
|
|
@@ -91,6 +101,11 @@ When the subject is a **class-wide** requirement — one that **cannot be establ
|
|
|
91
101
|
catch any of this; the two slices share no path. It is decidable from the plan alone, so check it here
|
|
92
102
|
rather than discovering it at the slice that fails.
|
|
93
103
|
- **Doc steps (`spec-writer`, `work-decomposer`):** every required field of the output contract is filled; the artifact is consistent with its inputs (does the brief cover every AC and match the research map's real paths? does the slice DAG obey file-disjoint + hotspot-serialization rules, and does every AC map to a slice?). For `work-decomposer`, do not approve unless the supplied `plan/slices.json` is a top-level object with array-valued `slices` (the exact seedable shape `{ "slices": [...] }`); inspect only the supplied artifact, not a broader plan schema. Coverage is not enough: where more than one slice exists, a slice claiming the entire acceptance set, or claiming paths spanning every module in its lane, is a BLOCKER — that plan reviews clean and fails later as "N categories missing", which is a scope report rather than a defect report. Apply the same reviewability test to **every** slice with no condition on the plan's size, including the only slice of a one-slice plan: if your own likely rejection of it would say whole categories of required behaviour remain unimplemented, it is too large and the plan is a BLOCKER. **A one-slice plan whose `### Single-slice justification` is absent, or which justifies itself only by the brief presenting one closed inventory, is a BLOCKER** — the justification must name the semantic boundaries considered and why splitting them would create proof-only work, illegal path/test ownership, or inseparable implementation. Do not demand a split from a genuinely small change whose justification does that; the requirement is a stated reason, not a minimum slice count. For class-wide subjects, the brief must include the finite implementation matrix (per §"Class-wide completeness") — a class-wide spec that lacks it is a BLOCKER. Whether each slice can make its own `test_plan` green is the satisfiability bullet's check, stated once there rather than repeated here.
|
|
104
|
+
Check that criteria and proposed requirements support the requested outcome or necessary correctness/safety.
|
|
105
|
+
Additional capabilities and broad architectural requirements need an explicit scope rationale and approval;
|
|
106
|
+
reject unapproved scope expansion rather than silently accepting it as an implementation requirement.
|
|
107
|
+
Check the supplied request and approval record; do not reopen explicitly approved scope merely because
|
|
108
|
+
a smaller feature is possible. Do not impose a criterion-count limit or reject necessary reliability behavior.
|
|
94
109
|
- **Build slices (`backend-builder` / `frontend-builder`):** apply the repo's own rubric — its agent instructions (`AGENTS.md` or `CLAUDE.md` and any review or rules files it points at — against the **observed diff**:
|
|
95
110
|
- Backend: the repo's layering, its projection/read path, its API boundary.
|
|
96
111
|
- Frontend: the repo's component conventions, binding forms, state approach and design tokens.
|