thatgfsj-code 0.5.0 → 0.7.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.
Files changed (185) hide show
  1. package/README.md +7 -12
  2. package/dist/app/index.d.ts +2 -0
  3. package/dist/app/index.d.ts.map +1 -1
  4. package/dist/app/index.js +11 -6
  5. package/dist/app/index.js.map +1 -1
  6. package/dist/cmd/index.d.ts +1 -2
  7. package/dist/cmd/index.d.ts.map +1 -1
  8. package/dist/cmd/index.js +26 -23
  9. package/dist/cmd/index.js.map +1 -1
  10. package/dist/config/index.d.ts.map +1 -1
  11. package/dist/config/index.js +1 -0
  12. package/dist/config/index.js.map +1 -1
  13. package/dist/config/types.d.ts +1 -0
  14. package/dist/config/types.d.ts.map +1 -1
  15. package/dist/prompts/index.d.ts +2 -0
  16. package/dist/prompts/index.d.ts.map +1 -1
  17. package/dist/prompts/index.js +7 -0
  18. package/dist/prompts/index.js.map +1 -1
  19. package/dist/skills/brainstorming.d.ts +3 -0
  20. package/dist/skills/brainstorming.d.ts.map +1 -0
  21. package/dist/skills/brainstorming.js +42 -0
  22. package/dist/skills/brainstorming.js.map +1 -0
  23. package/dist/skills/code-review.d.ts +3 -0
  24. package/dist/skills/code-review.d.ts.map +1 -0
  25. package/dist/skills/code-review.js +44 -0
  26. package/dist/skills/code-review.js.map +1 -0
  27. package/dist/skills/executing-plans.d.ts +3 -0
  28. package/dist/skills/executing-plans.d.ts.map +1 -0
  29. package/dist/skills/executing-plans.js +26 -0
  30. package/dist/skills/executing-plans.js.map +1 -0
  31. package/dist/skills/frontend-design.d.ts +3 -0
  32. package/dist/skills/frontend-design.d.ts.map +1 -0
  33. package/dist/skills/frontend-design.js +34 -0
  34. package/dist/skills/frontend-design.js.map +1 -0
  35. package/dist/skills/git-workflow.d.ts +3 -0
  36. package/dist/skills/git-workflow.d.ts.map +1 -0
  37. package/dist/skills/git-workflow.js +35 -0
  38. package/dist/skills/git-workflow.js.map +1 -0
  39. package/dist/skills/improve-architecture.d.ts +3 -0
  40. package/dist/skills/improve-architecture.d.ts.map +1 -0
  41. package/dist/skills/improve-architecture.js +37 -0
  42. package/dist/skills/improve-architecture.js.map +1 -0
  43. package/dist/skills/index.d.ts +50 -0
  44. package/dist/skills/index.d.ts.map +1 -0
  45. package/dist/skills/index.js +98 -0
  46. package/dist/skills/index.js.map +1 -0
  47. package/dist/skills/neuroweave.d.ts +3 -0
  48. package/dist/skills/neuroweave.d.ts.map +1 -0
  49. package/dist/skills/neuroweave.js +46 -0
  50. package/dist/skills/neuroweave.js.map +1 -0
  51. package/dist/skills/playwright.d.ts +3 -0
  52. package/dist/skills/playwright.d.ts.map +1 -0
  53. package/dist/skills/playwright.js +71 -0
  54. package/dist/skills/playwright.js.map +1 -0
  55. package/dist/skills/prototype.d.ts +3 -0
  56. package/dist/skills/prototype.d.ts.map +1 -0
  57. package/dist/skills/prototype.js +29 -0
  58. package/dist/skills/prototype.js.map +1 -0
  59. package/dist/skills/subagent.d.ts +3 -0
  60. package/dist/skills/subagent.d.ts.map +1 -0
  61. package/dist/skills/subagent.js +27 -0
  62. package/dist/skills/subagent.js.map +1 -0
  63. package/dist/skills/supabase.d.ts +3 -0
  64. package/dist/skills/supabase.d.ts.map +1 -0
  65. package/dist/skills/supabase.js +43 -0
  66. package/dist/skills/supabase.js.map +1 -0
  67. package/dist/skills/systematic-debugging.d.ts +3 -0
  68. package/dist/skills/systematic-debugging.d.ts.map +1 -0
  69. package/dist/skills/systematic-debugging.js +43 -0
  70. package/dist/skills/systematic-debugging.js.map +1 -0
  71. package/dist/skills/tdd.d.ts +3 -0
  72. package/dist/skills/tdd.d.ts.map +1 -0
  73. package/dist/skills/tdd.js +38 -0
  74. package/dist/skills/tdd.js.map +1 -0
  75. package/dist/skills/triage.d.ts +3 -0
  76. package/dist/skills/triage.d.ts.map +1 -0
  77. package/dist/skills/triage.js +34 -0
  78. package/dist/skills/triage.js.map +1 -0
  79. package/dist/skills/verification.d.ts +3 -0
  80. package/dist/skills/verification.d.ts.map +1 -0
  81. package/dist/skills/verification.js +30 -0
  82. package/dist/skills/verification.js.map +1 -0
  83. package/dist/skills/writing-plans.d.ts +3 -0
  84. package/dist/skills/writing-plans.d.ts.map +1 -0
  85. package/dist/skills/writing-plans.js +41 -0
  86. package/dist/skills/writing-plans.js.map +1 -0
  87. package/dist/tools/index.d.ts +1 -0
  88. package/dist/tools/index.d.ts.map +1 -1
  89. package/dist/tools/index.js +3 -0
  90. package/dist/tools/index.js.map +1 -1
  91. package/dist/tools/nwt.d.ts +70 -0
  92. package/dist/tools/nwt.d.ts.map +1 -0
  93. package/dist/tools/nwt.js +289 -0
  94. package/dist/tools/nwt.js.map +1 -0
  95. package/dist/tui/app.d.ts +9 -0
  96. package/dist/tui/app.d.ts.map +1 -0
  97. package/dist/tui/app.js +40 -0
  98. package/dist/tui/app.js.map +1 -0
  99. package/dist/tui/components/ChatList.d.ts +13 -0
  100. package/dist/tui/components/ChatList.d.ts.map +1 -0
  101. package/dist/tui/components/ChatList.js +11 -0
  102. package/dist/tui/components/ChatList.js.map +1 -0
  103. package/dist/tui/components/ChatMessage.d.ts +15 -0
  104. package/dist/tui/components/ChatMessage.d.ts.map +1 -0
  105. package/dist/tui/components/ChatMessage.js +17 -0
  106. package/dist/tui/components/ChatMessage.js.map +1 -0
  107. package/dist/tui/components/Header.d.ts +9 -0
  108. package/dist/tui/components/Header.d.ts.map +1 -0
  109. package/dist/tui/components/Header.js +6 -0
  110. package/dist/tui/components/Header.js.map +1 -0
  111. package/dist/tui/components/Markdown.d.ts +8 -0
  112. package/dist/tui/components/Markdown.d.ts.map +1 -0
  113. package/dist/tui/components/Markdown.js +31 -0
  114. package/dist/tui/components/Markdown.js.map +1 -0
  115. package/dist/tui/components/StatusBar.d.ts +9 -0
  116. package/dist/tui/components/StatusBar.d.ts.map +1 -0
  117. package/dist/tui/components/StatusBar.js +8 -0
  118. package/dist/tui/components/StatusBar.js.map +1 -0
  119. package/dist/tui/components/Thinking.d.ts +8 -0
  120. package/dist/tui/components/Thinking.d.ts.map +1 -0
  121. package/dist/tui/components/Thinking.js +7 -0
  122. package/dist/tui/components/Thinking.js.map +1 -0
  123. package/dist/tui/components/ToolCall.d.ts +15 -0
  124. package/dist/tui/components/ToolCall.d.ts.map +1 -0
  125. package/dist/tui/components/ToolCall.js +42 -0
  126. package/dist/tui/components/ToolCall.js.map +1 -0
  127. package/dist/tui/components/UserInput.d.ts +9 -0
  128. package/dist/tui/components/UserInput.d.ts.map +1 -0
  129. package/dist/tui/components/UserInput.js +76 -0
  130. package/dist/tui/components/UserInput.js.map +1 -0
  131. package/dist/tui/hooks/useChat.d.ts +11 -0
  132. package/dist/tui/hooks/useChat.d.ts.map +1 -0
  133. package/dist/tui/hooks/useChat.js +138 -0
  134. package/dist/tui/hooks/useChat.js.map +1 -0
  135. package/dist/tui/hooks/useCommands.d.ts +10 -0
  136. package/dist/tui/hooks/useCommands.d.ts.map +1 -0
  137. package/dist/tui/hooks/useCommands.js +78 -0
  138. package/dist/tui/hooks/useCommands.js.map +1 -0
  139. package/dist/tui/index.d.ts +2 -4
  140. package/dist/tui/index.d.ts.map +1 -1
  141. package/dist/tui/index.js +2 -4
  142. package/dist/tui/index.js.map +1 -1
  143. package/dist/tui/welcome.d.ts.map +1 -1
  144. package/dist/tui/welcome.js +22 -4
  145. package/dist/tui/welcome.js.map +1 -1
  146. package/install.ps1 +171 -192
  147. package/package.json +9 -1
  148. package/src/app/index.ts +13 -7
  149. package/src/cmd/{index.ts → index.tsx} +28 -27
  150. package/src/config/index.ts +1 -0
  151. package/src/config/types.ts +1 -0
  152. package/src/prompts/index.ts +8 -0
  153. package/src/skills/brainstorming.ts +43 -0
  154. package/src/skills/code-review.ts +45 -0
  155. package/src/skills/executing-plans.ts +27 -0
  156. package/src/skills/frontend-design.ts +35 -0
  157. package/src/skills/git-workflow.ts +36 -0
  158. package/src/skills/improve-architecture.ts +38 -0
  159. package/src/skills/index.ts +136 -0
  160. package/src/skills/neuroweave.ts +47 -0
  161. package/src/skills/playwright.ts +72 -0
  162. package/src/skills/prototype.ts +30 -0
  163. package/src/skills/subagent.ts +28 -0
  164. package/src/skills/supabase.ts +44 -0
  165. package/src/skills/systematic-debugging.ts +44 -0
  166. package/src/skills/tdd.ts +39 -0
  167. package/src/skills/triage.ts +35 -0
  168. package/src/skills/verification.ts +31 -0
  169. package/src/skills/writing-plans.ts +42 -0
  170. package/src/tools/index.ts +3 -0
  171. package/src/tools/nwt.ts +362 -0
  172. package/src/tui/app.tsx +61 -0
  173. package/src/tui/components/ChatList.tsx +32 -0
  174. package/src/tui/components/ChatMessage.tsx +54 -0
  175. package/src/tui/components/Header.tsx +28 -0
  176. package/src/tui/components/Markdown.tsx +35 -0
  177. package/src/tui/components/StatusBar.tsx +30 -0
  178. package/src/tui/components/Thinking.tsx +19 -0
  179. package/src/tui/components/ToolCall.tsx +74 -0
  180. package/src/tui/components/UserInput.tsx +83 -0
  181. package/src/tui/hooks/useChat.ts +154 -0
  182. package/src/tui/hooks/useCommands.ts +91 -0
  183. package/src/tui/index.ts +2 -4
  184. package/src/tui/welcome.ts +24 -5
  185. package/tsconfig.json +5 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-workflow.js","sourceRoot":"","sources":["../../src/skills/git-workflow.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC;IAC1E,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0Bc;CACvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const improveArchitectureSkill: Skill;
