feat: integrate framework files into monorepo under packages/mosaic/framework/
Moves all Mosaic framework runtime files from the separate bootstrap repo into the monorepo as canonical source. The @mosaic/mosaic npm package now ships the complete framework — bin scripts, runtime configs, tools, and templates — enabling standalone installation via npm install. Structure: packages/mosaic/framework/ ├── bin/ 28 CLI scripts (mosaic, mosaic-doctor, mosaic-sync-skills, etc.) ├── runtime/ Runtime adapters (claude, codex, opencode, pi, mcp) ├── tools/ Shell tooling (git, prdy, orchestrator, quality, etc.) ├── templates/ Agent and repo templates ├── defaults/ Default identity files (AGENTS.md, STANDARDS.md, SOUL.md, etc.) ├── install.sh Legacy bash installer └── remote-install.sh One-liner remote installer Key files with Pi support and recent fixes: - bin/mosaic: launch_pi() with skills-local loop - bin/mosaic-doctor: --fix auto-wiring for all 4 harnesses - bin/mosaic-sync-skills: Pi as 4th link target, symlink-aware find - bin/mosaic-link-runtime-assets: Pi settings.json patching - bin/mosaic-migrate-local-skills: Pi skill roots, symlink find - runtime/pi/RUNTIME.md + mosaic-extension.ts Package ships 251 framework files in the npm tarball (278KB compressed).
This commit is contained in:
@@ -0,0 +1,268 @@
|
||||
---
|
||||
file_path: {full_path}
|
||||
file_name: {sanitized_name}
|
||||
remediation_report: {FileName}_remediation_needed.md
|
||||
timestamp_start: {ISO_timestamp}
|
||||
timestamp_end: {ISO_timestamp}
|
||||
iteration: {current_iteration}
|
||||
status: {planning|researching|executing|validating|completed|failed}
|
||||
success_metrics:
|
||||
typescript: {pass|fail|not_applicable}
|
||||
eslint: {pass|fail|not_applicable}
|
||||
prettier: {pass|fail|not_applicable}
|
||||
security: {pass|fail|not_applicable}
|
||||
---
|
||||
|
||||
# Remediation Actions: {file_name}
|
||||
|
||||
## Planning Phase
|
||||
|
||||
**Start Time**: {timestamp}
|
||||
**Status**: {in_progress|completed}
|
||||
|
||||
### Sequential Thinking Analysis
|
||||
|
||||
```
|
||||
Thought 1: Analyzing reported issues - {analysis}
|
||||
Thought 2: Determining fix priority - {priority reasoning}
|
||||
Thought 3: Identifying dependencies - {dependency analysis}
|
||||
Thought 4: Planning execution order - {order rationale}
|
||||
Thought 5: Estimating complexity - {complexity assessment}
|
||||
Thought 6: Validation approach - {how to verify success}
|
||||
Total Thoughts: {n}
|
||||
Decision: {chosen approach}
|
||||
```
|
||||
|
||||
### Issues Prioritization
|
||||
|
||||
1. **Critical**: {issues that block compilation/execution}
|
||||
2. **High**: {issues affecting functionality}
|
||||
3. **Medium**: {code quality issues}
|
||||
4. **Low**: {style/formatting issues}
|
||||
|
||||
## Research Phase
|
||||
|
||||
**Start Time**: {timestamp}
|
||||
**Status**: {in_progress|completed}
|
||||
|
||||
### Context7 Documentation Retrieved
|
||||
|
||||
```javascript
|
||||
// Query 1: TypeScript best practices
|
||||
await mcp__context7__get_library_docs({
|
||||
context7CompatibleLibraryID: '/microsoft/TypeScript',
|
||||
topic: '{specific topic}',
|
||||
tokens: 3000,
|
||||
});
|
||||
// Result: {summary of findings}
|
||||
|
||||
// Query 2: ESLint rules
|
||||
await mcp__context7__get_library_docs({
|
||||
context7CompatibleLibraryID: '/eslint/eslint',
|
||||
topic: '{specific rules}',
|
||||
tokens: 2000,
|
||||
});
|
||||
// Result: {summary of findings}
|
||||
|
||||
// Query 3: Framework patterns
|
||||
await mcp__context7__get_library_docs({
|
||||
context7CompatibleLibraryID: '{framework library}',
|
||||
topic: '{specific patterns}',
|
||||
tokens: 2500,
|
||||
});
|
||||
// Result: {summary of findings}
|
||||
```
|
||||
|
||||
### Relevant Patterns Identified
|
||||
|
||||
- **Pattern 1**: {description and application}
|
||||
- **Pattern 2**: {description and application}
|
||||
- **Best Practice**: {relevant best practice from docs}
|
||||
|
||||
## Action Plan
|
||||
|
||||
**Generated**: {timestamp}
|
||||
**Total Actions**: {count}
|
||||
|
||||
### Planned Actions
|
||||
|
||||
1. [ ] **Fix TypeScript interface issue**
|
||||
- **Issue**: Property 'onClick' missing from ButtonProps
|
||||
- **Solution**: Add optional onClick property with proper typing
|
||||
- **Rationale**: Maintains backward compatibility while fixing type error
|
||||
- **Rollback**: Remove property if breaks existing usage
|
||||
- **Estimated Impact**: Low risk, improves type safety
|
||||
|
||||
2. [ ] **Resolve ESLint violations**
|
||||
- **Issue**: no-unused-vars on line 45
|
||||
- **Solution**: Remove unused import or implement usage
|
||||
- **Rationale**: Clean code practice, reduces bundle size
|
||||
- **Rollback**: Re-add if functionality needed
|
||||
- **Estimated Impact**: No functional change
|
||||
|
||||
3. [ ] **Apply Prettier formatting**
|
||||
- **Issue**: Inconsistent formatting throughout file
|
||||
- **Solution**: Run prettier --write
|
||||
- **Rationale**: Maintains code style consistency
|
||||
- **Rollback**: Not needed (formatting only)
|
||||
- **Estimated Impact**: No functional change
|
||||
|
||||
## Execution Phase
|
||||
|
||||
**Start Time**: {timestamp}
|
||||
**Status**: {in_progress|completed}
|
||||
|
||||
### Actions Taken
|
||||
|
||||
#### Action 1: Fix TypeScript interface issue
|
||||
|
||||
**Timestamp**: {ISO timestamp}
|
||||
**Tool Used**: Edit
|
||||
**Target**: Lines 10-15 of ButtonProps interface
|
||||
**Change Applied**:
|
||||
|
||||
```typescript
|
||||
// Before
|
||||
interface ButtonProps {
|
||||
label: string;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
// After
|
||||
interface ButtonProps {
|
||||
label: string;
|
||||
disabled?: boolean;
|
||||
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
||||
}
|
||||
```
|
||||
|
||||
**Result**: ✅ Success - TypeScript compilation now passes
|
||||
**Side Effects**: None observed
|
||||
**Status**: [x] Completed
|
||||
|
||||
#### Action 2: Resolve ESLint violations
|
||||
|
||||
**Timestamp**: {ISO timestamp}
|
||||
**Tool Used**: MultiEdit
|
||||
**Target**: Multiple locations with violations
|
||||
**Changes Applied**:
|
||||
|
||||
- Removed unused import on line 3
|
||||
- Fixed missing dependency in useEffect on line 67
|
||||
- Added missing return type on line 89
|
||||
**Result**: ✅ Success - ESLint now reports 0 errors
|
||||
**Side Effects**: None
|
||||
**Status**: [x] Completed
|
||||
|
||||
#### Action 3: Apply Prettier formatting
|
||||
|
||||
**Timestamp**: {ISO timestamp}
|
||||
**Tool Used**: Bash
|
||||
**Command**: `npx prettier --write {file_path}`
|
||||
**Result**: ✅ Success - File formatted
|
||||
**Lines Changed**: 47
|
||||
**Status**: [x] Completed
|
||||
|
||||
### Unexpected Issues Encountered
|
||||
|
||||
{Any issues that arose during execution}
|
||||
|
||||
### Adjustments Made
|
||||
|
||||
{Any deviations from the original plan and why}
|
||||
|
||||
## Validation Phase
|
||||
|
||||
**Start Time**: {timestamp}
|
||||
**Status**: {in_progress|completed}
|
||||
|
||||
### Re-run QA Checks
|
||||
|
||||
#### TypeScript Validation
|
||||
|
||||
```bash
|
||||
npx tsc --noEmit {file_path}
|
||||
```
|
||||
|
||||
**Result**: ✅ PASS - No errors
|
||||
**Details**: Compilation successful, all types resolved
|
||||
|
||||
#### ESLint Validation
|
||||
|
||||
```bash
|
||||
npx eslint {file_path}
|
||||
```
|
||||
|
||||
**Result**: ✅ PASS - 0 errors, 2 warnings
|
||||
**Warnings**:
|
||||
|
||||
- Line 34: Prefer const over let (prefer-const)
|
||||
- Line 78: Missing explicit return type (explicit-function-return-type)
|
||||
|
||||
#### Prettier Validation
|
||||
|
||||
```bash
|
||||
npx prettier --check {file_path}
|
||||
```
|
||||
|
||||
**Result**: ✅ PASS - File formatted correctly
|
||||
|
||||
#### Security Scan
|
||||
|
||||
```bash
|
||||
# Security check command
|
||||
```
|
||||
|
||||
**Result**: ✅ PASS - No vulnerabilities detected
|
||||
|
||||
### Overall Validation Status
|
||||
|
||||
- **All Critical Issues**: ✅ Resolved
|
||||
- **All High Issues**: ✅ Resolved
|
||||
- **Medium Issues**: ⚠️ 2 warnings remain (non-blocking)
|
||||
- **Low Issues**: ✅ Resolved
|
||||
|
||||
## Next Steps
|
||||
|
||||
### If Successful (All Pass)
|
||||
|
||||
- [x] Move reports to done/
|
||||
- [x] Archive after 7 days
|
||||
- [x] Log success metrics
|
||||
|
||||
### If Failed (Issues Remain)
|
||||
|
||||
- [ ] Check iteration count: {current}/5
|
||||
- [ ] If < 5: Plan next iteration approach
|
||||
- [ ] If >= 5: Escalate with detailed analysis
|
||||
|
||||
### Next Iteration Planning (If Needed)
|
||||
|
||||
**Remaining Issues**: {list}
|
||||
**New Approach**: {different strategy based on learnings}
|
||||
**Sequential Thinking**:
|
||||
|
||||
```
|
||||
Thought 1: Why did previous approach fail?
|
||||
Thought 2: What alternative solutions exist?
|
||||
Thought 3: Which approach has highest success probability?
|
||||
Decision: {new approach}
|
||||
```
|
||||
|
||||
## Summary
|
||||
|
||||
**Total Execution Time**: {duration}
|
||||
**Actions Completed**: {n}/{total}
|
||||
**Success Rate**: {percentage}
|
||||
**Final Status**: {completed|needs_iteration|escalated}
|
||||
|
||||
## Lessons Learned
|
||||
|
||||
{Any insights that could help future remediation}
|
||||
|
||||
---
|
||||
|
||||
_Generated by Auto-Remediation Agent_
|
||||
_Start: {ISO timestamp}_
|
||||
_End: {ISO timestamp}_
|
||||
_Agent Version: 1.0.0_
|
||||
Reference in New Issue
Block a user