@relipa/ai-flow-kit 0.0.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.
Files changed (204) hide show
  1. package/AIFLOW.md +432 -0
  2. package/CHANGELOG.md +78 -0
  3. package/CONTRIBUTING.md +351 -0
  4. package/IMPLEMENTATION_SUMMARY.md +348 -0
  5. package/QUICK_START.md +392 -0
  6. package/README.md +323 -0
  7. package/bin/aiflow.js +178 -0
  8. package/custom/mcp-presets/README.md +138 -0
  9. package/custom/mcp-presets/backlog.json +15 -0
  10. package/custom/mcp-presets/figma.json +15 -0
  11. package/custom/mcp-presets/google-sheets.json +14 -0
  12. package/custom/mcp-presets/jira.json +16 -0
  13. package/custom/prompts/bug-fix.md +149 -0
  14. package/custom/prompts/feature.md +190 -0
  15. package/custom/prompts/investigation.md +164 -0
  16. package/custom/rules/code-style.md +7 -0
  17. package/custom/rules/java/code-style.md +11 -0
  18. package/custom/rules/java/naming.md +17 -0
  19. package/custom/rules/java/review-checklist.md +36 -0
  20. package/custom/rules/javascript/code-style.md +12 -0
  21. package/custom/rules/javascript/naming.md +14 -0
  22. package/custom/rules/naming.md +9 -0
  23. package/custom/rules/php/code-style.md +10 -0
  24. package/custom/rules/php/naming.md +15 -0
  25. package/custom/rules/review-checklist.md +9 -0
  26. package/custom/skills/figma-to-component/SKILL.md +207 -0
  27. package/custom/skills/generate-spec/SKILL.md +97 -0
  28. package/custom/skills/impact-analysis/SKILL.md +94 -0
  29. package/custom/skills/investigate-bug/SKILL.md +93 -0
  30. package/custom/skills/report-customer/SKILL.md +95 -0
  31. package/custom/skills/review-plan/SKILL.md +158 -0
  32. package/custom/skills/validate-ticket/SKILL.md +240 -0
  33. package/custom/templates/laravel.md +90 -0
  34. package/custom/templates/nextjs.md +89 -0
  35. package/custom/templates/reactjs.md +567 -0
  36. package/custom/templates/spring-boot.md +598 -0
  37. package/custom/templates/vue-nuxt.md +89 -0
  38. package/docs/architecture.md +395 -0
  39. package/docs/cli-reference.md +438 -0
  40. package/docs/configuration.md +412 -0
  41. package/docs/getting-started.md +248 -0
  42. package/docs/troubleshooting.md +587 -0
  43. package/docs/workflows/bug-fix.md +126 -0
  44. package/docs/workflows/feature.md +123 -0
  45. package/docs/workflows/impact-analysis.md +13 -0
  46. package/docs/workflows/investigation.md +13 -0
  47. package/docs/workflows/refactor.md +13 -0
  48. package/index.js +27 -0
  49. package/package.json +70 -0
  50. package/scripts/config.js +317 -0
  51. package/scripts/context.js +117 -0
  52. package/scripts/detect.js +239 -0
  53. package/scripts/doctor.js +48 -0
  54. package/scripts/guide.js +282 -0
  55. package/scripts/hooks/session-start.js +140 -0
  56. package/scripts/init.js +453 -0
  57. package/scripts/memory.js +247 -0
  58. package/scripts/prompt.js +392 -0
  59. package/scripts/remove.js +170 -0
  60. package/scripts/update.js +111 -0
  61. package/scripts/use.js +570 -0
  62. package/scripts/validate.js +303 -0
  63. package/upstream/.claude-plugin/marketplace.json +20 -0
  64. package/upstream/.claude-plugin/plugin.json +20 -0
  65. package/upstream/.codex/INSTALL.md +67 -0
  66. package/upstream/.cursor-plugin/plugin.json +25 -0
  67. package/upstream/.gitattributes +18 -0
  68. package/upstream/.github/FUNDING.yml +3 -0
  69. package/upstream/.github/ISSUE_TEMPLATE/bug_report.md +52 -0
  70. package/upstream/.github/ISSUE_TEMPLATE/config.yml +5 -0
  71. package/upstream/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
  72. package/upstream/.github/ISSUE_TEMPLATE/platform_support.md +23 -0
  73. package/upstream/.github/PULL_REQUEST_TEMPLATE.md +87 -0
  74. package/upstream/.opencode/INSTALL.md +83 -0
  75. package/upstream/.opencode/plugins/superpowers.js +112 -0
  76. package/upstream/.version-bump.json +19 -0
  77. package/upstream/AGENTS.md +1 -0
  78. package/upstream/CHANGELOG.md +13 -0
  79. package/upstream/CLAUDE.md +85 -0
  80. package/upstream/CODE_OF_CONDUCT.md +128 -0
  81. package/upstream/GEMINI.md +2 -0
  82. package/upstream/LICENSE +21 -0
  83. package/upstream/README.md +190 -0
  84. package/upstream/RELEASE-NOTES.md +1096 -0
  85. package/upstream/agents/code-reviewer.md +48 -0
  86. package/upstream/commands/brainstorm.md +5 -0
  87. package/upstream/commands/execute-plan.md +5 -0
  88. package/upstream/commands/write-plan.md +5 -0
  89. package/upstream/docs/README.codex.md +126 -0
  90. package/upstream/docs/README.opencode.md +130 -0
  91. package/upstream/docs/plans/2025-11-22-opencode-support-design.md +294 -0
  92. package/upstream/docs/plans/2025-11-22-opencode-support-implementation.md +1095 -0
  93. package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +711 -0
  94. package/upstream/docs/plans/2026-01-17-visual-brainstorming.md +571 -0
  95. package/upstream/docs/superpowers/plans/2026-01-22-document-review-system.md +301 -0
  96. package/upstream/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +523 -0
  97. package/upstream/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +479 -0
  98. package/upstream/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +564 -0
  99. package/upstream/docs/superpowers/specs/2026-01-22-document-review-system-design.md +136 -0
  100. package/upstream/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +162 -0
  101. package/upstream/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +118 -0
  102. package/upstream/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +244 -0
  103. package/upstream/docs/testing.md +303 -0
  104. package/upstream/docs/windows/polyglot-hooks.md +212 -0
  105. package/upstream/gemini-extension.json +6 -0
  106. package/upstream/hooks/hooks-cursor.json +10 -0
  107. package/upstream/hooks/hooks.json +16 -0
  108. package/upstream/hooks/run-hook.cmd +46 -0
  109. package/upstream/hooks/session-start +57 -0
  110. package/upstream/package.json +6 -0
  111. package/upstream/scripts/bump-version.sh +220 -0
  112. package/upstream/skills/brainstorming/SKILL.md +164 -0
  113. package/upstream/skills/brainstorming/scripts/frame-template.html +214 -0
  114. package/upstream/skills/brainstorming/scripts/helper.js +88 -0
  115. package/upstream/skills/brainstorming/scripts/server.cjs +354 -0
  116. package/upstream/skills/brainstorming/scripts/start-server.sh +148 -0
  117. package/upstream/skills/brainstorming/scripts/stop-server.sh +56 -0
  118. package/upstream/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  119. package/upstream/skills/brainstorming/visual-companion.md +287 -0
  120. package/upstream/skills/dispatching-parallel-agents/SKILL.md +182 -0
  121. package/upstream/skills/executing-plans/SKILL.md +70 -0
  122. package/upstream/skills/finishing-a-development-branch/SKILL.md +200 -0
  123. package/upstream/skills/receiving-code-review/SKILL.md +213 -0
  124. package/upstream/skills/requesting-code-review/SKILL.md +105 -0
  125. package/upstream/skills/requesting-code-review/code-reviewer.md +146 -0
  126. package/upstream/skills/subagent-driven-development/SKILL.md +277 -0
  127. package/upstream/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  128. package/upstream/skills/subagent-driven-development/implementer-prompt.md +113 -0
  129. package/upstream/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  130. package/upstream/skills/systematic-debugging/CREATION-LOG.md +119 -0
  131. package/upstream/skills/systematic-debugging/SKILL.md +296 -0
  132. package/upstream/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  133. package/upstream/skills/systematic-debugging/condition-based-waiting.md +115 -0
  134. package/upstream/skills/systematic-debugging/defense-in-depth.md +122 -0
  135. package/upstream/skills/systematic-debugging/find-polluter.sh +63 -0
  136. package/upstream/skills/systematic-debugging/root-cause-tracing.md +169 -0
  137. package/upstream/skills/systematic-debugging/test-academic.md +14 -0
  138. package/upstream/skills/systematic-debugging/test-pressure-1.md +58 -0
  139. package/upstream/skills/systematic-debugging/test-pressure-2.md +68 -0
  140. package/upstream/skills/systematic-debugging/test-pressure-3.md +69 -0
  141. package/upstream/skills/test-driven-development/SKILL.md +371 -0
  142. package/upstream/skills/test-driven-development/testing-anti-patterns.md +299 -0
  143. package/upstream/skills/using-git-worktrees/SKILL.md +218 -0
  144. package/upstream/skills/using-superpowers/SKILL.md +117 -0
  145. package/upstream/skills/using-superpowers/references/codex-tools.md +100 -0
  146. package/upstream/skills/using-superpowers/references/copilot-tools.md +52 -0
  147. package/upstream/skills/using-superpowers/references/gemini-tools.md +33 -0
  148. package/upstream/skills/verification-before-completion/SKILL.md +139 -0
  149. package/upstream/skills/writing-plans/SKILL.md +152 -0
  150. package/upstream/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  151. package/upstream/skills/writing-skills/SKILL.md +655 -0
  152. package/upstream/skills/writing-skills/anthropic-best-practices.md +1150 -0
  153. package/upstream/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  154. package/upstream/skills/writing-skills/graphviz-conventions.dot +172 -0
  155. package/upstream/skills/writing-skills/persuasion-principles.md +187 -0
  156. package/upstream/skills/writing-skills/render-graphs.js +168 -0
  157. package/upstream/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  158. package/upstream/tests/brainstorm-server/package-lock.json +36 -0
  159. package/upstream/tests/brainstorm-server/package.json +10 -0
  160. package/upstream/tests/brainstorm-server/server.test.js +427 -0
  161. package/upstream/tests/brainstorm-server/windows-lifecycle.test.sh +351 -0
  162. package/upstream/tests/brainstorm-server/ws-protocol.test.js +392 -0
  163. package/upstream/tests/claude-code/README.md +158 -0
  164. package/upstream/tests/claude-code/analyze-token-usage.py +168 -0
  165. package/upstream/tests/claude-code/run-skill-tests.sh +187 -0
  166. package/upstream/tests/claude-code/test-document-review-system.sh +177 -0
  167. package/upstream/tests/claude-code/test-helpers.sh +202 -0
  168. package/upstream/tests/claude-code/test-subagent-driven-development-integration.sh +314 -0
  169. package/upstream/tests/claude-code/test-subagent-driven-development.sh +165 -0
  170. package/upstream/tests/explicit-skill-requests/prompts/action-oriented.txt +3 -0
  171. package/upstream/tests/explicit-skill-requests/prompts/after-planning-flow.txt +17 -0
  172. package/upstream/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +11 -0
  173. package/upstream/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +8 -0
  174. package/upstream/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +3 -0
  175. package/upstream/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +1 -0
  176. package/upstream/tests/explicit-skill-requests/prompts/skip-formalities.txt +3 -0
  177. package/upstream/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +1 -0
  178. package/upstream/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +1 -0
  179. package/upstream/tests/explicit-skill-requests/run-all.sh +70 -0
  180. package/upstream/tests/explicit-skill-requests/run-claude-describes-sdd.sh +100 -0
  181. package/upstream/tests/explicit-skill-requests/run-extended-multiturn-test.sh +113 -0
  182. package/upstream/tests/explicit-skill-requests/run-haiku-test.sh +144 -0
  183. package/upstream/tests/explicit-skill-requests/run-multiturn-test.sh +143 -0
  184. package/upstream/tests/explicit-skill-requests/run-test.sh +136 -0
  185. package/upstream/tests/opencode/run-tests.sh +163 -0
  186. package/upstream/tests/opencode/setup.sh +88 -0
  187. package/upstream/tests/opencode/test-plugin-loading.sh +82 -0
  188. package/upstream/tests/opencode/test-priority.sh +198 -0
  189. package/upstream/tests/opencode/test-tools.sh +104 -0
  190. package/upstream/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +8 -0
  191. package/upstream/tests/skill-triggering/prompts/executing-plans.txt +1 -0
  192. package/upstream/tests/skill-triggering/prompts/requesting-code-review.txt +3 -0
  193. package/upstream/tests/skill-triggering/prompts/systematic-debugging.txt +11 -0
  194. package/upstream/tests/skill-triggering/prompts/test-driven-development.txt +7 -0
  195. package/upstream/tests/skill-triggering/prompts/writing-plans.txt +10 -0
  196. package/upstream/tests/skill-triggering/run-all.sh +60 -0
  197. package/upstream/tests/skill-triggering/run-test.sh +88 -0
  198. package/upstream/tests/subagent-driven-dev/go-fractals/design.md +81 -0
  199. package/upstream/tests/subagent-driven-dev/go-fractals/plan.md +172 -0
  200. package/upstream/tests/subagent-driven-dev/go-fractals/scaffold.sh +45 -0
  201. package/upstream/tests/subagent-driven-dev/run-test.sh +106 -0
  202. package/upstream/tests/subagent-driven-dev/svelte-todo/design.md +70 -0
  203. package/upstream/tests/subagent-driven-dev/svelte-todo/plan.md +222 -0
  204. package/upstream/tests/subagent-driven-dev/svelte-todo/scaffold.sh +46 -0
