@mind-fold/open-flow 0.1.9 → 0.1.10
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
CHANGED
|
@@ -81,6 +81,7 @@ your-project/
|
|
|
81
81
|
| `/onboard-developer` | Guide new developer through setup |
|
|
82
82
|
| `/update-frontend-structure` | Update frontend guidelines if new patterns found |
|
|
83
83
|
| `/update-backend-structure` | Update backend guidelines if new patterns found |
|
|
84
|
+
| `/create-command` | Create a new slash command in both `.cursor/` and `.claude/` directories |
|
|
84
85
|
|
|
85
86
|
## Workflow
|
|
86
87
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAgBtD"}
|
|
@@ -16,6 +16,7 @@ export function getCommandTemplates() {
|
|
|
16
16
|
"before-backend-dev": getBeforeBackendDevTemplate(),
|
|
17
17
|
"update-frontend-structure": getUpdateFrontendStructureTemplate(),
|
|
18
18
|
"update-backend-structure": getUpdateBackendStructureTemplate(),
|
|
19
|
+
"create-command": getCreateCommandTemplate(),
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
function getInitAgentTemplate() {
|
|
@@ -843,4 +844,161 @@ This creates a knowledge base of solved problems for future reference, helping y
|
|
|
843
844
|
\`\`\`
|
|
844
845
|
`;
|
|
845
846
|
}
|
|
847
|
+
function getCreateCommandTemplate() {
|
|
848
|
+
return `# Create New Slash Command
|
|
849
|
+
|
|
850
|
+
Create a new slash command in both \`.cursor/commands/\` and \`.claude/commands/\` directories based on user requirements.
|
|
851
|
+
|
|
852
|
+
## Usage
|
|
853
|
+
|
|
854
|
+
\`\`\`
|
|
855
|
+
/create-command <command-name> <description>
|
|
856
|
+
\`\`\`
|
|
857
|
+
|
|
858
|
+
**Example**:
|
|
859
|
+
\`\`\`
|
|
860
|
+
/create-command review-pr Check PR code changes against project guidelines
|
|
861
|
+
\`\`\`
|
|
862
|
+
|
|
863
|
+
## Execution Steps
|
|
864
|
+
|
|
865
|
+
### 1. Parse Input
|
|
866
|
+
|
|
867
|
+
Extract from user input:
|
|
868
|
+
- **Command name**: Use kebab-case (e.g., \`review-pr\`)
|
|
869
|
+
- **Description**: What the command should accomplish
|
|
870
|
+
|
|
871
|
+
### 2. Analyze Requirements
|
|
872
|
+
|
|
873
|
+
Determine command type based on description:
|
|
874
|
+
- **Initialization**: Read docs, establish context
|
|
875
|
+
- **Pre-development**: Read guidelines, check dependencies
|
|
876
|
+
- **Code check**: Validate code quality and guideline compliance
|
|
877
|
+
- **Recording**: Record progress, questions, structure changes
|
|
878
|
+
- **Generation**: Generate docs, code templates
|
|
879
|
+
|
|
880
|
+
### 3. Generate Command Content
|
|
881
|
+
|
|
882
|
+
Based on command type, generate appropriate content:
|
|
883
|
+
|
|
884
|
+
**Simple command** (1-3 lines):
|
|
885
|
+
\`\`\`markdown
|
|
886
|
+
Concise instruction describing what to do
|
|
887
|
+
\`\`\`
|
|
888
|
+
|
|
889
|
+
**Complex command** (with steps):
|
|
890
|
+
\`\`\`markdown
|
|
891
|
+
# Command Title
|
|
892
|
+
|
|
893
|
+
Command description
|
|
894
|
+
|
|
895
|
+
## Steps
|
|
896
|
+
|
|
897
|
+
### 1. First Step
|
|
898
|
+
Specific action
|
|
899
|
+
|
|
900
|
+
### 2. Second Step
|
|
901
|
+
Specific action
|
|
902
|
+
|
|
903
|
+
## Output Format (if needed)
|
|
904
|
+
|
|
905
|
+
Template
|
|
906
|
+
\`\`\`
|
|
907
|
+
|
|
908
|
+
### 4. Create Files
|
|
909
|
+
|
|
910
|
+
Create in both directories:
|
|
911
|
+
- \`.cursor/commands/<command-name>.md\`
|
|
912
|
+
- \`.claude/commands/<command-name>.md\`
|
|
913
|
+
|
|
914
|
+
### 5. Confirm Creation
|
|
915
|
+
|
|
916
|
+
Output result:
|
|
917
|
+
\`\`\`
|
|
918
|
+
✅ Created Slash Command: /<command-name>
|
|
919
|
+
|
|
920
|
+
File paths:
|
|
921
|
+
- .cursor/commands/<command-name>.md
|
|
922
|
+
- .claude/commands/<command-name>.md
|
|
923
|
+
|
|
924
|
+
Usage:
|
|
925
|
+
/<command-name>
|
|
926
|
+
|
|
927
|
+
Description:
|
|
928
|
+
<description>
|
|
929
|
+
\`\`\`
|
|
930
|
+
|
|
931
|
+
## Command Content Guidelines
|
|
932
|
+
|
|
933
|
+
### ✅ Good command content
|
|
934
|
+
|
|
935
|
+
1. **Clear and concise**: Immediately understandable
|
|
936
|
+
2. **Executable**: AI can follow steps directly
|
|
937
|
+
3. **Well-scoped**: Clear boundaries of what to do and not do
|
|
938
|
+
4. **Has output**: Specifies expected output format (if needed)
|
|
939
|
+
|
|
940
|
+
### ❌ Avoid
|
|
941
|
+
|
|
942
|
+
1. **Too vague**: e.g., "optimize code"
|
|
943
|
+
2. **Too complex**: Single command should not exceed 100 lines
|
|
944
|
+
3. **Duplicate functionality**: Check if similar command exists first
|
|
945
|
+
|
|
946
|
+
## Naming Conventions
|
|
947
|
+
|
|
948
|
+
| Command Type | Prefix | Example |
|
|
949
|
+
|--------------|--------|---------|
|
|
950
|
+
| Initialization | \`init-\` | \`init-agent\` |
|
|
951
|
+
| Pre-development | \`before-\` | \`before-frontend-dev\` |
|
|
952
|
+
| Check | \`check-\` | \`check-frontend\` |
|
|
953
|
+
| Record | \`record-\` | \`record-agent-flow\` |
|
|
954
|
+
| Generate | \`generate-\` | \`generate-api-doc\` |
|
|
955
|
+
| Update | \`update-\` | \`update-changelog\` |
|
|
956
|
+
| Other | Verb-first | \`review-code\`, \`sync-data\` |
|
|
957
|
+
|
|
958
|
+
## Example
|
|
959
|
+
|
|
960
|
+
### Input
|
|
961
|
+
\`\`\`
|
|
962
|
+
/create-command review-pr Check PR code changes against project guidelines
|
|
963
|
+
\`\`\`
|
|
964
|
+
|
|
965
|
+
### Generated Command Content
|
|
966
|
+
\`\`\`markdown
|
|
967
|
+
# PR Code Review
|
|
968
|
+
|
|
969
|
+
Check current PR code changes against project guidelines.
|
|
970
|
+
|
|
971
|
+
## Steps
|
|
972
|
+
|
|
973
|
+
### 1. Get Changed Files
|
|
974
|
+
\\\`\\\`\\\`bash
|
|
975
|
+
git diff main...HEAD --name-only
|
|
976
|
+
\\\`\\\`\\\`
|
|
977
|
+
|
|
978
|
+
### 2. Categorized Review
|
|
979
|
+
|
|
980
|
+
**Frontend files** (\`apps/web/\`):
|
|
981
|
+
- Reference \`workflow/structure/frontend/index.md\`
|
|
982
|
+
|
|
983
|
+
**Backend files** (\`packages/api/\`):
|
|
984
|
+
- Reference \`workflow/structure/backend/index.md\`
|
|
985
|
+
|
|
986
|
+
### 3. Output Review Report
|
|
987
|
+
|
|
988
|
+
Format:
|
|
989
|
+
|
|
990
|
+
## PR Review Report
|
|
991
|
+
|
|
992
|
+
### Changed Files
|
|
993
|
+
- [file list]
|
|
994
|
+
|
|
995
|
+
### Check Results
|
|
996
|
+
- ✅ Passed items
|
|
997
|
+
- ❌ Issues found
|
|
998
|
+
|
|
999
|
+
### Suggestions
|
|
1000
|
+
- [improvement suggestions]
|
|
1001
|
+
\`\`\`
|
|
1002
|
+
`;
|
|
1003
|
+
}
|
|
846
1004
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAA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