fraim-framework 2.0.44 → 2.0.45
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/bin/fraim.js +1 -1
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +73 -0
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +145 -0
- package/dist/registry/ai-manager-rules/design-phases/design.md +108 -0
- package/dist/registry/ai-manager-rules/design-phases/finalize.md +60 -0
- package/dist/registry/ai-manager-rules/design-phases/validate.md +125 -0
- package/dist/registry/ai-manager-rules/implement-phases/code.md +323 -0
- package/dist/registry/ai-manager-rules/implement-phases/completeness-review.md +94 -0
- package/dist/registry/ai-manager-rules/implement-phases/finalize.md +177 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +286 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +120 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +173 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +104 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +100 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +230 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +121 -0
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +371 -0
- package/dist/registry/ai-manager-rules/implement-phases/quality-review.md +304 -0
- package/dist/registry/ai-manager-rules/implement-phases/regression.md +159 -0
- package/dist/registry/ai-manager-rules/implement-phases/repro.md +101 -0
- package/dist/registry/ai-manager-rules/implement-phases/scoping.md +93 -0
- package/dist/registry/ai-manager-rules/implement-phases/smoke.md +225 -0
- package/dist/registry/ai-manager-rules/implement-phases/spike.md +118 -0
- package/dist/registry/ai-manager-rules/implement-phases/validate.md +347 -0
- package/dist/registry/ai-manager-rules/shared-phases/finalize.md +169 -0
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +202 -0
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +170 -0
- package/dist/registry/ai-manager-rules/spec-phases/finalize.md +60 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +66 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +139 -0
- package/dist/registry/ai-manager-rules/spec-phases/spec.md +102 -0
- package/dist/registry/ai-manager-rules/spec-phases/validate.md +118 -0
- package/dist/src/ai-manager/ai-manager.js +380 -119
- package/dist/src/ai-manager/evidence-validator.js +309 -0
- package/dist/src/ai-manager/phase-flow.js +244 -0
- package/dist/src/ai-manager/types.js +5 -0
- package/dist/src/fraim-mcp-server.js +45 -153
- package/dist/src/static-website-middleware.js +75 -0
- package/dist/tests/test-ai-coach-edge-cases.js +415 -0
- package/dist/tests/test-ai-coach-mcp-integration.js +432 -0
- package/dist/tests/test-ai-coach-performance.js +328 -0
- package/dist/tests/test-ai-coach-phase-content.js +264 -0
- package/dist/tests/test-ai-coach-workflows.js +487 -0
- package/dist/tests/test-ai-manager-phase-protocol.js +147 -0
- package/dist/tests/test-ai-manager.js +60 -71
- package/dist/tests/test-evidence-validation.js +221 -0
- package/dist/tests/test-mcp-lifecycle-methods.js +18 -23
- package/dist/tests/test-pr-review-integration.js +1 -0
- package/dist/tests/test-pr-review-workflow.js +299 -0
- package/dist/website/.nojekyll +0 -0
- package/dist/website/404.html +101 -0
- package/dist/website/CNAME +1 -0
- package/dist/website/README.md +22 -0
- package/dist/website/demo.html +604 -0
- package/dist/website/images/.gitkeep +1 -0
- package/dist/website/images/fraim-logo.png +0 -0
- package/dist/website/index.html +290 -0
- package/dist/website/pricing.html +414 -0
- package/dist/website/script.js +55 -0
- package/dist/website/styles.css +2647 -0
- package/package.json +2 -1
- package/registry/agent-guardrails.md +1 -1
- package/registry/stubs/workflows/brainstorming/blue-sky-brainstorming.md +11 -0
- package/registry/stubs/workflows/brainstorming/codebase-brainstorming.md +11 -0
- package/registry/stubs/workflows/compliance/detect-compliance-requirements.md +11 -0
- package/registry/stubs/workflows/compliance/generate-audit-evidence.md +11 -0
- package/registry/stubs/workflows/learning/synthesize-learnings.md +11 -0
- package/registry/stubs/workflows/legal/nda.md +11 -0
- package/registry/stubs/workflows/legal/patent-filing.md +11 -0
- package/registry/stubs/workflows/legal/trademark-filing.md +11 -0
- package/registry/stubs/workflows/product-building/design.md +1 -1
- package/registry/stubs/workflows/product-building/implement.md +1 -2
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Phase: wait-for-pr-review
|
|
2
|
+
|
|
3
|
+
## INTENT
|
|
4
|
+
Wait for human instruction to check PR status, then evaluate if PR is ready for merge or needs more work.
|
|
5
|
+
|
|
6
|
+
## OUTCOME
|
|
7
|
+
Either:
|
|
8
|
+
- **PR Approved**: Workflow complete, ready for merge
|
|
9
|
+
- **PR Has Comments**: Write feedback file and return to workflow to address feedback
|
|
10
|
+
|
|
11
|
+
## RULES FOR THIS PHASE
|
|
12
|
+
|
|
13
|
+
### Success Criteria
|
|
14
|
+
Read `registry/rules/agent-success-criteria.md` via `get_fraim_file` for the complete framework.
|
|
15
|
+
|
|
16
|
+
## WORKFLOW
|
|
17
|
+
|
|
18
|
+
### Step 1: Wait for Human Instruction
|
|
19
|
+
|
|
20
|
+
**Your task is to wait for human instruction.** Do not automatically poll or check PR status.
|
|
21
|
+
|
|
22
|
+
When human says "check the PR" or "proceed", move to Step 2.
|
|
23
|
+
|
|
24
|
+
### Step 2: Check PR Status and Comments
|
|
25
|
+
|
|
26
|
+
Use GitHub MCP tools to check the PR comprehensively:
|
|
27
|
+
|
|
28
|
+
1. **Get PR Status**: Use `mcp_github_pull_request_read` with method `get` to check if PR is approved
|
|
29
|
+
2. **Get All Comment Types**:
|
|
30
|
+
- **PR-level comments**: Use method `get_comments`
|
|
31
|
+
- **Review comments**: Use method `get_review_comments` (inline/detailed comments)
|
|
32
|
+
- **Review status**: Use method `get_reviews` (approval/changes requested)
|
|
33
|
+
|
|
34
|
+
### Step 3: Evaluate Results and Write Feedback File
|
|
35
|
+
|
|
36
|
+
**If PR status shows "approved" AND no unresolved comments:**
|
|
37
|
+
- PR is ready for merge
|
|
38
|
+
- Report success
|
|
39
|
+
|
|
40
|
+
**If PR has ANY comments OR is not approved:**
|
|
41
|
+
- PR needs more work
|
|
42
|
+
- **CRITICAL**: Write feedback file to `docs/evidence/{issueNumber}-{workflowType}-feedback.md`
|
|
43
|
+
- Use Round X format (check existing file to determine next round number)
|
|
44
|
+
- Report failure with feedback file path
|
|
45
|
+
|
|
46
|
+
## FEEDBACK FILE FORMAT
|
|
47
|
+
|
|
48
|
+
Create or append to `docs/evidence/{issueNumber}-{workflowType}-feedback.md`:
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
# PR Feedback for Issue #{issueNumber} - {WorkflowType} Workflow
|
|
52
|
+
|
|
53
|
+
## Round {X} Feedback
|
|
54
|
+
*Received: {timestamp}*
|
|
55
|
+
|
|
56
|
+
### Comment {N} - UNADDRESSED
|
|
57
|
+
- **Author**: {author}
|
|
58
|
+
- **Type**: {pr_comment|review_comment|review}
|
|
59
|
+
- **File**: {file_path} (if applicable)
|
|
60
|
+
- **Line**: {line_number} (if applicable)
|
|
61
|
+
- **Comment**: {comment_body}
|
|
62
|
+
- **Status**: UNADDRESSED
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Round Detection Logic**:
|
|
66
|
+
1. If feedback file doesn't exist → Start with "Round 1"
|
|
67
|
+
2. If feedback file exists → Parse to find highest "Round X", use "Round X+1"
|
|
68
|
+
3. Always append new round, never overwrite existing rounds
|
|
69
|
+
|
|
70
|
+
## VALIDATION
|
|
71
|
+
|
|
72
|
+
### Phase Complete When:
|
|
73
|
+
- ✅ PR status is "approved" in GitHub
|
|
74
|
+
- ✅ No unresolved comment threads exist
|
|
75
|
+
- ✅ No pending review comments
|
|
76
|
+
|
|
77
|
+
**Report back with:**
|
|
78
|
+
```javascript
|
|
79
|
+
seekCoachingOnNextStep({
|
|
80
|
+
workflowType: "{workflow_type}",
|
|
81
|
+
issueNumber: "{issue_number}",
|
|
82
|
+
currentPhase: "wait-for-pr-review",
|
|
83
|
+
status: "complete",
|
|
84
|
+
evidence: {
|
|
85
|
+
prStatus: "approved",
|
|
86
|
+
commentsResolved: true,
|
|
87
|
+
readyForMerge: true
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Phase Failed When:
|
|
93
|
+
- ✅ PR has unresolved comments
|
|
94
|
+
- ✅ PR status is not "approved"
|
|
95
|
+
- ✅ Review requests changes
|
|
96
|
+
|
|
97
|
+
### Report Back:
|
|
98
|
+
|
|
99
|
+
**When PR is approved and ready:**
|
|
100
|
+
```javascript
|
|
101
|
+
seekCoachingOnNextStep({
|
|
102
|
+
workflowType: "{workflow_type}",
|
|
103
|
+
issueNumber: "{issue_number}",
|
|
104
|
+
currentPhase: "wait-for-pr-review",
|
|
105
|
+
status: "complete",
|
|
106
|
+
evidence: {
|
|
107
|
+
prStatus: "approved",
|
|
108
|
+
commentsResolved: true,
|
|
109
|
+
readyForMerge: true
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**When PR has comments (CRITICAL: Write feedback file first):**
|
|
115
|
+
```javascript
|
|
116
|
+
seekCoachingOnNextStep({
|
|
117
|
+
workflowType: "{workflow_type}",
|
|
118
|
+
issueNumber: "{issue_number}",
|
|
119
|
+
currentPhase: "wait-for-pr-review",
|
|
120
|
+
status: "failure",
|
|
121
|
+
findings: {
|
|
122
|
+
feedbackFile: "{issueNumber}-{workflowType}-feedback.md",
|
|
123
|
+
roundNumber: {X},
|
|
124
|
+
commentCount: {total_comments},
|
|
125
|
+
prStatus: "{current_status}"
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## GITHUB MCP TOOLS TO USE
|
|
131
|
+
|
|
132
|
+
1. **Check PR Status**:
|
|
133
|
+
```javascript
|
|
134
|
+
mcp_github_pull_request_read({
|
|
135
|
+
method: "get",
|
|
136
|
+
owner: "{repo_owner}",
|
|
137
|
+
repo: "{repo_name}",
|
|
138
|
+
pullNumber: {pr_number}
|
|
139
|
+
})
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
2. **Get PR Comments**:
|
|
143
|
+
```javascript
|
|
144
|
+
mcp_github_pull_request_read({
|
|
145
|
+
method: "get_comments",
|
|
146
|
+
owner: "{repo_owner}",
|
|
147
|
+
repo: "{repo_name}",
|
|
148
|
+
pullNumber: {pr_number}
|
|
149
|
+
})
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
3. **Get Review Comments**:
|
|
153
|
+
```javascript
|
|
154
|
+
mcp_github_pull_request_read({
|
|
155
|
+
method: "get_review_comments",
|
|
156
|
+
owner: "{repo_owner}",
|
|
157
|
+
repo: "{repo_name}",
|
|
158
|
+
pullNumber: {pr_number}
|
|
159
|
+
})
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
4. **Get Reviews**:
|
|
163
|
+
```javascript
|
|
164
|
+
mcp_github_pull_request_read({
|
|
165
|
+
method: "get_reviews",
|
|
166
|
+
owner: "{repo_owner}",
|
|
167
|
+
repo: "{repo_name}",
|
|
168
|
+
pullNumber: {pr_number}
|
|
169
|
+
})
|
|
170
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Phase: Finalize
|
|
2
|
+
|
|
3
|
+
## INTENT
|
|
4
|
+
To prepare completed work for human review by setting proper labels, creating/updating PR, and documenting evidence.
|
|
5
|
+
|
|
6
|
+
## OUTCOME
|
|
7
|
+
Work is ready for human review with:
|
|
8
|
+
- Proper issue labels applied
|
|
9
|
+
- PR created/updated with work
|
|
10
|
+
- Evidence documented
|
|
11
|
+
- Clean handoff to next phase or review
|
|
12
|
+
|
|
13
|
+
## WORKFLOW
|
|
14
|
+
|
|
15
|
+
### Step 1: Apply Issue Labels
|
|
16
|
+
- Remove current phase label (e.g., `phase:spec`, `phase:design`, `phase:impl`)
|
|
17
|
+
- Add `status:needs-review` label
|
|
18
|
+
- Keep any other relevant labels
|
|
19
|
+
|
|
20
|
+
### Step 2: Create/Update Pull Request
|
|
21
|
+
- Ensure PR exists for the feature branch
|
|
22
|
+
- Update PR title to reflect completed work
|
|
23
|
+
- Update PR description with summary of work completed
|
|
24
|
+
- Link to relevant documents (specs, designs, evidence)
|
|
25
|
+
|
|
26
|
+
### Step 3: Document Evidence
|
|
27
|
+
- Create evidence file at `docs/evidence/{issue_number}-{workflow}-evidence.md`
|
|
28
|
+
- Document key decisions made
|
|
29
|
+
- List deliverables created
|
|
30
|
+
- Note any recommendations for next phase
|
|
31
|
+
|
|
32
|
+
### Step 4: Prepare Handoff
|
|
33
|
+
- Ensure all work is committed to git
|
|
34
|
+
- Verify documentation is complete
|
|
35
|
+
- Confirm work is ready for human review
|
|
36
|
+
|
|
37
|
+
## VALIDATION
|
|
38
|
+
|
|
39
|
+
### Phase Complete When:
|
|
40
|
+
- ✅ Issue labels updated (`status:needs-review`)
|
|
41
|
+
- ✅ PR created/updated with work summary
|
|
42
|
+
- ✅ Evidence documented
|
|
43
|
+
- ✅ All work committed to git
|
|
44
|
+
- ✅ Ready for human review
|
|
45
|
+
|
|
46
|
+
### Report Back:
|
|
47
|
+
```javascript
|
|
48
|
+
seekCoachingOnNextStep({
|
|
49
|
+
workflowType: "{workflow_type}",
|
|
50
|
+
issueNumber: "{issue_number}",
|
|
51
|
+
currentPhase: "finalize",
|
|
52
|
+
status: "complete",
|
|
53
|
+
evidence: {
|
|
54
|
+
labelsApplied: ["status:needs-review"],
|
|
55
|
+
prUpdated: true,
|
|
56
|
+
evidenceDocumented: "docs/evidence/{issue_number}-{workflow}-evidence.md",
|
|
57
|
+
workCommitted: true
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Phase: Spec-Completeness-Review
|
|
2
|
+
|
|
3
|
+
## INTENT
|
|
4
|
+
To verify that the specification is complete and includes high-fidelity HTML mocks when UI changes are involved.
|
|
5
|
+
|
|
6
|
+
## OUTCOME
|
|
7
|
+
Confirmation that:
|
|
8
|
+
- Specification document is complete and follows template
|
|
9
|
+
- High-fidelity HTML mocks exist for UI changes (not markdown code blocks)
|
|
10
|
+
- Mocks are accessible and render properly in browser
|
|
11
|
+
- All requirements from original issue are addressed
|
|
12
|
+
|
|
13
|
+
## WORKFLOW
|
|
14
|
+
|
|
15
|
+
### Step 1: Check Specification Completeness
|
|
16
|
+
- Verify spec document exists at `docs/feature specs/{issue_number}-*.md`
|
|
17
|
+
- Confirm all template sections are complete (not placeholder text)
|
|
18
|
+
- Check that customer, desired outcome, and user experience are well-defined
|
|
19
|
+
|
|
20
|
+
### Step 2: Validate Mocks (if UI changes)
|
|
21
|
+
**If the feature involves UI changes:**
|
|
22
|
+
- Check that HTML mock files exist in `docs/feature specs/mocks/`
|
|
23
|
+
- Verify mocks are named `{issue_number}-*.html`
|
|
24
|
+
- Confirm mocks are actual HTML files (not markdown code blocks)
|
|
25
|
+
- **Ask agent to open mocks in browser** to verify they render properly
|
|
26
|
+
- Check that mocks show different states/views of the feature
|
|
27
|
+
|
|
28
|
+
**If no UI changes:**
|
|
29
|
+
- Confirm this is documented in the spec
|
|
30
|
+
- Verify the feature is purely backend/API
|
|
31
|
+
|
|
32
|
+
### Step 3: Requirements Coverage
|
|
33
|
+
- Review original GitHub issue requirements
|
|
34
|
+
- Confirm all requirements are addressed in the specification
|
|
35
|
+
- Check that acceptance criteria are covered
|
|
36
|
+
|
|
37
|
+
## VALIDATION
|
|
38
|
+
|
|
39
|
+
### Phase Complete When:
|
|
40
|
+
- ✅ Specification document complete and professional quality
|
|
41
|
+
- ✅ High-fidelity HTML mocks created (if UI changes required)
|
|
42
|
+
- ✅ Agent has opened mocks in browser and confirmed they render
|
|
43
|
+
- ✅ All original issue requirements addressed
|
|
44
|
+
- ✅ Ready for design phase
|
|
45
|
+
|
|
46
|
+
### Phase Incomplete If:
|
|
47
|
+
- ❌ Specification incomplete or poor quality
|
|
48
|
+
- ❌ UI changes specified but no HTML mocks provided
|
|
49
|
+
- ❌ Mocks don't render properly in browser
|
|
50
|
+
- ❌ Original requirements not fully addressed
|
|
51
|
+
|
|
52
|
+
### Report Back:
|
|
53
|
+
```javascript
|
|
54
|
+
seekCoachingOnNextStep({
|
|
55
|
+
workflowType: "spec",
|
|
56
|
+
issueNumber: "{issue_number}",
|
|
57
|
+
currentPhase: "spec-completeness-review",
|
|
58
|
+
status: "complete",
|
|
59
|
+
evidence: {
|
|
60
|
+
specComplete: true,
|
|
61
|
+
mockFilesCreated: ["docs/feature specs/mocks/21-view1.html", "21-view2.html"],
|
|
62
|
+
browserValidated: true,
|
|
63
|
+
requirementsCovered: true
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
```
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Phase: Spec-Spec
|
|
2
|
+
|
|
3
|
+
## INTENT
|
|
4
|
+
To create a comprehensive feature specification that clearly defines customer needs, desired outcomes, user experience, and validation criteria.
|
|
5
|
+
|
|
6
|
+
## OUTCOME
|
|
7
|
+
A complete specification document that:
|
|
8
|
+
- Identifies the target customer and their needs
|
|
9
|
+
- Defines the desired outcome and success criteria
|
|
10
|
+
- Describes the user experience in detail
|
|
11
|
+
- Includes high-fidelity mocks for UI changes
|
|
12
|
+
- Provides a comprehensive validation plan
|
|
13
|
+
- Analyzes alternatives and competitive landscape
|
|
14
|
+
|
|
15
|
+
## PRINCIPLES
|
|
16
|
+
- **Customer-First**: Start with customer identification and needs
|
|
17
|
+
- **Outcome-Driven**: Focus on what the customer wants to achieve
|
|
18
|
+
- **Experience-Detailed**: Provide step-by-step user workflows
|
|
19
|
+
- **Validation-Ready**: Include specific, executable validation steps
|
|
20
|
+
- **Template-Compliant**: Follow FEATURESPEC template structure
|
|
21
|
+
|
|
22
|
+
## WORKFLOW
|
|
23
|
+
|
|
24
|
+
### Step 1: Get Repository Context and Issue Details
|
|
25
|
+
|
|
26
|
+
**GitHub Repository Context**: Before using GitHub MCP tools, read the local `.fraim/config.json` file to get the repository context:
|
|
27
|
+
- Use `git.repoOwner` for the GitHub repository owner
|
|
28
|
+
- Use `git.repoName` for the GitHub repository name
|
|
29
|
+
- These values are required for GitHub MCP API calls (owner/repo parameters)
|
|
30
|
+
|
|
31
|
+
**Read Issue Details**: Use GitHub MCP tools to get the complete issue information:
|
|
32
|
+
- Read the full issue description, title, and labels
|
|
33
|
+
- Check for linked documents or references
|
|
34
|
+
- Review any comments or discussion threads
|
|
35
|
+
- Note any existing requirements or context
|
|
36
|
+
- Understand the customer problem being addressed
|
|
37
|
+
|
|
38
|
+
### Step 2: Load Template and Rules
|
|
39
|
+
- Call `get_fraim_file({ path: "templates/specs/FEATURESPEC-TEMPLATE.md" })`
|
|
40
|
+
- Call `get_fraim_file({ path: "rules/communication.md" })`
|
|
41
|
+
- Call `get_fraim_file({ path: "rules/pr-workflow-completeness.md" })`
|
|
42
|
+
|
|
43
|
+
### Step 3: Check for PR Feedback
|
|
44
|
+
|
|
45
|
+
**CRITICAL**: Before creating specification, check for feedback:
|
|
46
|
+
- **PR Review Feedback**: `docs/evidence/{issue_number}-spec-feedback.md`
|
|
47
|
+
|
|
48
|
+
**If PR feedback exists:**
|
|
49
|
+
- **MUST address all UNADDRESSED items** before proceeding
|
|
50
|
+
- Update feedback file after addressing each item
|
|
51
|
+
- Change status from UNADDRESSED to ADDRESSED with resolution details
|
|
52
|
+
- Cannot skip or defer feedback items
|
|
53
|
+
- Phase cannot complete until all feedback is addressed
|
|
54
|
+
|
|
55
|
+
**PR Feedback File Format** (if exists):
|
|
56
|
+
```markdown
|
|
57
|
+
### Comment X - ADDRESSED
|
|
58
|
+
- **Author**: reviewer_name
|
|
59
|
+
- **Comment**: Original feedback
|
|
60
|
+
- **Status**: ADDRESSED
|
|
61
|
+
- **Resolution**: How you addressed this feedback
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Step 4: Create Specification Document
|
|
65
|
+
- Create spec file at `docs/feature specs/{issue_number}-{kebab-case-title}.md`
|
|
66
|
+
- Follow FEATURESPEC template structure exactly
|
|
67
|
+
- Include all required sections:
|
|
68
|
+
- Customer identification
|
|
69
|
+
- Customer's desired outcome
|
|
70
|
+
- Customer problem definition
|
|
71
|
+
- User experience with detailed workflows
|
|
72
|
+
- Validation plan
|
|
73
|
+
- Alternatives analysis
|
|
74
|
+
- Competitive landscape
|
|
75
|
+
|
|
76
|
+
### Step 4: Create High-Fidelity Mocks (if UI changes)
|
|
77
|
+
If the feature involves UI changes:
|
|
78
|
+
- Create HTML/CSS mocks in `docs/feature specs/mocks/`
|
|
79
|
+
- Name files: `{issue_number}-{descriptive-name}.html`
|
|
80
|
+
- Include at least 3 different views/states
|
|
81
|
+
- Link mocks in the specification document
|
|
82
|
+
- **Note**: Markdown code blocks are NOT sufficient - must be actual HTML files
|
|
83
|
+
|
|
84
|
+
### Step 5: Validate Completeness
|
|
85
|
+
- Ensure all template sections are complete
|
|
86
|
+
- Verify customer focus is clear and specific
|
|
87
|
+
- Check that user experience includes step-by-step workflows
|
|
88
|
+
- Confirm validation plan is actionable and executable
|
|
89
|
+
- Review alternatives and competitive analysis
|
|
90
|
+
|
|
91
|
+
### Step 6: Apply Labels
|
|
92
|
+
- Label the GitHub issue with `phase:spec`
|
|
93
|
+
- This will trigger automatic PR creation/update
|
|
94
|
+
|
|
95
|
+
## VALIDATION
|
|
96
|
+
|
|
97
|
+
### Phase Complete When:
|
|
98
|
+
- ✅ Specification document created using FEATURESPEC template
|
|
99
|
+
- ✅ All required sections completed with substantial content
|
|
100
|
+
- ✅ Customer and desired outcome clearly identified
|
|
101
|
+
- ✅ User experience includes detailed step-by-step workflows
|
|
102
|
+
- ✅ High-fidelity mocks created (if UI changes required)
|
|
103
|
+
- ✅ Validation plan includes specific, executable steps
|
|
104
|
+
- ✅ Alternatives and competitive landscape analyzed
|
|
105
|
+
- ✅ **PR feedback addressed** (if `docs/evidence/{issue_number}-spec-feedback.md` exists)
|
|
106
|
+
- ✅ Issue labeled with `phase:spec`
|
|
107
|
+
|
|
108
|
+
### Phase Incomplete If:
|
|
109
|
+
- ❌ Specification document missing or incomplete
|
|
110
|
+
- ❌ Template structure not followed
|
|
111
|
+
- ❌ Customer identification vague or missing
|
|
112
|
+
- ❌ User experience lacks detailed workflows
|
|
113
|
+
- ❌ UI changes specified but no HTML mocks provided
|
|
114
|
+
- ❌ Validation plan not actionable
|
|
115
|
+
- ❌ Alternatives or competitive analysis missing
|
|
116
|
+
- ❌ **PR feedback not addressed** (UNADDRESSED items remain in feedback file)
|
|
117
|
+
|
|
118
|
+
### Report Back:
|
|
119
|
+
When you complete this phase, call:
|
|
120
|
+
|
|
121
|
+
```javascript
|
|
122
|
+
seekCoachingOnNextStep({
|
|
123
|
+
workflowType: "spec",
|
|
124
|
+
issueNumber: "{issue_number}",
|
|
125
|
+
currentPhase: "spec-spec",
|
|
126
|
+
status: "complete",
|
|
127
|
+
evidence: {
|
|
128
|
+
specDocument: "docs/feature specs/{issue_number}-{title}.md",
|
|
129
|
+
templateUsed: "FEATURESPEC-TEMPLATE.md",
|
|
130
|
+
mockFiles: ["docs/feature specs/mocks/{issue_number}-view1.html", "..."],
|
|
131
|
+
namingConvention: "{issue_number}-{kebab-case-title}.md",
|
|
132
|
+
issueLabeled: "phase:spec"
|
|
133
|
+
},
|
|
134
|
+
findings: {
|
|
135
|
+
completedSections: ["Customer identification", "Customer desired outcome", "..."],
|
|
136
|
+
keyInsights: ["Key insight 1", "Key insight 2", "..."]
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
```
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Phase: Spec
|
|
2
|
+
|
|
3
|
+
## INTENT
|
|
4
|
+
To create a comprehensive feature specification that clearly defines customer needs, desired outcomes, user experience, and validation criteria.
|
|
5
|
+
|
|
6
|
+
## OUTCOME
|
|
7
|
+
A complete specification document that:
|
|
8
|
+
- Identifies the target customer and their needs
|
|
9
|
+
- Defines the desired outcome and success criteria
|
|
10
|
+
- Describes the user experience in detail
|
|
11
|
+
- Includes high-fidelity mocks for UI changes
|
|
12
|
+
- Provides a comprehensive validation plan
|
|
13
|
+
- Analyzes alternatives and competitive landscape
|
|
14
|
+
|
|
15
|
+
## PRINCIPLES
|
|
16
|
+
- **Customer-First**: Start with customer identification and needs
|
|
17
|
+
- **Outcome-Driven**: Focus on what the customer wants to achieve
|
|
18
|
+
- **Experience-Detailed**: Provide step-by-step user workflows
|
|
19
|
+
- **Validation-Ready**: Include specific, executable validation steps
|
|
20
|
+
- **Template-Compliant**: Follow FEATURESPEC template structure
|
|
21
|
+
|
|
22
|
+
## WORKFLOW
|
|
23
|
+
|
|
24
|
+
### Step 1: Load Template and Rules
|
|
25
|
+
- Call `get_fraim_file({ path: "templates/specs/FEATURESPEC-TEMPLATE.md" })`
|
|
26
|
+
- Call `get_fraim_file({ path: "rules/communication.md" })`
|
|
27
|
+
- Call `get_fraim_file({ path: "rules/pr-workflow-completeness.md" })`
|
|
28
|
+
|
|
29
|
+
### Step 2: Create Specification Document
|
|
30
|
+
- Create spec file at `docs/feature specs/{issue_number}-{kebab-case-title}.md`
|
|
31
|
+
- Follow FEATURESPEC template structure exactly
|
|
32
|
+
- Include all required sections:
|
|
33
|
+
- Customer identification
|
|
34
|
+
- Customer's desired outcome
|
|
35
|
+
- Customer problem definition
|
|
36
|
+
- User experience with detailed workflows
|
|
37
|
+
- Validation plan
|
|
38
|
+
- Alternatives analysis
|
|
39
|
+
- Competitive landscape
|
|
40
|
+
|
|
41
|
+
### Step 3: Create High-Fidelity Mocks (if UI changes)
|
|
42
|
+
If the feature involves UI changes:
|
|
43
|
+
- Create HTML/CSS mocks in `docs/feature specs/mocks/`
|
|
44
|
+
- Name files: `{issue_number}-{descriptive-name}.html`
|
|
45
|
+
- Include at least 3 different views/states
|
|
46
|
+
- Link mocks in the specification document
|
|
47
|
+
- **Note**: Markdown code blocks are NOT sufficient - must be actual HTML files
|
|
48
|
+
|
|
49
|
+
### Step 4: Validate Completeness
|
|
50
|
+
- Ensure all template sections are complete
|
|
51
|
+
- Verify customer focus is clear and specific
|
|
52
|
+
- Check that user experience includes step-by-step workflows
|
|
53
|
+
- Confirm validation plan is actionable and executable
|
|
54
|
+
- Review alternatives and competitive analysis
|
|
55
|
+
|
|
56
|
+
### Step 5: Apply Labels
|
|
57
|
+
- Label the GitHub issue with `phase:spec`
|
|
58
|
+
- This will trigger automatic PR creation/update
|
|
59
|
+
|
|
60
|
+
## VALIDATION
|
|
61
|
+
|
|
62
|
+
### Phase Complete When:
|
|
63
|
+
- ✅ Specification document created using FEATURESPEC template
|
|
64
|
+
- ✅ All required sections completed with substantial content
|
|
65
|
+
- ✅ Customer and desired outcome clearly identified
|
|
66
|
+
- ✅ User experience includes detailed step-by-step workflows
|
|
67
|
+
- ✅ High-fidelity mocks created (if UI changes required)
|
|
68
|
+
- ✅ Validation plan includes specific, executable steps
|
|
69
|
+
- ✅ Alternatives and competitive landscape analyzed
|
|
70
|
+
- ✅ Issue labeled with `phase:spec`
|
|
71
|
+
|
|
72
|
+
### Phase Incomplete If:
|
|
73
|
+
- ❌ Specification document missing or incomplete
|
|
74
|
+
- ❌ Template structure not followed
|
|
75
|
+
- ❌ Customer identification vague or missing
|
|
76
|
+
- ❌ User experience lacks detailed workflows
|
|
77
|
+
- ❌ UI changes specified but no HTML mocks provided
|
|
78
|
+
- ❌ Validation plan not actionable
|
|
79
|
+
- ❌ Alternatives or competitive analysis missing
|
|
80
|
+
|
|
81
|
+
### Report Back:
|
|
82
|
+
When you complete this phase, call:
|
|
83
|
+
|
|
84
|
+
```javascript
|
|
85
|
+
seekCoachingOnNextStep({
|
|
86
|
+
workflowType: "spec",
|
|
87
|
+
issueNumber: "{issue_number}",
|
|
88
|
+
currentPhase: "spec",
|
|
89
|
+
status: "complete",
|
|
90
|
+
evidence: {
|
|
91
|
+
specDocument: "docs/feature specs/{issue_number}-{title}.md",
|
|
92
|
+
templateUsed: "FEATURESPEC-TEMPLATE.md",
|
|
93
|
+
mockFiles: ["docs/feature specs/mocks/{issue_number}-view1.html", "..."],
|
|
94
|
+
namingConvention: "{issue_number}-{kebab-case-title}.md",
|
|
95
|
+
issueLabeled: "phase:spec"
|
|
96
|
+
},
|
|
97
|
+
findings: {
|
|
98
|
+
completedSections: ["Customer identification", "Customer desired outcome", "..."],
|
|
99
|
+
keyInsights: ["Key insight 1", "Key insight 2", "..."]
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Phase: Validate (Spec)
|
|
2
|
+
|
|
3
|
+
## INTENT
|
|
4
|
+
To systematically validate that the specification is complete, follows template structure, and meets all quality criteria before proceeding to the next workflow phase.
|
|
5
|
+
|
|
6
|
+
## OUTCOME
|
|
7
|
+
Confirmation that:
|
|
8
|
+
- Specification follows FEATURESPEC template structure
|
|
9
|
+
- All required sections are complete and substantial
|
|
10
|
+
- Customer focus is clear and specific
|
|
11
|
+
- User experience includes detailed workflows
|
|
12
|
+
- High-fidelity mocks are provided (if UI changes)
|
|
13
|
+
- Validation plan is actionable
|
|
14
|
+
- Quality standards are met consistently
|
|
15
|
+
|
|
16
|
+
## PRINCIPLES
|
|
17
|
+
- **Template Compliance**: Strict adherence to FEATURESPEC structure
|
|
18
|
+
- **Completeness**: All sections must be substantial, not placeholder text
|
|
19
|
+
- **Customer Focus**: Clear identification of who and what
|
|
20
|
+
- **Actionable Validation**: Validation plan must be executable
|
|
21
|
+
- **Quality Standards**: Professional-grade specification ready for design phase
|
|
22
|
+
|
|
23
|
+
## WORKFLOW
|
|
24
|
+
|
|
25
|
+
### Step 1: Load Validation Rules
|
|
26
|
+
- Call `get_fraim_file({ path: "ai-manager-rules/spec.json" })`
|
|
27
|
+
- Review all validation criteria and grading requirements
|
|
28
|
+
|
|
29
|
+
### Step 2: Execute Validation Checklist
|
|
30
|
+
|
|
31
|
+
**Blocking Validation Steps (ALL must pass):**
|
|
32
|
+
|
|
33
|
+
1. **Issue Labeling**: Verify issue has `phase:spec` label
|
|
34
|
+
2. **Document Location**: Confirm spec exists at `docs/feature specs/{issue_number}-*.md` with >1000 characters
|
|
35
|
+
3. **Template Structure**: Check all required sections present:
|
|
36
|
+
- Customer identification
|
|
37
|
+
- Customer's desired outcome
|
|
38
|
+
- Customer problem definition
|
|
39
|
+
- User experience
|
|
40
|
+
- Validation plan
|
|
41
|
+
- Alternatives analysis
|
|
42
|
+
- Competitive landscape
|
|
43
|
+
4. **Customer Section**: Customer clearly identified with specific details
|
|
44
|
+
5. **Desired Outcome**: Outcome is clear, measurable, describes end goal
|
|
45
|
+
6. **Problem Definition**: Specific explanation of why current state insufficient
|
|
46
|
+
7. **User Experience**: Step-by-step workflow (start in X, click Y, see Z)
|
|
47
|
+
8. **High-Fidelity Mocks**: If UI changes, HTML/CSS files in mocks folder (not markdown)
|
|
48
|
+
9. **Validation Plan**: Specific, executable steps (browser tests, API calls, scenarios)
|
|
49
|
+
10. **Requirements Coverage**: All original issue requirements addressed
|
|
50
|
+
|
|
51
|
+
**Warning Validation Steps (80% should pass):**
|
|
52
|
+
|
|
53
|
+
11. **Alternatives Analysis**: Table with alternatives and reasons for rejection
|
|
54
|
+
12. **Competitive Landscape**: Table with competitors, solutions, market research
|
|
55
|
+
|
|
56
|
+
### Step 3: Quality Assessment
|
|
57
|
+
- Check for placeholder text or incomplete sections
|
|
58
|
+
- Verify professional writing quality
|
|
59
|
+
- Ensure consistency throughout document
|
|
60
|
+
- Confirm all links and references work
|
|
61
|
+
|
|
62
|
+
### Step 4: Generate Validation Report
|
|
63
|
+
Document findings for each validation step:
|
|
64
|
+
- Pass/Fail for each blocking step
|
|
65
|
+
- Pass/Fail for each warning step
|
|
66
|
+
- Specific reasons for any failures
|
|
67
|
+
- Overall assessment and recommendations
|
|
68
|
+
|
|
69
|
+
## VALIDATION
|
|
70
|
+
|
|
71
|
+
### Phase Complete When:
|
|
72
|
+
- ✅ ALL blocking validation steps pass
|
|
73
|
+
- ✅ At least 80% of warning validation steps pass
|
|
74
|
+
- ✅ No placeholder text or incomplete sections
|
|
75
|
+
- ✅ Quality standards met consistently
|
|
76
|
+
- ✅ Validation report generated with evidence
|
|
77
|
+
|
|
78
|
+
### Phase Incomplete If:
|
|
79
|
+
- ❌ ANY blocking validation step fails
|
|
80
|
+
- ❌ Multiple warning validation steps fail
|
|
81
|
+
- ❌ Placeholder text or incomplete sections found
|
|
82
|
+
- ❌ Quality issues identified
|
|
83
|
+
- ❌ Requirements not properly addressed
|
|
84
|
+
|
|
85
|
+
### Report Back:
|
|
86
|
+
When you complete this phase, call:
|
|
87
|
+
|
|
88
|
+
```javascript
|
|
89
|
+
seekCoachingOnNextStep({
|
|
90
|
+
workflowType: "spec",
|
|
91
|
+
issueNumber: "{issue_number}",
|
|
92
|
+
currentPhase: "validate",
|
|
93
|
+
status: "complete",
|
|
94
|
+
evidence: {
|
|
95
|
+
validationReport: "All 10 blocking steps passed, 2/2 warning steps passed",
|
|
96
|
+
blockingStepsPassed: 10,
|
|
97
|
+
warningStepsPassed: 2,
|
|
98
|
+
totalWarningSteps: 2,
|
|
99
|
+
qualityAssessment: "Professional grade, ready for design phase",
|
|
100
|
+
validationDecision: "PASS"
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If validation fails:
|
|
106
|
+
```javascript
|
|
107
|
+
seekCoachingOnNextStep({
|
|
108
|
+
workflowType: "spec",
|
|
109
|
+
issueNumber: "{issue_number}",
|
|
110
|
+
currentPhase: "validate",
|
|
111
|
+
status: "incomplete",
|
|
112
|
+
findings: {
|
|
113
|
+
failedSteps: ["Step 8: High-fidelity mocks missing", "Step 9: Validation plan not actionable"],
|
|
114
|
+
validationDecision: "FAIL",
|
|
115
|
+
nextAction: "Return to spec phase to address failed validation steps"
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
```
|