@phuthuycoding/kanban-flow 0.3.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.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +173 -0
  3. package/dist/cli/args.js +219 -0
  4. package/dist/cli/commands/approve.js +44 -0
  5. package/dist/cli/commands/archive.js +245 -0
  6. package/dist/cli/commands/artifacts.js +100 -0
  7. package/dist/cli/commands/autoconfig.js +180 -0
  8. package/dist/cli/commands/cancel.js +129 -0
  9. package/dist/cli/commands/contexts.js +101 -0
  10. package/dist/cli/commands/doctor.js +35 -0
  11. package/dist/cli/commands/harness.js +60 -0
  12. package/dist/cli/commands/helpers.js +22 -0
  13. package/dist/cli/commands/init.js +119 -0
  14. package/dist/cli/commands/inspect.js +141 -0
  15. package/dist/cli/commands/new.js +80 -0
  16. package/dist/cli/commands/rules.js +69 -0
  17. package/dist/cli/commands/run.js +156 -0
  18. package/dist/cli/commands/stage.js +186 -0
  19. package/dist/cli/result.js +1 -0
  20. package/dist/dashboard/dashboard-view.js +238 -0
  21. package/dist/dashboard/dashboard.js +206 -0
  22. package/dist/harness/chain.js +41 -0
  23. package/dist/harness/config.js +168 -0
  24. package/dist/harness/prompt.js +105 -0
  25. package/dist/harness/run.js +245 -0
  26. package/dist/harness/session.js +78 -0
  27. package/dist/harness/supervise.js +65 -0
  28. package/dist/index.js +123 -0
  29. package/dist/integrations/agents.js +67 -0
  30. package/dist/integrations/hooks.js +59 -0
  31. package/dist/integrations/install.js +193 -0
  32. package/dist/project/bootstrap.js +358 -0
  33. package/dist/project/config.js +111 -0
  34. package/dist/project/contexts.js +98 -0
  35. package/dist/project/doctor.js +163 -0
  36. package/dist/shared/frontmatter.js +54 -0
  37. package/dist/shared/paths.js +78 -0
  38. package/dist/shared/time.js +5 -0
  39. package/dist/workflow/direction.js +56 -0
  40. package/dist/workflow/features.js +198 -0
  41. package/dist/workflow/findings.js +3 -0
  42. package/dist/workflow/schema.js +148 -0
  43. package/dist/workflow/secrets.js +52 -0
  44. package/dist/workflow/status.js +188 -0
  45. package/dist/workflow/validate-approval.js +25 -0
  46. package/dist/workflow/validate-artifacts.js +89 -0
  47. package/dist/workflow/validate-cancel.js +14 -0
  48. package/dist/workflow/validate-reports.js +121 -0
  49. package/dist/workflow/validate-traceability.js +91 -0
  50. package/dist/workflow/validate.js +73 -0
  51. package/docs/workflow/README.md +67 -0
  52. package/docs/workflow/artifacts.md +60 -0
  53. package/docs/workflow/cli-reference.md +78 -0
  54. package/docs/workflow/dashboard.md +35 -0
  55. package/docs/workflow/gates.md +103 -0
  56. package/docs/workflow/harness.md +144 -0
  57. package/docs/workflow/lifecycle.md +107 -0
  58. package/docs/workflow/skills.md +52 -0
  59. package/docs/workflow/source-layout.md +47 -0
  60. package/docs/workflow/state-machine.md +83 -0
  61. package/kanban-flow/review/rules/README.md +30 -0
  62. package/kanban-flow/review/rules/general.md +41 -0
  63. package/kanban-flow/review/rules/performance.md +29 -0
  64. package/kanban-flow/review/rules/security.md +32 -0
  65. package/kanban-flow/review/stacks/go.md +33 -0
  66. package/kanban-flow/review/stacks/java.md +38 -0
  67. package/kanban-flow/review/stacks/node.md +28 -0
  68. package/kanban-flow/review/stacks/php.md +30 -0
  69. package/kanban-flow/review/stacks/python.md +34 -0
  70. package/kanban-flow/review/stacks/ruby.md +32 -0
  71. package/kanban-flow/review/stacks/rust.md +33 -0
  72. package/kanban-flow/templates/phase-1-bug-report.md +76 -0
  73. package/kanban-flow/templates/phase-1-spec-requirement.md +67 -0
  74. package/kanban-flow/templates/phase-2-implementation-plan.md +85 -0
  75. package/kanban-flow/templates/phase-2-test-case.md +68 -0
  76. package/kanban-flow/templates/phase-2-use-case-diagram.md +18 -0
  77. package/kanban-flow/templates/phase-2-use-case-specification.md +33 -0
  78. package/kanban-flow/templates/phase-2-use-case.md +60 -0
  79. package/kanban-flow/templates/phase-4-testing-result.md +63 -0
  80. package/kanban-flow/templates/phase-5-review-report.md +68 -0
  81. package/kanban-flow/templates/phase-6-feature-report.md +78 -0
  82. package/package.json +63 -0
  83. package/skills/kanban-archive/SKILL.md +78 -0
  84. package/skills/kanban-brainstorm/SKILL.md +310 -0
  85. package/skills/kanban-bug/SKILL.md +55 -0
  86. package/skills/kanban-flow/SKILL.md +136 -0
  87. package/skills/kanban-implement/SKILL.md +72 -0
  88. package/skills/kanban-plan/SKILL.md +102 -0
  89. package/skills/kanban-review/SKILL.md +90 -0
  90. package/skills/kanban-test/SKILL.md +76 -0