3
+ //# sourceMappingURL=improve-architecture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-architecture.d.ts","sourceRoot":"","sources":["../../src/skills/improve-architecture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,wBAAwB,EAAE,KAmCtC,CAAC"}
@@ -0,0 +1,37 @@
1
+ export const improveArchitectureSkill = {
2
+ id: 'improve-architecture',
3
+ name: 'Improve Architecture',
4
+ description: 'Systematically improve codebase structure and quality',
5
+ category: 'architecture',
6
+ autoActivate: ['重构', 'refactor', '架构', 'architecture', 'clean', 'improve'],
7
+ prompt: `## Architecture Improvement Protocol
8
+
9
+ When improving code structure:
10
+
11
+ ### 1. Assess Current State
12
+ - Read the code and identify pain points
13
+ - Look for: god classes, circular dependencies, tight coupling, code duplication
14
+
15
+ ### 2. Identify Patterns
16
+ - **Single Responsibility**: Does each module/class do ONE thing?
17
+ - **Dependency Direction**: Do high-level modules depend on low-level ones?
18
+ - **Abstraction Level**: Is each layer at the right abstraction?
19
+
20
+ ### 3. Plan Changes
21
+ - Start with the highest-impact, lowest-risk change
22
+ - Each change should be independently valuable
23
+ - Never refactor everything at once
24
+
25
+ ### 4. Execute Safely
26
+ - Make one change at a time
27
+ - Verify after each change
28
+ - Commit frequently
29
+
30
+ ### Red Flags to Fix
31
+ - Files over 300 lines
32
+ - Functions over 50 lines
33
+ - More than 3 levels of nesting
34
+ - Copy-pasted code blocks
35
+ - Circular imports`,
36
+ };
37
+ //# sourceMappingURL=improve-architecture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"improve-architecture.js","sourceRoot":"","sources":["../../src/skills/improve-architecture.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAU;IAC7C,EAAE,EAAE,sBAAsB;IAC1B,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE,cAAc;IACxB,YAAY,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,CAAC;IAC1E,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA4BS;CAClB,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Skills Registry - Built-in skills for development workflows
3
+ * Inspired by skills.sh (obra/superpowers, mattpocock/skills, anthropics/skills)
4
+ */
5
+ export interface Skill {
6
+ id: string;
7
+ name: string;
8
+ description: string;
9
+ category: 'planning' | 'debugging' | 'testing' | 'architecture' | 'workflow' | 'browser' | 'review';
10
+ prompt: string;
11
+ autoActivate?: string[];
12
+ }
13
+ import { writingPlansSkill } from './writing-plans.js';
14
+ import { executingPlansSkill } from './executing-plans.js';
15
+ import { systematicDebuggingSkill } from './systematic-debugging.js';
16
+ import { brainstormingSkill } from './brainstorming.js';
17
+ import { tddSkill } from './tdd.js';
18
+ import { improveArchitectureSkill } from './improve-architecture.js';
19
+ import { verificationSkill } from './verification.js';
20
+ import { codeReviewSkill } from './code-review.js';
21
+ import { prototypeSkill } from './prototype.js';
22
+ import { triageSkill } from './triage.js';
23
+ import { gitWorkflowSkill } from './git-workflow.js';
24
+ import { subagentSkill } from './subagent.js';
25
+ import { playwrightSkill } from './playwright.js';
26
+ import { frontendDesignSkill } from './frontend-design.js';
27
+ import { supabaseSkill } from './supabase.js';
28
+ import { neuroweaveSkill } from './neuroweave.js';
29
+ export declare const BUILTIN_SKILLS: Skill[];
30
+ export declare class SkillRegistry {
31
+ private skills;
32
+ private activeSkills;
33
+ constructor();
34
+ get(id: string): Skill | undefined;
35
+ list(): Skill[];
36
+ listActive(): Skill[];
37
+ activate(id: string): boolean;
38
+ deactivate(id: string): boolean;
39
+ isActive(id: string): boolean;
40
+ /**
41
+ * Get all active skill prompts for system prompt injection
42
+ */
43
+ getActivePrompts(): string;
44
+ /**
45
+ * Auto-activate skills based on user input
46
+ */
47
+ autoActivate(input: string): void;
48
+ }
49
+ export { writingPlansSkill, executingPlansSkill, systematicDebuggingSkill, brainstormingSkill, tddSkill, improveArchitectureSkill, verificationSkill, codeReviewSkill, prototypeSkill, triageSkill, gitWorkflowSkill, subagentSkill, playwrightSkill, frontendDesignSkill, supabaseSkill, neuroweaveSkill, };
50
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IACpG,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAGD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,eAAO,MAAM,cAAc,EAAE,KAAK,EAiBjC,CAAC;AAGF,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,YAAY,CAA0B;;IAY9C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAIlC,IAAI,IAAI,KAAK,EAAE;IAIf,UAAU,IAAI,KAAK,EAAE;IAIrB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAQ7B,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI/B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI7B;;OAEG;IACH,gBAAgB,IAAI,MAAM;IAO1B;;OAEG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAQlC;AAED,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,EAClB,QAAQ,EACR,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,eAAe,GAChB,CAAC"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Skills Registry - Built-in skills for development workflows
3
+ * Inspired by skills.sh (obra/superpowers, mattpocock/skills, anthropics/skills)
4
+ */
5
+ // Import all skills
6
+ import { writingPlansSkill } from './writing-plans.js';
7
+ import { executingPlansSkill } from './executing-plans.js';
8
+ import { systematicDebuggingSkill } from './systematic-debugging.js';
9
+ import { brainstormingSkill } from './brainstorming.js';
10
+ import { tddSkill } from './tdd.js';
11
+ import { improveArchitectureSkill } from './improve-architecture.js';
12
+ import { verificationSkill } from './verification.js';
13
+ import { codeReviewSkill } from './code-review.js';
14
+ import { prototypeSkill } from './prototype.js';
15
+ import { triageSkill } from './triage.js';
16
+ import { gitWorkflowSkill } from './git-workflow.js';
17
+ import { subagentSkill } from './subagent.js';
18
+ import { playwrightSkill } from './playwright.js';
19
+ import { frontendDesignSkill } from './frontend-design.js';
20
+ import { supabaseSkill } from './supabase.js';
21
+ import { neuroweaveSkill } from './neuroweave.js';
22
+ // All built-in skills (16 total)
23
+ export const BUILTIN_SKILLS = [
24
+ writingPlansSkill,
25
+ executingPlansSkill,
26
+ systematicDebuggingSkill,
27
+ brainstormingSkill,
28
+ tddSkill,
29
+ improveArchitectureSkill,
30
+ verificationSkill,
31
+ codeReviewSkill,
32
+ prototypeSkill,
33
+ triageSkill,
34
+ gitWorkflowSkill,
35
+ subagentSkill,
36
+ playwrightSkill,
37
+ frontendDesignSkill,
38
+ supabaseSkill,
39
+ neuroweaveSkill,
40
+ ];
41
+ // Skill registry
42
+ export class SkillRegistry {
43
+ skills = new Map();
44
+ activeSkills = new Set();
45
+ constructor() {
46
+ for (const skill of BUILTIN_SKILLS) {
47
+ this.skills.set(skill.id, skill);
48
+ }
49
+ // Default active skills
50
+ this.activeSkills.add('writing-plans');
51
+ this.activeSkills.add('systematic-debugging');
52
+ this.activeSkills.add('verification');
53
+ }
54
+ get(id) {
55
+ return this.skills.get(id);
56
+ }
57
+ list() {
58
+ return [...this.skills.values()];
59
+ }
60
+ listActive() {
61
+ return [...this.activeSkills].map(id => this.skills.get(id)).filter(Boolean);
62
+ }
63
+ activate(id) {
64
+ if (this.skills.has(id)) {
65
+ this.activeSkills.add(id);
66
+ return true;
67
+ }
68
+ return false;
69
+ }
70
+ deactivate(id) {
71
+ return this.activeSkills.delete(id);
72
+ }
73
+ isActive(id) {
74
+ return this.activeSkills.has(id);
75
+ }
76
+ /**
77
+ * Get all active skill prompts for system prompt injection
78
+ */
79
+ getActivePrompts() {
80
+ const active = this.listActive();
81
+ if (active.length === 0)
82
+ return '';
83
+ return active.map(s => `### Skill: ${s.name}\n${s.prompt}`).join('\n\n');
84
+ }
85
+ /**
86
+ * Auto-activate skills based on user input
87
+ */
88
+ autoActivate(input) {
89
+ const lower = input.toLowerCase();
90
+ for (const skill of this.skills.values()) {
91
+ if (skill.autoActivate?.some(kw => lower.includes(kw))) {
92
+ this.activeSkills.add(skill.id);
93
+ }
94
+ }
95
+ }
96
+ }
97
+ export { writingPlansSkill, executingPlansSkill, systematicDebuggingSkill, brainstormingSkill, tddSkill, improveArchitectureSkill, verificationSkill, codeReviewSkill, prototypeSkill, triageSkill, gitWorkflowSkill, subagentSkill, playwrightSkill, frontendDesignSkill, supabaseSkill, neuroweaveSkill, };
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const neuroweaveSkill: Skill;
3
+ //# sourceMappingURL=neuroweave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neuroweave.d.ts","sourceRoot":"","sources":["../../src/skills/neuroweave.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,KA4C7B,CAAC"}
@@ -0,0 +1,46 @@
1
+ export const neuroweaveSkill = {
2
+ id: 'neuroweave',
3
+ name: 'NeuroWeave Timeline',
4
+ description: 'Project evolution memory - track decisions, changes, and milestones',
5
+ category: 'workflow',
6
+ autoActivate: ['timeline', 'history', 'what changed', 'why was', 'track'],
7
+ prompt: `## NeuroWeave Timeline (NWT)
8
+
9
+ You have access to the NWT tool for tracking project evolution. Use it to:
10
+
11
+ ### When to Log Events
12
+ - **After significant changes**: New features, refactors, bug fixes
13
+ - **When making decisions**: Architecture choices, library selection, design patterns
14
+ - **At milestones**: Feature complete, tests passing, deployment ready
15
+
16
+ ### How to Log
17
+ \`\`\`
18
+ nwt log
19
+ task: "Add user authentication"
20
+ summary: "Implemented JWT-based auth with login/register endpoints"
21
+ reason: "Need user accounts for personalized features"
22
+ files: "src/auth.ts, src/routes/auth.ts"
23
+ tags: "feature, auth, api"
24
+ \`\`\`
25
+
26
+ ### Tags Convention
27
+ - \`feature\` - New functionality
28
+ - \`fix\` - Bug fixes
29
+ - \`refactor\` - Code restructuring
30
+ - \`decision\` - Architecture/design decisions
31
+ - \`milestone\` - Project milestones
32
+ - \`config\` - Configuration changes
33
+ - \`docs\` - Documentation updates
34
+
35
+ ### Auto-log Rule
36
+ After completing a multi-step task, automatically log it to NWT with:
37
+ - task: What was done (imperative)
38
+ - summary: How it was done
39
+ - reason: Why it was done
40
+ - files: What files changed
41
+ - tags: Category labels
42
+
43
+ ### Archives
44
+ Events older than 30 days are automatically archived. Use \`nwt story\` to see the full project narrative.`,
45
+ };
46
+ //# sourceMappingURL=neuroweave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"neuroweave.js","sourceRoot":"","sources":["../../src/skills/neuroweave.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qEAAqE;IAClF,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,CAAC;IACzE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2GAqCiG;CAC1G,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const playwrightSkill: Skill;
3
+ //# sourceMappingURL=playwright.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../../src/skills/playwright.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,KAqE7B,CAAC"}
@@ -0,0 +1,71 @@
1
+ export const playwrightSkill = {
2
+ id: 'playwright',
3
+ name: 'Playwright Browser Automation',
4
+ description: 'Automate browser tasks: testing, scraping, screenshots',
5
+ category: 'browser',
6
+ autoActivate: ['browser', 'screenshot', 'scrape', 'web', '网页', '浏览器', 'playwright', 'e2e'],
7
+ prompt: `## Playwright Browser Automation
8
+
9
+ You can use the shell tool to run Playwright commands for browser automation.
10
+
11
+ ### Setup
12
+ \`\`\`bash
13
+ npm install playwright
14
+ npx playwright install chromium
15
+ \`\`\`
16
+
17
+ ### Common Tasks
18
+
19
+ **Take a screenshot:**
20
+ \`\`\`bash
21
+ npx playwright screenshot https://example.com screenshot.png
22
+ \`\`\`
23
+
24
+ **Scrape page content:**
25
+ \`\`\`javascript
26
+ // save as scrape.js
27
+ const { chromium } = require('playwright');
28
+ (async () => {
29
+ const browser = await chromium.launch();
30
+ const page = await browser.newPage();
31
+ await page.goto('https://example.com');
32
+ const title = await page.title();
33
+ const text = await page.textContent('body');
34
+ console.log('Title:', title);
35
+ console.log('Content:', text.slice(0, 500));
36
+ await browser.close();
37
+ })();
38
+ \`\`\`
39
+
40
+ **Fill and submit forms:**
41
+ \`\`\`javascript
42
+ await page.fill('#username', 'user');
43
+ await page.fill('#password', 'pass');
44
+ await page.click('button[type="submit"]');
45
+ \`\`\`
46
+
47
+ **Wait for dynamic content:**
48
+ \`\`\`javascript
49
+ await page.waitForSelector('.results');
50
+ await page.waitForLoadState('networkidle');
51
+ \`\`\`
52
+
53
+ **E2E Testing:**
54
+ \`\`\`javascript
55
+ const { test, expect } = require('@playwright/test');
56
+ test('login flow', async ({ page }) => {
57
+ await page.goto('/login');
58
+ await page.fill('#email', 'test@example.com');
59
+ await page.fill('#password', 'password');
60
+ await page.click('button[type="submit"]');
61
+ await expect(page).toHaveURL('/dashboard');
62
+ });
63
+ \`\`\`
64
+
65
+ ### Best Practices
66
+ - Use \`waitForSelector\` before interacting with elements
67
+ - Use \`page.locator()\` for reliable element selection
68
+ - Take screenshots for visual verification
69
+ - Use \`--headed\` flag to watch: \`npx playwright test --headed\``,
70
+ };
71
+ //# sourceMappingURL=playwright.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.js","sourceRoot":"","sources":["../../src/skills/playwright.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAU;IACpC,EAAE,EAAE,YAAY;IAChB,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,wDAAwD;IACrE,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC;IAC1F,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEA8DyD;CAClE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const prototypeSkill: Skill;
3
+ //# sourceMappingURL=prototype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prototype.d.ts","sourceRoot":"","sources":["../../src/skills/prototype.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,cAAc,EAAE,KA2B5B,CAAC"}
@@ -0,0 +1,29 @@
1
+ export const prototypeSkill = {
2
+ id: 'prototype',
3
+ name: 'Rapid Prototyping',
4
+ description: 'Quick working prototypes before production code',
5
+ category: 'workflow',
6
+ autoActivate: ['prototype', '原型', '快速实现', 'quick', 'demo'],
7
+ prompt: `## Rapid Prototyping Mode
8
+
9
+ When the user wants to quickly try something:
10
+
11
+ ### Principles
12
+ - **Working > Perfect** - Get something running first
13
+ - **Skip boilerplate** - Use minimal setup
14
+ - **Hardcode first** - Constants before config
15
+ - **Single file** - Don't split until needed
16
+
17
+ ### Workflow
18
+ 1. Create a single file with everything
19
+ 2. Make it work end-to-end
20
+ 3. Show the result
21
+ 4. Ask: "Want me to refactor this into proper code?"
22
+
23
+ ### When to Use
24
+ - Exploring a new API or library
25
+ - Testing a design idea
26
+ - Creating a quick demo
27
+ - Validating an approach`,
28
+ };
29
+ //# sourceMappingURL=prototype.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prototype.js","sourceRoot":"","sources":["../../src/skills/prototype.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAU;IACnC,EAAE,EAAE,WAAW;IACf,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,iDAAiD;IAC9D,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC;IAC1D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;yBAoBe;CACxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const subagentSkill: Skill;
3
+ //# sourceMappingURL=subagent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subagent.d.ts","sourceRoot":"","sources":["../../src/skills/subagent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAC"}
@@ -0,0 +1,27 @@
1
+ export const subagentSkill = {
2
+ id: 'subagent',
3
+ name: 'Subagent Delegation',
4
+ description: 'Break complex tasks into parallel subtasks',
5
+ category: 'workflow',
6
+ prompt: `## Task Decomposition
7
+
8
+ For complex tasks, think about what can be done in parallel:
9
+
10
+ ### Parallel-izable Tasks
11
+ - Reading multiple independent files
12
+ - Running multiple independent commands
13
+ - Creating multiple independent files
14
+ - Testing multiple independent features
15
+
16
+ ### Sequential Tasks (must be done in order)
17
+ - Build → Test → Deploy
18
+ - Read → Analyze → Write
19
+ - Design → Implement → Verify
20
+
21
+ ### When Task is Complex
22
+ 1. Identify independent subtasks
23
+ 2. Execute them (in parallel if possible)
24
+ 3. Combine results
25
+ 4. Verify the whole`,
26
+ };
27
+ //# sourceMappingURL=subagent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subagent.js","sourceRoot":"","sources":["../../src/skills/subagent.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,4CAA4C;IACzD,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE;;;;;;;;;;;;;;;;;;;oBAmBU;CACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const supabaseSkill: Skill;
3
+ //# sourceMappingURL=supabase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supabase.d.ts","sourceRoot":"","sources":["../../src/skills/supabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,aAAa,EAAE,KAyC3B,CAAC"}
@@ -0,0 +1,43 @@
1
+ export const supabaseSkill = {
2
+ id: 'supabase',
3
+ name: 'Supabase Best Practices',
4
+ description: 'PostgreSQL and Supabase patterns for backend development',
5
+ category: 'architecture',
6
+ autoActivate: ['supabase', 'postgres', 'database', 'sql', '数据库'],
7
+ prompt: `## Supabase / PostgreSQL Best Practices
8
+
9
+ ### Schema Design
10
+ - Use UUIDs for primary keys (\`gen_random_uuid()\`)
11
+ - Always add \`created_at\` and \`updated_at\` timestamps
12
+ - Use enums for fixed sets of values
13
+ - Normalize first, denormalize for performance
14
+
15
+ ### Row Level Security (RLS)
16
+ - Always enable RLS on tables
17
+ - Write policies for each operation (SELECT, INSERT, UPDATE, DELETE)
18
+ - Use \`auth.uid()\` for user-specific access
19
+ - Test policies thoroughly
20
+
21
+ ### Queries
22
+ - Use \`select()\` with specific columns, not \`select('*')\`
23
+ - Use \`maybeSingle()\` instead of \`single()\` when 0 rows is valid
24
+ - Use \`range()\` for pagination
25
+ - Index columns used in WHERE and JOIN
26
+
27
+ ### Common Patterns
28
+ \`\`\`typescript
29
+ // Insert with returning
30
+ const { data, error } = await supabase
31
+ .from('posts')
32
+ .insert({ title, content, user_id: user.id })
33
+ .select()
34
+ .single();
35
+
36
+ // Realtime subscriptions
37
+ const channel = supabase
38
+ .channel('changes')
39
+ .on('postgres_changes', { event: '*', schema: 'public', table: 'messages' }, handleChange)
40
+ .subscribe();
41
+ \`\`\``,
42
+ };
43
+ //# sourceMappingURL=supabase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supabase.js","sourceRoot":"","sources":["../../src/skills/supabase.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,0DAA0D;IACvE,QAAQ,EAAE,cAAc;IACxB,YAAY,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC;IAChE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCH;CACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const systematicDebuggingSkill: Skill;
3
+ //# sourceMappingURL=systematic-debugging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systematic-debugging.d.ts","sourceRoot":"","sources":["../../src/skills/systematic-debugging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,wBAAwB,EAAE,KAyCtC,CAAC"}
@@ -0,0 +1,43 @@
1
+ export const systematicDebuggingSkill = {
2
+ id: 'systematic-debugging',
3
+ name: 'Systematic Debugging',
4
+ description: 'Structured approach to finding and fixing bugs',
5
+ category: 'debugging',
6
+ autoActivate: ['bug', 'error', 'fix', 'debug', '不工作', '报错', '出错', '问题'],
7
+ prompt: `## Debugging Protocol
8
+
9
+ When debugging an issue, follow this systematic approach:
10
+
11
+ ### 1. Understand the Problem
12
+ - What is the expected behavior?
13
+ - What is the actual behavior?
14
+ - When does it happen? (always, sometimes, specific conditions)
15
+ - What changed recently?
16
+
17
+ ### 2. Gather Evidence
18
+ - Read error messages carefully - they often tell you exactly what's wrong
19
+ - Check logs, console output, stack traces
20
+ - Reproduce the issue reliably before attempting fixes
21
+
22
+ ### 3. Form Hypotheses
23
+ - List 2-3 possible causes, ranked by likelihood
24
+ - For each hypothesis: "If X is the cause, then Y should be true"
25
+
26
+ ### 4. Test Hypotheses
27
+ - Test the most likely hypothesis first
28
+ - Use minimal changes to isolate the issue
29
+ - Add debug logging if needed
30
+
31
+ ### 5. Fix and Verify
32
+ - Apply the minimal fix that addresses the root cause
33
+ - Verify the fix works
34
+ - Check for regressions
35
+ - Explain WHY the fix works
36
+
37
+ ### Anti-patterns to Avoid
38
+ - Don't make random changes hoping something works
39
+ - Don't change multiple things at once
40
+ - Don't skip the "understand" phase
41
+ - Don't fix symptoms instead of root causes`,
42
+ };
43
+ //# sourceMappingURL=systematic-debugging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systematic-debugging.js","sourceRoot":"","sources":["../../src/skills/systematic-debugging.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,wBAAwB,GAAU;IAC7C,EAAE,EAAE,sBAAsB;IAC1B,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;IACvE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAkCkC;CAC3C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const tddSkill: Skill;
3
+ //# sourceMappingURL=tdd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tdd.d.ts","sourceRoot":"","sources":["../../src/skills/tdd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,QAAQ,EAAE,KAoCtB,CAAC"}
@@ -0,0 +1,38 @@
1
+ export const tddSkill = {
2
+ id: 'tdd',
3
+ name: 'Test-Driven Development',
4
+ description: 'Write tests first, then implement to pass them',
5
+ category: 'testing',
6
+ autoActivate: ['test', '测试', 'tdd', '写测试', '单元测试'],
7
+ prompt: `## TDD Workflow
8
+
9
+ When implementing new features, follow the Red-Green-Refactor cycle:
10
+
11
+ ### 1. Red - Write a Failing Test
12
+ - Write the test FIRST
13
+ - Run it and confirm it FAILS
14
+ - This proves the test is actually testing something
15
+
16
+ ### 2. Green - Make It Pass
17
+ - Write the MINIMUM code to make the test pass
18
+ - Don't over-engineer
19
+ - Run the test and confirm it PASSES
20
+
21
+ ### 3. Refactor - Clean Up
22
+ - Now that tests protect you, improve the code
23
+ - Run tests after each change to ensure nothing broke
24
+
25
+ ### Test Naming
26
+ \`\`\`
27
+ describe('FeatureName', () => {
28
+ it('should do X when Y', () => { ... });
29
+ it('should handle edge case Z', () => { ... });
30
+ });
31
+ \`\`\`
32
+
33
+ ### Always Test
34
+ - Happy path (normal usage)
35
+ - Edge cases (empty input, null, boundary values)
36
+ - Error cases (invalid input, missing data)`,
37
+ };
38
+ //# sourceMappingURL=tdd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tdd.js","sourceRoot":"","sources":["../../src/skills/tdd.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,EAAE,EAAE,KAAK;IACT,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;IAClD,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CA6BkC;CAC3C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Skill } from './index.js';
2
+ export declare const triageSkill: Skill;
3
+ //# sourceMappingURL=triage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triage.d.ts","sourceRoot":"","sources":["../../src/skills/triage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,eAAO,MAAM,WAAW,EAAE,KAgCzB,CAAC"}