@mind-fold/open-flow 0.1.8 → 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
@@ -77,9 +77,11 @@ your-project/
77
77
  | `/check-frontend` | Check frontend code against guidelines |
78
78
  | `/check-backend` | Check backend code against guidelines |
79
79
  | `/record-agent-flow` | Record work progress (after human commits) |
80
+ | `/record-question` | Document a solved problem for future reference |
80
81
  | `/onboard-developer` | Guide new developer through setup |
81
82
  | `/update-frontend-structure` | Update frontend guidelines if new patterns found |
82
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 |
83
85
 
84
86
  ## Workflow
85
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,CActD"}
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"}
@@ -8,6 +8,7 @@ export function getCommandTemplates() {
8
8
  "check-frontend": getCheckFrontendTemplate(),
9
9
  "check-backend": getCheckBackendTemplate(),
10
10
  "record-agent-flow": getRecordAgentFlowTemplate(),
11
+ "record-question": getRecordQuestionTemplate(),
11
12
  "onboard-developer": getOnboardDeveloperTemplate(),
12
13
  "generate-frontend-structure": getGenerateFrontendStructureTemplate(),
13
14
  "generate-backend-structure": getGenerateBackendStructureTemplate(),
@@ -15,6 +16,7 @@ export function getCommandTemplates() {
15
16
  "before-backend-dev": getBeforeBackendDevTemplate(),
16
17
  "update-frontend-structure": getUpdateFrontendStructureTemplate(),
17
18
  "update-backend-structure": getUpdateBackendStructureTemplate(),
19
+ "create-command": getCreateCommandTemplate(),
18
20
  };
19
21
  }
20
22
  function getInitAgentTemplate() {
@@ -802,4 +804,201 @@ Execute these steps:
802
804
  Only update if there are genuine new patterns worth documenting.
803
805
  `;
804
806
  }
807
+ function getRecordQuestionTemplate() {
808
+ return `Record the problem you just solved in \`workflow/big-question/\` directory.
809
+
810
+ Create a new markdown file with a descriptive name (e.g., \`issue-name.md\`) that documents:
811
+
812
+ 1. **Problem Description**: What was the issue?
813
+ 2. **Initial Attempts**: What did you try first?
814
+ 3. **Why Initial Attempts Failed**: Why didn't the first approaches work?
815
+ 4. **Final Solution**: What ultimately solved the problem?
816
+ 5. **Why It Worked**: What made this solution effective?
817
+ 6. **Key Insight**: How did you arrive at this solution? What was the "aha" moment?
818
+
819
+ This creates a knowledge base of solved problems for future reference, helping you and other developers avoid the same pitfalls.
820
+
821
+ **Format**:
822
+ \`\`\`markdown
823
+ # [Problem Title]
824
+
825
+ ## Problem Description
826
+ [Describe the issue clearly]
827
+
828
+ ## Initial Attempts
829
+ 1. [First attempt]
830
+ 2. [Second attempt]
831
+ ...
832
+
833
+ ## Why Initial Attempts Failed
834
+ [Explain why each attempt didn't work]
835
+
836
+ ## Final Solution
837
+ [Describe what fixed the problem]
838
+
839
+ ## Why It Worked
840
+ [Explain the root cause and why this solution addresses it]
841
+
842
+ ## Key Insight
843
+ [What did you learn? How can this be applied in the future?]
844
+ \`\`\`
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
+ }
805
1004
  //# sourceMappingURL=templates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,UAAU,mBAAmB;IAClC,OAAO;QACN,YAAY,EAAE,oBAAoB,EAAE;QACpC,gBAAgB,EAAE,wBAAwB,EAAE;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;;;;CASP,CAAC;AACF,CAAC;AAED,SAAS,2BAA2B;IACnC,OAAO;;;;;;;;;CASP,CAAC;AACF,CAAC;AAED,SAAS,kCAAkC;IAC1C,OAAO;;;;;;;;;;;;;;;CAeP,CAAC;AACF,CAAC;AAED,SAAS,iCAAiC;IACzC,OAAO;;;;;;;;;;;;;;;CAeP,CAAC;AACF,CAAC;AAED,SAAS,yBAAyB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCP,CAAC;AACF,CAAC;AAED,SAAS,wBAAwB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0JP,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mind-fold/open-flow",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "AI-assisted development workflow initializer for Cursor, Claude Code and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",