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.
Files changed (120) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/src/cli/commands/init-project.js +10 -4
  3. package/dist/src/cli/setup/mcp-config-generator.js +23 -15
  4. package/dist/src/local-mcp-server/stdio-server.js +207 -0
  5. package/dist/src/utils/validate-workflows.js +101 -0
  6. package/dist/src/utils/workflow-parser.js +81 -0
  7. package/package.json +16 -11
  8. package/registry/scripts/pdf-styles.css +172 -0
  9. package/registry/scripts/prep-issue.sh +46 -4
  10. package/registry/scripts/profile-server.ts +131 -130
  11. package/registry/stubs/workflows/customer-development/user-survey-dispatch.md +1 -1
  12. package/registry/stubs/workflows/customer-development/users-to-target.md +1 -1
  13. package/registry/stubs/workflows/product-building/design.md +1 -1
  14. package/registry/stubs/workflows/product-building/implement.md +1 -1
  15. package/Claude.md +0 -1
  16. package/dist/registry/ai-manager-rules/design-phases/design-completeness-review.md +0 -73
  17. package/dist/registry/ai-manager-rules/design-phases/design-design.md +0 -145
  18. package/dist/registry/ai-manager-rules/implement-phases/implement-code.md +0 -283
  19. package/dist/registry/ai-manager-rules/implement-phases/implement-completeness-review.md +0 -120
  20. package/dist/registry/ai-manager-rules/implement-phases/implement-regression.md +0 -173
  21. package/dist/registry/ai-manager-rules/implement-phases/implement-repro.md +0 -104
  22. package/dist/registry/ai-manager-rules/implement-phases/implement-scoping.md +0 -100
  23. package/dist/registry/ai-manager-rules/implement-phases/implement-smoke.md +0 -237
  24. package/dist/registry/ai-manager-rules/implement-phases/implement-spike.md +0 -121
  25. package/dist/registry/ai-manager-rules/implement-phases/implement-validate.md +0 -375
  26. package/dist/registry/ai-manager-rules/retrospective.md +0 -116
  27. package/dist/registry/ai-manager-rules/shared-phases/address-pr-feedback.md +0 -188
  28. package/dist/registry/ai-manager-rules/shared-phases/submit-pr.md +0 -202
  29. package/dist/registry/ai-manager-rules/shared-phases/wait-for-pr-review.md +0 -170
  30. package/dist/registry/ai-manager-rules/spec-phases/spec-competitor-analysis.md +0 -105
  31. package/dist/registry/ai-manager-rules/spec-phases/spec-completeness-review.md +0 -66
  32. package/dist/registry/ai-manager-rules/spec-phases/spec-spec.md +0 -139
  33. package/dist/registry/providers/ado.json +0 -19
  34. package/dist/registry/providers/github.json +0 -19
  35. package/dist/registry/scripts/cleanup-branch.js +0 -287
  36. package/dist/registry/scripts/evaluate-code-quality.js +0 -66
  37. package/dist/registry/scripts/exec-with-timeout.js +0 -142
  38. package/dist/registry/scripts/generate-engagement-emails.js +0 -705
  39. package/dist/registry/scripts/newsletter-helpers.js +0 -671
  40. package/dist/registry/scripts/profile-server.js +0 -388
  41. package/dist/registry/scripts/run-thank-you-workflow.js +0 -92
  42. package/dist/registry/scripts/send-newsletter-simple.js +0 -85
  43. package/dist/registry/scripts/send-thank-you-emails.js +0 -54
  44. package/dist/registry/scripts/validate-openapi-limits.js +0 -311
  45. package/dist/registry/scripts/validate-test-coverage.js +0 -262
  46. package/dist/registry/scripts/verify-test-coverage.js +0 -66
  47. package/dist/scripts/build-stub-registry.js +0 -108
  48. package/dist/src/ai-manager/ai-manager.js +0 -482
  49. package/dist/src/ai-manager/phase-flow.js +0 -357
  50. package/dist/src/ai-manager/types.js +0 -5
  51. package/dist/src/fraim-mcp-server.js +0 -1885
  52. package/dist/tests/debug-tools.js +0 -80
  53. package/dist/tests/shared-server-utils.js +0 -57
  54. package/dist/tests/test-add-ide.js +0 -283
  55. package/dist/tests/test-ai-coach-edge-cases.js +0 -420
  56. package/dist/tests/test-ai-coach-mcp-integration.js +0 -450
  57. package/dist/tests/test-ai-coach-performance.js +0 -328
  58. package/dist/tests/test-ai-coach-phase-content.js +0 -264
  59. package/dist/tests/test-ai-coach-workflows.js +0 -514
  60. package/dist/tests/test-cli.js +0 -228
  61. package/dist/tests/test-client-scripts-validation.js +0 -167
  62. package/dist/tests/test-complete-setup-flow.js +0 -110
  63. package/dist/tests/test-config-system.js +0 -279
  64. package/dist/tests/test-debug-session.js +0 -134
  65. package/dist/tests/test-end-to-end-hybrid-validation.js +0 -328
  66. package/dist/tests/test-enhanced-session-init.js +0 -188
  67. package/dist/tests/test-first-run-journey.js +0 -368
  68. package/dist/tests/test-fraim-issues.js +0 -59
  69. package/dist/tests/test-genericization.js +0 -44
  70. package/dist/tests/test-hybrid-script-execution.js +0 -340
  71. package/dist/tests/test-ide-detector.js +0 -46
  72. package/dist/tests/test-improved-setup.js +0 -121
  73. package/dist/tests/test-mcp-config-generator.js +0 -99
  74. package/dist/tests/test-mcp-connection.js +0 -107
  75. package/dist/tests/test-mcp-issue-integration.js +0 -156
  76. package/dist/tests/test-mcp-lifecycle-methods.js +0 -240
  77. package/dist/tests/test-mcp-shared-server.js +0 -308
  78. package/dist/tests/test-mcp-template-processing.js +0 -160
  79. package/dist/tests/test-modular-issue-tracking.js +0 -165
  80. package/dist/tests/test-node-compatibility.js +0 -95
  81. package/dist/tests/test-npm-install.js +0 -68
  82. package/dist/tests/test-package-size.js +0 -108
  83. package/dist/tests/test-pr-review-workflow.js +0 -307
  84. package/dist/tests/test-prep-issue.js +0 -129
  85. package/dist/tests/test-productivity-integration.js +0 -157
  86. package/dist/tests/test-script-location-independence.js +0 -198
  87. package/dist/tests/test-script-sync.js +0 -557
  88. package/dist/tests/test-server-utils.js +0 -32
  89. package/dist/tests/test-session-rehydration.js +0 -148
  90. package/dist/tests/test-setup-integration.js +0 -98
  91. package/dist/tests/test-setup-scenarios.js +0 -322
  92. package/dist/tests/test-standalone.js +0 -143
  93. package/dist/tests/test-stub-registry.js +0 -136
  94. package/dist/tests/test-sync-stubs.js +0 -143
  95. package/dist/tests/test-sync-version-update.js +0 -93
  96. package/dist/tests/test-telemetry.js +0 -193
  97. package/dist/tests/test-token-validator.js +0 -30
  98. package/dist/tests/test-user-journey.js +0 -236
  99. package/dist/tests/test-users-to-target-workflow.js +0 -253
  100. package/dist/tests/test-utils.js +0 -109
  101. package/dist/tests/test-wizard.js +0 -71
  102. package/dist/tests/test-workflow-discovery.js +0 -242
  103. package/labels.json +0 -52
  104. package/registry/agent-guardrails.md +0 -63
  105. package/registry/fraim.md +0 -48
  106. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-customer-profiling.md +0 -11
  107. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase1-survey-scoping.md +0 -11
  108. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-platform-discovery.md +0 -11
  109. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase2-survey-build-linkedin.md +0 -11
  110. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-prospect-qualification.md +0 -11
  111. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase3-survey-build-reddit.md +0 -11
  112. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-inventory-compilation.md +0 -11
  113. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase4-survey-build-x.md +0 -11
  114. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase5-survey-build-facebook.md +0 -11
  115. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase6-survey-build-custom.md +0 -11
  116. package/registry/stubs/workflows/customer-development/ai-coach-phases/phase7-survey-dispatch.md +0 -11
  117. package/registry/stubs/workflows/customer-development/templates/customer-persona-template.md +0 -11
  118. package/registry/stubs/workflows/customer-development/templates/search-strategy-template.md +0 -11
  119. package/setup.js +0 -171
  120. package/tsconfig.json +0 -23
