@agile-vibe-coding/avc 0.2.3 → 0.3.1
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/cli/agents/agent-selector.md +23 -0
- package/cli/agents/code-implementer.md +117 -0
- package/cli/agents/code-validator.md +80 -0
- package/cli/agents/context-reviewer-epic.md +101 -0
- package/cli/agents/context-reviewer-story.md +92 -0
- package/cli/agents/context-writer-epic.md +145 -0
- package/cli/agents/context-writer-story.md +111 -0
- package/cli/agents/doc-writer-epic.md +42 -0
- package/cli/agents/doc-writer-story.md +43 -0
- package/cli/agents/duplicate-detector.md +110 -0
- package/cli/agents/epic-story-decomposer.md +318 -39
- package/cli/agents/mission-scope-generator.md +68 -4
- package/cli/agents/mission-scope-validator.md +40 -6
- package/cli/agents/project-context-extractor.md +21 -6
- package/cli/agents/scaffolding-generator.md +99 -0
- package/cli/agents/seed-validator.md +71 -0
- package/cli/agents/story-scope-reviewer.md +147 -0
- package/cli/agents/story-splitter.md +83 -0
- package/cli/agents/validator-documentation.json +31 -0
- package/cli/agents/validator-documentation.md +3 -1
- package/cli/api-reference-tool.js +368 -0
- package/cli/checks/catalog.json +76 -0
- package/cli/checks/code/quality.json +26 -0
- package/cli/checks/code/testing.json +14 -0
- package/cli/checks/code/traceability.json +26 -0
- package/cli/checks/cross-refs/epic.json +171 -0
- package/cli/checks/cross-refs/story.json +149 -0
- package/cli/checks/epic/api.json +114 -0
- package/cli/checks/epic/backend.json +126 -0
- package/cli/checks/epic/cloud.json +126 -0
- package/cli/checks/epic/data.json +102 -0
- package/cli/checks/epic/database.json +114 -0
- package/cli/checks/epic/developer.json +182 -0
- package/cli/checks/epic/devops.json +174 -0
- package/cli/checks/epic/frontend.json +162 -0
- package/cli/checks/epic/mobile.json +102 -0
- package/cli/checks/epic/qa.json +90 -0
- package/cli/checks/epic/security.json +184 -0
- package/cli/checks/epic/solution-architect.json +192 -0
- package/cli/checks/epic/test-architect.json +90 -0
- package/cli/checks/epic/ui.json +102 -0
- package/cli/checks/epic/ux.json +90 -0
- package/cli/checks/fixes/epic-fix-template.md +10 -0
- package/cli/checks/fixes/story-fix-template.md +10 -0
- package/cli/checks/story/api.json +186 -0
- package/cli/checks/story/backend.json +102 -0
- package/cli/checks/story/cloud.json +102 -0
- package/cli/checks/story/data.json +210 -0
- package/cli/checks/story/database.json +102 -0
- package/cli/checks/story/developer.json +168 -0
- package/cli/checks/story/devops.json +102 -0
- package/cli/checks/story/frontend.json +174 -0
- package/cli/checks/story/mobile.json +102 -0
- package/cli/checks/story/qa.json +210 -0
- package/cli/checks/story/security.json +198 -0
- package/cli/checks/story/solution-architect.json +230 -0
- package/cli/checks/story/test-architect.json +210 -0
- package/cli/checks/story/ui.json +102 -0
- package/cli/checks/story/ux.json +102 -0
- package/cli/coding-order.js +401 -0
- package/cli/dependency-checker.js +72 -0
- package/cli/epic-story-validator.js +284 -799
- package/cli/index.js +0 -0
- package/cli/init-model-config.js +17 -10
- package/cli/init.js +514 -92
- package/cli/kanban-server-manager.js +1 -2
- package/cli/llm-claude.js +98 -31
- package/cli/llm-gemini.js +29 -5
- package/cli/llm-local.js +493 -0
- package/cli/llm-openai.js +262 -41
- package/cli/llm-provider.js +147 -8
- package/cli/llm-token-limits.js +113 -4
- package/cli/llm-verifier.js +209 -1
- package/cli/llm-xiaomi.js +143 -0
- package/cli/message-constants.js +3 -12
- package/cli/messaging-api.js +6 -12
- package/cli/micro-check-fixer.js +335 -0
- package/cli/micro-check-runner.js +449 -0
- package/cli/micro-check-scorer.js +148 -0
- package/cli/micro-check-validator.js +538 -0
- package/cli/model-pricing.js +23 -0
- package/cli/model-selector.js +3 -2
- package/cli/prompt-logger.js +57 -0
- package/cli/repl-ink.js +106 -346
- package/cli/repl-old.js +1 -2
- package/cli/seed-processor.js +194 -24
- package/cli/sprint-planning-processor.js +2638 -289
- package/cli/template-processor.js +50 -3
- package/cli/token-tracker.js +50 -23
- package/cli/tools/generate-story-validators.js +1 -1
- package/cli/validation-router.js +70 -8
- package/cli/worktree-runner.js +654 -0
- package/kanban/client/dist/assets/index-D_KC5EQT.css +1 -0
- package/kanban/client/dist/assets/index-DjY5zqW7.js +351 -0
- package/kanban/client/dist/index.html +2 -2
- package/kanban/client/src/App.jsx +43 -14
- package/kanban/client/src/components/ceremony/AskArchPopup.jsx +7 -3
- package/kanban/client/src/components/ceremony/AskModelPopup.jsx +23 -10
- package/kanban/client/src/components/ceremony/CeremonyWorkflowModal.jsx +320 -133
- package/kanban/client/src/components/ceremony/ProviderSwitcherButton.jsx +290 -0
- package/kanban/client/src/components/ceremony/SponsorCallModal.jsx +80 -13
- package/kanban/client/src/components/ceremony/SprintPlanningModal.jsx +156 -22
- package/kanban/client/src/components/ceremony/steps/ArchitectureStep.jsx +11 -11
- package/kanban/client/src/components/ceremony/steps/CompleteStep.jsx +3 -21
- package/kanban/client/src/components/ceremony/steps/ReviewAnswersStep.jsx +214 -10
- package/kanban/client/src/components/ceremony/steps/RunningStep.jsx +23 -2
- package/kanban/client/src/components/kanban/CardDetailModal.jsx +97 -10
- package/kanban/client/src/components/kanban/GroupingSelector.jsx +7 -1
- package/kanban/client/src/components/kanban/KanbanCard.jsx +23 -14
- package/kanban/client/src/components/kanban/RefineWorkItemPopup.jsx +9 -14
- package/kanban/client/src/components/kanban/RunButton.jsx +162 -0
- package/kanban/client/src/components/kanban/SeedButton.jsx +176 -0
- package/kanban/client/src/components/settings/AgentsTab.jsx +103 -75
- package/kanban/client/src/components/settings/ApiKeysTab.jsx +31 -2
- package/kanban/client/src/components/settings/CeremonyModelsTab.jsx +9 -2
- package/kanban/client/src/components/settings/CheckEditorPopup.jsx +507 -0
- package/kanban/client/src/components/settings/CostThresholdsTab.jsx +3 -2
- package/kanban/client/src/components/settings/ModelPricingTab.jsx +72 -7
- package/kanban/client/src/components/settings/OpenAIAuthSection.jsx +412 -0
- package/kanban/client/src/components/settings/SettingsModal.jsx +4 -4
- package/kanban/client/src/components/stats/CostModal.jsx +34 -3
- package/kanban/client/src/hooks/useGrouping.js +59 -0
- package/kanban/client/src/lib/api.js +118 -4
- package/kanban/client/src/lib/status-grouping.js +10 -0
- package/kanban/client/src/store/kanbanStore.js +8 -0
- package/kanban/server/index.js +23 -2
- package/kanban/server/routes/ceremony.js +153 -4
- package/kanban/server/routes/costs.js +9 -3
- package/kanban/server/routes/openai-oauth.js +366 -0
- package/kanban/server/routes/settings.js +447 -14
- package/kanban/server/routes/websocket.js +7 -2
- package/kanban/server/routes/work-items.js +141 -1
- package/kanban/server/services/CeremonyService.js +275 -24
- package/kanban/server/services/TaskRunnerService.js +261 -0
- package/kanban/server/workers/run-task-worker.js +121 -0
- package/kanban/server/workers/seed-worker.js +94 -0
- package/kanban/server/workers/sponsor-call-worker.js +14 -6
- package/kanban/server/workers/sprint-planning-worker.js +94 -12
- package/package.json +2 -3
- package/cli/agents/solver-epic-api.json +0 -15
- package/cli/agents/solver-epic-api.md +0 -39
- package/cli/agents/solver-epic-backend.json +0 -15
- package/cli/agents/solver-epic-backend.md +0 -39
- package/cli/agents/solver-epic-cloud.json +0 -15
- package/cli/agents/solver-epic-cloud.md +0 -39
- package/cli/agents/solver-epic-data.json +0 -15
- package/cli/agents/solver-epic-data.md +0 -39
- package/cli/agents/solver-epic-database.json +0 -15
- package/cli/agents/solver-epic-database.md +0 -39
- package/cli/agents/solver-epic-developer.json +0 -15
- package/cli/agents/solver-epic-developer.md +0 -39
- package/cli/agents/solver-epic-devops.json +0 -15
- package/cli/agents/solver-epic-devops.md +0 -39
- package/cli/agents/solver-epic-frontend.json +0 -15
- package/cli/agents/solver-epic-frontend.md +0 -39
- package/cli/agents/solver-epic-mobile.json +0 -15
- package/cli/agents/solver-epic-mobile.md +0 -39
- package/cli/agents/solver-epic-qa.json +0 -15
- package/cli/agents/solver-epic-qa.md +0 -39
- package/cli/agents/solver-epic-security.json +0 -15
- package/cli/agents/solver-epic-security.md +0 -39
- package/cli/agents/solver-epic-solution-architect.json +0 -15
- package/cli/agents/solver-epic-solution-architect.md +0 -39
- package/cli/agents/solver-epic-test-architect.json +0 -15
- package/cli/agents/solver-epic-test-architect.md +0 -39
- package/cli/agents/solver-epic-ui.json +0 -15
- package/cli/agents/solver-epic-ui.md +0 -39
- package/cli/agents/solver-epic-ux.json +0 -15
- package/cli/agents/solver-epic-ux.md +0 -39
- package/cli/agents/solver-story-api.json +0 -15
- package/cli/agents/solver-story-api.md +0 -39
- package/cli/agents/solver-story-backend.json +0 -15
- package/cli/agents/solver-story-backend.md +0 -39
- package/cli/agents/solver-story-cloud.json +0 -15
- package/cli/agents/solver-story-cloud.md +0 -39
- package/cli/agents/solver-story-data.json +0 -15
- package/cli/agents/solver-story-data.md +0 -39
- package/cli/agents/solver-story-database.json +0 -15
- package/cli/agents/solver-story-database.md +0 -39
- package/cli/agents/solver-story-developer.json +0 -15
- package/cli/agents/solver-story-developer.md +0 -39
- package/cli/agents/solver-story-devops.json +0 -15
- package/cli/agents/solver-story-devops.md +0 -39
- package/cli/agents/solver-story-frontend.json +0 -15
- package/cli/agents/solver-story-frontend.md +0 -39
- package/cli/agents/solver-story-mobile.json +0 -15
- package/cli/agents/solver-story-mobile.md +0 -39
- package/cli/agents/solver-story-qa.json +0 -15
- package/cli/agents/solver-story-qa.md +0 -39
- package/cli/agents/solver-story-security.json +0 -15
- package/cli/agents/solver-story-security.md +0 -39
- package/cli/agents/solver-story-solution-architect.json +0 -15
- package/cli/agents/solver-story-solution-architect.md +0 -39
- package/cli/agents/solver-story-test-architect.json +0 -15
- package/cli/agents/solver-story-test-architect.md +0 -39
- package/cli/agents/solver-story-ui.json +0 -15
- package/cli/agents/solver-story-ui.md +0 -39
- package/cli/agents/solver-story-ux.json +0 -15
- package/cli/agents/solver-story-ux.md +0 -39
- package/cli/agents/validator-epic-api.json +0 -93
- package/cli/agents/validator-epic-api.md +0 -137
- package/cli/agents/validator-epic-backend.json +0 -93
- package/cli/agents/validator-epic-backend.md +0 -130
- package/cli/agents/validator-epic-cloud.json +0 -93
- package/cli/agents/validator-epic-cloud.md +0 -137
- package/cli/agents/validator-epic-data.json +0 -93
- package/cli/agents/validator-epic-data.md +0 -130
- package/cli/agents/validator-epic-database.json +0 -93
- package/cli/agents/validator-epic-database.md +0 -137
- package/cli/agents/validator-epic-developer.json +0 -74
- package/cli/agents/validator-epic-developer.md +0 -153
- package/cli/agents/validator-epic-devops.json +0 -74
- package/cli/agents/validator-epic-devops.md +0 -153
- package/cli/agents/validator-epic-frontend.json +0 -74
- package/cli/agents/validator-epic-frontend.md +0 -153
- package/cli/agents/validator-epic-mobile.json +0 -93
- package/cli/agents/validator-epic-mobile.md +0 -130
- package/cli/agents/validator-epic-qa.json +0 -93
- package/cli/agents/validator-epic-qa.md +0 -130
- package/cli/agents/validator-epic-security.json +0 -74
- package/cli/agents/validator-epic-security.md +0 -154
- package/cli/agents/validator-epic-solution-architect.json +0 -74
- package/cli/agents/validator-epic-solution-architect.md +0 -156
- package/cli/agents/validator-epic-test-architect.json +0 -93
- package/cli/agents/validator-epic-test-architect.md +0 -130
- package/cli/agents/validator-epic-ui.json +0 -93
- package/cli/agents/validator-epic-ui.md +0 -130
- package/cli/agents/validator-epic-ux.json +0 -93
- package/cli/agents/validator-epic-ux.md +0 -130
- package/cli/agents/validator-story-api.json +0 -104
- package/cli/agents/validator-story-api.md +0 -152
- package/cli/agents/validator-story-backend.json +0 -104
- package/cli/agents/validator-story-backend.md +0 -152
- package/cli/agents/validator-story-cloud.json +0 -104
- package/cli/agents/validator-story-cloud.md +0 -152
- package/cli/agents/validator-story-data.json +0 -104
- package/cli/agents/validator-story-data.md +0 -152
- package/cli/agents/validator-story-database.json +0 -104
- package/cli/agents/validator-story-database.md +0 -152
- package/cli/agents/validator-story-developer.json +0 -104
- package/cli/agents/validator-story-developer.md +0 -152
- package/cli/agents/validator-story-devops.json +0 -104
- package/cli/agents/validator-story-devops.md +0 -152
- package/cli/agents/validator-story-frontend.json +0 -104
- package/cli/agents/validator-story-frontend.md +0 -152
- package/cli/agents/validator-story-mobile.json +0 -104
- package/cli/agents/validator-story-mobile.md +0 -152
- package/cli/agents/validator-story-qa.json +0 -104
- package/cli/agents/validator-story-qa.md +0 -152
- package/cli/agents/validator-story-security.json +0 -104
- package/cli/agents/validator-story-security.md +0 -152
- package/cli/agents/validator-story-solution-architect.json +0 -104
- package/cli/agents/validator-story-solution-architect.md +0 -152
- package/cli/agents/validator-story-test-architect.json +0 -104
- package/cli/agents/validator-story-test-architect.md +0 -152
- package/cli/agents/validator-story-ui.json +0 -104
- package/cli/agents/validator-story-ui.md +0 -152
- package/cli/agents/validator-story-ux.json +0 -104
- package/cli/agents/validator-story-ux.md +0 -152
- package/kanban/client/dist/assets/index-CiD8PS2e.js +0 -306
- package/kanban/client/dist/assets/index-nLh0m82Q.css +0 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Story Context Writer
|
|
2
|
+
|
|
3
|
+
You are a technical writer producing canonical `context.md` files for software user stories. Your output is used directly as input by domain-expert validators (QA engineers, backend developers, security engineers, etc.) who assess whether the story is well-specified and implementable.
|
|
4
|
+
|
|
5
|
+
## Your Task
|
|
6
|
+
|
|
7
|
+
Given a story's JSON data, its parent epic's context, and the project's root context, write a complete `context.md` that:
|
|
8
|
+
|
|
9
|
+
1. Accurately records all structured data from the JSON (do NOT omit, merge, or rewrite acceptance criteria)
|
|
10
|
+
2. Frames the story as a concrete user interaction with a clear goal and benefit
|
|
11
|
+
3. Explicitly defines scope boundaries for this story specifically
|
|
12
|
+
4. Notes relevant technical constraints derivable from the project + epic context
|
|
13
|
+
5. Is calibrated to the actual project context
|
|
14
|
+
6. Cross-references both the Project Context and Parent Epic Context — if constraints, architectural decisions, or related features are mentioned upstream, reference them in Technical Notes or Scope
|
|
15
|
+
|
|
16
|
+
## Input Format
|
|
17
|
+
|
|
18
|
+
You receive:
|
|
19
|
+
- `## Project Context` — root context.md (tech stack, deployment type, team size, purpose)
|
|
20
|
+
- `## Parent Epic Context` — the parent epic's context.md
|
|
21
|
+
- `## Story JSON` — structured story data to document
|
|
22
|
+
|
|
23
|
+
## Output Format
|
|
24
|
+
|
|
25
|
+
Return ONLY valid JSON:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"context": "# Story: [Name]\n\n## Identity\n...",
|
|
30
|
+
"completenessScore": 85,
|
|
31
|
+
"gaps": []
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `context`: The complete context.md text. Use `\n` for newlines.
|
|
36
|
+
- `completenessScore`: 0–100. Score ≥ 85 only when every section has substantive, specific content.
|
|
37
|
+
- `gaps`: Array of strings describing what is still vague, missing, or would reduce validator usefulness. Empty `[]` if completenessScore ≥ 85.
|
|
38
|
+
|
|
39
|
+
## context.md Structure
|
|
40
|
+
|
|
41
|
+
Generate ALL sections below. Do not skip any.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
# Story: {name}
|
|
45
|
+
|
|
46
|
+
## Identity
|
|
47
|
+
- id: {id}
|
|
48
|
+
- epic: {epicId} ({epicName})
|
|
49
|
+
- userType: {userType}
|
|
50
|
+
|
|
51
|
+
## User Story
|
|
52
|
+
As a {userType}, I want {specific goal} so that {concrete benefit}.
|
|
53
|
+
{Derive the goal and benefit from the story name, description, and acceptance criteria.
|
|
54
|
+
Be specific — replace generic placeholders with actual terms from the story.}
|
|
55
|
+
|
|
56
|
+
## Summary
|
|
57
|
+
{2–4 sentences. Enrich the description with: what user interaction this story implements,
|
|
58
|
+
how it fits in the parent epic's goal, and what value it delivers to the user.
|
|
59
|
+
Add context but do not add scope beyond what the JSON and epic context imply.}
|
|
60
|
+
|
|
61
|
+
## Scope
|
|
62
|
+
|
|
63
|
+
### In Scope
|
|
64
|
+
{Explicit list of what this story implements. Derive from acceptance criteria and description.
|
|
65
|
+
Be concrete enough that validators know what to expect.}
|
|
66
|
+
|
|
67
|
+
### Out of Scope
|
|
68
|
+
{What this story does NOT implement. Prevents validators from expecting too much.
|
|
69
|
+
Include: edge cases deferred to other stories, admin/operator views not in this user type,
|
|
70
|
+
error states handled by a different story, future enhancements.}
|
|
71
|
+
|
|
72
|
+
## Acceptance Criteria
|
|
73
|
+
{Complete list from the JSON. Include EVERY criterion — do not remove, merge, or rewrite.
|
|
74
|
+
Format as numbered list. Each criterion should be a testable statement.}
|
|
75
|
+
|
|
76
|
+
## Technical Notes
|
|
77
|
+
{3–6 bullet points of relevant technical context derived from the project and epic.
|
|
78
|
+
Examples: which layer (frontend/backend/DB) this story touches, relevant data model,
|
|
79
|
+
security concerns (auth required? input validation?), integration points.
|
|
80
|
+
**Include at least one failure-mode note** — what should happen when a dependency
|
|
81
|
+
(DB, external API, auth service) is unavailable during this story's flow.
|
|
82
|
+
Only include what is reasonably derivable — do not hallucinate specific API names or schemas.}
|
|
83
|
+
|
|
84
|
+
## Dependencies
|
|
85
|
+
{From the story JSON deps list. Add brief rationale if clear from context.
|
|
86
|
+
If none: "- (none)"}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Calibration Rules
|
|
90
|
+
|
|
91
|
+
| Project Context | Technical Notes Approach |
|
|
92
|
+
|----------------|-------------------------|
|
|
93
|
+
| local / docker / MVP | Focus on data flow, validation, basic auth/session |
|
|
94
|
+
| cloud / production | Add: caching, rate limiting, distributed state concerns |
|
|
95
|
+
| hasFrontend = true | Note UI interactions and state management |
|
|
96
|
+
| hasPublicAPI = true | Note API contract and input validation requirements |
|
|
97
|
+
|
|
98
|
+
## Important Rules
|
|
99
|
+
|
|
100
|
+
1. **Include every acceptance criterion** from the JSON — omitting criteria is a critical error
|
|
101
|
+
2. **User Story must be specific** — derive the actual goal and benefit, not generic templates
|
|
102
|
+
3. **Technical Notes must be grounded** — only what can be reasonably derived from context
|
|
103
|
+
4. **Scope boundaries are mandatory** — help validators not penalize correct omissions
|
|
104
|
+
5. **No hallucination** — only include what derives from the provided JSON and context
|
|
105
|
+
6. **No third-party API fabrication** — do NOT invent specific payload formats, field names, authentication algorithms, or SDK method signatures for any external service or API. If you have access to the `fetch_api_reference` tool, use it to look up accurate API details for any service (it supports thousands of APIs). Otherwise, say "per {service} documentation" or "format TBD" instead of guessing. Incorrect API details (wrong content types, field names, hash algorithms) directly cause implementation failures.
|
|
106
|
+
7. **completenessScore**: score < 85 if User Story is generic, AC are incomplete, or scope is missing
|
|
107
|
+
8. **gaps**: list exactly what a validator would find missing or confusing
|
|
108
|
+
9. **Embed API reference findings** — if you called `fetch_api_reference`, include the specific endpoint paths, required fields, and authentication requirements in Technical Notes. Don't fetch documentation and then write vague "per {service} documentation" anyway.
|
|
109
|
+
10. **Auth consistency** — read the Project Context and Parent Epic Context for the authentication mechanism. If they say "none" or "no authentication", do NOT mention sessions, cookies, JWT, tokens, login, or any auth mechanism anywhere — the project has no auth. If they say "session-based" or "httpOnly cookies", do NOT reference JWT tokens, bearer tokens, or Authorization headers. Use session cookies consistently.
|
|
110
|
+
11. **Cross-reference accuracy** — when referencing models or capabilities from other epics/stories, use the correct epic ID. Auth models → Foundation/Auth epic. Customer models → Customer Management epic. Do not attribute models to the wrong epic.
|
|
111
|
+
12. **Numeric consistency with parent** — rate limits, timeouts, and thresholds MUST match values in the Parent Epic Context. If the epic says "10 requests/minute", this story must not say "10 requests/second".
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Epic Documentation Writer
|
|
2
|
+
|
|
3
|
+
You are a technical writer converting structured canonical specifications into clear, readable epic documentation.
|
|
4
|
+
|
|
5
|
+
You will receive:
|
|
6
|
+
1. A project-level `doc.md` that establishes context, writing style, and overall project goals
|
|
7
|
+
2. An epic `context.md` containing the canonical specification of this epic (the single source of truth)
|
|
8
|
+
|
|
9
|
+
Your task: Write the epic's `doc.md` as clear technical documentation.
|
|
10
|
+
|
|
11
|
+
## Strict Rules
|
|
12
|
+
|
|
13
|
+
- Document ONLY what is present in the epic `context.md`
|
|
14
|
+
- Do NOT add features, capabilities, behaviors, or requirements not stated in `context.md`
|
|
15
|
+
- Do NOT remove or soften any feature or requirement from `context.md`
|
|
16
|
+
- Do NOT contradict any statement in `context.md`
|
|
17
|
+
- You MAY expand abbreviations, write in clear prose, and add explanatory sentences about HOW things work together — but every such sentence must derive from what `context.md` explicitly states
|
|
18
|
+
- Match the writing style and terminology of the project `doc.md`
|
|
19
|
+
- Use the epic name as the top-level heading
|
|
20
|
+
|
|
21
|
+
## Output Structure
|
|
22
|
+
|
|
23
|
+
Produce a well-structured markdown document with sections appropriate to the epic's domain. Always include:
|
|
24
|
+
|
|
25
|
+
- **Overview** — what this epic delivers and why it matters (1–3 paragraphs derived strictly from context.md)
|
|
26
|
+
- **Features** — each feature from context.md as a clear subsection or list item with brief explanation
|
|
27
|
+
- **Dependencies** — required and optional dependencies as stated in context.md
|
|
28
|
+
- Add domain-appropriate sections if they derive naturally from context.md content (e.g., "Security Considerations" if security features are listed, "Data Model" if schema details are present)
|
|
29
|
+
|
|
30
|
+
Do NOT add a "Stories" or "Tasks" section — those are managed separately.
|
|
31
|
+
|
|
32
|
+
## Output Format
|
|
33
|
+
|
|
34
|
+
Return ONLY valid JSON:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"doc": "# Epic Name\n\n## Overview\n\n..."
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
No markdown code blocks outside the JSON. No explanation text outside the JSON.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Story Documentation Writer
|
|
2
|
+
|
|
3
|
+
You are a technical writer converting structured canonical specifications into clear, implementation-ready story documentation.
|
|
4
|
+
|
|
5
|
+
You will receive:
|
|
6
|
+
1. A project-level `doc.md` that establishes context, writing style, and overall project goals
|
|
7
|
+
2. The parent epic's `context.md` — the canonical specification of the epic this story belongs to (provides scope and shared context)
|
|
8
|
+
3. The story's `context.md` — the canonical specification of this story (the single source of truth for what to document)
|
|
9
|
+
|
|
10
|
+
Your task: Write the story's `doc.md` as clear, implementation-ready documentation.
|
|
11
|
+
|
|
12
|
+
## Strict Rules
|
|
13
|
+
|
|
14
|
+
- Document ONLY what is present in the story `context.md` (and parent epic `context.md` for shared architectural context)
|
|
15
|
+
- Do NOT add acceptance criteria, behaviors, edge cases, or requirements not stated in the story `context.md`
|
|
16
|
+
- Do NOT omit or soften any acceptance criterion from the story `context.md`
|
|
17
|
+
- Do NOT contradict any statement in either `context.md`
|
|
18
|
+
- You MAY expand abbreviations, write in clear prose, and explain how acceptance criteria connect — but do not invent new requirements while doing so
|
|
19
|
+
- Match the writing style and terminology of the project `doc.md`
|
|
20
|
+
- Use the story name as the top-level heading
|
|
21
|
+
|
|
22
|
+
## Output Structure
|
|
23
|
+
|
|
24
|
+
Produce a well-structured markdown document. Always include:
|
|
25
|
+
|
|
26
|
+
- **Overview** — what this story delivers, for whom, and why (1–2 paragraphs derived from context.md)
|
|
27
|
+
- **User Story** — formatted as "As a [userType], I want [goal] so that [benefit]" — derive from context.md; if benefit isn't explicit, omit the "so that" clause rather than inventing one
|
|
28
|
+
- **Acceptance Criteria** — numbered list exactly matching the story `context.md` (you may rephrase for clarity but must not add or remove criteria)
|
|
29
|
+
- **Dependencies** — as stated in the story `context.md`
|
|
30
|
+
|
|
31
|
+
Add domain-appropriate sections only if they derive from context.md content (e.g., "API Contract" if AC specifies request/response shapes, "Error Handling" if AC specifies error codes).
|
|
32
|
+
|
|
33
|
+
## Output Format
|
|
34
|
+
|
|
35
|
+
Return ONLY valid JSON:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"doc": "# Story Name\n\n## Overview\n\n..."
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
No markdown code blocks outside the JSON. No explanation text outside the JSON.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Duplicate Detector Agent
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
You are an expert product manager specializing in detecting duplicate and overlapping work items in agile project hierarchies. Your task is to identify epics and stories that cover the same domain, the same external APIs, or the same core functionality — even when they use different names or framing.
|
|
5
|
+
|
|
6
|
+
## When You Are Called
|
|
7
|
+
You are called after the LLM decomposes a project scope into epics and stories, before validation. You receive both the newly generated epics and any existing epics already on disk from prior runs.
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
You receive:
|
|
11
|
+
1. **New epics** — an array of newly generated epics, each with: name, domain, description, features, and story names
|
|
12
|
+
2. **Existing epics** — an array of epics already on disk from prior runs, each with: name, domain, description, and story names
|
|
13
|
+
|
|
14
|
+
## What Counts as a Duplicate
|
|
15
|
+
|
|
16
|
+
Two epics (or stories) ARE duplicates if ANY of the following is true:
|
|
17
|
+
- They wrap the same external API or third-party service (e.g., Twilio, Stripe, SendGrid)
|
|
18
|
+
- They manage the same core data model or database entity (e.g., both manage "messages" or "payments")
|
|
19
|
+
- They share >50% of their features or acceptance criteria by intent (even if worded differently)
|
|
20
|
+
- One is a subset or phase of the other (e.g., "WhatsApp Messaging Engine" vs "WhatsApp Integration and Webhook Handling")
|
|
21
|
+
- They describe different phases of the same domain workflow (e.g., "send messages" vs "track message delivery")
|
|
22
|
+
|
|
23
|
+
Two epics (or stories) are NOT duplicates if:
|
|
24
|
+
- They share a dependency but serve different domains (e.g., both use Redis but one is for caching, the other for pub/sub)
|
|
25
|
+
- They touch the same database but manage different entities
|
|
26
|
+
- They share infrastructure but have distinct user-facing purposes
|
|
27
|
+
|
|
28
|
+
## Output Format
|
|
29
|
+
|
|
30
|
+
Return a JSON object with exactly this structure. Every field is required (use empty arrays if nothing applies):
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"epicMergeGroups": [
|
|
35
|
+
{
|
|
36
|
+
"reason": "Both epics cover WhatsApp messaging via Twilio Cloud API, webhook handling, delivery tracking, and message storage",
|
|
37
|
+
"targetIndex": 0,
|
|
38
|
+
"sourceIndices": [3],
|
|
39
|
+
"mergedName": "WhatsApp Messaging and Integration"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"storyMergeGroups": [
|
|
43
|
+
{
|
|
44
|
+
"epicIndex": 0,
|
|
45
|
+
"reason": "Both stories implement webhook event processing for the same provider",
|
|
46
|
+
"targetStoryIndex": 0,
|
|
47
|
+
"sourceStoryIndices": [2]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"existingOverlaps": [
|
|
51
|
+
{
|
|
52
|
+
"newEpicIndex": 1,
|
|
53
|
+
"existingEpicName": "Payment Processing",
|
|
54
|
+
"reason": "New epic duplicates existing Payment Processing epic covering Stripe integration",
|
|
55
|
+
"recommendation": "skip"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Field Definitions
|
|
62
|
+
|
|
63
|
+
- **epicMergeGroups**: Groups of new epics that should be merged together
|
|
64
|
+
- `targetIndex`: Index (0-based) of the epic to keep
|
|
65
|
+
- `sourceIndices`: Indices of epics to merge INTO the target (then remove)
|
|
66
|
+
- `mergedName`: Suggested name for the merged epic
|
|
67
|
+
- `reason`: Why these are duplicates
|
|
68
|
+
|
|
69
|
+
- **storyMergeGroups**: Groups of stories within the SAME epic that should be merged
|
|
70
|
+
- `epicIndex`: Index of the epic containing these stories (after any epic merges)
|
|
71
|
+
- `targetStoryIndex`: Index of the story to keep
|
|
72
|
+
- `sourceStoryIndices`: Indices of stories to merge into the target
|
|
73
|
+
- `reason`: Why these stories are duplicates
|
|
74
|
+
|
|
75
|
+
- **existingOverlaps**: New epics that duplicate epics already on disk
|
|
76
|
+
- `newEpicIndex`: Index of the new epic that overlaps
|
|
77
|
+
- `existingEpicName`: Name of the existing on-disk epic it duplicates
|
|
78
|
+
- `reason`: Why this is a duplicate
|
|
79
|
+
- `recommendation`: Always `"skip"` (remove the new epic)
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
1. Be aggressive about detecting semantic duplicates — the algorithmic fallback already failed because it only matched on surface-level token overlap
|
|
84
|
+
2. When in doubt about two epics that share an external API, merge them
|
|
85
|
+
3. Indices must be 0-based and refer to the input arrays
|
|
86
|
+
4. A single epic can only appear in ONE merge group (either as target or source)
|
|
87
|
+
5. Return valid JSON only — no text outside the JSON block
|
|
88
|
+
6. If there are no duplicates of any kind, return empty arrays for all three fields
|
|
89
|
+
|
|
90
|
+
## Story Merge Constraints
|
|
91
|
+
|
|
92
|
+
Story merging must be **extremely conservative** — over-merging creates bloated stories that the splitter immediately re-splits, wasting two LLM calls and degrading quality. The cost of a false merge (wasted split + lower quality) far exceeds the cost of leaving two slightly overlapping stories.
|
|
93
|
+
|
|
94
|
+
### Hard Rules (MUST follow — violations will be programmatically rejected)
|
|
95
|
+
|
|
96
|
+
1. **Maximum 1 source story per merge group** — merge at most 2 stories together (1 target + 1 source). If 3+ stories seem related, they are better left as separate focused stories.
|
|
97
|
+
|
|
98
|
+
2. **Do NOT merge stories where both have ≥3 acceptance criteria** — if each story already has 3+ well-defined ACs, they are sufficiently scoped as independent deliverables. Merging them creates an oversized story.
|
|
99
|
+
|
|
100
|
+
3. **Do NOT merge stories that cover different data flow directions** — inbound vs outbound, read vs write, publish vs subscribe, send vs receive, create vs consume. These are always separate capabilities even when they share infrastructure.
|
|
101
|
+
|
|
102
|
+
4. **Do NOT merge stories that cover different lifecycle phases** — e.g., "inbound webhook handling" and "outbound message sending" share the Twilio API but have distinct endpoints, authorization, error handling, and test surfaces.
|
|
103
|
+
|
|
104
|
+
5. **Do NOT merge stories that span different layers** — e.g., a backend API story and a UI/dashboard story for the same feature should stay separate even if they share a data model.
|
|
105
|
+
|
|
106
|
+
### Guidance
|
|
107
|
+
|
|
108
|
+
- **Only merge stories that are truly the same capability described twice** — e.g., "Send WhatsApp Messages" and "WhatsApp Outbound Messaging" are the same story with different names. "Webhook Handling" and "Message Threading" are NOT — they serve different purposes.
|
|
109
|
+
- **When in doubt, do NOT merge stories** — it is far better to keep two slightly overlapping stories than to create one oversized story that needs splitting.
|
|
110
|
+
- **Ask yourself**: "Would merging these create a story with >7 acceptance criteria or >2 distinct API endpoints?" If yes, do NOT merge.
|