@meltstudio/meltctl 2.0.2 → 2.1.0
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/README.md +7 -6
- package/dist/commands/project/init.js +14 -21
- package/package.json +1 -1
- package/templates/cursor-commands/melt-plan.md +22 -11
- package/templates/melt-memory/context.md +0 -23
- package/templates/melt-scripts/ps/common.ps1 +0 -48
- package/templates/melt-scripts/sh/common.sh +0 -44
package/README.md
CHANGED
|
@@ -120,12 +120,13 @@ This tool is part of the Melt Development Process. For issues or contributions:
|
|
|
120
120
|
The CLI uses a bundled template system organized in:
|
|
121
121
|
|
|
122
122
|
```
|
|
123
|
-
packages/cli/
|
|
124
|
-
├──
|
|
125
|
-
├──
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
packages/cli/
|
|
124
|
+
├── memory/ # Project context and standards
|
|
125
|
+
├── scripts/ # Utility scripts for sh and PowerShell
|
|
126
|
+
│ ├── sh/ # Bash/zsh utility scripts
|
|
127
|
+
│ └── ps/ # PowerShell utility scripts
|
|
128
|
+
└── templates/
|
|
129
|
+
└── cursor-commands/ # All 8 Cursor AI command templates
|
|
129
130
|
```
|
|
130
131
|
|
|
131
132
|
Templates support dynamic content replacement (like timestamps) and are copied to your project during initialization.
|
|
@@ -80,17 +80,11 @@ export async function initCommand(options = {}) {
|
|
|
80
80
|
console.log(` • ${chalk.cyan('.melt/templates/')}`);
|
|
81
81
|
console.log();
|
|
82
82
|
console.log('Next steps:');
|
|
83
|
-
console.log(' 1.
|
|
84
|
-
console.log(`
|
|
85
|
-
console.log(
|
|
86
|
-
console.log(
|
|
87
|
-
console.log(`
|
|
88
|
-
console.log(` • ${chalk.cyan('/melt-pr')} - Create pull request with proper description`);
|
|
89
|
-
console.log(` • ${chalk.cyan('/melt-review')} - Review code for quality and compliance`);
|
|
90
|
-
console.log(` • ${chalk.cyan('/melt-complete')} - Complete story and handle deployment`);
|
|
91
|
-
console.log(` • ${chalk.cyan('/melt-debug')} - Systematic debugging with AI assistance`);
|
|
92
|
-
console.log(' 2. Customize templates in .melt/templates/');
|
|
93
|
-
console.log(` 3. Use utility scripts in .melt/scripts/${selectedShell}/`);
|
|
83
|
+
console.log(' 1. Open Cursor IDE');
|
|
84
|
+
console.log(` 2. Run ${chalk.cyan('/melt-plan')} to start planning a feature`);
|
|
85
|
+
console.log(' 3. Follow the workflow: Plan → Test → Implement → Review');
|
|
86
|
+
console.log();
|
|
87
|
+
console.log(`See docs: ${chalk.cyan('https://melt-development-prompts.vercel.app')}`);
|
|
94
88
|
outro(chalk.green('Happy coding with Melt! 🚀'));
|
|
95
89
|
}
|
|
96
90
|
catch (error) {
|
|
@@ -125,22 +119,21 @@ async function copyTemplates(baseDir, shell) {
|
|
|
125
119
|
if (existsSync(cursorCommandsTemplateDir)) {
|
|
126
120
|
fs.copySync(cursorCommandsTemplateDir, cursorCommandsDestDir);
|
|
127
121
|
}
|
|
128
|
-
// Create initial context file from
|
|
129
|
-
const
|
|
122
|
+
// Create initial context file from memory
|
|
123
|
+
const contextSourcePath = join(__dirname, '../../../memory', 'context.md');
|
|
130
124
|
const contextDestPath = join(baseDir, '.melt', 'memory', 'context.md');
|
|
131
|
-
if (existsSync(
|
|
132
|
-
let contextContent = readFileSync(
|
|
125
|
+
if (existsSync(contextSourcePath)) {
|
|
126
|
+
let contextContent = readFileSync(contextSourcePath, 'utf8');
|
|
133
127
|
// Replace timestamp placeholders
|
|
134
128
|
const timestamp = new Date().toISOString();
|
|
135
129
|
contextContent = contextContent.replace(/{{timestamp}}/g, timestamp);
|
|
136
130
|
fs.writeFileSync(contextDestPath, contextContent, 'utf8');
|
|
137
131
|
}
|
|
138
|
-
// Copy shell
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
fs.copySync(scriptTemplatePath, scriptDestPath);
|
|
132
|
+
// Copy shell scripts from CLI package
|
|
133
|
+
const scriptsSourceDir = join(__dirname, '../../../scripts', shell);
|
|
134
|
+
const scriptsDestDir = join(baseDir, '.melt', 'scripts', shell);
|
|
135
|
+
if (existsSync(scriptsSourceDir)) {
|
|
136
|
+
fs.copySync(scriptsSourceDir, scriptsDestDir);
|
|
144
137
|
}
|
|
145
138
|
}
|
|
146
139
|
function createVersionFile(meltDir) {
|
package/package.json
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create implementation plan following Melt's domain-driven architecture standards
|
|
2
|
+
description: Create implementation plan with User Story and RFC validation following Melt's domain-driven architecture standards
|
|
3
|
+
scripts:
|
|
4
|
+
sh: .melt/scripts/sh/get-plan-context.sh --json
|
|
5
|
+
ps: .melt/scripts/ps/get-plan-context.ps1 -Json
|
|
3
6
|
---
|
|
4
7
|
|
|
5
8
|
Create a comprehensive implementation plan for the requested feature. Follow these steps:
|
|
6
9
|
|
|
7
|
-
1. **
|
|
8
|
-
-
|
|
10
|
+
1. **Collect Requirements**:
|
|
11
|
+
- Run `{SCRIPT}` from the project root and parse JSON for USER_STORY, RFC, ISSUE_ID, PLAN_FILE, and PROJECT_ROOT
|
|
12
|
+
- If script fails, prompt manually for User Story and RFC
|
|
13
|
+
- Validate that both User Story and RFC are complete and actionable
|
|
14
|
+
|
|
15
|
+
2. **Analyze Requirements**:
|
|
16
|
+
- Analyze the provided User Story for clear acceptance criteria and user value
|
|
17
|
+
- Review the RFC for technical decisions, architecture, and constraints
|
|
18
|
+
- Read `.melt/memory/context.md` for additional project context
|
|
9
19
|
- Identify the target domain(s) this feature belongs to
|
|
10
20
|
- Determine integration points with existing domains
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
3. **Architecture Planning**:
|
|
13
23
|
- Design domain structure following our patterns:
|
|
14
24
|
```
|
|
15
25
|
src/domains/[domain]/
|
|
@@ -23,27 +33,28 @@ Create a comprehensive implementation plan for the requested feature. Follow the
|
|
|
23
33
|
- Plan component hierarchy and state management
|
|
24
34
|
- Design data flow and API integration points
|
|
25
35
|
|
|
26
|
-
|
|
36
|
+
4. **Technical Decisions**:
|
|
27
37
|
- Choose appropriate React patterns (server vs client components)
|
|
28
38
|
- Plan Zod schemas for data validation
|
|
29
39
|
- Design TypeScript interfaces and types
|
|
30
40
|
- Plan testing strategy (unit, integration, e2e)
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
5. **Implementation Strategy**:
|
|
33
43
|
- Break down into atomic, testable units
|
|
34
44
|
- Identify dependencies and execution order
|
|
35
45
|
- Plan for error handling and edge cases
|
|
36
46
|
- Consider accessibility and performance requirements
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
6. **Create Detailed Plan**:
|
|
39
49
|
- List specific files to create/modify
|
|
40
50
|
- Define component interfaces and props
|
|
41
51
|
- Specify API endpoints and data contracts
|
|
42
52
|
- Plan test cases and coverage targets
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
- Save comprehensive plan to
|
|
46
|
-
-
|
|
47
|
-
-
|
|
54
|
+
7. **Save Planning Output**:
|
|
55
|
+
- Save comprehensive plan to the PLAN_FILE path provided by the script
|
|
56
|
+
- Include User Story and RFC as context sections in the plan
|
|
57
|
+
- Update `.melt/memory/context.md` with planning decisions and issue reference
|
|
58
|
+
- Create task breakdown for implementation with clear dependencies
|
|
48
59
|
|
|
49
60
|
Focus on maintainable, testable code that follows our domain-driven architecture principles.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Project Context
|
|
2
|
-
|
|
3
|
-
## Project Overview
|
|
4
|
-
This project uses Melt's development standards with domain-driven architecture.
|
|
5
|
-
|
|
6
|
-
## Architecture Principles
|
|
7
|
-
- **Domain-Driven Design**: Code organized by business domains
|
|
8
|
-
- **React 2025 Standards**: Functional components, hooks, TypeScript strict
|
|
9
|
-
- **Type Safety**: Zod schemas for runtime validation
|
|
10
|
-
- **Testing**: 80% coverage minimum with comprehensive test strategies
|
|
11
|
-
|
|
12
|
-
## Development Workflow
|
|
13
|
-
1. **Plan**: Create implementation plans in `.melt/outputs/plans/`
|
|
14
|
-
2. **Implement**: Follow domain architecture patterns
|
|
15
|
-
3. **Review**: Ensure quality and compliance
|
|
16
|
-
4. **Debug**: Systematic problem-solving approach
|
|
17
|
-
|
|
18
|
-
## Current Status
|
|
19
|
-
- Initialized: {{timestamp}}
|
|
20
|
-
- Last Updated: {{timestamp}}
|
|
21
|
-
|
|
22
|
-
## Notes
|
|
23
|
-
Update this file as the project evolves to maintain context for AI assistants and team members.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env pwsh
|
|
2
|
-
# Common utilities for Melt development workflow
|
|
3
|
-
|
|
4
|
-
function Get-ProjectRoot {
|
|
5
|
-
try {
|
|
6
|
-
git rev-parse --show-toplevel
|
|
7
|
-
}
|
|
8
|
-
catch {
|
|
9
|
-
Get-Location
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function Get-Timestamp {
|
|
14
|
-
Get-Date -Format "yyyyMMdd-HHmmss"
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function Test-MeltWorkspace {
|
|
18
|
-
if (-not (Test-Path ".melt" -PathType Container)) {
|
|
19
|
-
Write-Error "ERROR: .melt workspace not found. Run 'meltctl project init' first."
|
|
20
|
-
exit 1
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function New-OutputFile {
|
|
25
|
-
param(
|
|
26
|
-
[string]$Category,
|
|
27
|
-
[string]$Name
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
$timestamp = Get-Timestamp
|
|
31
|
-
$filename = "$timestamp-$Name.md"
|
|
32
|
-
$filepath = ".melt/outputs/$Category/$filename"
|
|
33
|
-
|
|
34
|
-
New-Item -Path ".melt/outputs/$Category" -ItemType Directory -Force | Out-Null
|
|
35
|
-
return $filepath
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function Update-Context {
|
|
39
|
-
param([string]$Message)
|
|
40
|
-
|
|
41
|
-
$timestamp = Get-Date -Format "yyyy-MM-ddTHH:mm:ssK"
|
|
42
|
-
|
|
43
|
-
Add-Content -Path ".melt/memory/context.md" -Value "## Update: $timestamp"
|
|
44
|
-
Add-Content -Path ".melt/memory/context.md" -Value $Message
|
|
45
|
-
Add-Content -Path ".melt/memory/context.md" -Value ""
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
Write-Output "Melt development utilities loaded."
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Common utilities for Melt development workflow
|
|
3
|
-
|
|
4
|
-
# Get project root directory
|
|
5
|
-
get_project_root() {
|
|
6
|
-
git rev-parse --show-toplevel 2>/dev/null || pwd
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
# Get current timestamp for file naming
|
|
10
|
-
get_timestamp() {
|
|
11
|
-
date '+%Y%m%d-%H%M%S'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
# Check if .melt directory exists
|
|
15
|
-
check_melt_workspace() {
|
|
16
|
-
if [[ ! -d ".melt" ]]; then
|
|
17
|
-
echo "ERROR: .melt workspace not found. Run 'meltctl project init' first."
|
|
18
|
-
exit 1
|
|
19
|
-
fi
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
# Create output file with timestamp
|
|
23
|
-
create_output_file() {
|
|
24
|
-
local category="$1"
|
|
25
|
-
local name="$2"
|
|
26
|
-
local timestamp=$(get_timestamp)
|
|
27
|
-
local filename="${timestamp}-${name}.md"
|
|
28
|
-
local filepath=".melt/outputs/${category}/${filename}"
|
|
29
|
-
|
|
30
|
-
mkdir -p ".melt/outputs/${category}"
|
|
31
|
-
echo "$filepath"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
# Update context file with new information
|
|
35
|
-
update_context() {
|
|
36
|
-
local message="$1"
|
|
37
|
-
local timestamp=$(date -Iseconds)
|
|
38
|
-
|
|
39
|
-
echo "## Update: $timestamp" >> .melt/memory/context.md
|
|
40
|
-
echo "$message" >> .melt/memory/context.md
|
|
41
|
-
echo "" >> .melt/memory/context.md
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
echo "Melt development utilities loaded."
|