@mind-fold/open-flow 0.1.15 → 0.2.1
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/dist/configurators/templates.d.ts.map +1 -1
- package/dist/configurators/templates.js +19 -6
- package/dist/configurators/templates.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +82 -6
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/templates/commands/break-loop.txt +107 -0
- package/dist/templates/commands/check-cross-layer.txt +153 -0
- package/dist/templates/commands/extract-llm-docs.txt +218 -0
- package/dist/templates/commands/extract-to-rules.txt +433 -0
- package/dist/templates/commands/finish-work.txt +129 -0
- package/dist/templates/commands/index.d.ts +11 -5
- package/dist/templates/commands/index.d.ts.map +1 -1
- package/dist/templates/commands/index.js +18 -5
- package/dist/templates/commands/index.js.map +1 -1
- package/dist/templates/commands/init-agent.txt +100 -9
- package/dist/templates/commands/sync-from-runtime.txt +140 -0
- package/dist/templates/markdown/flow.md.txt +96 -84
- package/dist/templates/markdown/index.d.ts +21 -4
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +27 -4
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/structure/backend/database-guidelines.md.txt +247 -0
- package/dist/templates/markdown/structure/backend/directory-structure.md.txt +153 -0
- package/dist/templates/markdown/structure/backend/error-handling.md.txt +257 -0
- package/dist/templates/markdown/structure/backend/index.md.txt +88 -0
- package/dist/templates/markdown/structure/backend/logging-guidelines.md.txt +212 -0
- package/dist/templates/markdown/structure/backend/quality-guidelines.md.txt +219 -0
- package/dist/templates/markdown/structure/backend/type-safety.md.txt +192 -0
- package/dist/templates/markdown/structure/flows/code-reuse-thinking-guide.md.txt +343 -0
- package/dist/templates/markdown/structure/flows/cross-layer-thinking-guide.md.txt +283 -0
- package/dist/templates/markdown/structure/flows/index.md.txt +133 -0
- package/dist/templates/markdown/structure/flows/pre-implementation-checklist.md.txt +182 -0
- package/dist/templates/markdown/structure/flows/spec-flow-template.md.txt +145 -0
- package/dist/templates/markdown/structure/frontend/component-guidelines.md.txt +335 -0
- package/dist/templates/markdown/structure/frontend/directory-structure.md.txt +172 -0
- package/dist/templates/markdown/structure/frontend/hook-guidelines.md.txt +287 -0
- package/dist/templates/markdown/structure/frontend/index.md.txt +91 -0
- package/dist/templates/markdown/structure/frontend/quality-guidelines.md.txt +274 -0
- package/dist/templates/markdown/structure/frontend/state-management.md.txt +293 -0
- package/dist/templates/markdown/structure/frontend/type-safety.md.txt +275 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,MAAM,WAAW,gBAAgB;IAChC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAoCtD"}
|
|
@@ -2,23 +2,36 @@
|
|
|
2
2
|
* Short command templates for AI assistants
|
|
3
3
|
* These are the core commands that enable AI-assisted development workflow
|
|
4
4
|
*/
|
|
5
|
-
import { initAgentTemplate, checkFrontendTemplate, checkBackendTemplate, recordAgentFlowTemplate, recordQuestionTemplate, onboardDeveloperTemplate, generateFrontendStructureTemplate, generateBackendStructureTemplate, beforeFrontendDevTemplate, beforeBackendDevTemplate, updateFrontendStructureTemplate, updateBackendStructureTemplate, createCommandTemplate, integrateSkillTemplate, } from "../templates/commands/index.js";
|
|
5
|
+
import { initAgentTemplate, checkFrontendTemplate, checkBackendTemplate, checkCrossLayerTemplate, recordAgentFlowTemplate, recordQuestionTemplate, onboardDeveloperTemplate, generateFrontendStructureTemplate, generateBackendStructureTemplate, beforeFrontendDevTemplate, beforeBackendDevTemplate, updateFrontendStructureTemplate, updateBackendStructureTemplate, createCommandTemplate, integrateSkillTemplate, extractLlmDocsTemplate, extractToRulesTemplate, finishWorkTemplate, breakLoopTemplate, syncFromRuntimeTemplate, } from "../templates/commands/index.js";
|
|
6
6
|
export function getCommandTemplates() {
|
|
7
7
|
return {
|
|
8
|
+
// Core workflow
|
|
8
9
|
"init-agent": initAgentTemplate,
|
|
9
|
-
"check-frontend": checkFrontendTemplate,
|
|
10
|
-
"check-backend": checkBackendTemplate,
|
|
11
10
|
"record-agent-flow": recordAgentFlowTemplate,
|
|
12
|
-
"record-question": recordQuestionTemplate,
|
|
13
11
|
"onboard-developer": onboardDeveloperTemplate,
|
|
14
|
-
|
|
15
|
-
"
|
|
12
|
+
// Development checks
|
|
13
|
+
"check-frontend": checkFrontendTemplate,
|
|
14
|
+
"check-backend": checkBackendTemplate,
|
|
15
|
+
"check-cross-layer": checkCrossLayerTemplate,
|
|
16
|
+
// Pre-development
|
|
16
17
|
"before-frontend-dev": beforeFrontendDevTemplate,
|
|
17
18
|
"before-backend-dev": beforeBackendDevTemplate,
|
|
19
|
+
// Structure generation
|
|
20
|
+
"generate-frontend-structure": generateFrontendStructureTemplate,
|
|
21
|
+
"generate-backend-structure": generateBackendStructureTemplate,
|
|
18
22
|
"update-frontend-structure": updateFrontendStructureTemplate,
|
|
19
23
|
"update-backend-structure": updateBackendStructureTemplate,
|
|
24
|
+
// Work completion
|
|
25
|
+
"finish-work": finishWorkTemplate,
|
|
26
|
+
"break-loop": breakLoopTemplate,
|
|
27
|
+
// Utilities
|
|
20
28
|
"create-command": createCommandTemplate,
|
|
21
29
|
"integrate-skill": integrateSkillTemplate,
|
|
30
|
+
"extract-llm-docs": extractLlmDocsTemplate,
|
|
31
|
+
"extract-to-rules": extractToRulesTemplate,
|
|
32
|
+
"record-question": recordQuestionTemplate,
|
|
33
|
+
// Knowledge sync
|
|
34
|
+
"sync-from-runtime": syncFromRuntimeTemplate,
|
|
22
35
|
};
|
|
23
36
|
}
|
|
24
37
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,EACjC,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/configurators/templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,EACjC,gCAAgC,EAChC,yBAAyB,EACzB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,GACvB,MAAM,gCAAgC,CAAC;AAMxC,MAAM,UAAU,mBAAmB;IAClC,OAAO;QACN,gBAAgB;QAChB,YAAY,EAAE,iBAAiB;QAC/B,mBAAmB,EAAE,uBAAuB;QAC5C,mBAAmB,EAAE,wBAAwB;QAE7C,qBAAqB;QACrB,gBAAgB,EAAE,qBAAqB;QACvC,eAAe,EAAE,oBAAoB;QACrC,mBAAmB,EAAE,uBAAuB;QAE5C,kBAAkB;QAClB,qBAAqB,EAAE,yBAAyB;QAChD,oBAAoB,EAAE,wBAAwB;QAE9C,uBAAuB;QACvB,6BAA6B,EAAE,iCAAiC;QAChE,4BAA4B,EAAE,gCAAgC;QAC9D,2BAA2B,EAAE,+BAA+B;QAC5D,0BAA0B,EAAE,8BAA8B;QAE1D,kBAAkB;QAClB,aAAa,EAAE,kBAAkB;QACjC,YAAY,EAAE,iBAAiB;QAE/B,YAAY;QACZ,gBAAgB,EAAE,qBAAqB;QACvC,iBAAiB,EAAE,sBAAsB;QACzC,kBAAkB,EAAE,sBAAsB;QAC1C,kBAAkB,EAAE,sBAAsB;QAC1C,iBAAiB,EAAE,sBAAsB;QAEzC,iBAAiB;QACjB,mBAAmB,EAAE,uBAAuB;KAC5C,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA4CA,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BxE"}
|
|
@@ -2,7 +2,13 @@ import path from "node:path";
|
|
|
2
2
|
// Import script templates
|
|
3
3
|
import { initDeveloperScript, getDeveloperScript, extractMdHeadingsScript, featureScript, getContextScript, updateIndexScript, addSessionScript, } from "../templates/scripts/index.js";
|
|
4
4
|
// Import markdown templates
|
|
5
|
-
import { agentProgressIndexContent,
|
|
5
|
+
import { agentProgressIndexContent, flowMdContent, workflowGitignoreContent,
|
|
6
|
+
// Backend structure (multi-doc)
|
|
7
|
+
backendIndexContent, backendDirectoryStructureContent, backendTypeSafetyContent, backendDatabaseGuidelinesContent, backendLoggingGuidelinesContent, backendQualityGuidelinesContent, backendErrorHandlingContent,
|
|
8
|
+
// Frontend structure (multi-doc)
|
|
9
|
+
frontendIndexContent, frontendDirectoryStructureContent, frontendTypeSafetyContent, frontendHookGuidelinesContent, frontendComponentGuidelinesContent, frontendQualityGuidelinesContent, frontendStateManagementContent,
|
|
10
|
+
// Flows structure
|
|
11
|
+
flowsIndexContent, flowsCrossLayerThinkingGuideContent, flowsSpecFlowTemplateContent, flowsPreImplementationChecklistContent, flowsCodeReuseThinkingGuideContent, } from "../templates/markdown/index.js";
|
|
6
12
|
import { writeFile, ensureDir } from "../utils/file-writer.js";
|
|
7
13
|
export async function createWorkflowStructure(cwd) {
|
|
8
14
|
// Create directories
|
|
@@ -13,6 +19,7 @@ export async function createWorkflowStructure(cwd) {
|
|
|
13
19
|
"workflow/structure",
|
|
14
20
|
"workflow/structure/frontend",
|
|
15
21
|
"workflow/structure/backend",
|
|
22
|
+
"workflow/structure/flows",
|
|
16
23
|
];
|
|
17
24
|
for (const dir of dirs) {
|
|
18
25
|
ensureDir(path.join(cwd, dir));
|
|
@@ -21,7 +28,7 @@ export async function createWorkflowStructure(cwd) {
|
|
|
21
28
|
await createScripts(cwd);
|
|
22
29
|
// Create agent-progress index
|
|
23
30
|
await createAgentProgressIndex(cwd);
|
|
24
|
-
// Create structure templates
|
|
31
|
+
// Create structure templates (multi-doc format)
|
|
25
32
|
await createStructureTemplates(cwd);
|
|
26
33
|
// Create flow.md
|
|
27
34
|
await createFlowMd(cwd);
|
|
@@ -47,10 +54,79 @@ async function createAgentProgressIndex(cwd) {
|
|
|
47
54
|
await writeFile(path.join(cwd, "workflow/agent-progress/index.md"), agentProgressIndexContent);
|
|
48
55
|
}
|
|
49
56
|
async function createStructureTemplates(cwd) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
// Backend structure (multi-doc format)
|
|
58
|
+
const backendDocs = [
|
|
59
|
+
{ name: "index.md", content: backendIndexContent },
|
|
60
|
+
{
|
|
61
|
+
name: "directory-structure.md",
|
|
62
|
+
content: backendDirectoryStructureContent,
|
|
63
|
+
},
|
|
64
|
+
{ name: "type-safety.md", content: backendTypeSafetyContent },
|
|
65
|
+
{
|
|
66
|
+
name: "database-guidelines.md",
|
|
67
|
+
content: backendDatabaseGuidelinesContent,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "logging-guidelines.md",
|
|
71
|
+
content: backendLoggingGuidelinesContent,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "quality-guidelines.md",
|
|
75
|
+
content: backendQualityGuidelinesContent,
|
|
76
|
+
},
|
|
77
|
+
{ name: "error-handling.md", content: backendErrorHandlingContent },
|
|
78
|
+
];
|
|
79
|
+
for (const doc of backendDocs) {
|
|
80
|
+
await writeFile(path.join(cwd, "workflow/structure/backend", doc.name), doc.content);
|
|
81
|
+
}
|
|
82
|
+
// Frontend structure (multi-doc format)
|
|
83
|
+
const frontendDocs = [
|
|
84
|
+
{ name: "index.md", content: frontendIndexContent },
|
|
85
|
+
{
|
|
86
|
+
name: "directory-structure.md",
|
|
87
|
+
content: frontendDirectoryStructureContent,
|
|
88
|
+
},
|
|
89
|
+
{ name: "type-safety.md", content: frontendTypeSafetyContent },
|
|
90
|
+
{ name: "hook-guidelines.md", content: frontendHookGuidelinesContent },
|
|
91
|
+
{
|
|
92
|
+
name: "component-guidelines.md",
|
|
93
|
+
content: frontendComponentGuidelinesContent,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "quality-guidelines.md",
|
|
97
|
+
content: frontendQualityGuidelinesContent,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "state-management.md",
|
|
101
|
+
content: frontendStateManagementContent,
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
for (const doc of frontendDocs) {
|
|
105
|
+
await writeFile(path.join(cwd, "workflow/structure/frontend", doc.name), doc.content);
|
|
106
|
+
}
|
|
107
|
+
// Flows structure
|
|
108
|
+
const flowsDocs = [
|
|
109
|
+
{ name: "index.md", content: flowsIndexContent },
|
|
110
|
+
{
|
|
111
|
+
name: "cross-layer-thinking-guide.md",
|
|
112
|
+
content: flowsCrossLayerThinkingGuideContent,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "spec-flow-template.md",
|
|
116
|
+
content: flowsSpecFlowTemplateContent,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "pre-implementation-checklist.md",
|
|
120
|
+
content: flowsPreImplementationChecklistContent,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "code-reuse-thinking-guide.md",
|
|
124
|
+
content: flowsCodeReuseThinkingGuideContent,
|
|
125
|
+
},
|
|
126
|
+
];
|
|
127
|
+
for (const doc of flowsDocs) {
|
|
128
|
+
await writeFile(path.join(cwd, "workflow/structure/flows", doc.name), doc.content);
|
|
129
|
+
}
|
|
54
130
|
}
|
|
55
131
|
async function createFlowMd(cwd) {
|
|
56
132
|
await writeFile(path.join(cwd, "workflow/flow.md"), flowMdContent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,0BAA0B;AAC1B,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,+BAA+B,CAAC;AAEvC,4BAA4B;AAC5B,OAAO,EACN,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,0BAA0B;AAC1B,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GAChB,MAAM,+BAA+B,CAAC;AAEvC,4BAA4B;AAC5B,OAAO,EACN,yBAAyB,EACzB,aAAa,EACb,wBAAwB;AACxB,gCAAgC;AAChC,mBAAmB,EACnB,gCAAgC,EAChC,wBAAwB,EACxB,gCAAgC,EAChC,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B;AAC3B,iCAAiC;AACjC,oBAAoB,EACpB,iCAAiC,EACjC,yBAAyB,E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I,CAAC,IAAI,CAAC,GAAG,EAAE,0BAA0B,EAAE,GAAG,CAAC,IAAI,CAAC,EACpD,GAAG,CAAC,OAAO,CACX,CAAC;IACH,CAAC;AACF,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,GAAW;IACtC,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,kBAAkB,CAAC,EAAE,aAAa,CAAC,CAAC;AACpE,CAAC;AAED,KAAK,UAAU,uBAAuB,CAAC,GAAW;IACjD,MAAM,SAAS,CACd,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC,EACrC,wBAAwB,CACxB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Break the Loop - Deep Bug Analysis
|
|
2
|
+
|
|
3
|
+
When debug is complete, use this command for deep analysis to break the "fix bug → forget → repeat" cycle.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Analysis Framework
|
|
8
|
+
|
|
9
|
+
Analyze the bug you just fixed from these 5 dimensions:
|
|
10
|
+
|
|
11
|
+
### 1. Root Cause Category
|
|
12
|
+
|
|
13
|
+
Which category does this bug belong to?
|
|
14
|
+
|
|
15
|
+
| Category | Characteristics | Example |
|
|
16
|
+
|----------|-----------------|---------|
|
|
17
|
+
| **A. Missing Spec** | No documentation on how to do it | New feature without checklist |
|
|
18
|
+
| **B. Cross-Layer Contract** | Interface between layers unclear | API returns different format than expected |
|
|
19
|
+
| **C. Change Propagation Failure** | Changed one place, missed others | Changed function signature, missed call sites |
|
|
20
|
+
| **D. Test Coverage Gap** | Unit test passes, integration fails | Works alone, breaks when combined |
|
|
21
|
+
| **E. Implicit Assumption** | Code relies on undocumented assumption | Timestamp seconds vs milliseconds |
|
|
22
|
+
|
|
23
|
+
### 2. Why Fixes Failed (if applicable)
|
|
24
|
+
|
|
25
|
+
If you tried multiple fixes before succeeding, analyze each failure:
|
|
26
|
+
|
|
27
|
+
- **Surface Fix**: Fixed symptom, not root cause
|
|
28
|
+
- **Incomplete Scope**: Found root cause, didn't cover all cases
|
|
29
|
+
- **Tool Limitation**: grep missed it, type check wasn't strict
|
|
30
|
+
- **Mental Model**: Kept looking in same layer, didn't think cross-layer
|
|
31
|
+
|
|
32
|
+
### 3. Prevention Mechanisms
|
|
33
|
+
|
|
34
|
+
What mechanisms would prevent this from happening again?
|
|
35
|
+
|
|
36
|
+
| Type | Description | Example |
|
|
37
|
+
|------|-------------|---------|
|
|
38
|
+
| **Documentation** | Write it down so people know | Update thinking guide |
|
|
39
|
+
| **Architecture** | Make the error impossible structurally | Type-safe wrappers |
|
|
40
|
+
| **Compile-time** | TypeScript strict, no any | Signature change causes compile error |
|
|
41
|
+
| **Runtime** | Monitoring, alerts, scans | Detect orphan entities |
|
|
42
|
+
| **Test Coverage** | E2E tests, integration tests | Verify full flow |
|
|
43
|
+
| **Code Review** | Checklist, PR template | "Did you check X?" |
|
|
44
|
+
|
|
45
|
+
### 4. Systematic Expansion
|
|
46
|
+
|
|
47
|
+
What broader problems does this bug reveal?
|
|
48
|
+
|
|
49
|
+
- **Similar Issues**: Where else might this problem exist?
|
|
50
|
+
- **Design Flaw**: Is there a fundamental architecture issue?
|
|
51
|
+
- **Process Flaw**: Is there a development process improvement?
|
|
52
|
+
- **Knowledge Gap**: Is the team missing some understanding?
|
|
53
|
+
|
|
54
|
+
### 5. Knowledge Capture
|
|
55
|
+
|
|
56
|
+
Solidify insights into the system:
|
|
57
|
+
|
|
58
|
+
- [ ] Update `workflow/structure/flows/` thinking guides
|
|
59
|
+
- [ ] Update `workflow/structure/backend/` or `frontend/` docs
|
|
60
|
+
- [ ] Create issue record (if applicable)
|
|
61
|
+
- [ ] Create feature ticket for root fix
|
|
62
|
+
- [ ] Update check commands if needed
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Output Format
|
|
67
|
+
|
|
68
|
+
Please output analysis in this format:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
## Bug Analysis: [Short Description]
|
|
72
|
+
|
|
73
|
+
### 1. Root Cause Category
|
|
74
|
+
- **Category**: [A/B/C/D/E] - [Category Name]
|
|
75
|
+
- **Specific Cause**: [Detailed description]
|
|
76
|
+
|
|
77
|
+
### 2. Why Fixes Failed (if applicable)
|
|
78
|
+
1. [First attempt]: [Why it failed]
|
|
79
|
+
2. [Second attempt]: [Why it failed]
|
|
80
|
+
...
|
|
81
|
+
|
|
82
|
+
### 3. Prevention Mechanisms
|
|
83
|
+
| Priority | Mechanism | Specific Action | Status |
|
|
84
|
+
|----------|-----------|-----------------|--------|
|
|
85
|
+
| P0 | ... | ... | TODO/DONE |
|
|
86
|
+
|
|
87
|
+
### 4. Systematic Expansion
|
|
88
|
+
- **Similar Issues**: [List places with similar problems]
|
|
89
|
+
- **Design Improvement**: [Architecture-level suggestions]
|
|
90
|
+
- **Process Improvement**: [Development process suggestions]
|
|
91
|
+
|
|
92
|
+
### 5. Knowledge Capture
|
|
93
|
+
- [ ] [Documents to update / tickets to create]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Core Philosophy
|
|
99
|
+
|
|
100
|
+
> **The value of debugging is not in fixing the bug, but in making this class of bugs never happen again.**
|
|
101
|
+
|
|
102
|
+
Three levels of insight:
|
|
103
|
+
1. **Tactical**: How to fix THIS bug
|
|
104
|
+
2. **Strategic**: How to prevent THIS CLASS of bugs
|
|
105
|
+
3. **Philosophical**: How to expand thinking patterns
|
|
106
|
+
|
|
107
|
+
30 minutes of analysis saves 30 hours of future debugging.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Cross-Layer Check
|
|
2
|
+
|
|
3
|
+
Check if your changes considered all dimensions. Most bugs come from "didn't think of it", not lack of technical skill.
|
|
4
|
+
|
|
5
|
+
> **Note**: This is a **post-implementation** safety net. Ideally, read the [Pre-Implementation Checklist](workflow/structure/flows/pre-implementation-checklist.md) **before** writing code.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Related Documents
|
|
10
|
+
|
|
11
|
+
| Document | Purpose | Timing |
|
|
12
|
+
|----------|---------|--------|
|
|
13
|
+
| [Pre-Implementation Checklist](workflow/structure/flows/pre-implementation-checklist.md) | Questions before coding | **Before** writing code |
|
|
14
|
+
| [Code Reuse Thinking Guide](workflow/structure/flows/code-reuse-thinking-guide.md) | Pattern recognition | During implementation |
|
|
15
|
+
| **`/check-cross-layer`** (this) | Verification check | **After** implementation |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Execution Steps
|
|
20
|
+
|
|
21
|
+
### 1. Identify Change Scope
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git status
|
|
25
|
+
git diff --name-only
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Select Applicable Check Dimensions
|
|
29
|
+
|
|
30
|
+
Based on your change type, execute relevant checks below:
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Dimension A: Cross-Layer Data Flow (Required when 3+ layers)
|
|
35
|
+
|
|
36
|
+
**Trigger**: Changes involve 3 or more layers
|
|
37
|
+
|
|
38
|
+
| Layer | Identifier |
|
|
39
|
+
|-------|------------|
|
|
40
|
+
| API Route | `routes/`, `api/` |
|
|
41
|
+
| Service | `services/`, `lib/` |
|
|
42
|
+
| Database | `db/`, `schema` |
|
|
43
|
+
| Hook | `hooks/`, `use*.ts` |
|
|
44
|
+
| Component | `components/`, `*.tsx` |
|
|
45
|
+
| Utility | `utils/`, `lib/` |
|
|
46
|
+
|
|
47
|
+
**Checklist**:
|
|
48
|
+
- [ ] Read flow: Database → Service → API → Hook → Component
|
|
49
|
+
- [ ] Write flow: Component → Hook → API → Service → Database
|
|
50
|
+
- [ ] Types correctly passed between layers?
|
|
51
|
+
- [ ] Errors properly propagated to UI?
|
|
52
|
+
- [ ] Loading states handled at each layer?
|
|
53
|
+
|
|
54
|
+
**Detailed Guide**: `workflow/structure/flows/cross-layer-thinking-guide.md`
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Dimension B: Code Reuse (Required when modifying constants/config)
|
|
59
|
+
|
|
60
|
+
**Trigger**:
|
|
61
|
+
- Modifying UI constants (label, icon, color)
|
|
62
|
+
- Modifying any hardcoded value
|
|
63
|
+
- Seeing similar code in multiple places
|
|
64
|
+
- Creating a new utility/helper function
|
|
65
|
+
- Just finished batch modifications across files
|
|
66
|
+
|
|
67
|
+
**Checklist**:
|
|
68
|
+
- [ ] Search first: How many places define this value?
|
|
69
|
+
```bash
|
|
70
|
+
grep -r "value-to-change" --include="*.ts" --include="*.tsx"
|
|
71
|
+
```
|
|
72
|
+
- [ ] If 2+ places define same value → Should extract to shared constant
|
|
73
|
+
- [ ] After modification, all usage sites updated?
|
|
74
|
+
- [ ] If creating utility: Does similar utility already exist?
|
|
75
|
+
|
|
76
|
+
**Detailed Guide**: `workflow/structure/flows/code-reuse-thinking-guide.md`
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Dimension B2: New Utility Functions
|
|
81
|
+
|
|
82
|
+
**Trigger**: About to create a new utility/helper function
|
|
83
|
+
|
|
84
|
+
**Checklist**:
|
|
85
|
+
- [ ] Search for existing similar utilities first
|
|
86
|
+
```bash
|
|
87
|
+
grep -r "functionNamePattern" --include="*.ts"
|
|
88
|
+
```
|
|
89
|
+
- [ ] If similar exists, can you extend it instead?
|
|
90
|
+
- [ ] If creating new, is it in the right location (shared vs domain-specific)?
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Dimension B3: After Batch Modifications
|
|
95
|
+
|
|
96
|
+
**Trigger**: Just modified similar patterns in multiple files
|
|
97
|
+
|
|
98
|
+
**Checklist**:
|
|
99
|
+
- [ ] Did you check ALL files with similar patterns?
|
|
100
|
+
```bash
|
|
101
|
+
grep -r "patternYouChanged" --include="*.ts" --include="*.tsx"
|
|
102
|
+
```
|
|
103
|
+
- [ ] Any files missed that should also be updated?
|
|
104
|
+
- [ ] Should this pattern be abstracted to prevent future duplication?
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Dimension C: Import Paths (Required when creating new files)
|
|
109
|
+
|
|
110
|
+
**Trigger**: Creating new .ts/.tsx files
|
|
111
|
+
|
|
112
|
+
**Checklist**:
|
|
113
|
+
- [ ] Using correct path aliases?
|
|
114
|
+
- [ ] No circular imports?
|
|
115
|
+
- [ ] Relative vs absolute paths consistent with project convention?
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Dimension D: Same-Layer Consistency
|
|
120
|
+
|
|
121
|
+
**Trigger**:
|
|
122
|
+
- Modifying display logic in a component
|
|
123
|
+
- Same domain concept used in multiple components
|
|
124
|
+
|
|
125
|
+
**Checklist**:
|
|
126
|
+
- [ ] Search for other components using same concept
|
|
127
|
+
```bash
|
|
128
|
+
grep -r "ConceptName" --include="*.tsx"
|
|
129
|
+
```
|
|
130
|
+
- [ ] Are these components' displays consistent?
|
|
131
|
+
- [ ] Should they share configuration?
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Common Issues Quick Reference
|
|
136
|
+
|
|
137
|
+
| Issue | Root Cause | Prevention |
|
|
138
|
+
|-------|------------|------------|
|
|
139
|
+
| Changed one place, missed others | Didn't search impact scope | `grep` before changing |
|
|
140
|
+
| Data lost at some layer | Didn't check data flow | Trace data source to destination |
|
|
141
|
+
| Type mismatch | Cross-layer types inconsistent | Use shared types |
|
|
142
|
+
| UI inconsistent | Same concept in multiple places | Extract shared constants |
|
|
143
|
+
| Similar utility exists | Didn't search first | Search before creating |
|
|
144
|
+
| Batch fix incomplete | Didn't verify all occurrences | grep after fixing |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Output
|
|
149
|
+
|
|
150
|
+
Report:
|
|
151
|
+
1. Which dimensions your changes involve
|
|
152
|
+
2. Check results for each dimension
|
|
153
|
+
3. Issues found and fix suggestions
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Extract Development Guidelines from LLM Documents
|
|
2
|
+
|
|
3
|
+
Extract development guidelines from external service llms.txt or other LLM-friendly documentation and integrate them into your project's structure documentation.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/extract-llm-docs <url-or-service-name>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Examples**:
|
|
12
|
+
```
|
|
13
|
+
/extract-llm-docs https://docs.stripe.com/llms.txt
|
|
14
|
+
/extract-llm-docs vercel
|
|
15
|
+
/extract-llm-docs https://supabase.com/llms.txt
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Core Principle
|
|
19
|
+
|
|
20
|
+
> ⚠️ **Important**: The extracted content should be **development guidelines**, not direct project code.
|
|
21
|
+
>
|
|
22
|
+
> - Guidelines content → Write to `workflow/structure/{target}/doc.md`
|
|
23
|
+
> - Code examples → Place in `workflow/structure/{target}/examples/services/<service-name>/`
|
|
24
|
+
> - Example files → Use `.template` suffix to avoid IDE errors
|
|
25
|
+
>
|
|
26
|
+
> Where `{target}` is `frontend` or `backend`, determined by service type.
|
|
27
|
+
|
|
28
|
+
## Execution Steps
|
|
29
|
+
|
|
30
|
+
### 1. Fetch LLM Documentation
|
|
31
|
+
|
|
32
|
+
**Method A: Direct URL**
|
|
33
|
+
```bash
|
|
34
|
+
curl <url>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Method B: Common service llms.txt locations**
|
|
38
|
+
|
|
39
|
+
| Service | llms.txt URL |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| Vercel | `https://vercel.com/llms.txt` |
|
|
42
|
+
| Supabase | `https://supabase.com/llms.txt` |
|
|
43
|
+
| Stripe | `https://docs.stripe.com/llms.txt` |
|
|
44
|
+
| Cloudflare | `https://developers.cloudflare.com/llms.txt` |
|
|
45
|
+
| Resend | `https://resend.com/llms.txt` |
|
|
46
|
+
|
|
47
|
+
**Method C: Guess URL**
|
|
48
|
+
```
|
|
49
|
+
https://<service>.com/llms.txt
|
|
50
|
+
https://docs.<service>.com/llms.txt
|
|
51
|
+
https://developers.<service>.com/llms.txt
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Parse Document Structure
|
|
55
|
+
|
|
56
|
+
llms.txt standard format:
|
|
57
|
+
```markdown
|
|
58
|
+
# Project Name
|
|
59
|
+
|
|
60
|
+
> Brief description
|
|
61
|
+
|
|
62
|
+
## Core Documentation
|
|
63
|
+
- [Quick Start](url): Getting started guide
|
|
64
|
+
- [API Reference](url): API documentation
|
|
65
|
+
|
|
66
|
+
## Optional
|
|
67
|
+
- [Blog](url): Optional content
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 3. Determine Integration Target
|
|
71
|
+
|
|
72
|
+
Based on service type, determine where to write:
|
|
73
|
+
|
|
74
|
+
| Service Type | Integration Target |
|
|
75
|
+
|--------------|-------------------|
|
|
76
|
+
| UI components (shadcn, radix) | `workflow/structure/frontend/` |
|
|
77
|
+
| Backend services (supabase, stripe) | `workflow/structure/backend/` |
|
|
78
|
+
| Full-stack frameworks (vercel, next.js) | May involve both |
|
|
79
|
+
| Email services (resend) | `workflow/structure/backend/` |
|
|
80
|
+
| Storage services (cloudflare r2) | `workflow/structure/backend/` |
|
|
81
|
+
|
|
82
|
+
### 4. Extract Key Guidelines
|
|
83
|
+
|
|
84
|
+
Extract the following from documentation:
|
|
85
|
+
|
|
86
|
+
| Category | Content to Extract |
|
|
87
|
+
|----------|-------------------|
|
|
88
|
+
| **Initialization** | Install commands, configuration methods |
|
|
89
|
+
| **Core API** | Main function/method usage patterns |
|
|
90
|
+
| **Type Definitions** | TypeScript type import methods |
|
|
91
|
+
| **Best Practices** | Recommended usage patterns |
|
|
92
|
+
| **Common Errors** | Error handling, edge cases |
|
|
93
|
+
| **Project Adaptation** | How to integrate with existing project conventions |
|
|
94
|
+
|
|
95
|
+
### 5. Execute Integration
|
|
96
|
+
|
|
97
|
+
#### 5.1 Update Guidelines Document
|
|
98
|
+
|
|
99
|
+
Add a new section to the corresponding `doc.md`:
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
@@@section:service-<service-name>
|
|
103
|
+
## 🔌 <Service Name> Integration Guide
|
|
104
|
+
|
|
105
|
+
### Overview
|
|
106
|
+
[Core functionality and use cases of the service]
|
|
107
|
+
|
|
108
|
+
### Installation & Configuration
|
|
109
|
+
[Install commands and environment configuration]
|
|
110
|
+
|
|
111
|
+
### Usage Patterns
|
|
112
|
+
|
|
113
|
+
#### Basic Usage
|
|
114
|
+
[Code examples]
|
|
115
|
+
|
|
116
|
+
#### Advanced Usage
|
|
117
|
+
[Code examples]
|
|
118
|
+
|
|
119
|
+
### Type Definitions
|
|
120
|
+
[How to import and use types]
|
|
121
|
+
|
|
122
|
+
### Error Handling
|
|
123
|
+
[Common errors and how to handle them]
|
|
124
|
+
|
|
125
|
+
### Project Adaptation
|
|
126
|
+
- [Integration points with existing conventions]
|
|
127
|
+
- [Notable differences to be aware of]
|
|
128
|
+
|
|
129
|
+
### Reference Examples
|
|
130
|
+
See `examples/services/<service-name>/`
|
|
131
|
+
|
|
132
|
+
### External Documentation
|
|
133
|
+
- [Official Docs](url)
|
|
134
|
+
|
|
135
|
+
@@@/section:service-<service-name>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
#### 5.2 Create Examples Directory (if code examples exist)
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
workflow/structure/{target}/
|
|
142
|
+
├── doc.md # Add service-related section
|
|
143
|
+
├── index.md # Update index
|
|
144
|
+
└── examples/
|
|
145
|
+
└── services/
|
|
146
|
+
└── <service-name>/
|
|
147
|
+
├── README.md # Example documentation
|
|
148
|
+
├── basic-usage.ts.template
|
|
149
|
+
└── advanced-usage.ts.template
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### 5.3 Update Index File
|
|
153
|
+
|
|
154
|
+
Add to the Quick Navigation table in `index.md`:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
| Using <Service> | <Section name> | `service-<service-name>` |
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### 6. Generate Integration Report
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## LLM Document Extraction Report: `<service-name>`
|
|
165
|
+
|
|
166
|
+
### 📋 Source
|
|
167
|
+
- **Document URL**: [llms.txt](url)
|
|
168
|
+
- **Service Type**: [Frontend/Backend/Full-stack]
|
|
169
|
+
- **Integration Target**: `workflow/structure/{target}/`
|
|
170
|
+
|
|
171
|
+
### 📚 Extracted Content
|
|
172
|
+
|
|
173
|
+
| Category | Content |
|
|
174
|
+
|----------|---------|
|
|
175
|
+
| Initialization | [Install and config methods] |
|
|
176
|
+
| Core API | [Main usage patterns] |
|
|
177
|
+
| Type Definitions | [Type import methods] |
|
|
178
|
+
| Best Practices | [Recommended approaches] |
|
|
179
|
+
|
|
180
|
+
### 📁 Integration Locations
|
|
181
|
+
|
|
182
|
+
| Type | Path |
|
|
183
|
+
|------|------|
|
|
184
|
+
| Guidelines doc | `workflow/structure/{target}/doc.md` (section: `service-<name>`) |
|
|
185
|
+
| Code examples | `workflow/structure/{target}/examples/services/<name>/` |
|
|
186
|
+
| Index update | `workflow/structure/{target}/index.md` |
|
|
187
|
+
|
|
188
|
+
### ✅ Completed Changes
|
|
189
|
+
|
|
190
|
+
- [ ] Added `@@@section:service-<name>` section to `doc.md`
|
|
191
|
+
- [ ] Added index entry to `index.md`
|
|
192
|
+
- [ ] Created example files in `examples/services/<name>/`
|
|
193
|
+
- [ ] Example files use `.template` suffix
|
|
194
|
+
|
|
195
|
+
### 🔗 External Links
|
|
196
|
+
|
|
197
|
+
- [Official Documentation](url)
|
|
198
|
+
- [API Reference](url)
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Common Services Reference
|
|
203
|
+
|
|
204
|
+
| Service | Type | llms.txt |
|
|
205
|
+
|---------|------|----------|
|
|
206
|
+
| Vercel | Deployment | `vercel.com/llms.txt` |
|
|
207
|
+
| Supabase | Backend | `supabase.com/llms.txt` |
|
|
208
|
+
| Stripe | Payments | `docs.stripe.com/llms.txt` |
|
|
209
|
+
| Resend | Email | `resend.com/llms.txt` |
|
|
210
|
+
| Cloudflare | CDN/Storage | `developers.cloudflare.com/llms.txt` |
|
|
211
|
+
| Upstash | Redis/Kafka | `upstash.com/llms.txt` |
|
|
212
|
+
|
|
213
|
+
## Notes
|
|
214
|
+
|
|
215
|
+
1. **Prefer llms.txt**: More concise than full documentation, better suited for LLM context
|
|
216
|
+
2. **Focus on relevant content**: Only extract parts related to your project's tech stack
|
|
217
|
+
3. **Avoid duplication**: Check if a related section already exists before adding
|
|
218
|
+
4. **Keep updated**: Record document version or date for future updates
|