@@ -1,173 +0,0 @@
1
- # Phase: Regression
2
-
3
- ## INTENT
4
- For bugs: Verify the repro test now passes. For features: Write comprehensive regression tests to prevent future breakage.
5
-
6
- ## OUTCOME
7
- **For Bugs:**
8
- - Repro test from implement-repro phase now PASSES
9
- - Bug is confirmed fixed
10
- - Test serves as regression protection
11
-
12
- **For Features:**
13
- - New regression tests written
14
- - All key functionality covered
15
- - Tests verify acceptance criteria
16
- - All tests pass
17
-
18
- **Note**: This phase focuses specifically on regression testing. Build validation and manual testing are handled in other phases.
19
-
20
- ## PRINCIPLES
21
- - **Test Quality**: Write meaningful tests, not checkbox tests
22
- - **Coverage**: Test main scenarios and edge cases
23
- - **Real Testing**: Test actual functionality, not mocks
24
- - **Maintainable**: Tests should be clear and maintainable
25
-
26
- ## WORKFLOW
27
-
28
- ### For Bug Fixes:
29
-
30
- #### Step 1: Run Repro Test
31
- ```bash
32
- npm test -- path/to/repro/test.test.ts
33
- ```
34
-
35
- #### Step 2: Verify Test Passes
36
- - Test should now PASS (was failing in implement-repro phase)
37
- - Confirms bug is fixed
38
- - Test serves as regression protection
39
-
40
- #### Step 3: If Test Still Fails
41
- **Return to implement phase:**
42
- - Bug is not actually fixed
43
- - Review the fix
44
- - Debug why test still fails
45
- - Fix and re-validate
46
-
47
- ### For Features:
48
-
49
- #### Step 1: Identify Test Coverage Needed
50
- Based on acceptance criteria:
51
- - Main user scenarios
52
- - Edge cases
53
- - Error conditions
54
- - Integration points
55
-
56
- #### Step 2: Write Regression Tests
57
- - Create tests for all key functionality
58
- - Test main user workflows
59
- - Cover edge cases
60
- - Test error handling
61
-
62
- #### Step 3: Follow Test Architecture
63
- Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Key requirements:
64
- - Use shared-server-utils.ts
65
- - Unique API keys per test
66
- - Proper cleanup in finally blocks
67
- - No individual server instances
68
- - Proper timeouts (5-10s for network calls)
69
-
70
- #### Step 4: Run All New Tests
71
- ```bash
72
- npm test -- path/to/new/tests.test.ts
73
- ```
74
-
75
- Verify all tests pass
76
-
77
- #### Step 5: Tag Tests Appropriately
78
- - `smoke`: If testing core functionality
79
- - `integration`: If testing multiple components
80
- - `unit`: If testing individual functions
81
- - `e2e`: If testing complete workflows
82
-
83
- ## VALIDATION
84
-
85
- ### Phase Complete When:
86
-
87
- **For Bugs:**
88
- - ✅ Repro test now PASSES
89
- - ✅ Bug confirmed fixed
90
- - ✅ Test output documented
91
-
92
- **For Features:**
93
- - ✅ Regression tests written
94
- - ✅ All acceptance criteria covered
95
- - ✅ Tests follow architecture standards
96
- - ✅ All tests pass
97
- - ✅ Tests appropriately tagged
98
-
99
- ### Phase Incomplete If:
100
- - ❌ (Bugs) Repro test still fails
101
- - ❌ (Features) No regression tests written
102
- - ❌ (Features) Tests don't cover acceptance criteria
103
- - ❌ Any tests fail
104
- - ❌ Tests violate architecture standards
105
-
106
- ## RULES FOR THIS PHASE
107
- - Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full test architecture guidelines
108
- - Use Successful Debugging Patterns from `rules/successful-debugging-patterns.md` via `get_fraim_file`
109
- - Follow Git Safe Commands from `rules/git-safe-commands.md` via `get_fraim_file`
110
-
111
- ### Failure Handling
112
- - **If regression tests fail**: Return to implement-code phase
113
- - **If test writing fails**: Return to implement-code phase to understand implementation better
114
- - Fix the implementation first, then write proper regression tests
115
-
116
- ## TEST QUALITY REQUIREMENTS
117
- - Tests must validate real functionality, not mocked behavior
118
- - No tests that default to passing without validation
119
- - Use flow testing, not just static analysis
120
- - Tests should fail if code is broken
121
-
122
- ## SCRIPTS
123
-
124
- **Run tests:**
125
- ```bash
126
- npm test -- path/to/test.test.ts
127
- ```
128
-
129
- **Run all tests:**
130
- ```bash
131
- npm test
132
- ```
133
-
134
- ### Report Back (Bugs):
135
- When you complete this phase for a bug fix, call:
136
-
137
- ```javascript
138
- seekCoachingOnNextStep({
139
- workflowType: "implement",
140
- issueNumber: "{issue_number}",
141
- currentPhase: "implement-regression",
142
- status: "complete",
143
- findings: {
144
- issueType: "bug" // Required for phase validation
145
- },
146
- evidence: {
147
- reproTestResult: "Repro test at test/sync.test.ts:45 now PASSES",
148
- bugStatus: "Bug confirmed fixed",
149
- regressionProtection: "Test serves as regression protection"
150
- }
151
- })
152
- ```
153
-
154
- ### Report Back (Features):
155
- When you complete this phase for a feature, call:
156
-
157
- ```javascript
158
- seekCoachingOnNextStep({
159
- workflowType: "implement",
160
- issueNumber: "{issue_number}",
161
- currentPhase: "implement-regression",
162
- status: "complete",
163
- findings: {
164
- issueType: "feature" // Required for phase validation
165
- },
166
- evidence: {
167
- testLocation: "test/auth.test.ts",
168
- testCoverage: "All acceptance criteria covered",
169
- testResults: "8/8 tests passing",
170
- testTags: "Tagged as integration"
171
- }
172
- })
173
- ```
@@ -1,104 +0,0 @@
1
- # Phase: Implement-Repro
2
-
3
- ## INTENT
4
- To create a failing test that reproduces the reported bug, demonstrating that the issue exists and providing a clear success criterion for the fix.
5
-
6
- ## OUTCOME
7
- A test that:
8
- - **FAILS** when run, reproducing the bug
9
- - Clearly demonstrates the incorrect behavior
10
- - Will pass once the bug is fixed
11
- - Serves as a regression test
12
-
13
- ## PRINCIPLES
14
- - **Test-First**: Create the failing test before fixing
15
- - **Actual Reproduction**: Use real reproduction, not hypothetical scenarios
16
- - **Clear Failure**: Test should fail obviously and consistently
17
- - **No Assumptions**: If reproduction steps are unclear, escalate to user
18
- - **Minimal Test**: Focus on reproducing the specific bug
19
-
20
- ## WORKFLOW
21
-
22
- ### Step 1: Review Bug Spec
23
- - Read the bug description thoroughly
24
- - Note the reproduction steps
25
- - Understand the expected vs actual behavior
26
- - Identify the failure conditions
27
-
28
- ### Step 2: Check Reproduction Steps
29
- **If reproduction steps are clear:**
30
- - Proceed to create test
31
-
32
- **If reproduction steps are unclear or missing:**
33
- - **DO NOT** hypothesize about the issue
34
- - **ESCALATE** to user with specific questions:
35
- - What exact steps trigger the bug?
36
- - What is the expected behavior?
37
- - What is the actual (incorrect) behavior?
38
- - Are there specific inputs or conditions?
39
-
40
- ### Step 3: Create Failing Test
41
- - Choose appropriate test file location
42
- - Write test that follows reproduction steps
43
- - Test should demonstrate the bug clearly
44
- - Use descriptive test name: `test: reproduces bug #{issue_number} - {description}`
45
-
46
- ### Step 4: Run the Test
47
- - Execute the test
48
- - **Verify it FAILS** as expected
49
- - Capture the failure output
50
- - Confirm it fails for the right reason (reproducing the bug, not test errors)
51
-
52
- ### Step 5: Document Test Location
53
- In your evidence, include:
54
- - Path to the test file
55
- - Test name/description
56
- - Failure output showing the bug
57
- - Confirmation that test reproduces the issue
58
-
59
- ## VALIDATION
60
-
61
- ### Phase Complete When:
62
- - ✅ Test created that reproduces the bug
63
- - ✅ Test FAILS when run
64
- - ✅ Failure clearly demonstrates the bug
65
- - ✅ Test will pass once bug is fixed
66
- - ✅ Test location documented
67
-
68
- ### Phase Incomplete If:
69
- - ❌ Test passes (not reproducing the bug)
70
- - ❌ Test fails for wrong reason (test error, not bug)
71
- - ❌ Reproduction steps were unclear and not escalated
72
- - ❌ Test is hypothetical, not based on actual reproduction
73
-
74
- ## RULES FOR THIS PHASE
75
- - Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full test architecture standards
76
- - Use Successful Debugging Patterns from `rules/successful-debugging-patterns.md` via `get_fraim_file`
77
- - Follow Git Safe Commands from `rules/git-safe-commands.md` via `get_fraim_file`
78
-
79
- ## SCRIPTS
80
- Run test:
81
- ```bash
82
- npm test -- path/to/test/file.test.ts
83
- ```
84
-
85
- ### Report Back:
86
- When you complete this phase, call:
87
-
88
- ```javascript
89
- seekCoachingOnNextStep({
90
- workflowType: "implement",
91
- issueNumber: "{issue_number}",
92
- currentPhase: "implement-repro",
93
- status: "complete",
94
- findings: {
95
- issueType: "bug" // Required for phase validation
96
- },
97
- evidence: {
98
- testLocation: "test/sync.test.ts:45",
99
- testResult: "FAILS with timeout after 30s",
100
- reproductionConfirmed: true,
101
- testOutput: "Include actual test failure output here"
102
- }
103
- })
104
- ```
@@ -1,100 +0,0 @@
1
- # Phase: Implement-Scoping
2
-
3
- ## INTENT
4
- To understand the issue requirements and determine whether it's a bug fix or feature implementation.
5
-
6
- ## OUTCOME
7
- Clear understanding of:
8
- - Issue type (bug or feature)
9
- - All requirements and acceptance criteria
10
- - Ready to proceed to next phase (repro for bugs, spike for features)
11
-
12
- ## PRINCIPLES
13
- - **Thorough Understanding**: Read all linked documents and context
14
- - **Clear Classification**: Accurately determine bug vs feature
15
- - **Question Early**: Escalate if requirements are unclear
16
-
17
- ## RULES FOR THIS PHASE
18
-
19
- ### Success Criteria
20
- Read `registry/rules/agent-success-criteria.md` via `get_fraim_file` for the complete 5-criteria success framework. Focus especially on **Integrity** (truthfulness in reporting) and **Independence** (smart decision making).
21
-
22
- ### Simplicity Principles
23
- Read `registry/rules/simplicity.md` via `get_fraim_file` for complete guidelines. Key principles for scoping:
24
- - **Focus on the assigned issue only** - don't scope other issues
25
- - **Don't over-think it** - understand the specific need being addressed
26
-
27
- ### Architecture Compliance
28
- Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full architecture guidelines. Understanding the architecture helps with proper scoping.
29
-
30
- ## WORKFLOW
31
-
32
- ### Step 1: Get Repository Context and Issue Details
33
-
34
- **GitHub Repository Context**: Before using GitHub MCP tools, read the local `.fraim/config.json` file to get the repository context:
35
- - Use `git.repoOwner` for the GitHub repository owner
36
- - Use `git.repoName` for the GitHub repository name
37
- - These values are required for GitHub MCP API calls (owner/repo parameters)
38
-
39
- **Read Issue Details**: Use GitHub MCP tools to get the complete issue information:
40
- - Read the full issue description in GitHub (use MCP where available)
41
- - Note the issue title, labels, and any linked documents
42
- - Identify if there's a spec, RFC, or design document
43
-
44
- ### Step 2: Review Linked Documents
45
- - If spec/RFC exists: Read it thoroughly
46
- - If design document exists: Review the technical approach
47
- - Note all acceptance criteria and requirements
48
-
49
- ### Step 3: Determine Issue Type
50
- **Bug indicators:**
51
- - Issue describes broken/incorrect behavior
52
- - References a regression or failure
53
- - Has reproduction steps
54
- - Reports unexpected behavior
55
-
56
- **Feature indicators:**
57
- - Issue describes new functionality
58
- - Adds capabilities that don't exist
59
- - Enhances existing features
60
- - Has acceptance criteria for new behavior
61
-
62
- ### Step 4: Understand Requirements
63
- - List all acceptance criteria
64
- - Identify edge cases mentioned
65
- - Note any constraints or limitations
66
- - Understand success criteria
67
-
68
- ### Step 5: Identify Uncertainties
69
- If anything is unclear:
70
- - **DO NOT** make assumptions
71
- - **DO NOT** hypothesize requirements
72
- - **ESCALATE** to user with specific questions
73
- - Wait for clarification before proceeding
74
-
75
- ## VALIDATION
76
-
77
- ### Phase Complete When:
78
- - ✅ Issue type determined (bug or feature)
79
- - ✅ All requirements understood
80
- - ✅ No blocking uncertainties remain
81
- - ✅ Ready to proceed to next phase
82
-
83
- ### Report Back:
84
- When you complete scoping, call:
85
-
86
- ```javascript
87
- seekCoachingOnNextStep({
88
- workflowType: "implement",
89
- issueNumber: "{issue_number}",
90
- currentPhase: "implement-scoping",
91
- status: "complete",
92
- findings: {
93
- issueType: "bug", // or "feature"
94
- requirements: "Brief summary of what you understood",
95
- uncertainties: [] // List any unclear aspects, or empty array if none
96
- }
97
- })
98
- ```
99
-
100
- The AI Coach will provide instructions for your next phase based on the issue type you determined.
@@ -1,237 +0,0 @@
1
- # Phase: Implement-Smoke
2
-
3
- ## INTENT
4
- To run technical health checks ensuring the system is stable: build passes, all tests pass, git status is clean, and core functionality hasn't been broken by the implementation.
5
-
6
- ## OUTCOME
7
- All technical checks pass, confirming:
8
- - Build compiles successfully
9
- - All tests pass (100% success rate)
10
- - Git status is clean
11
- - Core system functionality intact
12
- - No regressions in critical paths
13
-
14
- **Note**: This phase focuses purely on technical health checks. Manual validation and functional testing are handled in the implement-validate phase.
15
-
16
- ## PRINCIPLES
17
- - **Zero Tolerance**: All checks must pass
18
- - **Technical Focus**: Automated verification only
19
- - **Fix Immediately**: If any check fails, return to implement phase
20
- - **Fast Feedback**: Quick automated verification
21
-
22
- ## 📋 MANDATORY TECHNICAL CHECKS
23
-
24
- ### Step 0: Read Project Validation Commands 📖
25
-
26
- **FIRST**: Check your project's custom commands:
27
-
28
- ```bash
29
- # Check for custom build command
30
- cat .fraim/config.json | grep -A 3 "buildCommand"
31
-
32
- # Check for custom smoke test command
33
- cat .fraim/config.json | grep -A 3 "smokeTestCommand"
34
- ```
35
-
36
- **Use the configured commands if they exist, otherwise use the defaults shown below.**
37
-
38
- ### Step 1: Build Compilation Check ✅
39
-
40
- **Requirements**:
41
- - TypeScript compiles without errors
42
- - Build process completes successfully
43
- - No type errors or warnings
44
-
45
- **Commands to Run** (use customizations.validation.buildCommand from config if available):
46
- ```bash
47
- # Use project-specific build command from .fraim/config.json if available:
48
- # - Look for customizations.validation.buildCommand
49
- # - Use that command if available, otherwise default to:
50
- npm run build
51
- ```
52
-
53
- **What to Look For**:
54
- - Exit code 0 (success) for all commands
55
- - No error messages in output
56
- - Clean compilation without warnings
57
-
58
- ### Step 2: Complete Test Suite ✅
59
-
60
- **Requirements**:
61
- - ALL existing tests pass (100% success rate) - not just tests you created
62
- - No timeouts or hanging tests
63
- - Comprehensive test coverage validation
64
-
65
- **CRITICAL**: You must run the COMPLETE test suite, including all existing tests, smoke tests, and any tests you created. Do not run only the tests you wrote.
66
-
67
- **Commands to Run** (use customizations.validation.smokeTestCommand from config if available):
68
- ```bash
69
- # Run the comprehensive test suite (use customizations.validation.smokeTestCommand if available)
70
- npm test
71
- ```
72
-
73
- **What to Look For**:
74
- - "All tests passed" or similar success message
75
- - No "FAILED" or "ERROR" in output
76
- - Test count should include existing tests + any new tests you added
77
- - No timeout messages
78
- - Verify that existing functionality tests are included in the run
79
-
80
- **Example Expected Output**:
81
- ```
82
- ✅ Running 45 tests (including existing + new tests)
83
- ✅ All tests passed
84
- ✅ Test suite completed successfully
85
- ```
86
-
87
- ### Step 3: Git Status Check ✅
88
-
89
- **Requirements**:
90
- - Git status is clean
91
- - Only intended changes present
92
- - No untracked files (except evidence docs)
93
-
94
- **Commands to Run**:
95
- ```bash
96
- # Check git status
97
- git status
98
-
99
- # Check recent commits
100
- git log --oneline -3
101
- ```
102
-
103
- **What to Look For**:
104
- - Only intended files are modified
105
- - No accidentally modified files
106
- - Clean working directory
107
- - Meaningful commit messages
108
-
109
- ### Step 4: Code Quality Verification ✅
110
-
111
- **Requirements**:
112
- - No type bypassing
113
- - No debugging code remains
114
- - No task placeholder comments in core functionality
115
-
116
- **Commands to Run**:
117
- ```bash
118
- # Check for type bypassing
119
- grep -r "as any" src/ || echo "✅ No type bypassing found"
120
-
121
- # Look for debugging code
122
- grep -r "console.log" src/ | grep -v "logger" | grep -v "// OK" || echo "✅ No debug logs found"
123
-
124
- # Check for task placeholder comments
125
- grep -r "task-placeholder" src/ || echo "✅ No task placeholders found"
126
- ```
127
-
128
- **What to Look For**:
129
- - Zero instances of "as any" (or only justified ones with comments)
130
- - No console.log statements (except intentional logging)
131
- - No task placeholder comments in critical code
132
-
133
- ## 🛠️ TECHNICAL COMMANDS REFERENCE
134
-
135
- ### Project-Specific Commands (Read from .fraim/config.json)
136
- ```bash
137
- # Check your project's custom validation commands:
138
- cat .fraim/config.json | grep -A 5 "validation"
139
- ```
140
-
141
- ### Quick Health Check
142
- ```bash
143
- # One-liner using project defaults (customize based on your config)
144
- npm run build && npm test && git status
145
- ```
146
-
147
- ## VALIDATION
148
-
149
- ### Phase Complete When:
150
- - ✅ Build succeeds without errors
151
- - ✅ All tests pass (100% success rate)
152
- - ✅ Git status clean (only intended changes)
153
- - ✅ No "as any" type bypassing
154
- - ✅ No debugging code remains
155
- - ✅ No task placeholder comments in core functionality
156
- - ✅ All technical checks documented
157
-
158
- ### Phase Incomplete If:
159
- - ❌ Build fails
160
- - ❌ ANY test fails
161
- - ❌ Git status shows unintended changes
162
- - ❌ Code quality issues found
163
-
164
- **If ANY check fails, return to implement-code phase immediately.**
165
-
166
- ## RULES FOR THIS PHASE
167
-
168
- ### Technical Standards
169
- - Read `.fraim/config.json` for the architecture document path (`customizations.architectureDoc`), then read the local architecture document to understand the full technical standards
170
- - **Config Commands**: Always check `.fraim/config.json` first for `customizations.validation.buildCommand` and `customizations.validation.smokeTestCommand`, use those if available, otherwise use defaults
171
- - Use Successful Debugging Patterns from `rules/successful-debugging-patterns.md` via `get_fraim_file`
172
- - When using git commands directly (if MCP tools unavailable), read `rules/git-safe-commands.md` via `get_fraim_file`
173
-
174
- ### Failure Handling
175
- - **If ANY technical check fails**: Return to implement-code phase
176
- - **Do not proceed to regression phase** if smoke tests fail
177
- - Fix the implementation first, then re-run smoke tests
178
-
179
- ## SCRIPTS
180
-
181
- **Run all technical checks:**
182
- ```bash
183
- npm run build && npm test && git status
184
- ```
185
-
186
- **Run smoke tests specifically:**
187
- ```bash
188
- # Use project-specific command from .fraim/config.json if available
189
- # Check: cat .fraim/config.json | grep "smokeTestCommand"
190
- # Use configured command or default to:
191
- npm run test-smoke-ci
192
- ```
193
-
194
- ### Report Back:
195
- When you complete this phase, call:
196
-
197
- ```javascript
198
- seekCoachingOnNextStep({
199
- workflowType: "implement",
200
- issueNumber: "{issue_number}",
201
- currentPhase: "implement-smoke",
202
- status: "complete",
203
- findings: {
204
- issueType: "bug" // or "feature" - Required for phase validation
205
- },
206
- evidence: {
207
- buildPassed: "YES", // Did `npm run build` succeed?
208
- allTestsPassed: "YES", // Did `npm test` show 100% pass rate?
209
- gitStatusClean: "YES", // Does `git status` show only intended changes?
210
- noTypeBypass: "YES", // Did `grep -r "as any" src/` find zero instances?
211
- noDebugCode: "YES", // Did you remove console.log statements?
212
- registryValid: "YES", // Did `npm run validate:registry` pass?
213
- commandsRun: "npm run build && npm test && git status",
214
- summary: "All technical checks passed. Build succeeds, all tests pass, git status clean."
215
- }
216
- })
217
- ```
218
-
219
- If any technical check fails:
220
- ```javascript
221
- seekCoachingOnNextStep({
222
- workflowType: "implement",
223
- issueNumber: "{issue_number}",
224
- currentPhase: "implement-smoke",
225
- status: "incomplete",
226
- findings: {
227
- issueType: "bug" // or "feature" - Required for phase validation
228
- },
229
- evidence: {
230
- buildPassed: "NO", // Specify what failed
231
- allTestsPassed: "NO", // Be specific about failures
232
- issues: ["Build failed with TypeScript errors", "3 tests failing"],
233
- commandsRun: "npm run build && npm test",
234
- nextAction: "Returning to implement phase to fix technical issues"
235
- }
236
- })
237
- ```