@@ -0,0 +1,38 @@
1
+ # Java Review Rules
2
+
3
+ ## Error Handling
4
+ - No empty `catch` blocks and no `catch (Exception e)` that swallows — handle or rethrow with cause
5
+ - Wrapped exceptions preserve the original via the `cause` constructor — no lost stack traces
6
+ - No `throws Exception`/`Throwable` on public APIs — declare specific exception types
7
+ - Exceptions not used for expected control flow; `Optional`/empty results for normal absence
8
+
9
+ ## Null Safety & API
10
+ - `null` never returned where `Optional` or an empty collection expresses absence
11
+ - Nullability contracts explicit (`@Nullable`/`Objects.requireNonNull`) at public boundaries
12
+ - `equals`/`hashCode` implemented together or via records/Lombok — never one without the other
13
+ - Reference comparison with `equals`, never `==` on Strings or boxed types
14
+ - Immutability preferred — `final` fields, `List.copyOf` on returns, records for value types
15
+
16
+ ## Resources & Concurrency
17
+ - Try-with-resources for every `AutoCloseable` — no manual `close()` in `finally`
18
+ - Shared mutable state guarded (locks, concurrent collections) — no unsynchronized lazy init
19
+ - `ExecutorService` over raw `Thread`; pools are sized, named, and shut down on lifecycle end
20
+ - Interrupted status restored (`Thread.currentThread().interrupt()`) or propagated, not swallowed
21
+ - No `Future.get()` without a timeout on blocking waits
22
+
23
+ ## Security
24
+ - JDBC via `PreparedStatement`/parameterized APIs — no string-concatenated SQL
25
+ - No Java native deserialization (`ObjectInputStream`) of untrusted bytes
26
+ - `Runtime.exec`/`ProcessBuilder` never interpolate user input into commands
27
+ - File paths validated against traversal (`normalize` + root check) before access
28
+
29
+ ## Dependencies & Build
30
+ - `pom.xml`/`build.gradle` changes reviewed — versions pinned, scopes correct, no unused deps
31
+ - No SNAPSHOT versions on release branches; wrapper scripts kept consistent with the build
32
+ - Secrets and environment config externalized — nothing sensitive in committed properties/YAML
33
+
34
+ ## Performance
35
+ - No N+1 via JPA — entity graphs/`JOIN FETCH`/batch fetching for associations in loops
36
+ - `StringBuilder` for concatenation in loops — no `+` on hot paths
37
+ - No boxing (`Integer`/`Long`) in hot loops where primitives suffice
38
+ - Caches and pools bounded with eviction configured — no unbounded map-as-cache
@@ -0,0 +1,28 @@
1
+ # Node.js / TypeScript Review Rules
2
+
3
+ ## Async & Errors
4
+ - No floating promises — every promise is awaited, returned, or explicitly handled
5
+ - No `.catch(() => {})` or `try/catch` that swallows errors
6
+ - Reject with `Error` objects, never strings or bare values
7
+ - Async work outside a request uses a dedicated context, not the request context
8
+
9
+ ## Module & Types
10
+ - Imports match the module system (ESM `import` vs CJS `require`) — no mixing
11
+ - No `any` leaks across public boundaries; narrow types at the edge
12
+ - Serialization fields have explicit types/validators at the API boundary
13
+ - No circular imports between modules
14
+
15
+ ## Dependencies & Config
16
+ - New dependencies are justified, pinned, and reviewed (license + maintenance)
17
+ - No secrets in code, `.env` files, or committed config
18
+ - Config read from environment once at startup, not scattered through code
19
+
20
+ ## Resource & Performance
21
+ - No sync fs/IO (`readFileSync`, `execSync`) on the request hot path
22
+ - Streams/buffers bounded — no unbounded `readFile` of user-controlled size
23
+ - HTTP/gRPC calls have explicit timeouts and a closed failure path
24
+ - DB queries are parameterized; no string-interpolated SQL
25
+
26
+ ## Testing
27
+ - Tests do not depend on execution order, wall-clock time, or env state
28
+ - No `console.log` noise left in committed code — use the project logger
@@ -0,0 +1,30 @@
1
+ # PHP Review Rules
2
+
3
+ ## Errors & Strictness
4
+ - `declare(strict_types=1)` at the top of every new file
5
+ - No `@` error suppression operator and no empty `catch` blocks — handle or rethrow
6
+ - Catch specific exception types; `Throwable` only at the application boundary handler
7
+ - Warnings/notices treated as bugs — no reliance on implicit null-to-type coercion
8
+
9
+ ## Types & API
10
+ - Parameter, return, and property types declared — no `mixed` leaking past boundaries unvalidated
11
+ - Nullable contracts explicit (`?Type`); no silent `null` defaults where a value is required
12
+ - Enums and `readonly` used for fixed value sets and immutable data over loose arrays
13
+ - No `extract()`, variable-variables (`$$x`), or dynamic property access on user-controlled keys
14
+
15
+ ## Security
16
+ - DB access via PDO prepared statements or ORM bindings — no string-concatenated SQL
17
+ - Output escaped for context (`htmlspecialchars`, template autoescape) — no raw `echo` of user data
18
+ - No `eval`, `unserialize` on untrusted input, or `include`/`require` of dynamic paths
19
+ - Uploads validated (MIME, extension, size) and stored outside web root or under renamed files
20
+ - CSRF tokens on state-changing requests; passwords via `password_hash`/`password_verify` only
21
+
22
+ ## Dependencies & Config
23
+ - `composer.json`/`composer.lock` committed together; `composer audit` clean for new deps
24
+ - Deploy installs with `--no-dev` — no dev-only packages reachable in production
25
+ - Secrets and config from environment — nothing sensitive committed in `.env` or config files
26
+
27
+ ## Performance
28
+ - No N+1 queries — eager loading/joins at the repository layer for loops over associations
29
+ - No `array_merge` or string concatenation inside loops over unbounded data
30
+ - No per-request filesystem scans or reflection recomputation in hot paths — cache at bootstrap
@@ -0,0 +1,34 @@
1
+ # Python Review Rules
2
+
3
+ ## Error Handling
4
+ - No bare `except:` or `except Exception: pass` — catch specific exception types only
5
+ - Exceptions re-raised or wrapped with `raise ... from e` preserving the original cause
6
+ - No exceptions used for control flow where a membership check or `.get()` is clearer
7
+ - Errors logged once at the layer with most context — no log-and-rethrow at every level
8
+
9
+ ## Types & API
10
+ - Public functions have type hints; no `Any` leaking across module boundaries
11
+ - No mutable default arguments (`def f(x=[])`) — use `None` sentinel and init in body
12
+ - Dataclasses or typed models for structured data at boundaries, not raw dict bags
13
+ - No `*args/**kwargs` pass-through hiding the real signature on public APIs
14
+
15
+ ## Concurrency
16
+ - No blocking calls (`time.sleep`, sync HTTP) inside `async def` — use awaitable equivalents
17
+ - Tasks/futures have a defined lifecycle — awaited, joined, or cancelled; no fire-and-forget
18
+ - Shared state guarded by locks or confined to one task; no unguarded mutation across threads
19
+
20
+ ## Security
21
+ - SQL via parameterized queries or ORM bindings — no f-string or `%`-formatted SQL
22
+ - No `eval`/`exec`/`pickle.loads`/`yaml.load` on untrusted input (`yaml.safe_load` only)
23
+ - Subprocess calls use arg lists with `shell=False`; no user input in shell commands
24
+ - Secrets from env/vault only — nothing sensitive in code or committed config
25
+
26
+ ## Dependencies & Resources
27
+ - Files/sockets/connections managed with `with` — no unclosed `.open()` handles
28
+ - Lockfile committed (`requirements.txt`, `poetry.lock`, `uv.lock`) with pinned or bounded versions
29
+ - New dependencies justified — stdlib (pathlib, itertools, dataclasses) preferred first
30
+
31
+ ## Performance
32
+ - No N+1 ORM queries — `select_related`/`prefetch_related`/batched fetches
33
+ - Membership tests in loops use `set`, not repeated `in` scans of a list
34
+ - Unbounded inputs streamed via generators — no `read()` of user-controlled size
@@ -0,0 +1,32 @@
1
+ # Ruby Review Rules
2
+
3
+ ## Error Handling
4
+ - No bare `rescue` or `rescue Exception` — rescue specific error classes only
5
+ - No `rescue` that returns `nil`/`false` to hide failures — handle, wrap, or re-raise
6
+ - `raise` uses typed error classes with context, not generic strings where a type exists
7
+ - Cleanup in `ensure`/block forms — no manual close paths that exceptions can bypass
8
+
9
+ ## Rails & Data Access
10
+ - Strong params on all mass assignment — no `params.permit!` or unfiltered `Model.new(params)`
11
+ - No N+1 — `includes`/`preload` verified for every association rendered in a loop
12
+ - Transactions wrap multi-write operations; uniqueness handled by constraints, not check-then-act
13
+ - No `update_column`/`update_attribute` skipping validations without a comment justifying it
14
+ - Migrations reversible and deploy-safe — no rename-and-drop in a single release
15
+
16
+ ## Code Quality
17
+ - `rubocop` (project config) clean on changed files — inline disables carry a comment why
18
+ - No monkey-patching core or third-party classes; refinements/wrappers where unavoidable
19
+ - `frozen_string_literal` respected — no mutation of string literals
20
+ - Predicate methods end in `?`; bang (`!`) reserved for raising/dangerous variants
21
+ - `respond_to_missing?` defined alongside any `method_missing`
22
+
23
+ ## Security
24
+ - No `constantize`/`send`/`public_send` on user-controlled strings — explicit allowlist dispatch
25
+ - SQL fragments (`where`, `order`, `joins` strings) use bind params — no interpolation of input
26
+ - `system`/backticks/`Open3` never interpolate user input into commands
27
+ - Secrets via credentials/env — no keys in code, fixtures, or committed config
28
+
29
+ ## Performance
30
+ - No `Model.all.each` on unbounded tables — `find_each`/`in_batches` for iteration
31
+ - `pluck`/`select` used over full model instantiation when only columns are needed
32
+ - Memoization (`||=`) only for stable values — never keyed on mutable or per-request state
@@ -0,0 +1,33 @@
1
+ # Rust Review Rules
2
+
3
+ ## Error Handling
4
+ - No `.unwrap()` / `.expect()` outside tests and `main` — propagate with `?` or map to typed errors
5
+ - Library crates expose typed errors (`thiserror` or manual enum); `anyhow` only at the binary/application edge
6
+ - No silently dropped `Result` — `let _ =` on a `Result` requires a comment why it is safe
7
+ - Panics never cross the public API as a control-flow mechanism
8
+
9
+ ## Safety
10
+ - `unsafe` blocks are minimal, justified by a `// SAFETY:` comment, and reviewed individually
11
+ - No `unsafe` to work around ownership — restructure instead
12
+ - `clippy::pedantic`-level warnings justified or fixed; `cargo clippy` and `cargo fmt --check` clean
13
+ - No integer overflow risk on user input — use `checked_`/`saturating_` ops where values are untrusted
14
+
15
+ ## Ownership & API Design
16
+ - Prefer borrowing (`&T`, `&mut T`) over `.clone()` in hot paths; clones must be justified
17
+ - Public types own their invariants — invalid states are unrepresentable (newtypes, enums), not validated per call
18
+ - `#[must_use]` on Results/values whose discard is a bug; `Drop` types clean up on all paths
19
+ - No `Rc`/`RefCell`/`Arc<Mutex>` leaks into API signatures without reason — keep them internal
20
+
21
+ ## Concurrency
22
+ - Shared state via `Arc<Mutex>`/`RwLock` or channels — no `static mut`, no lazy globals with mutation
23
+ - `Send`/`Sync` bounds are correct, not circumvented; async tasks have a defined join/abort path
24
+ - Lock scope is minimal — no `.await` while holding a `Mutex` guard (use `tokio::sync` primitives in async)
25
+
26
+ ## Dependencies & Code Quality
27
+ - `Cargo.lock` committed for binaries; dependency features reviewed — no default-features pulled blindly
28
+ - No `.unwrap()` on env/config parsing at runtime — fail fast with context at startup
29
+ - Tests live in `#[cfg(test)]` modules or `tests/`; doc examples compile via `cargo test --doc`
30
+
31
+ ## Performance
32
+ - No accidental quadratic copies — `&str` slices, iterators, `Vec::with_capacity`
33
+ - Serialization/deserialization derives are explicit; no `serde_json::Value` bags in hot paths
@@ -0,0 +1,76 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ kind: bug
6
+ status: pending
7
+ severity: {severity}
8
+ ---
9
+
10
+ # Bug Report
11
+
12
+ ## Bug Summary
13
+ {bug_summary}
14
+
15
+ ## Problem Statement
16
+ {problem_statement}
17
+
18
+ ## Severity
19
+ {severity}
20
+
21
+ ## Environment
22
+ {environment}
23
+
24
+ ## Steps to Reproduce
25
+ 1. {reproduction_step}
26
+
27
+ ## Actual Result
28
+ {actual_result}
29
+
30
+ ## Expected Result
31
+ {expected_result}
32
+
33
+ ## Scope
34
+ ### In Scope
35
+ - {in_scope_item}
36
+
37
+ ### Out of Scope
38
+ - {out_of_scope_item}
39
+
40
+ ## Related Feature
41
+
42
+ | Field | Value |
43
+ |---|---|
44
+ | Feature / context | {related_feature} |
45
+ | Existing requirement / use case | {related_docs} |
46
+
47
+ Use `N/A` with a reason when no related feature can be identified.
48
+
49
+ ## Constraints
50
+ - {constraint}
51
+
52
+ ## Assumptions
53
+ - {assumption}
54
+
55
+ ## Acceptance Criteria
56
+ - [ ] {acceptance_criterion}
57
+
58
+ ## Edge Cases
59
+ - {edge_case}
60
+
61
+ ## Suspected Root Cause
62
+ {suspected_root_cause}
63
+
64
+ ## Regression Test Strategy
65
+ - Test Level: {test_level}
66
+ - Tools: {test_tools}
67
+ - Coverage Target: {coverage_target}%
68
+
69
+ ## Documentation Impact
70
+
71
+ | Update needed? | Affected docs | Reason / intended update |
72
+ |---|---|---|
73
+ | {docs_update_needed} | {affected_docs} | {docs_update_reason} |
74
+
75
+ ## Open Questions
76
+ - {open_question}
@@ -0,0 +1,67 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ kind: feature
6
+ status: pending
7
+ ---
8
+
9
+ # Spec Requirement
10
+
11
+ ## Feature
12
+ {feature_name}
13
+
14
+ ## Objective
15
+ {objective}
16
+
17
+ ## Problem Statement
18
+ {problem_statement}
19
+
20
+ ## Scope
21
+ ### In Scope
22
+ - {in_scope_item}
23
+
24
+ ### Out of Scope
25
+ - {out_of_scope_item}
26
+
27
+ ## Actors
28
+ - {actor}
29
+
30
+ ## Functional Requirements
31
+ ### FR-001
32
+ - Requirement: {fr_001_description}
33
+ - Priority: {priority}
34
+ - Notes: {fr_001_notes}
35
+
36
+ ### FR-002
37
+ - Requirement: {fr_002_description}
38
+ - Priority: {priority}
39
+ - Notes: {fr_002_notes}
40
+
41
+ ## Non-Functional Requirements
42
+ - {nfr}
43
+
44
+ ## Main Use Cases
45
+ - UC-001 {use_case_name_001}
46
+ - UC-002 {use_case_name_002}
47
+
48
+ ## Constraints
49
+ - {constraint}
50
+
51
+ ## Assumptions
52
+ - {assumption}
53
+
54
+ ## Acceptance Criteria
55
+ - [ ] {acceptance_criterion}
56
+
57
+ ## Edge Cases
58
+ - {edge_case}
59
+
60
+ ## Open Questions
61
+ - {open_question}
62
+
63
+ ## Test Strategy
64
+ - Level: {test_level}
65
+ - UI Tests: {ui_test_scope}
66
+ - Tools: {test_tools}
67
+ - Coverage Target: {coverage_target}%
@@ -0,0 +1,85 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ status: planning
6
+ ---
7
+
8
+ # Implementation Plan
9
+
10
+ ## Feature
11
+ {feature_name}
12
+
13
+ ## Objective
14
+ {objective}
15
+
16
+ ## Implementation Scope
17
+ ### Implement Now
18
+ - {implement_now_item}
19
+
20
+ ### Supporting Features
21
+ - {supporting_feature}
22
+
23
+ ### Future Features
24
+ - {future_feature}
25
+
26
+ ### Explicitly Not Implemented
27
+ - {not_implemented_item}
28
+
29
+ ## Task Breakdown
30
+
31
+ | Task | Description | Area | Dependencies | Expected output | FR / UC references |
32
+ |---|---|---|---|---|---|
33
+ | TASK-001 | {task_description} | {area} | {dependencies} | {expected_output} | {requirement_reference} |
34
+
35
+ Add one row per task. Track execution progress separately in `tasks.md` so the approved plan remains unchanged.
36
+
37
+ ## Complexity
38
+ - Level: {complexity_level}
39
+ - Reason: {complexity_reason}
40
+
41
+ ## Impact Analysis
42
+
43
+ | Area | Impact |
44
+ |---|---|
45
+ | Backend | {backend_impact} |
46
+ | Frontend | {frontend_impact} |
47
+ | Database | {database_impact} |
48
+ | API | {api_impact} |
49
+ | Infrastructure | {infrastructure_impact} |
50
+ | Security | {security_impact} |
51
+ | Performance | {performance_impact} |
52
+ | Regression | {regression_impact} |
53
+ | Dependencies | {dependencies_impact} |
54
+
55
+ ## Risks and Mitigation
56
+
57
+ | Risk | Impact | Mitigation / rollback |
58
+ |---|---|---|
59
+ | {risk} | {risk_impact} | {risk_mitigation} |
60
+
61
+ ## Architecture Constraints
62
+ - {architecture_constraint}
63
+
64
+ ## Implementation Constraints
65
+ - {implementation_constraint}
66
+
67
+ ## Testing Strategy
68
+ - Unit: {unit_strategy}
69
+ - Integration: {integration_strategy}
70
+ - E2E: {e2e_strategy}
71
+ - Coverage target: >= {coverage_target}%
72
+
73
+ ## Documentation Impact
74
+ - {documentation_impact}
75
+
76
+ ## Definition of Done
77
+ - [ ] Implementation complete
78
+ - [ ] Unit tests
79
+ - [ ] Integration tests where applicable
80
+ - [ ] Coverage meets the agreed target
81
+ - [ ] E2E tests when required by the agreed Test Level
82
+ - [ ] All test cases pass
83
+ - [ ] Review passes
84
+ - [ ] Documentation updated
85
+ - [ ] Feature report generated
@@ -0,0 +1,68 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ status: planning
6
+ ---
7
+
8
+ # Test Plan
9
+
10
+ Test Strategy from `phase-1-spec-requirement.md` decides the depth:
11
+ `unit` → Unit; `unit+integration` → Unit + Integration; `full` → Unit + Integration + UI/E2E.
12
+
13
+ Extend the tables and repeat `## TC-###` for every planned test. Remove unused sample rows. Counts must match the detailed cases; use `0` with a reason for excluded test types. This is the planned contract: execution outcomes belong in the testing-result report.
14
+
15
+ ## Feature Test Summary
16
+
17
+ | Field | Value |
18
+ |---|---|
19
+ | Feature | {feature_name} |
20
+ | Context | {context} |
21
+ | Test level | {test_level} |
22
+ | UI scope | {ui_test_scope} |
23
+ | Tools / commands | {test_tools} |
24
+ | Coverage target | {coverage_target}% |
25
+
26
+ ## Overall Case Counts
27
+
28
+ | Test type | Planned | Must pass | Notes |
29
+ |---|---:|---:|---|
30
+ | Unit | {unit_total} | {unit_required} | {unit_scope} |
31
+ | Integration | {integration_total} | {integration_required} | {integration_scope} |
32
+ | UI / E2E | {e2e_total} | {e2e_required} | {e2e_scope} |
33
+ | **Total** | **{total_cases}** | **{total_required}** | **{overall_scope}** |
34
+
35
+ ## Use Case Coverage Matrix
36
+
37
+ | Use case | Requirement(s) | Test cases | Planned | Pass criteria |
38
+ |---|---|---|---:|---|
39
+ | UC-001 | FR-001 | TC-001 | {uc_001_case_count} | {uc_001_pass_criteria} |
40
+ | UC-002 | FR-002 | TC-002 | {uc_002_case_count} | {uc_002_pass_criteria} |
41
+
42
+ ## Requirement Coverage Matrix
43
+
44
+ | Requirement | Use case(s) | Test case(s) | Covered? | Gap / note |
45
+ |---|---|---|---|---|
46
+ | FR-001 | UC-001 | TC-001 | {fr_001_covered} | {fr_001_note} |
47
+ | FR-002 | UC-002 | TC-002 | {fr_002_covered} | {fr_002_note} |
48
+
49
+ ## TC-001
50
+
51
+ | Field | Detail |
52
+ |---|---|
53
+ | Test case ID | TC-001 |
54
+ | Requirement reference | FR-001 |
55
+ | Use case reference | UC-001 |
56
+ | Test type | Unit / Integration / UI / E2E |
57
+ | Priority | High / Medium / Low |
58
+ | Preconditions | {precondition} |
59
+ | Input | {input} |
60
+ | Steps | See steps table below |
61
+ | Expected outcome | {expected_outcome} |
62
+ | Status | PENDING |
63
+
64
+ ### Steps
65
+
66
+ | Step | Action | Expected result |
67
+ |---|---|---|
68
+ | 1 | {step} | {step_expected_result} |
@@ -0,0 +1,18 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ status: planning
6
+ ---
7
+
8
+ # Use Case Diagram
9
+
10
+ ```mermaid
11
+ flowchart LR
12
+ A[{actor}] --> UC1[UC-001 {use_case_001_name}]
13
+ A --> UC2[UC-002 {use_case_002_name}]
14
+ ```
15
+
16
+ - Actors: {actors}
17
+ - Use cases: {use_cases}
18
+ - Relationships: {relationships}
@@ -0,0 +1,33 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ status: planning
6
+ ---
7
+
8
+ # Use Case Index
9
+
10
+ Every use case is its own file under `use-cases/`. Do not write a combined narrative here.
11
+
12
+ ## Use Case Files
13
+
14
+ | ID | Name | File | Primary Actor | Status |
15
+ |---|---|---|---|---|
16
+ | UC-001 | {use_case_name_001} | [UC-001](use-cases/UC-001.md) | {primary_actor_001} | planned |
17
+ | UC-002 | {use_case_name_002} | [UC-002](use-cases/UC-002.md) | {primary_actor_002} | planned |
18
+
19
+ ## Use Case Coverage
20
+
21
+ | UC ID | FR references | TC references | Acceptance coverage |
22
+ |---|---|---|---|
23
+ | UC-001 | FR-001 | TC-001 | {uc_001_coverage} |
24
+ | UC-002 | FR-002 | TC-002 | {uc_002_coverage} |
25
+
26
+ ## Totals
27
+
28
+ | Metric | Total |
29
+ |---|---:|
30
+ | Use cases | {total_use_cases} |
31
+ | Actors | {total_actors} |
32
+ | Functional requirements covered | {total_requirements} |
33
+ | Test cases linked | {total_linked_test_cases} |
@@ -0,0 +1,60 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ created: "{timestamp}"
5
+ status: planning
6
+ ---
7
+
8
+ # Use Case
9
+
10
+ ## Overview
11
+
12
+ | Field | Value |
13
+ |---|---|
14
+ | ID | {use_case_id} |
15
+ | Name | {use_case_name} |
16
+ | Requirement reference | {requirement_reference} |
17
+ | Goal | {goal} |
18
+ | Primary actor | {primary_actor} |
19
+
20
+ ## Supporting Actors
21
+ - {supporting_actor}
22
+
23
+ ## Preconditions
24
+ - {precondition}
25
+
26
+ ## Trigger
27
+ {trigger}
28
+
29
+ ## Main Flow
30
+
31
+ | Step | Actor / system | Action | Outcome |
32
+ |---|---|---|---|
33
+ | 1 | {step_actor} | {main_flow_step} | {step_outcome} |
34
+
35
+ ## Alternative Flows
36
+ ### A1
37
+ - Trigger: {alternative_trigger}
38
+
39
+ | Step | Action | Outcome / return to main flow |
40
+ |---|---|---|
41
+ | A1.1 | {alternative_step} | {alternative_outcome} |
42
+
43
+ ## Exception Flows
44
+ ### E1
45
+
46
+ | Trigger | Handling | Resulting state / message |
47
+ |---|---|---|
48
+ | {exception_trigger} | {exception_handling} | {exception_outcome} |
49
+
50
+ ## Postconditions
51
+ - {postcondition}
52
+
53
+ ## Business Rules
54
+ - {business_rule}
55
+
56
+ ## Data
57
+ - {data_entity}: {data_description}
58
+
59
+ ## Acceptance Criteria
60
+ - [ ] {acceptance_criterion}
@@ -0,0 +1,63 @@
1
+ ---
2
+ feature: "{feature_name}"
3
+ context: "{context}"
4
+ tested: "{timestamp}"
5
+ execution: "{execution_id}"
6
+ status: BLOCKED
7
+ ---
8
+
9
+ # Testing Result
10
+
11
+ ## Feature
12
+ {feature_name}
13
+
14
+ ## Environment
15
+ - OS: {os}
16
+ - Runtime: {runtime}
17
+ - Tooling: {tooling}
18
+
19
+ ## Execution Time
20
+ {execution_time}
21
+
22
+ ## Summary
23
+ | Metric | Result |
24
+ |---|---:|
25
+ | Total | {total} |
26
+ | Passed | {passed} |
27
+ | Failed | {failed} |
28
+ | Rejected | {rejected} |
29
+ | Blocked | {blocked} |
30
+
31
+ ## Test Results
32
+
33
+ | Case / test name | Type | Status | Expected | Actual | Evidence |
34
+ |---|---|---|---|---|---|
35
+ | TC-001 | {test_type} | {tc_status} | {expected_outcome} | {actual_outcome} | {evidence} |
36
+
37
+ Use the approved TC IDs for features; use reproduction/regression test names for bugs. Include every required test, including blocked or unexecuted tests.
38
+
39
+ ## Commands and Evidence
40
+
41
+ | Command / tool | Exit code | Evidence / output |
42
+ |---|---:|---|
43
+ | {tool} | {exit_code} | {command_evidence} |
44
+
45
+ ## Failures and Blockers
46
+
47
+ | Case / test name | Error / blocker | Impact | Next action |
48
+ |---|---|---|---|
49
+ | {affected_test} | {error} | {failure_impact} | {next_action} |
50
+
51
+ ## Coverage
52
+
53
+ | Metric / scope | Target | Measured | Evidence |
54
+ |---|---:|---:|---|
55
+ | Overall code coverage | {coverage_target}% | {overall_coverage}% | {coverage_evidence} |
56
+
57
+ Do not equate test pass rate with code coverage. Use `N/A` with a reason for an unrequired metric; required but unmeasured coverage blocks PASS.
58
+
59
+ ## Regression
60
+ {regression}
61
+
62
+ ## Conclusion
63
+ - {conclusion}