fraim-framework 2.0.36 → 2.0.38
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 +5 -52
- package/dist/registry/scripts/build-scripts-generator.js +205 -0
- package/dist/registry/scripts/fraim-config.js +61 -0
- package/dist/registry/scripts/generic-issues-api.js +100 -0
- package/dist/registry/scripts/openapi-generator.js +664 -0
- package/dist/registry/scripts/performance/profile-server.js +390 -0
- package/dist/scripts/build-stub-registry.js +108 -0
- package/dist/src/cli/commands/doctor.js +5 -5
- package/dist/src/cli/commands/init-project.js +74 -0
- package/dist/src/cli/commands/setup.js +176 -0
- package/dist/src/cli/commands/sync.js +33 -19
- package/dist/src/cli/commands/test-mcp.js +135 -0
- package/dist/src/cli/fraim.js +6 -0
- package/dist/src/cli/setup/auto-mcp-setup.js +367 -0
- package/dist/src/cli/setup/ide-detector.js +163 -0
- package/dist/src/cli/setup/mcp-config-generator.js +115 -0
- package/dist/src/cli/setup/token-validator.js +49 -0
- package/dist/test-utils.js +96 -0
- package/dist/tests/debug-tools.js +2 -2
- package/dist/tests/esm-compat.js +11 -0
- package/dist/tests/shared-server-utils.js +57 -0
- package/dist/tests/test-chalk-esm-issue.js +159 -0
- package/dist/tests/test-chalk-real-world.js +265 -0
- package/dist/tests/test-chalk-regression.js +2 -18
- package/dist/tests/test-chalk-resolution-issue.js +304 -0
- package/dist/tests/test-client-scripts-validation.js +27 -5
- package/dist/tests/test-complete-setup-flow.js +110 -0
- package/dist/tests/test-fraim-install-chalk-issue.js +254 -0
- package/dist/tests/test-ide-detector.js +46 -0
- package/dist/tests/test-improved-setup.js +121 -0
- package/dist/tests/test-mcp-config-generator.js +70 -0
- package/dist/tests/test-mcp-connection.js +58 -117
- package/dist/tests/test-mcp-issue-integration.js +2 -2
- package/dist/tests/test-mcp-lifecycle-methods.js +34 -100
- package/dist/tests/test-mcp-shared-server.js +308 -0
- package/dist/tests/test-npm-resolution-diagnostic.js +140 -0
- package/dist/tests/test-package-size.js +101 -0
- package/dist/tests/test-prep-issue.js +34 -1
- package/dist/tests/test-script-location-independence.js +39 -62
- package/dist/tests/test-server-utils.js +32 -0
- package/dist/tests/test-session-rehydration.js +2 -2
- package/dist/tests/test-setup-integration.js +98 -0
- package/dist/tests/test-standalone.js +2 -2
- package/dist/tests/test-stub-registry.js +136 -0
- package/dist/tests/test-sync-stubs.js +143 -0
- package/dist/tests/test-telemetry.js +2 -2
- package/dist/tests/test-token-validator.js +30 -0
- package/dist/tests/test-user-journey.js +2 -1
- package/package.json +7 -9
- package/registry/agent-guardrails.md +62 -62
- package/registry/scripts/code-quality-check.sh +559 -559
- package/registry/scripts/detect-tautological-tests.sh +38 -38
- package/registry/scripts/prep-issue.sh +61 -30
- package/registry/scripts/validate-openapi-limits.ts +366 -366
- package/registry/scripts/validate-test-coverage.ts +280 -280
- package/registry/scripts/verify-pr-comments.sh +70 -70
- package/registry/stubs/workflows/bootstrap/create-architecture.md +11 -0
- package/registry/stubs/workflows/bootstrap/detect-broken-windows.md +11 -0
- package/registry/stubs/workflows/bootstrap/evaluate-code-quality.md +11 -0
- package/registry/stubs/workflows/bootstrap/verify-test-coverage.md +11 -0
- package/registry/stubs/workflows/business-development/create-business-plan.md +11 -0
- package/registry/stubs/workflows/business-development/ideate-business-opportunity.md +11 -0
- package/registry/stubs/workflows/business-development/price-product.md +18 -0
- package/registry/stubs/workflows/convert-to-pdf.md +11 -0
- package/registry/stubs/workflows/customer-development/insight-analysis.md +11 -0
- package/registry/stubs/workflows/customer-development/insight-triage.md +11 -0
- package/registry/stubs/workflows/customer-development/interview-preparation.md +11 -0
- package/registry/stubs/workflows/customer-development/linkedin-outreach.md +11 -0
- package/registry/stubs/workflows/customer-development/strategic-brainstorming.md +11 -0
- package/registry/stubs/workflows/customer-development/thank-customers.md +11 -0
- package/registry/stubs/workflows/customer-development/weekly-newsletter.md +11 -0
- package/registry/stubs/workflows/deploy/cloud-deployment.md +11 -0
- package/registry/stubs/workflows/improve-fraim/contribute.md +11 -0
- package/registry/stubs/workflows/improve-fraim/file-issue.md +11 -0
- package/registry/stubs/workflows/marketing/content-creation.md +11 -0
- package/registry/stubs/workflows/marketing/hbr-article.md +11 -0
- package/registry/stubs/workflows/marketing/launch-checklist.md +11 -0
- package/registry/stubs/workflows/marketing/marketing-strategy.md +11 -0
- package/registry/stubs/workflows/marketing/storytelling.md +11 -0
- package/registry/stubs/workflows/performance/analyze-performance.md +11 -0
- package/registry/stubs/workflows/product-building/design.md +11 -0
- package/registry/stubs/workflows/product-building/implement.md +12 -0
- package/registry/stubs/workflows/product-building/iterate-on-pr-comments.md +11 -0
- package/registry/stubs/workflows/product-building/prep-issue.md +11 -0
- package/registry/stubs/workflows/product-building/prototype.md +11 -0
- package/registry/stubs/workflows/product-building/resolve.md +11 -0
- package/registry/stubs/workflows/product-building/retrospect.md +11 -0
- package/registry/stubs/workflows/product-building/spec.md +11 -0
- package/registry/stubs/workflows/product-building/test.md +11 -0
- package/registry/stubs/workflows/quality-assurance/browser-validation.md +11 -0
- package/registry/stubs/workflows/quality-assurance/iterative-improvement-cycle.md +11 -0
- package/registry/stubs/workflows/replicate/replicate-discovery.md +11 -0
- package/registry/stubs/workflows/replicate/replicate-to-issues.md +11 -0
- package/registry/stubs/workflows/reviewer/review-implementation-vs-design-spec.md +11 -0
- package/registry/stubs/workflows/reviewer/review-implementation-vs-feature-spec.md +11 -0
- package/registry/stubs/workflows/startup-credits/aws-activate-application.md +11 -0
- package/registry/stubs/workflows/startup-credits/google-cloud-application.md +11 -0
- package/registry/stubs/workflows/startup-credits/microsoft-azure-application.md +11 -0
- package/.github/workflows/ci.yml +0 -65
- package/.github/workflows/deploy-fraim.yml +0 -87
- package/.github/workflows/phase-change.yml +0 -251
- package/.github/workflows/status-change.yml +0 -68
- package/.github/workflows/sync-on-pr-review.yml +0 -66
- package/examples/simple-webapp/TESTING.md +0 -62
- package/examples/simple-webapp/example-test.ts +0 -186
- package/registry/github/workflows/ci.yml +0 -51
- package/registry/github/workflows/phase-change.yml +0 -251
- package/registry/github/workflows/status-change.yml +0 -68
- package/registry/github/workflows/sync-on-pr-review.yml +0 -66
- package/registry/mcp-template.jsonc +0 -29
- package/registry/rules/agent-success-criteria.md +0 -52
- package/registry/rules/agent-testing-guidelines.md +0 -502
- package/registry/rules/architecture.md +0 -52
- package/registry/rules/communication.md +0 -122
- package/registry/rules/continuous-learning.md +0 -55
- package/registry/rules/debugging-multitenancy-issues.md +0 -85
- package/registry/rules/ephemeral-execution.md +0 -57
- package/registry/rules/git-safe-commands.md +0 -34
- package/registry/rules/hitl-ppe-record-analysis.md +0 -302
- package/registry/rules/integrity-and-test-ethics.md +0 -275
- package/registry/rules/local-development.md +0 -254
- package/registry/rules/merge-requirements.md +0 -231
- package/registry/rules/simplicity.md +0 -118
- package/registry/rules/software-development-lifecycle.md +0 -105
- package/registry/rules/spike-first-development.md +0 -205
- package/registry/rules/successful-debugging-patterns.md +0 -491
- package/registry/rules/telemetry.md +0 -67
- package/registry/templates/bootstrap/ARCHITECTURE-TEMPLATE.md +0 -53
- package/registry/templates/bootstrap/CODE-QUALITY-REPORT-TEMPLATE.md +0 -37
- package/registry/templates/bootstrap/TEST-COVERAGE-REPORT-TEMPLATE.md +0 -35
- package/registry/templates/business-development/IDEATION-REPORT-TEMPLATE.md +0 -29
- package/registry/templates/business-development/PRICING-STRATEGY-TEMPLATE.md +0 -126
- package/registry/templates/customer-development/customer-interview-template.md +0 -99
- package/registry/templates/customer-development/follow-up-email-templates.md +0 -132
- package/registry/templates/customer-development/insight-analysis-template.md +0 -74
- package/registry/templates/customer-development/strategic-recommendations-template.md +0 -53
- package/registry/templates/customer-development/thank-you-email-template.html +0 -124
- package/registry/templates/customer-development/thank-you-note-template.md +0 -16
- package/registry/templates/customer-development/triage-log-template.md +0 -278
- package/registry/templates/customer-development/weekly-newsletter-template.html +0 -204
- package/registry/templates/evidence/Design-Evidence.md +0 -30
- package/registry/templates/evidence/Implementation-BugEvidence.md +0 -86
- package/registry/templates/evidence/Implementation-FeatureEvidence.md +0 -121
- package/registry/templates/evidence/Spec-Evidence.md +0 -19
- package/registry/templates/help/HelpNeeded.md +0 -14
- package/registry/templates/marketing/HBR-ARTICLE-TEMPLATE.md +0 -66
- package/registry/templates/replicate/implementation-checklist.md +0 -39
- package/registry/templates/replicate/use-cases-template.md +0 -88
- package/registry/templates/retrospective/RETROSPECTIVE-TEMPLATE.md +0 -55
- package/registry/templates/specs/BUGSPEC-TEMPLATE.md +0 -37
- package/registry/templates/specs/FEATURESPEC-TEMPLATE.md +0 -29
- package/registry/templates/specs/TECHSPEC-TEMPLATE.md +0 -39
- package/registry/workflows/bootstrap/create-architecture.md +0 -38
- package/registry/workflows/bootstrap/evaluate-code-quality.md +0 -36
- package/registry/workflows/bootstrap/verify-test-coverage.md +0 -37
- package/registry/workflows/business-development/create-business-plan.md +0 -737
- package/registry/workflows/business-development/ideate-business-opportunity.md +0 -55
- package/registry/workflows/business-development/price-product.md +0 -325
- package/registry/workflows/convert-to-pdf.md +0 -235
- package/registry/workflows/customer-development/insight-analysis.md +0 -156
- package/registry/workflows/customer-development/insight-triage.md +0 -933
- package/registry/workflows/customer-development/interview-preparation.md +0 -421
- package/registry/workflows/customer-development/linkedin-outreach.md +0 -593
- package/registry/workflows/customer-development/strategic-brainstorming.md +0 -146
- package/registry/workflows/customer-development/thank-customers.md +0 -203
- package/registry/workflows/customer-development/weekly-newsletter.md +0 -366
- package/registry/workflows/deploy/cloud-deployment.md +0 -310
- package/registry/workflows/improve-fraim/contribute.md +0 -32
- package/registry/workflows/improve-fraim/file-issue.md +0 -32
- package/registry/workflows/marketing/content-creation.md +0 -37
- package/registry/workflows/marketing/hbr-article.md +0 -73
- package/registry/workflows/marketing/launch-checklist.md +0 -37
- package/registry/workflows/marketing/marketing-strategy.md +0 -45
- package/registry/workflows/performance/analyze-performance.md +0 -65
- package/registry/workflows/product-building/design.md +0 -130
- package/registry/workflows/product-building/implement.md +0 -315
- package/registry/workflows/product-building/iterate-on-pr-comments.md +0 -70
- package/registry/workflows/product-building/prep-issue.md +0 -43
- package/registry/workflows/product-building/prototype.md +0 -60
- package/registry/workflows/product-building/resolve.md +0 -164
- package/registry/workflows/product-building/retrospect.md +0 -86
- package/registry/workflows/product-building/spec.md +0 -117
- package/registry/workflows/product-building/test.md +0 -120
- package/registry/workflows/quality-assurance/browser-validation.md +0 -221
- package/registry/workflows/quality-assurance/iterative-improvement-cycle.md +0 -562
- package/registry/workflows/replicate/replicate-discovery.md +0 -336
- package/registry/workflows/replicate/replicate-to-issues.md +0 -319
- package/registry/workflows/reviewer/review-implementation-vs-design-spec.md +0 -632
- package/registry/workflows/reviewer/review-implementation-vs-feature-spec.md +0 -669
- package/registry/workflows/startup-credits/aws-activate-application.md +0 -535
- package/registry/workflows/startup-credits/google-cloud-application.md +0 -647
- package/registry/workflows/startup-credits/microsoft-azure-application.md +0 -538
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
# Workflow: implement
|
|
2
|
-
|
|
3
|
-
**Path:** `workflows/implement.md`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Implementation Phase
|
|
8
|
-
|
|
9
|
-
## INTENT
|
|
10
|
-
To implement solutions based on approved design documents, ensuring minimal, testable code that meets requirements while following established patterns and maintaining code quality.
|
|
11
|
-
Consult the architecture document for coding standards.
|
|
12
|
-
|
|
13
|
-
## PRINCIPLES
|
|
14
|
-
- **Success Criteria**: Optimize for Integrity (100pts), Correctness (50pts), Completeness (30pts), Independence (20pts), and Speed (10pts) - see `rules/agent-success-criteria.md` (fetch via `get_fraim_file`).
|
|
15
|
-
- **Design-Driven**: Follow approved RFCs and design documents
|
|
16
|
-
- **Minimal Implementation**: Write only the code needed for the issue
|
|
17
|
-
- **Test-First**: Ensure comprehensive test coverage
|
|
18
|
-
- **Quality Focus**: Maintain code quality and follow patterns
|
|
19
|
-
- **Complete**: All aspects of technical spec are implemented, tested, validated
|
|
20
|
-
- **Spike-First Development**: Follow "Spike-First Development" rule (read `rules/spike-first-development.md` via `get_fraim_file`) to validate technology compatibility before building complex solutions
|
|
21
|
-
- **Debugging**: Use "Successful Debugging Patterns" (read `rules/successful-debugging-patterns.md` via `get_fraim_file`) when stuck
|
|
22
|
-
- **Git Safety**: Follow "Git Safe Commands" (read `rules/git-safe-commands.md` via `get_fraim_file`)
|
|
23
|
-
- **Architecture**: Follow existing architecture - see `.fraim/config.json` for the path (`customizations.architectureDoc`)
|
|
24
|
-
|
|
25
|
-
## IMPLEMENTATION WORKFLOW
|
|
26
|
-
|
|
27
|
-
### Step 1: Issue Identification
|
|
28
|
-
Ask for {issue_number} (and optional {slug}); confirm target branch feature/{issue_number}-{slug}.
|
|
29
|
-
|
|
30
|
-
### Step 2: Phase Initiation
|
|
31
|
-
Label the issue 'phase:impl'. (GitHub Action will automatically create a draft PR if none exists, or update the existing PR with phase-specific details, and label the issue `status:wip`)
|
|
32
|
-
|
|
33
|
-
### Step 3: Environment Setup
|
|
34
|
-
**IMPORTANT**: The user has already run `prep-issue.sh` which has:
|
|
35
|
-
- ✅ Created the feature branch
|
|
36
|
-
- ✅ Checked out the branch
|
|
37
|
-
- ✅ Pushed the empty branch to origin
|
|
38
|
-
- ✅ Indexed the codebase with Serena
|
|
39
|
-
- ✅ Opened the editor in the prepared workspace
|
|
40
|
-
|
|
41
|
-
You can start working immediately in the prepared environment. No need to create branches or wait for GitHub Actions.
|
|
42
|
-
|
|
43
|
-
### Step 4: Work Location
|
|
44
|
-
You are already in the correct workspace prepared by the user. Confirm you're on the right branch and start working.
|
|
45
|
-
|
|
46
|
-
### Step 5: Implementation Work
|
|
47
|
-
Your work entails the following:
|
|
48
|
-
|
|
49
|
-
- **CHECK FOR FEEDBACK**: Before starting work, check for review feedback:
|
|
50
|
-
- Design Review Feedback: `docs/evidence/{issue}-design-reviewer-feedback.md`
|
|
51
|
-
- Feature Review Feedback: `docs/evidence/{issue}-feature-reviewer-feedback.md`
|
|
52
|
-
- If feedback exists: **MUST address all items in feedback before proceeding**
|
|
53
|
-
- Update evidence document after addressing feedback
|
|
54
|
-
- **SPIKE-FIRST CHECK**: Read and follow "Spike-First Development" rule (retrieve via `get_fraim_file({ path: "rules/spike-first-development.md" })`)
|
|
55
|
-
- If implementation involves unfamiliar technology, create spike/proof-of-concept first
|
|
56
|
-
- Validate technology compatibility before building complex solutions
|
|
57
|
-
- Review the RFC associated with this issue.
|
|
58
|
-
- **TEST ANALYSIS**: Check for existing tests related to this feature. Run them to establish a baseline.
|
|
59
|
-
- Determine whether changes need to be made to existing code, or brand new code needs to be written.
|
|
60
|
-
- **TEST-FIRST DISCIPLINE**: Write the minimal set of code and test cases needed for this issue. Tests must be created before or alongside implementation, not after.
|
|
61
|
-
- **TEST EXECUTION REQUIREMENT**: All test files must be executed and passing before submitting PR evidence. Cannot claim tests "need fixes" without attempting execution.
|
|
62
|
-
- **CRITICAL INTEGRITY CHECK**: Ensure test cases pass with original, unmodified criteria
|
|
63
|
-
- **VERIFICATION REQUIRED**: Run tests with original criteria before claiming success
|
|
64
|
-
- **AUTONOMOUS VALIDATION**: Must attempt to run tests, start servers, and validate claims independently before stating external dependencies. Cannot defer validation due to assumed constraints without verification.
|
|
65
|
-
- **MANUAL OUTPUT INSPECTION (CRITICAL)**:
|
|
66
|
-
- **Trust, but Verify**: Do not rely solely on automated tests.
|
|
67
|
-
- **Inspect Generated Artifacts**: If your code generates files, logs, or UI, you MUST use `view_file` or `read_url` to inspect the actual output.
|
|
68
|
-
- **Verify Content**: Ensure the content look correct, has no placeholders (unless intended), and follows expected formatting.
|
|
69
|
-
- When ready for review, flip issue to 'status:needs-review' and remove 'status:wip'
|
|
70
|
-
- **EVIDENCE STORAGE**: Create or update evidence document in `docs/evidence/{issue}-implementation-evidence.md`
|
|
71
|
-
- Use Bug Evidence template (retrieve via `get_fraim_file({ path: "templates/evidence/Implementation-BugEvidence.md" })`)
|
|
72
|
-
- Use Feature Evidence template (retrieve via `get_fraim_file({ path: "templates/evidence/Implementation-FeatureEvidence.md" })`)
|
|
73
|
-
- Include all test outputs, validation results, screenshots, etc.
|
|
74
|
-
- If addressing feedback, document how each feedback item was addressed
|
|
75
|
-
- This evidence will be reviewed by design review agent
|
|
76
|
-
- While submitting review, add a comment to the PR referencing the evidence document
|
|
77
|
-
|
|
78
|
-
### Step 6: Mandatory Pre-Completion Reflection
|
|
79
|
-
**🚨 CRITICAL - Minimum 1 minute required**
|
|
80
|
-
|
|
81
|
-
BEFORE marking status:needs-review, complete reflection:
|
|
82
|
-
|
|
83
|
-
1. Read "Mandatory Pre-Completion Reflection" rule (retrieve via `get_fraim_file({ path: "rules/mandatory-pre-completion-reflection.md" })`)
|
|
84
|
-
2. Complete all 4 phases:
|
|
85
|
-
- Phase 1: Claim Verification (3 min) - What am I claiming? What evidence do I have?
|
|
86
|
-
- Phase 2: Risk Analysis (3 min) - What could go wrong? What didn't I test?
|
|
87
|
-
- Phase 3: Validation Plan Check (2 min) - Do I cover all spec scenarios?
|
|
88
|
-
- Phase 4: Self-Audit (2 min) - Did I follow rules? Would I bet money this works?
|
|
89
|
-
3. Document reflection analysis
|
|
90
|
-
4. Address any blockers identified in reflection
|
|
91
|
-
5. Include reflection output in PR evidence comment
|
|
92
|
-
|
|
93
|
-
**Cannot proceed to status:needs-review until reflection complete and blockers addressed.**
|
|
94
|
-
|
|
95
|
-
**Process:**
|
|
96
|
-
- Create reflection document following template
|
|
97
|
-
- Identify gaps and blockers
|
|
98
|
-
- Fix blockers before proceeding
|
|
99
|
-
- Include reflection in evidence
|
|
100
|
-
|
|
101
|
-
### Step 7: Test Execution Checklist
|
|
102
|
-
**🚨 REQUIRED - Execute All Tests Before Evidence Submission:**
|
|
103
|
-
|
|
104
|
-
Before creating PR evidence, verify:
|
|
105
|
-
|
|
106
|
-
- [ ] All new test files have been executed
|
|
107
|
-
- [ ] All test execution results have been verified (exit code 0)
|
|
108
|
-
- [ ] Test output included in evidence (actual command output, not summaries)
|
|
109
|
-
- [ ] No test status marked "pending" if test file exists and can be executed
|
|
110
|
-
- [ ] All existing test suites run (or documented why not applicable)
|
|
111
|
-
- [ ] Cannot claim tests "need fixes" without attempting execution first
|
|
112
|
-
|
|
113
|
-
**Test Execution Requirements**:
|
|
114
|
-
- Must run actual test commands and capture output
|
|
115
|
-
- Must verify exit codes are 0 (success)
|
|
116
|
-
- Must include complete test output in evidence, not just summaries
|
|
117
|
-
- Must attempt to resolve test execution issues before claiming they exist
|
|
118
|
-
|
|
119
|
-
### Step 8: Quality Gate Validation
|
|
120
|
-
**🚨 REQUIRED - Run Quality Checks Before Marking Ready:**
|
|
121
|
-
|
|
122
|
-
Before marking work ready for review, run the pre-PR quality gate:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
# Execute code quality check script directly from synced location
|
|
126
|
-
~/.fraim/scripts/code-quality-check.sh pre-pr
|
|
127
|
-
|
|
128
|
-
# On Windows:
|
|
129
|
-
# %USERPROFILE%\.fraim\scripts\code-quality-check.sh pre-pr
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Step 6: PR Monitoring
|
|
133
|
-
After submitting/updating PR:
|
|
134
|
-
- Switch to "Iterate on PR Comments" workflow (retrieve via `get_fraim_file({ path: "workflows/product-building/iterate-on-pr-comments.md" })`) to monitor actions and handle feedback.
|
|
135
|
-
|
|
136
|
-
**What this checks**:
|
|
137
|
-
- ❌ BLOCKS: No `as any` type bypassing in src/
|
|
138
|
-
- ❌ BLOCKS: TypeScript compilation passes
|
|
139
|
-
- ❌ BLOCKS: All test files referenced in evidence have been executed (new check)
|
|
140
|
-
- ⚠️ WARNS: Linter passes
|
|
141
|
-
- ⚠️ WARNS: All commits are pushed
|
|
142
|
-
- ⚠️ WARNS: Working directory is clean
|
|
143
|
-
- ⚠️ WARNS: PR comments are addressed
|
|
144
|
-
- ⚠️ WARNS: Evidence statements claiming "pending" for automated validations (new check)
|
|
145
|
-
|
|
146
|
-
**If critical checks fail** (❌):
|
|
147
|
-
- You MUST fix violations before proceeding
|
|
148
|
-
- Do not mark work as ready for review
|
|
149
|
-
|
|
150
|
-
**If warnings appear** (⚠️):
|
|
151
|
-
- Address them if possible
|
|
152
|
-
- Document why you couldn't address them in evidence
|
|
153
|
-
- Warnings won't block marking ready for review
|
|
154
|
-
|
|
155
|
-
**In your implementation evidence**, include the output:
|
|
156
|
-
```markdown
|
|
157
|
-
## Quality Gate Validation
|
|
158
|
-
|
|
159
|
-
### Pre-PR Check Results
|
|
160
|
-
```bash
|
|
161
|
-
~/.fraim/scripts/code-quality-check.sh pre-pr
|
|
162
|
-
✅ GATE 1: No 'as any' Type Bypassing
|
|
163
|
-
✅ GATE 2: TypeScript Compilation
|
|
164
|
-
⚠️ GATE 3: Linter (2 warnings - documented below)
|
|
165
|
-
✅ GATE 4: Git Status
|
|
166
|
-
✅ GATE 5: Commits Pushed
|
|
167
|
-
✅ GATE 6: PR Comments Addressed
|
|
168
|
-
|
|
169
|
-
✅ ALL CHECKS PASSED (with warnings documented)
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Linter warnings:
|
|
173
|
-
- Warning 1: Unused variable in test file - intentional for test setup
|
|
174
|
-
- Warning 2: Prefer-const in legacy code - will address in separate cleanup PR
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Step 9: MANDATORY FINAL STATUS UPDATE
|
|
178
|
-
**🚨 CRITICAL - DO NOT SKIP THIS STEP:**
|
|
179
|
-
|
|
180
|
-
Once all implementation work is complete, quality gates pass, and evidence is provided:
|
|
181
|
-
|
|
182
|
-
1. **REQUIRED**: Verify pre-PR quality checks passed (see Step 6)
|
|
183
|
-
2. **REQUIRED**: Update issue status from `status:wip` to `status:needs-review`
|
|
184
|
-
3. **REQUIRED**: Verify the status change was applied successfully
|
|
185
|
-
4. **REQUIRED**: Confirm issue is ready for user review
|
|
186
|
-
|
|
187
|
-
**This step is MANDATORY and must not be forgotten. Add it to your todo list at the start of implementation.**
|
|
188
|
-
|
|
189
|
-
## TEST INTEGRITY REQUIREMENTS
|
|
190
|
-
|
|
191
|
-
### Test Immutability Rule
|
|
192
|
-
**Test success criteria are immutable during implementation phase.**
|
|
193
|
-
|
|
194
|
-
#### What This Means
|
|
195
|
-
- Test criteria must remain unchanged from design phase
|
|
196
|
-
- Success requirements cannot be modified to hide failures
|
|
197
|
-
- Test logic cannot be adjusted to accommodate broken code
|
|
198
|
-
- Any changes to test requirements must be explicitly approved and documented
|
|
199
|
-
|
|
200
|
-
#### Verification Process
|
|
201
|
-
Before claiming any implementation is working:
|
|
202
|
-
1. Run tests with original, unmodified criteria
|
|
203
|
-
2. Verify ALL requirements pass without exception
|
|
204
|
-
3. Document any test modifications if absolutely necessary
|
|
205
|
-
4. Get explicit approval for any test changes
|
|
206
|
-
|
|
207
|
-
### Progress Transparency Requirements
|
|
208
|
-
**Always be honest about implementation status and challenges.**
|
|
209
|
-
|
|
210
|
-
#### Required Statements
|
|
211
|
-
When facing implementation challenges, explicitly state:
|
|
212
|
-
- "I am struggling with [specific issue] and need help"
|
|
213
|
-
- "The implementation is not working because [specific reason]"
|
|
214
|
-
- "I need to fix [specific problem] before claiming success"
|
|
215
|
-
|
|
216
|
-
#### Prohibited Statements
|
|
217
|
-
- "The implementation is working" (when tests fail)
|
|
218
|
-
- "Core functionality is complete" (when critical features broken)
|
|
219
|
-
- "Tests are passing" (when criteria were modified)
|
|
220
|
-
- "Issue is resolved" (when underlying problems exist)
|
|
221
|
-
|
|
222
|
-
### Success Verification Standards
|
|
223
|
-
**Genuine success requires meeting ALL original criteria without modification.**
|
|
224
|
-
|
|
225
|
-
#### Verification Checklist
|
|
226
|
-
Before marking any task complete:
|
|
227
|
-
- [ ] All original test criteria pass without modification
|
|
228
|
-
- [ ] No test logic was changed to accommodate broken code
|
|
229
|
-
- [ ] Success requirements are met exactly as originally defined
|
|
230
|
-
- [ ] Implementation works with real data/scenarios
|
|
231
|
-
- [ ] No critical functionality is missing or broken
|
|
232
|
-
|
|
233
|
-
### When Tests Fail
|
|
234
|
-
1. **Don't modify tests** - Fix the code instead
|
|
235
|
-
2. **Don't claim success** - Admit the failure
|
|
236
|
-
3. **Ask for help** - Be transparent about challenges
|
|
237
|
-
4. **Fix root causes** - Address underlying issues
|
|
238
|
-
5. **Verify with original criteria** - Ensure genuine success
|
|
239
|
-
|
|
240
|
-
### When Facing Difficult Challenges
|
|
241
|
-
1. **Be honest** - State what's not working
|
|
242
|
-
2. **Ask for guidance** - Don't try to fake success
|
|
243
|
-
3. **Focus on solutions** - Work on fixing the code
|
|
244
|
-
4. **Maintain integrity** - Don't compromise standards
|
|
245
|
-
5. **Document struggles** - Help others learn from challenges
|
|
246
|
-
|
|
247
|
-
### Step 8: Post-Implementation Quality Assurance
|
|
248
|
-
|
|
249
|
-
After implementation is complete and before marking as ready for review, consider running a quality assurance cycle:
|
|
250
|
-
|
|
251
|
-
**Optional but Recommended**: Use `workflows/quality-assurance/iterative-improvement-cycle.md` for systematic review and improvement:
|
|
252
|
-
- Review the implemented feature in a browser
|
|
253
|
-
- Identify any issues or improvements
|
|
254
|
-
- Fix issues systematically
|
|
255
|
-
- Validate fixes work correctly
|
|
256
|
-
|
|
257
|
-
This workflow provides a systematic **Review → Critique → Fix → Validate** cycle that ensures high-quality, production-ready implementations.
|
|
258
|
-
|
|
259
|
-
### Step 10: Iteration
|
|
260
|
-
If workflow actions or reviewer feedback indicates more work is needed:
|
|
261
|
-
|
|
262
|
-
- Label the issue 'status:wip' and remove 'status:needs-review'
|
|
263
|
-
- Go back to Step 5 and iterate until PR is approved
|
|
264
|
-
|
|
265
|
-
## EXAMPLES
|
|
266
|
-
|
|
267
|
-
### Good: Proper Implementation Process
|
|
268
|
-
```
|
|
269
|
-
Issue #84: "Fix calendar sync timeout"
|
|
270
|
-
1. ✅ Identified: Issue #84, branch feature/84-fix-sync
|
|
271
|
-
2. ✅ Phase: Set phase:impl, PR created
|
|
272
|
-
3. ✅ Environment: User ran prep-issue.sh, ready to work
|
|
273
|
-
4. ✅ Location: Working in prepared workspace with Serena indexing
|
|
274
|
-
5. ✅ RFC Review: Read docs/rfcs/84-fix-sync-timeout.md
|
|
275
|
-
6. ✅ Analysis: Determined need to modify existing retry logic
|
|
276
|
-
7. ✅ Implementation: Added exponential backoff with jitter
|
|
277
|
-
8. ✅ Tests: Created test cases, all passing
|
|
278
|
-
9. ✅ Review: Set status:needs-review
|
|
279
|
-
10. ✅ Iteration: Incorporated feedback, updated implementation
|
|
280
|
-
Result: Clean, tested implementation following design
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### Bad: Incomplete Implementation Process
|
|
284
|
-
```
|
|
285
|
-
Issue #84: "Fix calendar sync timeout"
|
|
286
|
-
1. ✅ Identified: Issue #84
|
|
287
|
-
2. ❌ Skip: Didn't review RFC
|
|
288
|
-
3. ❌ Skip: Started coding without understanding requirements
|
|
289
|
-
4. ❌ Skip: No test cases written
|
|
290
|
-
5. ❌ Skip: Didn't verify tests pass
|
|
291
|
-
6. ❌ Skip: No code review process
|
|
292
|
-
Result: Incomplete, untested implementation
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
## 🔥 MANDATORY COMPLETION CHECKLIST
|
|
296
|
-
|
|
297
|
-
**Before claiming implementation is complete, verify ALL items:**
|
|
298
|
-
|
|
299
|
-
### ✅ Implementation Checklist
|
|
300
|
-
- [ ] RFC reviewed and understood
|
|
301
|
-
- [ ] Code changes implemented according to design
|
|
302
|
-
- [ ] **Existing tests checked and run**
|
|
303
|
-
- [ ] **New test cases created for the feature**
|
|
304
|
-
- [ ] **Full test suite run and passing**
|
|
305
|
-
- [ ] Evidence provided in GitHub issue
|
|
306
|
-
- [ ] PR feedback addressed (if applicable)
|
|
307
|
-
|
|
308
|
-
### ✅ CRITICAL FINAL STEPS
|
|
309
|
-
- [ ] **All PR comments verified and addressed (if PR exists)**
|
|
310
|
-
- [ ] **Evidence includes how each PR comment was handled**
|
|
311
|
-
- [ ] **Issue status updated from `status:wip` to `status:needs-review`**
|
|
312
|
-
- [ ] **Status change verified successfully**
|
|
313
|
-
- [ ] **User notified that issue is ready for review**
|
|
314
|
-
|
|
315
|
-
**🚨 FAILURE TO COMPLETE PR COMMENT VALIDATION AND STATUS UPDATE MEANS THE WORK IS NOT DONE! 🚨**
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Workflow: iterate-on-pr-comments
|
|
2
|
-
|
|
3
|
-
**Path:** `workflows/iterate-on-pr-comments.md`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# PR Iteration & Monitoring
|
|
8
|
-
|
|
9
|
-
## INTENT
|
|
10
|
-
To ensure AI agents autonomously handle the complete PR lifecycle with proper monitoring, feedback handling, and testing, eliminating gaps that require human intervention.
|
|
11
|
-
|
|
12
|
-
## PRINCIPLES
|
|
13
|
-
- **Complete Autonomy**: Agents should handle the PR workflow without requiring human prompting
|
|
14
|
-
- **Proactive Monitoring**: Continuously check status of actions and PRs
|
|
15
|
-
- **Comprehensive Feedback**: Address all comments before resubmission
|
|
16
|
-
- **Evidence-Based Progress**: Document test results and implementation status
|
|
17
|
-
|
|
18
|
-
## WORKFLOW
|
|
19
|
-
|
|
20
|
-
### Step 1: Git Action Monitoring
|
|
21
|
-
After pushing changes:
|
|
22
|
-
1. **Monitor Actions**: Check GitHub Actions status every 30 seconds.
|
|
23
|
-
2. **Retry on Failure**: If specific actions fail, analyze logs, debug, fix, and push again.
|
|
24
|
-
3. **Timeout**: If actions run > 10 mins or fail 3x consecutively, notify user with analysis.
|
|
25
|
-
4. **Success**: Only when all actions pass, proceed to Step 2.
|
|
26
|
-
|
|
27
|
-
### Step 2: PR Feedback Polling
|
|
28
|
-
After submission (or update):
|
|
29
|
-
1. **Poll**: Check for PR comments/reviews every 1 minute.
|
|
30
|
-
2. **Timeout**: After 24 hours of silence, notify user.
|
|
31
|
-
3. **Active Feedback**: If feedback arrives, proceed to Step 3 immediately.
|
|
32
|
-
|
|
33
|
-
### Step 3: Feedback Processing
|
|
34
|
-
1. **Set Status**: Label issue `status:wip`.
|
|
35
|
-
2. **Analyze**: Read all comments. Use `get_github_pr_comments` or similar tool.
|
|
36
|
-
3. **Address**: For each comment:
|
|
37
|
-
* Implement code changes or fixes.
|
|
38
|
-
* **Reply** to the comment (using `add_comment_to_pending_review` or `add_issue_comment`) explaining the fix.
|
|
39
|
-
4. **Verify**: Ensure no comments are left unaddressed.
|
|
40
|
-
|
|
41
|
-
### Step 4: Verification & Evidence
|
|
42
|
-
Before re-submitting:
|
|
43
|
-
1. **Run Tests**: Execute relevant test suites (Unit + Integration).
|
|
44
|
-
2. **Document**: Add a comment to the PR/Issue with:
|
|
45
|
-
* Test commands run.
|
|
46
|
-
* Pass/Fail status.
|
|
47
|
-
* Coverage summary.
|
|
48
|
-
3. **Clean Up**: Remove temp files/logs.
|
|
49
|
-
|
|
50
|
-
### Step 5: Submission
|
|
51
|
-
1. **Sync**: Push all changes.
|
|
52
|
-
2. **Set Status**: specific label `status:needs-review`.
|
|
53
|
-
3. **Loop**: Return to Step 1 (Monitor Actions).
|
|
54
|
-
|
|
55
|
-
## FAILURE MODES
|
|
56
|
-
- **Git Action Timeout**: 10 mins / 20 attempts.
|
|
57
|
-
- **Feedback Timeout**: 24 hours.
|
|
58
|
-
- **Network Errors**: Exponential backoff needed.
|
|
59
|
-
|
|
60
|
-
## EXAMPLES
|
|
61
|
-
|
|
62
|
-
### Good: Handling Feedback
|
|
63
|
-
```
|
|
64
|
-
1. Detected 3 comments on PR #123.
|
|
65
|
-
2. Comment 1 ("Fix typo"): Fixed in file.ts. Replied "Fixed".
|
|
66
|
-
3. Comment 2 ("Memory leak"): Reproduced, fixed logic. Replied "Fixed with new pattern".
|
|
67
|
-
4. Ran tests: All Pass.
|
|
68
|
-
5. Posted evidence.
|
|
69
|
-
6. Pushed. Labeled status:needs-review.
|
|
70
|
-
```
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Workflow: Issue Preparation (prep-issue)
|
|
2
|
-
|
|
3
|
-
This workflow prepares the local development environment for working on a specific GitHub issue.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- GitHub Issue Number (e.g., 56)
|
|
8
|
-
- GitHub CLI (gh) installed and authenticated
|
|
9
|
-
|
|
10
|
-
## Action Items
|
|
11
|
-
|
|
12
|
-
1. **Execute Preparation Script**:
|
|
13
|
-
Fetch and run cleanup/setup scripts ephemerally.
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
# Execute the prep-issue script directly from synced location
|
|
17
|
-
~/.fraim/scripts/prep-issue.sh {issue_number}
|
|
18
|
-
|
|
19
|
-
# On Windows:
|
|
20
|
-
# %USERPROFILE%\.fraim\scripts\prep-issue.sh {issue_number}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
3. **Verify Setup**:
|
|
25
|
-
- **Clean Context**: Start fresh to avoid pollution
|
|
26
|
-
- **Environment**: Follow "Local Development" guidelines (read `rules/local-development.md` using `get_fraim_file`).
|
|
27
|
-
- [ ] Feature branch created and pushed to origin.
|
|
28
|
-
- [ ] `npm install` completed.
|
|
29
|
-
- [ ] Serena indexing completed (if applicable).
|
|
30
|
-
|
|
31
|
-
## Implementation Detail (Agent Guidance)
|
|
32
|
-
|
|
33
|
-
Execute:
|
|
34
|
-
```bash
|
|
35
|
-
# Execute the prep-issue script directly from synced location
|
|
36
|
-
~/.fraim/scripts/prep-issue.sh {issue_number}
|
|
37
|
-
|
|
38
|
-
# On Windows:
|
|
39
|
-
# %USERPROFILE%\.fraim\scripts\prep-issue.sh {issue_number}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
> [!NOTE]
|
|
43
|
-
> The script will automatically handle branch naming based on the issue title using `gh issue view`.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Workflow: prototype
|
|
2
|
-
|
|
3
|
-
**Path:** `workflows/prototype.md`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Prototype / PoC Phase
|
|
8
|
-
|
|
9
|
-
## INTENT
|
|
10
|
-
To quickly explore ideas, validate technologies, or prove concepts using "spike" code. Speed and learning are prioritized over code quality and tests.
|
|
11
|
-
|
|
12
|
-
## PRINCIPLES
|
|
13
|
-
- **Speed Over Perfection**: It gets the job done; it doesn't need to be pretty.
|
|
14
|
-
- **Disposable Code**: Assume this code will be thrown away or heavily refactored.
|
|
15
|
-
- **Time-Boxed**: Spikes should have a clear time limit.
|
|
16
|
-
- **Learning Focused**: The goal is to answer a question or prove a capability.
|
|
17
|
-
|
|
18
|
-
## PROTOTYPE WORKFLOW
|
|
19
|
-
|
|
20
|
-
### Step 1: Issue Identification
|
|
21
|
-
Ask for {issue_number} (and optional {slug}).
|
|
22
|
-
|
|
23
|
-
### Step 2: Phase Initiation
|
|
24
|
-
Label the issue 'phase:prototype'.
|
|
25
|
-
|
|
26
|
-
### Step 3: Environment Setup
|
|
27
|
-
User runs `prep-issue.sh` (or you do if needed).
|
|
28
|
-
Switch to a `prototype/...` branch if not already on one.
|
|
29
|
-
|
|
30
|
-
### Step 4: Work Location
|
|
31
|
-
Work in the prepared workspace.
|
|
32
|
-
|
|
33
|
-
### Step 5: Prototyping
|
|
34
|
-
- **Goal**: Build a working demonstration of the concept.
|
|
35
|
-
- **Constraints**:
|
|
36
|
-
- **No Tests Required** (unless helpful for you).
|
|
37
|
-
- **Hardcoding Allowed**: Use hardcoded values to speed up development.
|
|
38
|
-
- **No Cleanup Required**: Formatting/Linting is optional.
|
|
39
|
-
- **Focus on the Core**: Ignore edge cases, error handling, and polish.
|
|
40
|
-
|
|
41
|
-
### Step 6: Demonstration
|
|
42
|
-
- Verify the prototype works for the "Happy Path".
|
|
43
|
-
- Create a screen recording or screenshot of the working prototype.
|
|
44
|
-
- Document what was learned:
|
|
45
|
-
- Does it work?
|
|
46
|
-
- What are the risks?
|
|
47
|
-
- How should we implement the real version?
|
|
48
|
-
- How should we implement the real version?
|
|
49
|
-
|
|
50
|
-
### Step 7: Transition
|
|
51
|
-
**Decide the next step:**
|
|
52
|
-
1. **Discard**: The idea didn't work. Close issue.
|
|
53
|
-
2. **Spec**: The idea works, but needs a full design. Call `get_fraim_workflow({ workflow: "spec" })`.
|
|
54
|
-
3. **Implement**: The prototype is good enough to be the base. **YOU MUST CLEAN IT UP.**
|
|
55
|
-
- Call `get_fraim_workflow({ workflow: "implement" })`.
|
|
56
|
-
- **CRITICAL**: You must specifically address the "Cleanup" phase where you refactor the prototype code into production-quality code, add tests, and handle edge cases.
|
|
57
|
-
|
|
58
|
-
### Step 8: Completion
|
|
59
|
-
- Commit the prototype code (optional, but good for history).
|
|
60
|
-
- Label `status:prototype-done`.
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
# Workflow: resolve
|
|
2
|
-
|
|
3
|
-
**Path:** `workflows/resolve.md`
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Issue Resolution Workflow
|
|
8
|
-
|
|
9
|
-
## INTENT
|
|
10
|
-
To provide a systematic approach to resolving issues from development through merge verification and cleanup, ensuring no work is lost and all changes are properly integrated into the main codebase.
|
|
11
|
-
|
|
12
|
-
## PRINCIPLES
|
|
13
|
-
- **Success Criteria**: Optimize for Integrity (Verify truthfully) and Completeness (Clean up fully) - see `rules/agent-success-criteria.md` (fetch via `get_fraim_file`).
|
|
14
|
-
- **Verification First**: Always verify merges before closing issues
|
|
15
|
-
- **Complete Cleanup**: Remove all traces of feature branches
|
|
16
|
-
- **No Work Loss**: Prevent incidents like Issue #112 through proper verification
|
|
17
|
-
- **Systematic Process**: Follow established steps in order
|
|
18
|
-
- **Evidence-Based**: Provide concrete verification of completion
|
|
19
|
-
- **Git Safety**: Follow "Git Safe Commands" (read `rules/git-safe-commands.md` using `get_fraim_file`)
|
|
20
|
-
|
|
21
|
-
## CRITICAL DEPENDENCY
|
|
22
|
-
**This workflow MUST be used in conjunction with "Merge Requirements" rule** (read `rules/merge-requirements.md` via `get_fraim_file`) which contains:
|
|
23
|
-
- **Pre-Push Workflow** (for feature branches during development)
|
|
24
|
-
- **PR Description Template** (for PR creation)
|
|
25
|
-
- **Final Merge Process** (for merging to master - used in this workflow)
|
|
26
|
-
- **Conflict Resolution Guide** (for resolving conflicts during rebase)
|
|
27
|
-
|
|
28
|
-
**Note**: The Pre-Push workflow applies to feature branch development. This resolve.md workflow focuses on the **final merge into master** and uses the Final Merge Process from merge-requirements.md.
|
|
29
|
-
|
|
30
|
-
## RESOLUTION WORKFLOW
|
|
31
|
-
|
|
32
|
-
**PREREQUISITE**: This workflow assumes:
|
|
33
|
-
- ✅ All development work is complete
|
|
34
|
-
- ✅ All tests have been run on the feature branch
|
|
35
|
-
- ✅ PR has been created and approved
|
|
36
|
-
- ✅ Feature branch is ready for merge
|
|
37
|
-
|
|
38
|
-
### 1. Execute the Merge
|
|
39
|
-
Use GitHub MCP to merge the PR:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# Merge the PR using GitHub MCP
|
|
43
|
-
gh pr merge <PR_NUMBER> --rebase
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**If conflicts occur during merge:**
|
|
47
|
-
- GitHub will reject the merge with conflict details
|
|
48
|
-
- Use `gh pr view <PR_NUMBER>` to see conflict details
|
|
49
|
-
- Resolve conflicts intelligently using the **Conflict Resolution Guide** from `merge-requirements.md`
|
|
50
|
-
- Keep master's base implementation and add your enhancements on top
|
|
51
|
-
- Test the resolution: `npm run build && npm run test-smoke test*.ts`
|
|
52
|
-
- Push the resolved changes and retry the merge
|
|
53
|
-
|
|
54
|
-
### 2. Wait for Master CI Smoke Tests
|
|
55
|
-
After successful merge, monitor the master branch CI:
|
|
56
|
-
- Check GitHub Actions for the master branch
|
|
57
|
-
- Wait for smoke tests to complete successfully
|
|
58
|
-
- **CRITICAL**: Do not proceed until CI passes
|
|
59
|
-
|
|
60
|
-
### 3. Verify Code Made it to Master
|
|
61
|
-
**MANDATORY**: Confirm the merge was successful:
|
|
62
|
-
```bash
|
|
63
|
-
# Check PR is merged, not just closed
|
|
64
|
-
gh pr view <PR_NUMBER> --json merged
|
|
65
|
-
|
|
66
|
-
# Verify merge commit in master
|
|
67
|
-
git fetch origin master
|
|
68
|
-
git log origin/master --oneline | grep "PR #<PR_NUMBER>"
|
|
69
|
-
|
|
70
|
-
# Verify files in master
|
|
71
|
-
git show origin/master:path/to/expected/file
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 4. Handle CI Failures
|
|
75
|
-
**If master CI fails:**
|
|
76
|
-
- Debug the issue immediately
|
|
77
|
-
- Fix the problem in the feature branch
|
|
78
|
-
- Push the fix and re-merge
|
|
79
|
-
- Repeat until CI passes
|
|
80
|
-
- **Do not close the issue until CI passes**
|
|
81
|
-
|
|
82
|
-
### 5. Confirm all good
|
|
83
|
-
**Only after CI passes successfully:**
|
|
84
|
-
|
|
85
|
-
**Add Resolution Comment if conflicts with master had to be resolved:**
|
|
86
|
-
- Add a comment to the issue using GitHub MCP:
|
|
87
|
-
```bash
|
|
88
|
-
gh issue comment <ISSUE_NUMBER> --body "✅ Encountered conflicts during merge with master.
|
|
89
|
-
|
|
90
|
-
**Conflict Resolution Notes:**
|
|
91
|
-
- Resolved conflicts in: [list files with conflicts]
|
|
92
|
-
- Resolution strategy: [explain what was done]
|
|
93
|
-
- Kept master's base implementation and added enhancements on top"
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
**Verify the following:**
|
|
97
|
-
1. ✅ **PR Status**: PR shows "merged" status, not just "closed"
|
|
98
|
-
2. ✅ **Merge Commit**: Verify merge commit exists in master
|
|
99
|
-
3. ✅ **Files in Master**: Confirm expected files are present in master
|
|
100
|
-
|
|
101
|
-
### **Verification Commands**
|
|
102
|
-
```bash
|
|
103
|
-
# Check PR is merged, not just closed
|
|
104
|
-
gh pr view <PR_NUMBER> --json merged
|
|
105
|
-
|
|
106
|
-
# Verify merge commit in master
|
|
107
|
-
git fetch origin master
|
|
108
|
-
git log origin/master --oneline | grep "PR #<PR_NUMBER>"
|
|
109
|
-
|
|
110
|
-
# Verify files in master
|
|
111
|
-
git show origin/master:path/to/expected/file
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
**CRITICAL**: Do not close the issue until merge verification passes. This prevents work loss incidents
|
|
115
|
-
|
|
116
|
-
### 6. Issue Resolution & Cleanup
|
|
117
|
-
**Close the Issue:**
|
|
118
|
-
- Close the issue with resolution comment using GitHub MCP:
|
|
119
|
-
```bash
|
|
120
|
-
gh issue close <ISSUE_NUMBER> --comment "✅ Issue resolved and merged to master. CI smoke tests passed."
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Cleanup Branch:**
|
|
124
|
-
```bash
|
|
125
|
-
# Execute cleanup script directly from synced location
|
|
126
|
-
npx tsx ~/.fraim/scripts/cleanup-branch.ts {branch_name}
|
|
127
|
-
|
|
128
|
-
# On Windows:
|
|
129
|
-
# npx tsx %USERPROFILE%\.fraim\scripts\cleanup-branch.ts {branch_name}
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### 7. Celebrate
|
|
133
|
-
- Say Hoorah !
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
## EXAMPLES
|
|
137
|
-
|
|
138
|
-
### Good: Proper Resolution Process
|
|
139
|
-
```
|
|
140
|
-
Issue #84: "Fix calendar sync timeout"
|
|
141
|
-
PREREQUISITE: ✅ Development complete, tests passed, PR approved
|
|
142
|
-
1. ✅ Merge: Used `gh pr merge <PR_NUMBER> --rebase`
|
|
143
|
-
2. ✅ Conflicts: Resolved conflicts intelligently (kept master's base)
|
|
144
|
-
3. ✅ CI Wait: Waited for master CI smoke tests to pass
|
|
145
|
-
4. ✅ Verification: Confirmed merge commit exists in master
|
|
146
|
-
5. ✅ Schema: Cleaned up database schema BEFORE branch deletion
|
|
147
|
-
6. ✅ Comment: Added resolution comment with conflict resolution notes
|
|
148
|
-
7. ✅ Close: Closed issue with resolution comment using `gh issue close`
|
|
149
|
-
8. ✅ Cleanup: Deleted branch after schema cleanup
|
|
150
|
-
Result: Complete resolution with no work loss
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Bad: Incomplete Resolution
|
|
154
|
-
```
|
|
155
|
-
Issue #84: "Fix calendar sync timeout"
|
|
156
|
-
PREREQUISITE: ✅ Development complete, tests passed, PR approved
|
|
157
|
-
1. ✅ Merge: Used `gh pr merge <PR_NUMBER> --rebase`
|
|
158
|
-
2. ❌ Skip: Didn't wait for master CI smoke tests
|
|
159
|
-
3. ❌ Skip: Didn't verify merge commit exists
|
|
160
|
-
4. ❌ Skip: Didn't clean up schema BEFORE branch deletion
|
|
161
|
-
5. ❌ Skip: Didn't add resolution comment with conflict notes
|
|
162
|
-
6. ❌ Close: Closed issue without CI verification
|
|
163
|
-
Result: Work lost, schema not cleaned up, CI may have failed
|
|
164
|
-
```
|