package/bin/aiflow.js ADDED
@@ -0,0 +1,178 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { program } = require('commander');
4
+ const chalk = require('chalk');
5
+ const packageJson = require('../package.json');
6
+ const initCommand = require('../scripts/init');
7
+ const updateCommand = require('../scripts/update');
8
+ const doctorCommand = require('../scripts/doctor');
9
+ const useCommand = require('../scripts/use');
10
+ const TaskDetector = require('../scripts/detect');
11
+ const validateCommand = require('../scripts/validate');
12
+ const memoryCommand = require('../scripts/memory');
13
+ const contextCommand = require('../scripts/context');
14
+ const promptCommand = require('../scripts/prompt');
15
+ const removeCommand = require('../scripts/remove');
16
+ const guideCommand = require('../scripts/guide');
17
+
18
+ program
19
+ .version(packageJson.version)
20
+ .description('AI Flow Kit CLI - AI-powered development workflows for teams');
21
+
22
+ // ── init ──────────────────────────────────────────────────────
23
+ program
24
+ .command('init')
25
+ .description('Initialize AI Flow Kit in your project')
26
+ .option('-f, --framework <types>', 'framework(s), comma-separated (e.g. spring-boot,reactjs)')
27
+ .option('-a, --adapter <types>', 'adapter(s), comma-separated (e.g. backlog,jira)')
28
+ .action((options) => {
29
+ options.frameworks = options.framework
30
+ ? options.framework.split(',').map(s => s.trim()).filter(Boolean)
31
+ : [];
32
+ options.adapters = options.adapter
33
+ ? options.adapter.split(',').map(s => s.trim()).filter(Boolean)
34
+ : [];
35
+ initCommand(options);
36
+ });
37
+
38
+ // ── use ───────────────────────────────────────────────────────
39
+ program
40
+ .command('use [target]')
41
+ .description('Load context from ticket, version, or file')
42
+ .option('-m, --manual', 'manual context entry')
43
+ .option('-f, --file <path>', 'load from file')
44
+ .option('-s, --save <name>', 'save as named context')
45
+ .option('--with-comments', 'load all comments (default: description only)')
46
+ .option('--comments-last <n>', 'load only the last N comments', parseInt)
47
+ .option('--comments-from <n>', 'load comments from index N onward (0-based)', parseInt)
48
+ .action((target, options) => {
49
+ useCommand(target, options);
50
+ });
51
+
52
+ // ── prompt ────────────────────────────────────────────────────
53
+ program
54
+ .command('prompt [type]')
55
+ .description('Generate AI prompt with context and rules')
56
+ .option('-l, --list', 'list available prompt types')
57
+ .option('-o, --output <file>', 'save to file')
58
+ .option('--lang <lang>', 'language: english (default) or vietnamese')
59
+ .option('--detail <level>', 'detail level: minimal | standard (default) | comprehensive')
60
+ .action((type, options) => {
61
+ promptCommand(type, options);
62
+ });
63
+
64
+ // ── detect ────────────────────────────────────────────────────
65
+ program
66
+ .command('detect [description]')
67
+ .description('Auto-detect task type from description')
68
+ .option('-v, --verbose', 'show detection details')
69
+ .option('-t, --threshold <number>', 'confidence threshold (0-100)')
70
+ .action((description, options) => {
71
+ const detector = new TaskDetector();
72
+ const threshold = options.threshold ? parseInt(options.threshold) / 100 : 0.8;
73
+ const result = detector.detect(description, threshold);
74
+ console.log(chalk.cyan('\nTask Detection Results:\n'));
75
+ console.log(detector.formatOutput(result, options.verbose));
76
+ });
77
+
78
+ // ── context ───────────────────────────────────────────────────
79
+ program
80
+ .command('context [action]')
81
+ .description('Manage task contexts (list|show|save <name>|clear)')
82
+ .option('-s, --save <name>', 'save current context with name')
83
+ .option('--load <name>', 'load saved context by name')
84
+ .option('-d, --delete <name>', 'delete saved context')
85
+ .option('--clear', 'clear all saved contexts')
86
+ .option('--show', 'show current context')
87
+ .action((action, options) => {
88
+ contextCommand(action, options);
89
+ });
90
+
91
+ // ── validate ──────────────────────────────────────────────────
92
+ program
93
+ .command('validate <file>')
94
+ .description('Validate output against team rules')
95
+ .option('-r, --ruleset <set>', 'rule set: default | strict | lenient', 'default')
96
+ .option('-v, --verbose', 'detailed report')
97
+ .option('--fix', 'auto-fix trailing whitespace')
98
+ .action((file, options) => {
99
+ validateCommand(file, {
100
+ ruleset: options.ruleset,
101
+ verbose: options.verbose,
102
+ fix: options.fix
103
+ });
104
+ });
105
+
106
+ // ── memory ────────────────────────────────────────────────────
107
+ // Sub-commands to avoid the ambiguous "memory <action> --save key" pattern
108
+ const memCmd = program.command('memory').description('Manage team knowledge and memory');
109
+
110
+ memCmd
111
+ .command('save <key> <value>')
112
+ .description('Save a memory entry')
113
+ .action((key, value) => memoryCommand('save', { key, value }));
114
+
115
+ memCmd
116
+ .command('get <key>')
117
+ .description('Retrieve a memory entry')
118
+ .action((key) => memoryCommand('get', { key }));
119
+
120
+ memCmd
121
+ .command('list')
122
+ .description('List all memories')
123
+ .action(() => memoryCommand('list'));
124
+
125
+ memCmd
126
+ .command('search <query>')
127
+ .description('Search memories by keyword')
128
+ .action((query) => memoryCommand('search', { query }));
129
+
130
+ memCmd
131
+ .command('delete <key>')
132
+ .description('Delete a memory entry')
133
+ .action((key) => memoryCommand('delete', { key }));
134
+
135
+ memCmd
136
+ .command('clear')
137
+ .description('Clear all memories')
138
+ .action(() => memoryCommand('clear'));
139
+
140
+ // ── guide ─────────────────────────────────────────────────────
141
+ program
142
+ .command('guide')
143
+ .description('Show quickstart guide, architecture, and command reference')
144
+ .option('--flow', 'show architecture & flow diagram only')
145
+ .option('--commands', 'show command reference only')
146
+ .action((options) => {
147
+ guideCommand(options);
148
+ });
149
+
150
+ // ── remove ────────────────────────────────────────────────────
151
+ program
152
+ .command('remove')
153
+ .description('Remove ai-flow-kit from project, a cached version, or uninstall globally')
154
+ .option('--version <ver>', 'remove a specific cached version from .aiflow/versions/')
155
+ .option('--global', 'uninstall the global npm package (removes `aiflow` command)')
156
+ .action((options) => {
157
+ removeCommand(options);
158
+ });
159
+
160
+ // ── update ────────────────────────────────────────────────────
161
+ program
162
+ .command('update')
163
+ .description('Update to latest version')
164
+ .option('--force', 'force update even if already on latest')
165
+ .action((options) => {
166
+ updateCommand(options);
167
+ });
168
+
169
+ // ── doctor ────────────────────────────────────────────────────
170
+ program
171
+ .command('doctor')
172
+ .description('Health check of AI Flow Kit setup')
173
+ .option('-v, --verbose', 'detailed output')
174
+ .action(() => {
175
+ doctorCommand();
176
+ });
177
+
178
+ program.parse(process.argv);
@@ -0,0 +1,138 @@
1
+ # MCP Presets
2
+
3
+ Pre-configured MCP (Model Context Protocol) adapters for various project management and collaboration tools.
4
+
5
+ ## Available Presets
6
+
7
+ ### Jira (`jira.json`)
8
+
9
+ Connect to Atlassian Jira for loading issues and context.
10
+
11
+ **Setup:**
12
+ ```bash
13
+ aiflow init --adapter jira
14
+ ```
15
+
16
+ **Required Environment Variables:**
17
+ - `JIRA_API_TOKEN` — Your Jira API token
18
+ - `JIRA_EMAIL` — Your Jira account email
19
+ - `JIRA_DOMAIN` — Your Jira domain (e.g., "company" in company.atlassian.net)
20
+
21
+ **Get API Token:**
22
+ 1. Go to https://id.atlassian.com/manage-profile/security/api-tokens
23
+ 2. Create new API token
24
+ 3. Copy the token
25
+
26
+ **Usage:**
27
+ ```bash
28
+ aiflow use JIRA-123
29
+ # Loads issue JIRA-123 from your Jira instance
30
+ ```
31
+
32
+ ### Backlog (`backlog.json`)
33
+
34
+ Connect to Nulab Backlog for loading tasks and context.
35
+
36
+ **Setup:**
37
+ ```bash
38
+ aiflow init --adapter backlog
39
+ ```
40
+
41
+ **Required Environment Variables:**
42
+ - `BACKLOG_API_KEY` — Your Backlog API key
43
+ - `BACKLOG_SPACE_KEY` — Your Backlog space key
44
+
45
+ **Get API Key:**
46
+ 1. Log in to Backlog
47
+ 2. Go to Personal Settings → API Settings
48
+ 3. Generate new API token
49
+
50
+ **Usage:**
51
+ ```bash
52
+ aiflow use BACKLOG-456
53
+ # Loads task from your Backlog instance
54
+ ```
55
+
56
+ ### Google Sheets (`google-sheets.json`)
57
+
58
+ Connect to Google Sheets for loading task context.
59
+
60
+ **Setup:**
61
+ ```bash
62
+ aiflow init --adapter google-sheets
63
+ ```
64
+
65
+ **Required Environment Variables:**
66
+ - `GOOGLE_SHEETS_CREDS` — Path to service account JSON
67
+
68
+ **Get Credentials:**
69
+ 1. Create Google Cloud project
70
+ 2. Enable Sheets API
71
+ 3. Create service account
72
+ 4. Download JSON credentials
73
+ 5. Store securely and set path
74
+
75
+ **Usage:**
76
+ ```bash
77
+ aiflow use SHEET-A1:D5
78
+ # Loads data from Google Sheet
79
+ ```
80
+
81
+ ## Creating Custom Presets
82
+
83
+ To add a new MCP adapter:
84
+
85
+ 1. Create `<adapter-name>.json`:
86
+
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "<adapter-name>": {
91
+ "command": "npx",
92
+ "args": [
93
+ "-y",
94
+ "@modelcontextprotocol/server-<adapter-name>"
95
+ ],
96
+ "env": {
97
+ "ENV_VAR_1": "{{PLACEHOLDER}}",
98
+ "ENV_VAR_2": "{{PLACEHOLDER}}"
99
+ }
100
+ }
101
+ }
102
+ }
103
+ ```
104
+
105
+ 2. Document in this README
106
+
107
+ 3. Users can install with:
108
+ ```bash
109
+ aiflow init --adapter <adapter-name>
110
+ ```
111
+
112
+ ## Validators
113
+
114
+ Each preset should be validated during `aiflow init`:
115
+
116
+ - ✓ Environment variables set
117
+ - ✓ API connectivity working
118
+ - ✓ Proper permissions configured
119
+
120
+ ## Best Practices
121
+
122
+ 1. **Use placeholders** — {{VAR_NAME}} for env variables
123
+ 2. **Document setup** — Include step-by-step guide
124
+ 3. **Provide examples** — Show usage patterns
125
+ 4. **Handle errors** — Clear error messages if setup fails
126
+ 5. **Support multiple instances** — Allow team variations
127
+
128
+ ## Security
129
+
130
+ - **Never commit credentials** — Use environment variables
131
+ - **Use secure storage** — Store API tokens securely
132
+ - **Rotate tokens** — Regularly update API tokens
133
+ - **Restrict permissions** — Use minimal required permissions
134
+ - **Audit access** — Monitor who accesses what
135
+
136
+ ---
137
+
138
+ For more info: See [Configuration Guide](../../docs/configuration.md)
@@ -0,0 +1,15 @@
1
+ {
2
+ "mcpServers": {
3
+ "backlog": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@modelcontextprotocol/server-backlog"
8
+ ],
9
+ "env": {
10
+ "BACKLOG_API_KEY": "{{BACKLOG_API_KEY}}",
11
+ "BACKLOG_SPACE_KEY": "{{BACKLOG_SPACE_KEY}}"
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "mcpServers": {
3
+ "figma": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "figma-developer-mcp",
8
+ "--stdio"
9
+ ],
10
+ "env": {
11
+ "FIGMA_API_TOKEN": "{{FIGMA_API_TOKEN}}"
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "mcpServers": {
3
+ "google-sheets": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@modelcontextprotocol/server-google-sheets"
8
+ ],
9
+ "env": {
10
+ "GOOGLE_CREDENTIALS_JSON": "{{GOOGLE_CREDENTIALS_JSON}}"
11
+ }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "mcpServers": {
3
+ "jira": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@modelcontextprotocol/server-jira"
8
+ ],
9
+ "env": {
10
+ "JIRA_API_TOKEN": "{{JIRA_API_TOKEN}}",
11
+ "JIRA_EMAIL": "{{JIRA_EMAIL}}",
12
+ "JIRA_DOMAIN": "{{JIRA_DOMAIN}}"
13
+ }
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,149 @@
1
+ # Bug Fix Investigation Prompt
2
+
3
+ ## 📋 Context
4
+
5
+ **Title:** {{TITLE}}
6
+
7
+ **Description:**
8
+ {{DESCRIPTION}}
9
+
10
+ **Reproduction Steps:**
11
+ {{STEPS}}
12
+
13
+ **Expected Behavior:**
14
+ {{EXPECTED}}
15
+
16
+ **Actual Behavior:**
17
+ {{ACTUAL}}
18
+
19
+ **Impact:** {{IMPACT}}
20
+
21
+ ---
22
+
23
+ ## 🎯 Your Task
24
+
25
+ Investigate and fix this bug following the structured approach below.
26
+
27
+ ### Step 1: Understand the Error
28
+
29
+ - Read and understand the error message completely
30
+ - Identify which feature or component is affected
31
+ - Check error logs, stack traces, or user reports
32
+ - Understand the business impact
33
+
34
+ ### Step 2: Trace the Data Flow
35
+
36
+ Start from where the user interacts with the system and trace through your application:
37
+
38
+ ```
39
+ Controller/Route (receives request)
40
+
41
+ Service/Action (processes business logic)
42
+
43
+ Model/Repository (database operations)
44
+
45
+ External APIs (if applicable)
46
+ ```
47
+
48
+ Add logging at each step if needed to understand variable values:
49
+ - What data enters the function?
50
+ - What transformations happen?
51
+ - What data is returned or saved?
52
+
53
+ ### Step 3: Check Git History
54
+
55
+ Use Git to understand the context:
56
+
57
+ ```bash
58
+ # Find suspicious changes
59
+ git blame <file>
60
+
61
+ # See full history of changes
62
+ git log -p <file>
63
+
64
+ # Check recent commits
65
+ git log --oneline -20
66
+ ```
67
+
68
+ Look for:
69
+ - Recent changes that could have broken this
70
+ - Why code was changed this way
71
+ - Dependencies on other changes
72
+
73
+ ### Step 4: Identify Root Cause
74
+
75
+ List the root cause with:
76
+ - Exact location in code (file:line)
77
+ - What is wrong
78
+ - Why it's wrong
79
+ - Impact on the system
80
+
81
+ ### Step 5: Propose Solution
82
+
83
+ Suggest the best fix:
84
+ - Minimal change (only fix the bug, don't refactor)
85
+ - No breaking changes to other features
86
+ - Consider performance and security
87
+ - Add tests to verify the fix
88
+
89
+ ### Step 6: Test the Fix
90
+
91
+ ```bash
92
+ # Run specific test
93
+ npm test -- tests/[feature].test.js
94
+
95
+ # Run all tests
96
+ npm test
97
+
98
+ # Check for linting issues
99
+ npm run lint
100
+ ```
101
+
102
+ Verify:
103
+ - ✅ The bug is fixed
104
+ - ✅ No other tests break
105
+ - ✅ Code style compliant
106
+ - ✅ No performance regression
107
+
108
+ ---
109
+
110
+ ## 📚 Team Framework Rules
111
+
112
+ {{FRAMEWORK_RULES}}
113
+
114
+ ---
115
+
116
+ ## 📏 Team Rules & Standards
117
+
118
+ {{TEAM_RULES}}
119
+
120
+ ---
121
+
122
+ ## ✅ Success Criteria
123
+
124
+ - [ ] Root cause identified with code reference
125
+ - [ ] Fix implemented and tested
126
+ - [ ] All tests passing
127
+ - [ ] No breaking changes
128
+ - [ ] Code follows team standards
129
+ - [ ] Solution is minimal and focused
130
+
131
+ ---
132
+
133
+ ## 💡 Tips
134
+
135
+ - **Don't guess** → Investigate systematically
136
+ - **Don't break things** → Verify no side effects
137
+ - **Don't over-engineer** → Keep fix minimal
138
+ - **Do test thoroughly** → Verify all scenarios
139
+ - **Do document** → Explain why you fixed it this way
140
+
141
+ ---
142
+
143
+ **Remember:** A good bug fix is one that:
144
+ 1. Solves the problem completely
145
+ 2. Doesn't create new problems
146
+ 3. Is understood and maintainable
147
+ 4. Is tested and verified
148
+
149
+ Start your investigation now! 🔍