fraim-framework 2.0.55 → 2.0.57
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/CHANGELOG.md +10 -0
- package/dist/src/cli/commands/init-project.js +10 -4
- package/dist/src/cli/setup/mcp-config-generator.js +23 -15
- package/dist/src/local-mcp-server/stdio-server.js +207 -0
- package/dist/src/utils/validate-workflows.js +101 -0
- package/dist/src/utils/workflow-parser.js +81 -0
- package/package.json +16 -11
- package/registry/scripts/pdf-styles.css +172 -0
- package/registry/scripts/prep-issue.sh +46 -4
- package/registry/scripts/profile-server.ts +131 -130
- package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
- package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
- package/registry/stubs/workflows/product-building/design.md +1 -1
- package/registry/stubs/workflows/product-building/implement.md +1 -1
- package/Claude.md +0 -1
- package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
- package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
- package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
- package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
- package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
- package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
- package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
- package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
- package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
- package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
- package/dist/registry/ai-manager-rules/retrospective.md +0 -116
- package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
- package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
- package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
- package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
- package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
- package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
- package/dist/registry/providers/ado.json +0 -19
- package/dist/registry/providers/github.json +0 -19
- package/dist/registry/scripts/cleanup-branch.js +0 -287
- package/dist/registry/scripts/evaluate-code-quality.js +0 -66
- package/dist/registry/scripts/exec-with-timeout.js +0 -142
- package/dist/registry/scripts/generate-engagement-emails.js +0 -705
- package/dist/registry/scripts/newsletter-helpers.js +0 -671
- package/dist/registry/scripts/profile-server.js +0 -388
- package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
- package/dist/registry/scripts/send-newsletter-simple.js +0 -85
- package/dist/registry/scripts/send-thank-you-emails.js +0 -54
- package/dist/registry/scripts/validate-openapi-limits.js +0 -311
- package/dist/registry/scripts/validate-test-coverage.js +0 -262
- package/dist/registry/scripts/verify-test-coverage.js +0 -66
- package/dist/scripts/build-stub-registry.js +0 -108
- package/dist/src/ai-manager/ai-manager.js +0 -482
- package/dist/src/ai-manager/phase-flow.js +0 -357
- package/dist/src/ai-manager/types.js +0 -5
- package/dist/src/fraim-mcp-server.js +0 -1885
- package/dist/tests/debug-tools.js +0 -80
- package/dist/tests/shared-server-utils.js +0 -57
- package/dist/tests/test-add-ide.js +0 -283
- package/dist/tests/test-ai-coach-edge-cases.js +0 -420
- package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
- package/dist/tests/test-ai-coach-performance.js +0 -328
- package/dist/tests/test-ai-coach-phase-content.js +0 -264
- package/dist/tests/test-ai-coach-workflows.js +0 -514
- package/dist/tests/test-cli.js +0 -228
- package/dist/tests/test-client-scripts-validation.js +0 -167
- package/dist/tests/test-complete-setup-flow.js +0 -110
- package/dist/tests/test-config-system.js +0 -279
- package/dist/tests/test-debug-session.js +0 -134
- package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
- package/dist/tests/test-enhanced-session-init.js +0 -188
- package/dist/tests/test-first-run-journey.js +0 -368
- package/dist/tests/test-fraim-issues.js +0 -59
- package/dist/tests/test-genericization.js +0 -44
- package/dist/tests/test-hybrid-script-execution.js +0 -340
- package/dist/tests/test-ide-detector.js +0 -46
- package/dist/tests/test-improved-setup.js +0 -121
- package/dist/tests/test-mcp-config-generator.js +0 -99
- package/dist/tests/test-mcp-connection.js +0 -107
- package/dist/tests/test-mcp-issue-integration.js +0 -156
- package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
- package/dist/tests/test-mcp-shared-server.js +0 -308
- package/dist/tests/test-mcp-template-processing.js +0 -160
- package/dist/tests/test-modular-issue-tracking.js +0 -165
- package/dist/tests/test-node-compatibility.js +0 -95
- package/dist/tests/test-npm-install.js +0 -68
- package/dist/tests/test-package-size.js +0 -108
- package/dist/tests/test-pr-review-workflow.js +0 -307
- package/dist/tests/test-prep-issue.js +0 -129
- package/dist/tests/test-productivity-integration.js +0 -157
- package/dist/tests/test-script-location-independence.js +0 -198
- package/dist/tests/test-script-sync.js +0 -557
- package/dist/tests/test-server-utils.js +0 -32
- package/dist/tests/test-session-rehydration.js +0 -148
- package/dist/tests/test-setup-integration.js +0 -98
- package/dist/tests/test-setup-scenarios.js +0 -322
- package/dist/tests/test-standalone.js +0 -143
- package/dist/tests/test-stub-registry.js +0 -136
- package/dist/tests/test-sync-stubs.js +0 -143
- package/dist/tests/test-sync-version-update.js +0 -93
- package/dist/tests/test-telemetry.js +0 -193
- package/dist/tests/test-token-validator.js +0 -30
- package/dist/tests/test-user-journey.js +0 -236
- package/dist/tests/test-users-to-target-workflow.js +0 -253
- package/dist/tests/test-utils.js +0 -109
- package/dist/tests/test-wizard.js +0 -71
- package/dist/tests/test-workflow-discovery.js +0 -242
- package/labels.json +0 -52
- package/registry/agent-guardrails.md +0 -63
- package/registry/fraim.md +0 -48
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-customer-profiling.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-survey-scoping.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-platform-discovery.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-survey-build-linkedin.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-prospect-qualification.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-survey-build-reddit.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-inventory-compilation.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-survey-build-x.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase5-survey-build-facebook.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase6-survey-build-custom.md +0 -11
- package/registry/stubs/workflows/customer-development/ai-coach-phases/phase7-survey-dispatch.md +0 -11
- package/registry/stubs/workflows/customer-development/templates/customer-persona-template.md +0 -11
- package/registry/stubs/workflows/customer-development/templates/search-strategy-template.md +0 -11
- package/setup.js +0 -171
- package/tsconfig.json +0 -23
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
> DO NOT EXECUTE.
|
|
9
9
|
|
|
10
10
|
## Intent
|
|
11
|
-
|
|
11
|
+
Engage target audiences across multiple social platforms through structured polls and surveys to gather quantitative and qualitative insights for product validation.
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
> DO NOT EXECUTE.
|
|
9
9
|
|
|
10
10
|
## Intent
|
|
11
|
-
|
|
11
|
+
Systematically discover, qualify, and compile a targeted prospect inventory of potential customers who have explicitly expressed pain points that your product solves.
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
> DO NOT EXECUTE.
|
|
9
9
|
|
|
10
10
|
## Intent
|
|
11
|
-
To create comprehensive technical design documents using a phase-based approach guided by the AI
|
|
11
|
+
To create comprehensive technical design documents using a phase-based approach guided by the AI Mentor, ensuring proper architecture, clear requirements, and stakeholder alignment.
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
> DO NOT EXECUTE.
|
|
9
9
|
|
|
10
10
|
## Intent
|
|
11
|
-
To implement bug fixes and features using a phase-based approach guided by the AI
|
|
11
|
+
To implement bug fixes and features using a phase-based approach guided by the AI Mentor, ensuring high-quality, tested code that meets requirements.
|
package/Claude.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Thoroughly review `.ai-agents/agent-guardrails.md`
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Phase: Design-Completeness-Review
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To verify that the technical design addresses all aspects of the functional specification, including the validation plan and testing strategy.
|
|
5
|
-
|
|
6
|
-
## OUTCOME
|
|
7
|
-
Confirmation that:
|
|
8
|
-
- Design addresses all functional spec requirements
|
|
9
|
-
- Validation plan from spec is reflected in design
|
|
10
|
-
- Testing strategy covers all specified scenarios
|
|
11
|
-
- Technical approach enables spec validation
|
|
12
|
-
- Design is ready for implementation
|
|
13
|
-
|
|
14
|
-
## WORKFLOW
|
|
15
|
-
|
|
16
|
-
### Step 1: Load Functional Specification
|
|
17
|
-
- Read the functional specification document from `docs/feature specs/{issue_number}-*.md`
|
|
18
|
-
- Extract all requirements, user workflows, and validation criteria
|
|
19
|
-
- Note any UI mockups and interaction patterns
|
|
20
|
-
|
|
21
|
-
### Step 2: Verify Spec Requirements Coverage
|
|
22
|
-
- Check that design addresses each functional requirement
|
|
23
|
-
- Confirm technical approach supports all user workflows from spec
|
|
24
|
-
- Verify API design enables the specified user experience
|
|
25
|
-
- Ensure data models support all spec requirements
|
|
26
|
-
|
|
27
|
-
### Step 3: Validation Plan Alignment
|
|
28
|
-
**Critical**: The spec's validation plan must be implementable with this design
|
|
29
|
-
- Review validation scenarios from functional spec
|
|
30
|
-
- Confirm design provides necessary APIs/interfaces for validation
|
|
31
|
-
- Check that testing strategy covers all validation scenarios
|
|
32
|
-
- Verify design enables browser testing (if UI changes)
|
|
33
|
-
- Ensure backend validation points are accessible
|
|
34
|
-
|
|
35
|
-
### Step 4: Technical Feasibility Check
|
|
36
|
-
- Confirm design is technically sound and implementable
|
|
37
|
-
- Check that all spec requirements can be built with this approach
|
|
38
|
-
- Verify integration points are well-defined
|
|
39
|
-
- Assess if design enables the spec's success criteria
|
|
40
|
-
|
|
41
|
-
## VALIDATION
|
|
42
|
-
|
|
43
|
-
### Phase Complete When:
|
|
44
|
-
- ✅ All functional spec requirements addressed in design
|
|
45
|
-
- ✅ Validation plan from spec is implementable with this design
|
|
46
|
-
- ✅ Testing strategy covers all spec scenarios
|
|
47
|
-
- ✅ Technical approach is sound and feasible
|
|
48
|
-
- ✅ Design enables spec success criteria
|
|
49
|
-
- ✅ Ready for implementation phase
|
|
50
|
-
|
|
51
|
-
### Phase Incomplete If:
|
|
52
|
-
- ❌ Functional spec requirements not addressed
|
|
53
|
-
- ❌ Validation plan not implementable with current design
|
|
54
|
-
- ❌ Testing strategy insufficient for spec scenarios
|
|
55
|
-
- ❌ Technical approach infeasible or unclear
|
|
56
|
-
- ❌ Design doesn't enable spec success criteria
|
|
57
|
-
|
|
58
|
-
### Report Back:
|
|
59
|
-
```javascript
|
|
60
|
-
seekCoachingOnNextStep({
|
|
61
|
-
workflowType: "design",
|
|
62
|
-
issueNumber: "{issue_number}",
|
|
63
|
-
currentPhase: "design-completeness-review",
|
|
64
|
-
status: "complete",
|
|
65
|
-
evidence: {
|
|
66
|
-
specRequirementsCovered: true,
|
|
67
|
-
validationPlanImplementable: true,
|
|
68
|
-
testingStrategySufficient: true,
|
|
69
|
-
technicallyFeasible: true,
|
|
70
|
-
functionalSpecPath: "docs/feature specs/{issue_number}-*.md"
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
```
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# Phase: Design-Design
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To create a comprehensive technical design that translates the feature specification into implementable architecture, APIs, and technical solutions.
|
|
5
|
-
|
|
6
|
-
## OUTCOME
|
|
7
|
-
A complete technical design document that:
|
|
8
|
-
- Translates spec requirements into technical architecture
|
|
9
|
-
- Defines APIs, data models, and system interactions
|
|
10
|
-
- Identifies technical risks and mitigation strategies
|
|
11
|
-
- Provides clear implementation guidance
|
|
12
|
-
- Includes technical validation criteria
|
|
13
|
-
|
|
14
|
-
## PRINCIPLES
|
|
15
|
-
- **Spec-Driven**: Design directly addresses specification requirements
|
|
16
|
-
- **Implementation-Ready**: Provides clear technical guidance
|
|
17
|
-
- **Risk-Aware**: Identifies and mitigates technical risks
|
|
18
|
-
- **Validation-Focused**: Includes technical validation criteria
|
|
19
|
-
- **Template-Compliant**: Follows RFC template structure
|
|
20
|
-
|
|
21
|
-
## WORKFLOW
|
|
22
|
-
|
|
23
|
-
### Step 1: Get Repository Context and Issue Details
|
|
24
|
-
|
|
25
|
-
**GitHub Repository Context**: Before using GitHub MCP tools, read the local `.fraim/config.json` file to get the repository context:
|
|
26
|
-
- Use `git.repoOwner` for the GitHub repository owner
|
|
27
|
-
- Use `git.repoName` for the GitHub repository name
|
|
28
|
-
- These values are required for GitHub MCP API calls (owner/repo parameters)
|
|
29
|
-
|
|
30
|
-
**Read Issue Details**: Use GitHub MCP tools to get the complete issue information:
|
|
31
|
-
- Read the full issue description, title, and labels
|
|
32
|
-
- Check for linked documents (specs, RFCs, design docs)
|
|
33
|
-
- Review any comments or discussion threads
|
|
34
|
-
- Note acceptance criteria and requirements
|
|
35
|
-
- Identify if there's an existing specification document
|
|
36
|
-
|
|
37
|
-
### Step 2: Load Template and Specification
|
|
38
|
-
- Call `get_fraim_file({ path: "templates/specs/TECHSPEC-TEMPLATE.md" })` (for features)
|
|
39
|
-
- Call `get_fraim_file({ path: "templates/specs/BUGSPEC-TEMPLATE.md" })` (for bugs)
|
|
40
|
-
- Read the completed specification document from previous phase
|
|
41
|
-
- Call `get_fraim_file({ path: "rules/spike-first-development.md" })`
|
|
42
|
-
|
|
43
|
-
### Step 3: Check for PR Feedback
|
|
44
|
-
|
|
45
|
-
**CRITICAL**: Before creating design, check for feedback:
|
|
46
|
-
- **PR Review Feedback**: `docs/evidence/{issue_number}-design-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: Analyze Specification Requirements
|
|
65
|
-
- Extract all technical requirements from specification
|
|
66
|
-
- Identify system components that need modification
|
|
67
|
-
- Determine API changes or additions needed
|
|
68
|
-
- Note any performance or scalability considerations
|
|
69
|
-
- List integration points with existing systems
|
|
70
|
-
|
|
71
|
-
### Step 5: Create Technical Design Document
|
|
72
|
-
- Create RFC file at `docs/rfcs/{issue_number}-{kebab-case-title}.md`
|
|
73
|
-
- Follow appropriate template structure (TECHSPEC or BUGSPEC)
|
|
74
|
-
- Include all required sections:
|
|
75
|
-
- Problem statement (from spec)
|
|
76
|
-
- Technical requirements
|
|
77
|
-
- Proposed solution architecture
|
|
78
|
-
- API design and data models
|
|
79
|
-
- Implementation plan
|
|
80
|
-
- Testing strategy
|
|
81
|
-
- Risk assessment and mitigation
|
|
82
|
-
- Alternative approaches considered
|
|
83
|
-
|
|
84
|
-
### Step 6: Design System Architecture
|
|
85
|
-
- Define component interactions and data flow
|
|
86
|
-
- Specify API endpoints and request/response formats
|
|
87
|
-
- Design database schema changes (if needed)
|
|
88
|
-
- Plan integration with existing systems
|
|
89
|
-
- Consider scalability and performance implications
|
|
90
|
-
|
|
91
|
-
### Step 7: Identify Technical Risks
|
|
92
|
-
- List unfamiliar technologies or patterns
|
|
93
|
-
- Note complex integrations or dependencies
|
|
94
|
-
- Identify performance bottlenecks
|
|
95
|
-
- Consider security implications
|
|
96
|
-
- Plan risk mitigation strategies
|
|
97
|
-
|
|
98
|
-
### Step 8: Apply Labels
|
|
99
|
-
- Label the GitHub issue with `phase:design`
|
|
100
|
-
- This will trigger automatic PR creation/update
|
|
101
|
-
|
|
102
|
-
## VALIDATION
|
|
103
|
-
|
|
104
|
-
### Phase Complete When:
|
|
105
|
-
- ✅ Technical design document created using appropriate template
|
|
106
|
-
- ✅ All specification requirements addressed technically
|
|
107
|
-
- ✅ System architecture clearly defined
|
|
108
|
-
- ✅ API design and data models specified
|
|
109
|
-
- ✅ Technical risks identified and mitigation planned
|
|
110
|
-
- ✅ Implementation plan provides clear guidance
|
|
111
|
-
- ✅ Testing strategy defined
|
|
112
|
-
- ✅ **PR feedback addressed** (if `docs/evidence/{issue_number}-design-feedback.md` exists)
|
|
113
|
-
- ✅ Issue labeled with `phase:design`
|
|
114
|
-
|
|
115
|
-
### Phase Incomplete If:
|
|
116
|
-
- ❌ Design document missing or incomplete
|
|
117
|
-
- ❌ Template structure not followed
|
|
118
|
-
- ❌ Specification requirements not addressed
|
|
119
|
-
- ❌ Architecture unclear or missing
|
|
120
|
-
- ❌ Technical risks not identified
|
|
121
|
-
- ❌ Implementation guidance insufficient
|
|
122
|
-
- ❌ **PR feedback not addressed** (UNADDRESSED items remain in feedback file)
|
|
123
|
-
|
|
124
|
-
### Report Back:
|
|
125
|
-
When you complete this phase, call:
|
|
126
|
-
|
|
127
|
-
```javascript
|
|
128
|
-
seekCoachingOnNextStep({
|
|
129
|
-
workflowType: "design",
|
|
130
|
-
issueNumber: "{issue_number}",
|
|
131
|
-
currentPhase: "design-design",
|
|
132
|
-
status: "complete",
|
|
133
|
-
evidence: {
|
|
134
|
-
designDocument: "docs/rfcs/{issue_number}-{title}.md",
|
|
135
|
-
templateUsed: "TECHSPEC-TEMPLATE.md",
|
|
136
|
-
architectureComponents: ["API layer", "Database schema", "UI components"],
|
|
137
|
-
technicalRisks: ["Integration with legacy system", "Performance at scale"],
|
|
138
|
-
issueLabeled: "phase:design"
|
|
139
|
-
},
|
|
140
|
-
findings: {
|
|
141
|
-
keyDecisions: ["Use REST API", "PostgreSQL for data storage", "React components"],
|
|
142
|
-
riskMitigation: ["Spike legacy integration", "Load testing plan"]
|
|
143
|
-
}
|
|
144
|
-
})
|
|
145
|
-
```
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
# Phase: Code
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To write the minimal, testable code needed to fix the bug or implement the feature, following approved designs and established patterns.
|
|
5
|
-
|
|
6
|
-
## OUTCOME
|
|
7
|
-
Working implementation that:
|
|
8
|
-
- Fixes the bug or implements the feature
|
|
9
|
-
- Follows approved design/RFC
|
|
10
|
-
- Includes comprehensive tests
|
|
11
|
-
- Maintains code quality
|
|
12
|
-
- Is ready for validation
|
|
13
|
-
|
|
14
|
-
## 🎯 SUCCESS MINDSET
|
|
15
|
-
|
|
16
|
-
**Your Goal**: Working application that users can actually use, not just passing tests.
|
|
17
|
-
|
|
18
|
-
**Critical Success Factors**:
|
|
19
|
-
- 🔍 **Manual validation is MANDATORY** - You WILL test in browser/API/CLI manually
|
|
20
|
-
- ⚠️ **Every error must be investigated** - No assumptions, no "that's probably fine"
|
|
21
|
-
- 🚫 **No placeholder code** - Implement complete solutions, no task placeholders or "for now" comments
|
|
22
|
-
- 📊 **100% test success required** - 91% is failure, 99% is failure, only 100% is success
|
|
23
|
-
- 🏗️ **Prototype-first** - Build simplest end-to-end solution, then engineer it properly
|
|
24
|
-
|
|
25
|
-
## RULES FOR THIS PHASE
|
|
26
|
-
|
|
27
|
-
### Success Criteria
|
|
28
|
-
Read `registry/rules/agent-success-criteria.md` via `get_fraim_file` for the complete framework. Focus especially on:
|
|
29
|
-
- **Integrity** (never claim tests pass if you didn't run them)
|
|
30
|
-
- **Correctness** (follow architecture, tests must pass, no `any` types)
|
|
31
|
-
- **Completeness** (implement everything in the issue description)
|
|
32
|
-
|
|
33
|
-
### Simplicity Principles
|
|
34
|
-
Read `registry/rules/simplicity.md` via `get_fraim_file` for complete guidelines. Critical for coding phase:
|
|
35
|
-
- **Prototype-First Development**: Build simplest solution that works end-to-end, validate manually, then engineer correctly
|
|
36
|
-
- **Manual Validation Required**: Test with browser/curl before creating automated tests
|
|
37
|
-
- **Resource Waste Prevention**: Maximum 2 retries for expensive operations
|
|
38
|
-
- **NEVER use placeholder comments** like "For now", "task placeholders", "fix-me notes"
|
|
39
|
-
|
|
40
|
-
### Architecture Compliance
|
|
41
|
-
Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Follow all architectural standards - no shortcuts.
|
|
42
|
-
|
|
43
|
-
### Git Operations (if needed)
|
|
44
|
-
When using git commands directly (if MCP tools unavailable), read `rules/git-safe-commands.md` via `get_fraim_file` to avoid interactive commands that hang agents.
|
|
45
|
-
|
|
46
|
-
### Failure Handling
|
|
47
|
-
- **If implementation fails**: Return to implement-scoping phase to re-understand requirements
|
|
48
|
-
- **If tests fail**: Fix implementation until all tests pass
|
|
49
|
-
- **If architecture violations**: Return to implement-scoping to understand constraints better
|
|
50
|
-
|
|
51
|
-
## PRINCIPLES
|
|
52
|
-
- **Design-Driven**: Follow approved RFCs and design documents
|
|
53
|
-
- **Minimal Implementation**: Write only code needed for this issue
|
|
54
|
-
- **Test-First**: Write tests before or alongside implementation
|
|
55
|
-
- **Quality Focus**: Maintain code quality and follow patterns
|
|
56
|
-
- **Complete**: All aspects of design/spec implemented
|
|
57
|
-
|
|
58
|
-
## 📋 ENHANCED WORKFLOW
|
|
59
|
-
|
|
60
|
-
### Step 1: Prototype-First Development
|
|
61
|
-
|
|
62
|
-
**Build Simplest End-to-End Solution**:
|
|
63
|
-
- Focus on getting something working, not perfect
|
|
64
|
-
- Don't worry about code quality initially
|
|
65
|
-
- Prove the approach works before optimizing
|
|
66
|
-
- Get basic functionality working first
|
|
67
|
-
|
|
68
|
-
**Manual Validation (CRITICAL)**:
|
|
69
|
-
- Test every step manually using browser/curl/CLI
|
|
70
|
-
- Verify each acceptance criteria works
|
|
71
|
-
- Take screenshots/capture output as evidence
|
|
72
|
-
- Fix any issues found immediately
|
|
73
|
-
|
|
74
|
-
### Step 2: Review Design/Spec
|
|
75
|
-
|
|
76
|
-
**For Bugs:**
|
|
77
|
-
- Review bug description and repro test
|
|
78
|
-
- Understand root cause
|
|
79
|
-
- Plan minimal fix
|
|
80
|
-
|
|
81
|
-
**For Features:**
|
|
82
|
-
- Review approved RFC/design document
|
|
83
|
-
- Review spike/POC findings (if applicable)
|
|
84
|
-
- Understand all acceptance criteria
|
|
85
|
-
- Plan implementation approach
|
|
86
|
-
|
|
87
|
-
### Step 3: Check for Design and PR Feedback
|
|
88
|
-
|
|
89
|
-
**CRITICAL**: Before implementing, check for feedback:
|
|
90
|
-
- **Design Review Feedback**: `docs/evidence/{issue_number}-design-reviewer-feedback.md`
|
|
91
|
-
- **Feature Review Feedback**: `docs/evidence/{issue_number}-feature-reviewer-feedback.md`
|
|
92
|
-
- **PR Review Feedback**: `docs/evidence/{issue_number}-implement-feedback.md`
|
|
93
|
-
|
|
94
|
-
**If any feedback exists:**
|
|
95
|
-
- **MUST address all UNADDRESSED items** before proceeding
|
|
96
|
-
- Update feedback files after addressing each item
|
|
97
|
-
- Change status from UNADDRESSED to ADDRESSED with resolution details
|
|
98
|
-
- Cannot skip or defer feedback items
|
|
99
|
-
- Phase cannot complete until all feedback is addressed
|
|
100
|
-
|
|
101
|
-
**PR Feedback File Format** (if exists):
|
|
102
|
-
```markdown
|
|
103
|
-
### Comment X - ADDRESSED
|
|
104
|
-
- **Author**: reviewer_name
|
|
105
|
-
- **Comment**: Original feedback
|
|
106
|
-
- **Status**: ADDRESSED
|
|
107
|
-
- **Resolution**: How you addressed this feedback
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Step 4: Implement Changes
|
|
111
|
-
|
|
112
|
-
**For Bugs:**
|
|
113
|
-
- Make minimal changes to fix the issue
|
|
114
|
-
- Focus on root cause, not symptoms
|
|
115
|
-
- Avoid unrelated changes
|
|
116
|
-
- Keep diff small and focused
|
|
117
|
-
|
|
118
|
-
**For Features:**
|
|
119
|
-
- Implement all aspects from design/spec
|
|
120
|
-
- Follow existing patterns and architecture
|
|
121
|
-
- Create necessary files/modules
|
|
122
|
-
- Implement all API contracts
|
|
123
|
-
- Implement all data models
|
|
124
|
-
- Implement all user interfaces
|
|
125
|
-
- No placeholder code for core functionality
|
|
126
|
-
|
|
127
|
-
### Step 5: Fix All Errors (MANDATORY)
|
|
128
|
-
|
|
129
|
-
**Error Investigation Requirements**:
|
|
130
|
-
- **Every error in logs must be investigated**
|
|
131
|
-
- **No error is "expected" until proven**
|
|
132
|
-
- **Fix root causes, not symptoms**
|
|
133
|
-
- **Document why any remaining errors are acceptable**
|
|
134
|
-
|
|
135
|
-
**Common Error Sources**:
|
|
136
|
-
- Server startup errors
|
|
137
|
-
- API connection errors
|
|
138
|
-
- Database connection errors
|
|
139
|
-
- TypeScript compilation errors
|
|
140
|
-
- Test execution errors
|
|
141
|
-
|
|
142
|
-
### Step 6: Write Comprehensive Tests
|
|
143
|
-
|
|
144
|
-
**MANDATORY**: Every issue requires tests - no exceptions.
|
|
145
|
-
|
|
146
|
-
**For Bugs:**
|
|
147
|
-
- Verify repro test from implement-repro phase now passes
|
|
148
|
-
- Add additional edge case tests if needed
|
|
149
|
-
- Ensure tests cover the fix
|
|
150
|
-
|
|
151
|
-
**For Features:**
|
|
152
|
-
- Write tests for all acceptance criteria
|
|
153
|
-
- Test main user scenarios
|
|
154
|
-
- Test edge cases
|
|
155
|
-
- Test error conditions
|
|
156
|
-
- Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full test architecture standards
|
|
157
|
-
|
|
158
|
-
**Test Requirements:**
|
|
159
|
-
- Use shared-server-utils.ts for server tests
|
|
160
|
-
- Unique API keys per test
|
|
161
|
-
- Proper cleanup in finally blocks
|
|
162
|
-
- No individual server instances
|
|
163
|
-
- Proper timeouts (5-10s for network calls)
|
|
164
|
-
- Tests must validate real functionality, not mocks
|
|
165
|
-
- No tests that default to passing
|
|
166
|
-
|
|
167
|
-
**Test Tagging Guidelines:**
|
|
168
|
-
Tag tests appropriately to ensure proper test suite execution:
|
|
169
|
-
|
|
170
|
-
- **`smoke`**: Tag tests as "smoke" if they verify:
|
|
171
|
-
- Core system functionality (CLI commands, server startup, basic workflows)
|
|
172
|
-
- Critical user journeys (init, sync, basic operations)
|
|
173
|
-
- Integration points between major components
|
|
174
|
-
- Functionality that, if broken, would make the system unusable
|
|
175
|
-
|
|
176
|
-
- **`integration`**: Tests that verify multiple components working together
|
|
177
|
-
- **`unit`**: Tests that verify individual functions or classes in isolation
|
|
178
|
-
- **`e2e`**: End-to-end tests that verify complete user workflows
|
|
179
|
-
|
|
180
|
-
### Step 7: Basic Compilation Check
|
|
181
|
-
|
|
182
|
-
**Verify code compiles:**
|
|
183
|
-
|
|
184
|
-
**Build Commands**: Always check `.fraim/config.json` first for `customizations.validation.buildCommand`, use that if available, otherwise default to `npm run build`.
|
|
185
|
-
|
|
186
|
-
**What to Look For**:
|
|
187
|
-
- Exit code 0 (success)
|
|
188
|
-
- No TypeScript compilation errors
|
|
189
|
-
- Clean build output
|
|
190
|
-
|
|
191
|
-
**Must exit with code 0** (no errors)
|
|
192
|
-
|
|
193
|
-
If compilation fails:
|
|
194
|
-
- Fix TypeScript errors
|
|
195
|
-
- Re-compile
|
|
196
|
-
- Iterate until clean
|
|
197
|
-
|
|
198
|
-
**Note**: Full validation, testing, and manual verification will be handled in subsequent phases (implement-validate, implement-smoke, implement-regression).
|
|
199
|
-
|
|
200
|
-
## 📸 EVIDENCE REQUIREMENTS
|
|
201
|
-
|
|
202
|
-
You MUST provide concrete evidence for all claims:
|
|
203
|
-
|
|
204
|
-
1. **Implementation Complete**: Code written per design/spec
|
|
205
|
-
2. **Tests Written**: Comprehensive test coverage for new functionality
|
|
206
|
-
3. **Compilation Success**: TypeScript compiles without errors
|
|
207
|
-
4. **Basic Functionality**: Code implements the required features/fixes
|
|
208
|
-
|
|
209
|
-
**Note**: Screenshots, manual validation, server logs, and API responses will be captured in the implement-validate phase.
|
|
210
|
-
|
|
211
|
-
## VALIDATION
|
|
212
|
-
|
|
213
|
-
### Phase Complete When:
|
|
214
|
-
- ✅ Implementation complete per design/spec
|
|
215
|
-
- ✅ (Bugs) Minimal, focused changes
|
|
216
|
-
- ✅ (Features) All design aspects implemented
|
|
217
|
-
- ✅ Tests written for new functionality
|
|
218
|
-
- ✅ TypeScript compiles cleanly
|
|
219
|
-
- ✅ Design feedback addressed (if applicable)
|
|
220
|
-
- ✅ **PR feedback addressed** (if `docs/evidence/{issue_number}-implement-feedback.md` exists)
|
|
221
|
-
- ✅ Code implements required features/fixes
|
|
222
|
-
|
|
223
|
-
### Phase Incomplete If:
|
|
224
|
-
- ❌ Design/spec not fully implemented
|
|
225
|
-
- ❌ No tests written for new functionality
|
|
226
|
-
- ❌ TypeScript compilation errors
|
|
227
|
-
- ❌ Design feedback not addressed
|
|
228
|
-
- ❌ **PR feedback not addressed** (UNADDRESSED items remain in feedback file)
|
|
229
|
-
- ❌ Code doesn't implement required functionality
|
|
230
|
-
|
|
231
|
-
### Report Back:
|
|
232
|
-
When you complete this phase, call:
|
|
233
|
-
|
|
234
|
-
```javascript
|
|
235
|
-
seekCoachingOnNextStep({
|
|
236
|
-
workflowType: "implement",
|
|
237
|
-
issueNumber: "{issue_number}",
|
|
238
|
-
currentPhase: "implement-code",
|
|
239
|
-
status: "complete",
|
|
240
|
-
findings: {
|
|
241
|
-
issueType: "bug", // or "feature" - Required for phase validation
|
|
242
|
-
evidence: "Brief summary of what you implemented and validated"
|
|
243
|
-
},
|
|
244
|
-
evidence: {
|
|
245
|
-
implementation: "Brief summary of what you implemented",
|
|
246
|
-
testsWritten: "Description of tests created for new functionality",
|
|
247
|
-
compilationStatus: "TypeScript compiles without errors",
|
|
248
|
-
feedbackAddressed: "All design/PR feedback addressed (if applicable)"
|
|
249
|
-
}
|
|
250
|
-
})
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
If implementation incomplete, iterate:
|
|
254
|
-
```javascript
|
|
255
|
-
seekCoachingOnNextStep({
|
|
256
|
-
workflowType: "implement",
|
|
257
|
-
issueNumber: "{issue_number}",
|
|
258
|
-
currentPhase: "implement-code",
|
|
259
|
-
status: "incomplete",
|
|
260
|
-
findings: {
|
|
261
|
-
issueType: "bug", // or "feature" - Required for phase validation
|
|
262
|
-
uncertainties: ["Issues encountered", "What needs to be fixed"]
|
|
263
|
-
}
|
|
264
|
-
})
|
|
265
|
-
```
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
## SCRIPTS
|
|
269
|
-
|
|
270
|
-
**Run tests:**
|
|
271
|
-
```bash
|
|
272
|
-
npm test -- path/to/test.test.ts
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
**Compile TypeScript:**
|
|
276
|
-
```bash
|
|
277
|
-
npx tsc --noEmit --skipLibCheck
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
**Start dev server (for manual testing in validate phase):**
|
|
281
|
-
```bash
|
|
282
|
-
npm run dev
|
|
283
|
-
```
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# Phase: Implement-Completeness-Review
|
|
2
|
-
|
|
3
|
-
## INTENT
|
|
4
|
-
To verify that all design aspects have been implemented and that the work fully addresses the requirements from the design document or issue specification.
|
|
5
|
-
|
|
6
|
-
## OUTCOME
|
|
7
|
-
Confirmation that:
|
|
8
|
-
- All design aspects implemented
|
|
9
|
-
- All acceptance criteria met
|
|
10
|
-
- Implementation matches design specifications
|
|
11
|
-
- Work is complete and ready for finalization
|
|
12
|
-
|
|
13
|
-
## PRINCIPLES
|
|
14
|
-
- **Design Fidelity**: Implementation must match design specifications
|
|
15
|
-
- **Complete Coverage**: All design aspects must be addressed
|
|
16
|
-
- **Evidence-Based**: Use existing comprehensive review workflows
|
|
17
|
-
|
|
18
|
-
## WORKFLOW
|
|
19
|
-
|
|
20
|
-
### Step 1: Check for PR Feedback to Address
|
|
21
|
-
|
|
22
|
-
- Check for PR feedback file: `docs/evidence/{issue_number}-implement-feedback.md`
|
|
23
|
-
- If feedback file exists, verify all comments have been addressed before proceeding
|
|
24
|
-
|
|
25
|
-
**PR Feedback Validation:**
|
|
26
|
-
- Read the feedback file to see all previous review rounds
|
|
27
|
-
- Ensure all items marked as UNADDRESSED have been resolved
|
|
28
|
-
- Update feedback file with ADDRESSED status and resolution details
|
|
29
|
-
- Cannot proceed until all feedback items are properly addressed
|
|
30
|
-
|
|
31
|
-
**Expected behavior:**
|
|
32
|
-
- All UNADDRESSED items in feedback file must be resolved
|
|
33
|
-
- Each resolved item should have detailed resolution explanation
|
|
34
|
-
- Phase cannot complete with any remaining UNADDRESSED items
|
|
35
|
-
|
|
36
|
-
### Step 2: Execute Design Review Workflow
|
|
37
|
-
|
|
38
|
-
Use the comprehensive design validation workflow:
|
|
39
|
-
- Read `registry/workflows/reviewer/review-implementation-vs-design-spec.md` via `get_fraim_file`
|
|
40
|
-
- Follow the complete systematic review process
|
|
41
|
-
- This workflow provides detailed checklists, validation steps, and templates
|
|
42
|
-
- Works for both bugs and features - all should be reviewed against their design spec
|
|
43
|
-
|
|
44
|
-
### Step 3: Execute Review Workflow
|
|
45
|
-
|
|
46
|
-
**Follow the design review workflow completely:**
|
|
47
|
-
- Use all the checklists provided
|
|
48
|
-
- Execute all validation steps
|
|
49
|
-
- Create feedback documents using the templates
|
|
50
|
-
- Follow the iteration limits (max 3)
|
|
51
|
-
|
|
52
|
-
### Step 4: Architecture Compliance
|
|
53
|
-
|
|
54
|
-
Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Verify implementation follows all design standards.
|
|
55
|
-
|
|
56
|
-
## VALIDATION
|
|
57
|
-
|
|
58
|
-
### Phase Complete When:
|
|
59
|
-
- ✅ PR comments addressed (if applicable)
|
|
60
|
-
- ✅ PR comment verification script passes (if applicable)
|
|
61
|
-
- ✅ Appropriate review workflow executed completely
|
|
62
|
-
- ✅ All workflow checklists completed
|
|
63
|
-
- ✅ All design aspects verified per workflow
|
|
64
|
-
- ✅ Evidence quality meets workflow standards
|
|
65
|
-
- ✅ Feedback documents created using workflow templates
|
|
66
|
-
- ✅ Architecture compliance verified
|
|
67
|
-
|
|
68
|
-
### Phase Incomplete If:
|
|
69
|
-
- ❌ PR comments not properly addressed
|
|
70
|
-
- ❌ PR comment verification script fails
|
|
71
|
-
- ❌ Review workflow not followed completely
|
|
72
|
-
- ❌ Workflow checklists incomplete
|
|
73
|
-
- ❌ Design aspects not verified per workflow standards
|
|
74
|
-
- ❌ Evidence quality insufficient per workflow criteria
|
|
75
|
-
- ❌ Feedback documents missing or not using templates
|
|
76
|
-
|
|
77
|
-
### Report Back:
|
|
78
|
-
When you complete this phase, call:
|
|
79
|
-
|
|
80
|
-
```javascript
|
|
81
|
-
seekCoachingOnNextStep({
|
|
82
|
-
workflowType: "implement",
|
|
83
|
-
issueNumber: "{issue_number}",
|
|
84
|
-
currentPhase: "implement-completeness-review",
|
|
85
|
-
status: "complete",
|
|
86
|
-
findings: {
|
|
87
|
-
issueType: "bug" // or "feature" - Required for phase validation
|
|
88
|
-
},
|
|
89
|
-
evidence: {
|
|
90
|
-
reviewWorkflowUsed: "review-implementation-vs-design-spec", // Which workflow was used
|
|
91
|
-
workflowChecklistsComplete: "YES", // All checklists from workflow completed?
|
|
92
|
-
designAspectsVerified: "YES", // All design aspects verified per workflow?
|
|
93
|
-
evidenceQualityMet: "YES", // Evidence meets workflow standards?
|
|
94
|
-
feedbackDocumentsCreated: "YES", // Feedback documents created using templates?
|
|
95
|
-
architectureCompliant: "YES", // Architecture compliance verified?
|
|
96
|
-
reviewDecision: "APPROVE", // APPROVE/REQUEST_CHANGES/REJECT per workflow
|
|
97
|
-
summary: "Completed systematic design review using comprehensive workflow. All design aspects verified and documented."
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
If review reveals issues:
|
|
103
|
-
```javascript
|
|
104
|
-
seekCoachingOnNextStep({
|
|
105
|
-
workflowType: "implement",
|
|
106
|
-
issueNumber: "{issue_number}",
|
|
107
|
-
currentPhase: "implement-completeness-review",
|
|
108
|
-
status: "incomplete",
|
|
109
|
-
findings: {
|
|
110
|
-
issueType: "bug" // or "feature" - Required for phase validation
|
|
111
|
-
},
|
|
112
|
-
evidence: {
|
|
113
|
-
reviewWorkflowUsed: "review-implementation-vs-design-spec",
|
|
114
|
-
reviewDecision: "REQUEST_CHANGES", // or "REJECT"
|
|
115
|
-
issuesFound: ["Missing test case X per workflow checklist", "Design requirement Y not implemented"],
|
|
116
|
-
feedbackDocumentLocation: "docs/evidence/{issue}-design-reviewer-feedback.md",
|
|
117
|
-
nextAction: "Implementation agent must address feedback per workflow iteration process"
|
|
118
|
-
}
|
|
119
|
-
})
|
|
120
|
-
```
|