@relipa/ai-flow-kit 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/bin/aiflow.js +55 -2
- package/bin/ak.js +0 -0
- package/custom/mcp-presets/README.md +204 -237
- package/custom/mcp-presets/backlog.json +0 -0
- package/custom/mcp-presets/figma-desktop.json +0 -0
- package/custom/mcp-presets/figma.json +0 -0
- package/custom/mcp-presets/gitnexus.json +0 -0
- package/custom/mcp-presets/google-sheets.json +0 -0
- package/custom/mcp-presets/jira.json +0 -0
- package/custom/prompts/bug-fix.md +0 -0
- package/custom/prompts/feature.md +0 -0
- package/custom/prompts/investigation.md +0 -0
- package/custom/rules/code-style.md +0 -0
- package/custom/rules/java/code-style.md +0 -0
- package/custom/rules/java/naming.md +0 -0
- package/custom/rules/java/review-checklist.md +0 -0
- package/custom/rules/java/spring-boot-examples.md +0 -0
- package/custom/rules/javascript/code-style.md +0 -0
- package/custom/rules/javascript/naming.md +0 -0
- package/custom/rules/ml-conventions.md +88 -0
- package/custom/rules/ml-review-checklist.md +14 -0
- package/custom/rules/naming.md +0 -0
- package/custom/rules/php/code-style.md +0 -0
- package/custom/rules/php/naming.md +0 -0
- package/custom/rules/project-conventions.md +0 -0
- package/custom/rules/review-checklist.md +0 -0
- package/custom/skills/deploy-model/SKILL.md +90 -0
- package/custom/skills/design-experiment/SKILL.md +88 -0
- package/custom/skills/evaluate-model/SKILL.md +93 -0
- package/custom/skills/explore-data/SKILL.md +87 -0
- package/custom/skills/figma-to-component/SKILL.md +0 -0
- package/custom/skills/frame-ml-problem/SKILL.md +88 -0
- package/custom/skills/generate-spec/SKILL.md +0 -0
- package/custom/skills/impact-analysis/SKILL.md +0 -0
- package/custom/skills/improve-algorithm/SKILL.md +74 -0
- package/custom/skills/investigate-bug/SKILL.md +0 -0
- package/custom/skills/read-study-requirement/SKILL.md +0 -0
- package/custom/skills/report-customer/SKILL.md +0 -0
- package/custom/skills/review-plan/SKILL.md +0 -0
- package/custom/skills/train-model/SKILL.md +78 -0
- package/custom/templates/laravel.md +0 -0
- package/custom/templates/nestjs.md +0 -0
- package/custom/templates/nextjs.md +0 -0
- package/custom/templates/nodejs-express.md +0 -0
- package/custom/templates/php-plain.md +0 -0
- package/custom/templates/php.md +0 -0
- package/custom/templates/python-django.md +0 -0
- package/custom/templates/python-fastapi.md +0 -0
- package/custom/templates/python-ml.md +273 -0
- package/custom/templates/python.md +0 -0
- package/custom/templates/reactjs.md +0 -0
- package/custom/templates/shared/gate-workflow.md +0 -0
- package/custom/templates/shared/ml-gate-workflow.md +103 -0
- package/custom/templates/spring-boot.md +0 -0
- package/custom/templates/tools/claude.md +0 -0
- package/custom/templates/tools/copilot.md +0 -0
- package/custom/templates/tools/cursor.md +0 -0
- package/custom/templates/tools/gemini.md +0 -0
- package/custom/templates/tools/generic.md +0 -0
- package/custom/templates/vue-nuxt.md +0 -0
- package/docs/common/AIFLOW.md +512 -512
- package/docs/common/CHANGELOG.md +32 -0
- package/docs/common/QUICK_START.md +0 -0
- package/docs/common/ai-integration.md +0 -0
- package/docs/common/cli-reference.md +0 -0
- package/docs/common/configuration.md +0 -0
- package/docs/common/getting-started.md +0 -0
- package/docs/common/troubleshooting.md +0 -0
- package/docs/common/workflows/bug-fix.md +0 -0
- package/docs/common/workflows/feature.md +0 -0
- package/docs/common/workflows/figma.md +0 -0
- package/docs/common/workflows/impact-analysis.md +0 -0
- package/docs/common/workflows/investigation.md +0 -0
- package/docs/common/workflows/refactor.md +0 -0
- package/docs/project/ARCHITECTURE.md +0 -0
- package/index.js +0 -0
- package/package.json +1 -1
- package/scripts/checkpoint.js +0 -0
- package/scripts/config.js +0 -0
- package/scripts/context.js +0 -0
- package/scripts/create-score-excel.js +0 -0
- package/scripts/detect.js +239 -239
- package/scripts/doctor.js +192 -218
- package/scripts/gitnexus-worker.js +0 -0
- package/scripts/guide.js +0 -0
- package/scripts/hooks/block-git-write.js +0 -0
- package/scripts/hooks/session-start.js +0 -0
- package/scripts/hooks/session-stop.js +0 -0
- package/scripts/init.js +1112 -1009
- package/scripts/link-resolver.js +0 -0
- package/scripts/memory.js +0 -0
- package/scripts/prompt.js +538 -538
- package/scripts/remove.js +0 -0
- package/scripts/task.js +546 -546
- package/scripts/telemetry/cli.js +0 -0
- package/scripts/telemetry/config.js +0 -0
- package/scripts/telemetry/crypto.js +0 -0
- package/scripts/telemetry/flush.js +0 -0
- package/scripts/telemetry/record.js +0 -0
- package/scripts/update.js +10 -7
- package/scripts/use.js +33 -12
- package/scripts/validate.js +0 -0
- package/upstream/.claude-plugin/marketplace.json +0 -0
- package/upstream/.claude-plugin/plugin.json +0 -0
- package/upstream/.codex/INSTALL.md +0 -0
- package/upstream/.cursor-plugin/plugin.json +0 -0
- package/upstream/.gitattributes +0 -0
- package/upstream/.github/FUNDING.yml +0 -0
- package/upstream/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- package/upstream/.github/ISSUE_TEMPLATE/config.yml +0 -0
- package/upstream/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- package/upstream/.github/ISSUE_TEMPLATE/platform_support.md +0 -0
- package/upstream/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- package/upstream/.opencode/INSTALL.md +0 -0
- package/upstream/.opencode/plugins/superpowers.js +0 -0
- package/upstream/.version-bump.json +0 -0
- package/upstream/AGENTS.md +0 -0
- package/upstream/CHANGELOG.md +0 -0
- package/upstream/CLAUDE.md +0 -0
- package/upstream/CODE_OF_CONDUCT.md +0 -0
- package/upstream/GEMINI.md +0 -0
- package/upstream/LICENSE +0 -0
- package/upstream/README.md +0 -0
- package/upstream/RELEASE-NOTES.md +0 -0
- package/upstream/agents/code-reviewer.md +0 -0
- package/upstream/commands/brainstorm.md +0 -0
- package/upstream/commands/execute-plan.md +0 -0
- package/upstream/commands/write-plan.md +0 -0
- package/upstream/docs/README.codex.md +0 -0
- package/upstream/docs/README.opencode.md +0 -0
- package/upstream/docs/plans/2025-11-22-opencode-support-design.md +0 -0
- package/upstream/docs/plans/2025-11-22-opencode-support-implementation.md +0 -0
- package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +0 -0
- package/upstream/docs/plans/2026-01-17-visual-brainstorming.md +0 -0
- package/upstream/docs/superpowers/plans/2026-01-22-document-review-system.md +0 -0
- package/upstream/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +0 -0
- package/upstream/docs/superpowers/plans/2026-03-11-zero-dep-brainstorm-server.md +0 -0
- package/upstream/docs/superpowers/plans/2026-03-23-codex-app-compatibility.md +0 -0
- package/upstream/docs/superpowers/specs/2026-01-22-document-review-system-design.md +0 -0
- package/upstream/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +0 -0
- package/upstream/docs/superpowers/specs/2026-03-11-zero-dep-brainstorm-server-design.md +0 -0
- package/upstream/docs/superpowers/specs/2026-03-23-codex-app-compatibility-design.md +0 -0
- package/upstream/docs/testing.md +0 -0
- package/upstream/docs/windows/polyglot-hooks.md +0 -0
- package/upstream/gemini-extension.json +0 -0
- package/upstream/hooks/hooks-cursor.json +0 -0
- package/upstream/hooks/hooks.json +0 -0
- package/upstream/hooks/run-hook.cmd +0 -0
- package/upstream/hooks/session-start +0 -0
- package/upstream/package.json +0 -0
- package/upstream/scripts/bump-version.sh +0 -0
- package/upstream/skills/brainstorming/SKILL.md +0 -0
- package/upstream/skills/brainstorming/scripts/frame-template.html +0 -0
- package/upstream/skills/brainstorming/scripts/helper.js +0 -0
- package/upstream/skills/brainstorming/scripts/server.cjs +0 -0
- package/upstream/skills/brainstorming/scripts/start-server.sh +0 -0
- package/upstream/skills/brainstorming/scripts/stop-server.sh +0 -0
- package/upstream/skills/brainstorming/spec-document-reviewer-prompt.md +0 -0
- package/upstream/skills/brainstorming/visual-companion.md +0 -0
- package/upstream/skills/dispatching-parallel-agents/SKILL.md +0 -0
- package/upstream/skills/executing-plans/SKILL.md +0 -0
- package/upstream/skills/finishing-a-development-branch/SKILL.md +0 -0
- package/upstream/skills/receiving-code-review/SKILL.md +0 -0
- package/upstream/skills/requesting-code-review/SKILL.md +0 -0
- package/upstream/skills/requesting-code-review/code-reviewer.md +0 -0
- package/upstream/skills/subagent-driven-development/SKILL.md +0 -0
- package/upstream/skills/subagent-driven-development/code-quality-reviewer-prompt.md +0 -0
- package/upstream/skills/subagent-driven-development/implementer-prompt.md +0 -0
- package/upstream/skills/subagent-driven-development/spec-reviewer-prompt.md +0 -0
- package/upstream/skills/systematic-debugging/CREATION-LOG.md +0 -0
- package/upstream/skills/systematic-debugging/SKILL.md +0 -0
- package/upstream/skills/systematic-debugging/condition-based-waiting-example.ts +0 -0
- package/upstream/skills/systematic-debugging/condition-based-waiting.md +0 -0
- package/upstream/skills/systematic-debugging/defense-in-depth.md +0 -0
- package/upstream/skills/systematic-debugging/find-polluter.sh +0 -0
- package/upstream/skills/systematic-debugging/root-cause-tracing.md +0 -0
- package/upstream/skills/systematic-debugging/test-academic.md +0 -0
- package/upstream/skills/systematic-debugging/test-pressure-1.md +0 -0
- package/upstream/skills/systematic-debugging/test-pressure-2.md +0 -0
- package/upstream/skills/systematic-debugging/test-pressure-3.md +0 -0
- package/upstream/skills/tdd-lean/SKILL.md +0 -0
- package/upstream/skills/test-driven-development/SKILL.md +0 -0
- package/upstream/skills/test-driven-development/testing-anti-patterns.md +0 -0
- package/upstream/skills/using-git-worktrees/SKILL.md +0 -0
- package/upstream/skills/using-superpowers/SKILL.md +0 -0
- package/upstream/skills/using-superpowers/references/codex-tools.md +0 -0
- package/upstream/skills/using-superpowers/references/copilot-tools.md +0 -0
- package/upstream/skills/using-superpowers/references/gemini-tools.md +0 -0
- package/upstream/skills/verification-before-completion/SKILL.md +0 -0
- package/upstream/skills/writing-plans/SKILL.md +0 -0
- package/upstream/skills/writing-plans/plan-document-reviewer-prompt.md +0 -0
- package/upstream/skills/writing-skills/SKILL.md +0 -0
- package/upstream/skills/writing-skills/anthropic-best-practices.md +0 -0
- package/upstream/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -0
- package/upstream/skills/writing-skills/graphviz-conventions.dot +0 -0
- package/upstream/skills/writing-skills/persuasion-principles.md +0 -0
- package/upstream/skills/writing-skills/render-graphs.js +0 -0
- package/upstream/skills/writing-skills/testing-skills-with-subagents.md +0 -0
- package/upstream/tests/brainstorm-server/package-lock.json +0 -0
- package/upstream/tests/brainstorm-server/package.json +0 -0
- package/upstream/tests/brainstorm-server/server.test.js +0 -0
- package/upstream/tests/brainstorm-server/windows-lifecycle.test.sh +0 -0
- package/upstream/tests/brainstorm-server/ws-protocol.test.js +0 -0
- package/upstream/tests/claude-code/README.md +0 -0
- package/upstream/tests/claude-code/analyze-token-usage.py +0 -0
- package/upstream/tests/claude-code/run-skill-tests.sh +0 -0
- package/upstream/tests/claude-code/test-document-review-system.sh +0 -0
- package/upstream/tests/claude-code/test-helpers.sh +0 -0
- package/upstream/tests/claude-code/test-subagent-driven-development-integration.sh +0 -0
- package/upstream/tests/claude-code/test-subagent-driven-development.sh +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/action-oriented.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/after-planning-flow.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/claude-suggested-it.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/i-know-what-sdd-means.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/mid-conversation-execute-plan.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/please-use-brainstorming.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/skip-formalities.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/subagent-driven-development-please.txt +0 -0
- package/upstream/tests/explicit-skill-requests/prompts/use-systematic-debugging.txt +0 -0
- package/upstream/tests/explicit-skill-requests/run-all.sh +0 -0
- package/upstream/tests/explicit-skill-requests/run-claude-describes-sdd.sh +0 -0
- package/upstream/tests/explicit-skill-requests/run-extended-multiturn-test.sh +0 -0
- package/upstream/tests/explicit-skill-requests/run-haiku-test.sh +0 -0
- package/upstream/tests/explicit-skill-requests/run-multiturn-test.sh +0 -0
- package/upstream/tests/explicit-skill-requests/run-test.sh +0 -0
- package/upstream/tests/opencode/run-tests.sh +0 -0
- package/upstream/tests/opencode/setup.sh +0 -0
- package/upstream/tests/opencode/test-plugin-loading.sh +0 -0
- package/upstream/tests/opencode/test-priority.sh +0 -0
- package/upstream/tests/opencode/test-tools.sh +0 -0
- package/upstream/tests/skill-triggering/prompts/dispatching-parallel-agents.txt +0 -0
- package/upstream/tests/skill-triggering/prompts/executing-plans.txt +0 -0
- package/upstream/tests/skill-triggering/prompts/requesting-code-review.txt +0 -0
- package/upstream/tests/skill-triggering/prompts/systematic-debugging.txt +0 -0
- package/upstream/tests/skill-triggering/prompts/test-driven-development.txt +0 -0
- package/upstream/tests/skill-triggering/prompts/writing-plans.txt +0 -0
- package/upstream/tests/skill-triggering/run-all.sh +0 -0
- package/upstream/tests/skill-triggering/run-test.sh +0 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/design.md +0 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/plan.md +0 -0
- package/upstream/tests/subagent-driven-dev/go-fractals/scaffold.sh +0 -0
- package/upstream/tests/subagent-driven-dev/run-test.sh +0 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/design.md +0 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/plan.md +0 -0
- package/upstream/tests/subagent-driven-dev/svelte-todo/scaffold.sh +0 -0
- package/custom/mcp-presets/playwright.json +0 -11
- package/custom/rules/test-patterns.md +0 -105
- package/custom/skills/automation-testing/SKILL.md +0 -168
- package/custom/skills/automation-testing/templates/BasePage.ts +0 -30
- package/custom/skills/automation-testing/templates/playwright.config.ts +0 -21
- package/custom/skills/automation-testing/templates/repos.json +0 -8
- package/scripts/score_members.js +0 -320
package/README.md
CHANGED
|
File without changes
|
package/bin/aiflow.js
CHANGED
|
@@ -19,6 +19,8 @@ const taskCommand = require('../scripts/task');
|
|
|
19
19
|
const checkpointCommand = require('../scripts/checkpoint');
|
|
20
20
|
const { record } = require('../scripts/telemetry/record');
|
|
21
21
|
const { updateTaskGateState } = require('../scripts/task');
|
|
22
|
+
const semver = require('semver');
|
|
23
|
+
const { execSync: execSyncChild, spawnSync } = require('child_process');
|
|
22
24
|
|
|
23
25
|
// ── DEPRECATION WARNING ───────────────────────────────────────
|
|
24
26
|
if (!process.env.AIFLOW_IS_AK) {
|
|
@@ -415,6 +417,50 @@ function showTelResult(result, label) {
|
|
|
415
417
|
} catch (e) { /* never block main flow */ }
|
|
416
418
|
}
|
|
417
419
|
|
|
420
|
+
// ── Gate start helpers ────────────────────────────────────────
|
|
421
|
+
|
|
422
|
+
function checkNodeVersionForGate() {
|
|
423
|
+
try {
|
|
424
|
+
const minRaw = packageJson.engines && packageJson.engines.node
|
|
425
|
+
? packageJson.engines.node
|
|
426
|
+
: '>=16.0.0';
|
|
427
|
+
const min = minRaw.replace('>=', '').trim();
|
|
428
|
+
const current = process.version.replace('v', '').trim();
|
|
429
|
+
if (semver.gte(current, min)) {
|
|
430
|
+
console.log(chalk.green(` ✓ Node ${process.version}`));
|
|
431
|
+
} else {
|
|
432
|
+
console.log(chalk.yellow(` ⚠ Node ${process.version} — minimum required: v${min}. Please upgrade Node.js.`));
|
|
433
|
+
}
|
|
434
|
+
} catch (_) {
|
|
435
|
+
console.log(chalk.gray(` Node ${process.version}`));
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function checkAndInstallAiflowGlobal() {
|
|
440
|
+
try {
|
|
441
|
+
const out = execSyncChild('npm list -g --depth 0 @relipa/ai-flow-kit', {
|
|
442
|
+
encoding: 'utf-8',
|
|
443
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
444
|
+
});
|
|
445
|
+
if (!out.includes('@relipa/ai-flow-kit')) {
|
|
446
|
+
throw new Error('not found');
|
|
447
|
+
}
|
|
448
|
+
// Already installed — silent
|
|
449
|
+
} catch (_) {
|
|
450
|
+
console.log(chalk.yellow(' ⚠ @relipa/ai-flow-kit not found globally. Installing latest...'));
|
|
451
|
+
const result = spawnSync(
|
|
452
|
+
'npm',
|
|
453
|
+
['install', '-g', '@relipa/ai-flow-kit@latest'],
|
|
454
|
+
{ stdio: 'inherit', shell: process.platform === 'win32' }
|
|
455
|
+
);
|
|
456
|
+
if (result.status !== 0) {
|
|
457
|
+
console.log(chalk.red(' ✗ Install failed. Please run manually: npm install -g @relipa/ai-flow-kit@latest'));
|
|
458
|
+
} else {
|
|
459
|
+
console.log(chalk.green(' ✓ @relipa/ai-flow-kit installed successfully.'));
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
418
464
|
// ── gate (telemetry for gate workflow events) ─────────────────
|
|
419
465
|
program
|
|
420
466
|
.command('gate <number> <action>')
|
|
@@ -426,6 +472,12 @@ program
|
|
|
426
472
|
if (isNaN(gateNum) || gateNum < 1 || gateNum > 5) return;
|
|
427
473
|
if (!['start', 'approved'].includes(action)) return;
|
|
428
474
|
|
|
475
|
+
if (action === 'start') {
|
|
476
|
+
console.log(chalk.cyan(`\n [aiflow] Gate ${gateNum} environment check:`));
|
|
477
|
+
checkNodeVersionForGate();
|
|
478
|
+
checkAndInstallAiflowGlobal();
|
|
479
|
+
}
|
|
480
|
+
|
|
429
481
|
const ticketId = options.ticket || '';
|
|
430
482
|
|
|
431
483
|
const telResult = record(`gate.${action}`, {
|
|
@@ -489,12 +541,13 @@ program
|
|
|
489
541
|
}
|
|
490
542
|
|
|
491
543
|
const state = await fs.readJson(stateFile);
|
|
492
|
-
|
|
544
|
+
// Support both old 'framework' (singular string) and new 'frameworks' (array)
|
|
545
|
+
const frameworks = state.frameworks || (state.framework ? [state.framework] : []);
|
|
493
546
|
const selectedTools = state.aiTools || Object.keys(AI_TOOL_FILES);
|
|
494
547
|
|
|
495
548
|
console.log(chalk.cyan('⟳ Syncing AI Instruction files...'));
|
|
496
549
|
for (const fw of frameworks) {
|
|
497
|
-
await setupFramework(projectDir, fw, frameworks.length > 1, selectedTools);
|
|
550
|
+
await setupFramework(projectDir, fw, frameworks.length > 1, selectedTools, { force: true });
|
|
498
551
|
}
|
|
499
552
|
await ensureAiflowGitignored(projectDir);
|
|
500
553
|
console.log(chalk.green('✨ Sync completed!'));
|
package/bin/ak.js
CHANGED
|
File without changes
|
|
@@ -1,237 +1,204 @@
|
|
|
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
|
-
### Figma (`figma.json`)
|
|
57
|
-
|
|
58
|
-
Connect to Figma via REST API to read design files and generate components.
|
|
59
|
-
|
|
60
|
-
**When to use:** Default choice. Works anywhere — no Desktop app required.
|
|
61
|
-
|
|
62
|
-
**Setup:**
|
|
63
|
-
```bash
|
|
64
|
-
aiflow init --adapter figma
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**Required Environment Variables:**
|
|
68
|
-
- `FIGMA_API_TOKEN` — Your Figma Personal Access Token
|
|
69
|
-
|
|
70
|
-
**Get API Token:**
|
|
71
|
-
1. Go to https://www.figma.com/settings → Security → Personal access tokens
|
|
72
|
-
2. Create a new token with File content (read) scope
|
|
73
|
-
3. Copy the token
|
|
74
|
-
|
|
75
|
-
**Tools provided by `figma-developer-mcp`:**
|
|
76
|
-
- `get_figma_data(fileKey, nodeId, depth)` — fetch node layout, styles, components
|
|
77
|
-
- `download_figma_images(fileKey, nodes, localPath)` — export images
|
|
78
|
-
|
|
79
|
-
**Usage:**
|
|
80
|
-
```
|
|
81
|
-
Generate component from Figma:
|
|
82
|
-
https://www.figma.com/design/XXXXX/App?node-id=123-456
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
See: [Figma workflow guide](../../docs/common/workflows/figma.md)
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
### Figma Desktop (`figma-desktop.json`)
|
|
90
|
-
|
|
91
|
-
Connect via the official Figma MCP server. Requires Figma Desktop app open.
|
|
92
|
-
|
|
93
|
-
**When to use:** When your team prefers the official Figma tooling and has Desktop app licenses.
|
|
94
|
-
**When NOT to use:** CI environments, headless servers, team members without Desktop licenses.
|
|
95
|
-
|
|
96
|
-
**Setup:**
|
|
97
|
-
```bash
|
|
98
|
-
aiflow init --adapter figma-desktop
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**Requirements:**
|
|
102
|
-
- Figma Desktop app installed
|
|
103
|
-
- A Figma file open in Desktop when invoking the skill
|
|
104
|
-
- No API token needed — uses Desktop session
|
|
105
|
-
|
|
106
|
-
**Tools provided by `@figma/mcp-server`:**
|
|
107
|
-
- `get_figma_data(fileKey, nodeId)` — fetch design data for open file
|
|
108
|
-
- `get_node_children(nodeId)` — traverse component tree
|
|
109
|
-
- `get_local_components()` — list components in the open file
|
|
110
|
-
|
|
111
|
-
| | `figma` (REST API) | `figma-desktop` (Official) |
|
|
112
|
-
|---|---|---|
|
|
113
|
-
| Needs Desktop app | No | Yes (must be open) |
|
|
114
|
-
| Auth | API Token | Desktop session |
|
|
115
|
-
| Works in CI | Yes | No |
|
|
116
|
-
| Access scope | Full REST API | Currently open file |
|
|
117
|
-
|
|
118
|
-
See: [Figma workflow guide](../../docs/common/workflows/figma.md)
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
###
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
**
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
3. Users can install with:
|
|
207
|
-
```bash
|
|
208
|
-
aiflow init --adapter <adapter-name>
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Validators
|
|
212
|
-
|
|
213
|
-
Each preset should be validated during `aiflow init`:
|
|
214
|
-
|
|
215
|
-
- ✓ Environment variables set
|
|
216
|
-
- ✓ API connectivity working
|
|
217
|
-
- ✓ Proper permissions configured
|
|
218
|
-
|
|
219
|
-
## Best Practices
|
|
220
|
-
|
|
221
|
-
1. **Use placeholders** — {{VAR_NAME}} for env variables
|
|
222
|
-
2. **Document setup** — Include step-by-step guide
|
|
223
|
-
3. **Provide examples** — Show usage patterns
|
|
224
|
-
4. **Handle errors** — Clear error messages if setup fails
|
|
225
|
-
5. **Support multiple instances** — Allow team variations
|
|
226
|
-
|
|
227
|
-
## Security
|
|
228
|
-
|
|
229
|
-
- **Never commit credentials** — Use environment variables
|
|
230
|
-
- **Use secure storage** — Store API tokens securely
|
|
231
|
-
- **Rotate tokens** — Regularly update API tokens
|
|
232
|
-
- **Restrict permissions** — Use minimal required permissions
|
|
233
|
-
- **Audit access** — Monitor who accesses what
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
For more info: See [Configuration Guide](../../docs/configuration.md)
|
|
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
|
+
### Figma (`figma.json`)
|
|
57
|
+
|
|
58
|
+
Connect to Figma via REST API to read design files and generate components.
|
|
59
|
+
|
|
60
|
+
**When to use:** Default choice. Works anywhere — no Desktop app required.
|
|
61
|
+
|
|
62
|
+
**Setup:**
|
|
63
|
+
```bash
|
|
64
|
+
aiflow init --adapter figma
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Required Environment Variables:**
|
|
68
|
+
- `FIGMA_API_TOKEN` — Your Figma Personal Access Token
|
|
69
|
+
|
|
70
|
+
**Get API Token:**
|
|
71
|
+
1. Go to https://www.figma.com/settings → Security → Personal access tokens
|
|
72
|
+
2. Create a new token with File content (read) scope
|
|
73
|
+
3. Copy the token
|
|
74
|
+
|
|
75
|
+
**Tools provided by `figma-developer-mcp`:**
|
|
76
|
+
- `get_figma_data(fileKey, nodeId, depth)` — fetch node layout, styles, components
|
|
77
|
+
- `download_figma_images(fileKey, nodes, localPath)` — export images
|
|
78
|
+
|
|
79
|
+
**Usage:**
|
|
80
|
+
```
|
|
81
|
+
Generate component from Figma:
|
|
82
|
+
https://www.figma.com/design/XXXXX/App?node-id=123-456
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
See: [Figma workflow guide](../../docs/common/workflows/figma.md)
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Figma Desktop (`figma-desktop.json`)
|
|
90
|
+
|
|
91
|
+
Connect via the official Figma MCP server. Requires Figma Desktop app open.
|
|
92
|
+
|
|
93
|
+
**When to use:** When your team prefers the official Figma tooling and has Desktop app licenses.
|
|
94
|
+
**When NOT to use:** CI environments, headless servers, team members without Desktop licenses.
|
|
95
|
+
|
|
96
|
+
**Setup:**
|
|
97
|
+
```bash
|
|
98
|
+
aiflow init --adapter figma-desktop
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Requirements:**
|
|
102
|
+
- Figma Desktop app installed
|
|
103
|
+
- A Figma file open in Desktop when invoking the skill
|
|
104
|
+
- No API token needed — uses Desktop session
|
|
105
|
+
|
|
106
|
+
**Tools provided by `@figma/mcp-server`:**
|
|
107
|
+
- `get_figma_data(fileKey, nodeId)` — fetch design data for open file
|
|
108
|
+
- `get_node_children(nodeId)` — traverse component tree
|
|
109
|
+
- `get_local_components()` — list components in the open file
|
|
110
|
+
|
|
111
|
+
| | `figma` (REST API) | `figma-desktop` (Official) |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| Needs Desktop app | No | Yes (must be open) |
|
|
114
|
+
| Auth | API Token | Desktop session |
|
|
115
|
+
| Works in CI | Yes | No |
|
|
116
|
+
| Access scope | Full REST API | Currently open file |
|
|
117
|
+
|
|
118
|
+
See: [Figma workflow guide](../../docs/common/workflows/figma.md)
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### Google Sheets (`google-sheets.json`)
|
|
123
|
+
|
|
124
|
+
Connect to Google Sheets for loading task context.
|
|
125
|
+
|
|
126
|
+
**Setup:**
|
|
127
|
+
```bash
|
|
128
|
+
aiflow init --adapter google-sheets
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
**Required Environment Variables:**
|
|
132
|
+
- `GOOGLE_SHEETS_CREDS` — Path to service account JSON
|
|
133
|
+
|
|
134
|
+
**Get Credentials:**
|
|
135
|
+
1. Create Google Cloud project
|
|
136
|
+
2. Enable Sheets API
|
|
137
|
+
3. Create service account
|
|
138
|
+
4. Download JSON credentials
|
|
139
|
+
5. Store securely and set path
|
|
140
|
+
|
|
141
|
+
**Usage:**
|
|
142
|
+
```bash
|
|
143
|
+
aiflow use SHEET-A1:D5
|
|
144
|
+
# Loads data from Google Sheet
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Creating Custom Presets
|
|
148
|
+
|
|
149
|
+
To add a new MCP adapter:
|
|
150
|
+
|
|
151
|
+
1. Create `<adapter-name>.json`:
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"mcpServers": {
|
|
156
|
+
"<adapter-name>": {
|
|
157
|
+
"command": "npx",
|
|
158
|
+
"args": [
|
|
159
|
+
"-y",
|
|
160
|
+
"@modelcontextprotocol/server-<adapter-name>"
|
|
161
|
+
],
|
|
162
|
+
"env": {
|
|
163
|
+
"ENV_VAR_1": "{{PLACEHOLDER}}",
|
|
164
|
+
"ENV_VAR_2": "{{PLACEHOLDER}}"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
2. Document in this README
|
|
172
|
+
|
|
173
|
+
3. Users can install with:
|
|
174
|
+
```bash
|
|
175
|
+
aiflow init --adapter <adapter-name>
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Validators
|
|
179
|
+
|
|
180
|
+
Each preset should be validated during `aiflow init`:
|
|
181
|
+
|
|
182
|
+
- ✓ Environment variables set
|
|
183
|
+
- ✓ API connectivity working
|
|
184
|
+
- ✓ Proper permissions configured
|
|
185
|
+
|
|
186
|
+
## Best Practices
|
|
187
|
+
|
|
188
|
+
1. **Use placeholders** — {{VAR_NAME}} for env variables
|
|
189
|
+
2. **Document setup** — Include step-by-step guide
|
|
190
|
+
3. **Provide examples** — Show usage patterns
|
|
191
|
+
4. **Handle errors** — Clear error messages if setup fails
|
|
192
|
+
5. **Support multiple instances** — Allow team variations
|
|
193
|
+
|
|
194
|
+
## Security
|
|
195
|
+
|
|
196
|
+
- **Never commit credentials** — Use environment variables
|
|
197
|
+
- **Use secure storage** — Store API tokens securely
|
|
198
|
+
- **Rotate tokens** — Regularly update API tokens
|
|
199
|
+
- **Restrict permissions** — Use minimal required permissions
|
|
200
|
+
- **Audit access** — Monitor who accesses what
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
For more info: See [Configuration Guide](../../docs/configuration.md)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# ML Conventions (Override Skill Defaults)
|
|
2
|
+
|
|
3
|
+
> **MANDATORY:** These rules override ANY upstream skill default (including `writing-plans`, `generate-spec`, `train-model`, `evaluate-model`, and all superpowers skills).
|
|
4
|
+
> Read this file before writing any output file during the ML Gate Workflow.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ML Plan Output Paths
|
|
9
|
+
|
|
10
|
+
| Output | Path | Note |
|
|
11
|
+
|--------|------|------|
|
|
12
|
+
| ML problem doc | `plan/[ticket-id]/ml-problem.md` | Gate 1 output |
|
|
13
|
+
| Experiment plan | `plan/[ticket-id]/experiment-plan.md` | Gate 2 output — **NOT** `docs/superpowers/plans/` |
|
|
14
|
+
| Evaluation report | `plan/[ticket-id]/eval-report.md` | Gate 4 output |
|
|
15
|
+
|
|
16
|
+
> The `[ticket-id]` comes from `.aiflow/context/current.json`.
|
|
17
|
+
> If no ticket context exists, use a descriptive slug: `plan/<feature-name>/ml-problem.md`.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Reproducibility Rules
|
|
22
|
+
|
|
23
|
+
Every experiment must be fully reproducible from its logged artifacts alone:
|
|
24
|
+
|
|
25
|
+
- **Set all seeds** before any randomness: `random.seed(n)`, `numpy.random.seed(n)`, and the framework seed (`torch.manual_seed(n)`, `tf.random.set_seed(n)`).
|
|
26
|
+
- **Enable deterministic flags** where feasible (`torch.use_deterministic_algorithms(True)`; note and document any performance trade-off).
|
|
27
|
+
- **Pin the environment:** `requirements.txt` or a lockfile must be committed alongside every model artifact.
|
|
28
|
+
- **Log seed, config, and commit SHA** with every tracked run — a run is not reproducible unless these three are recorded.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Experiment Naming Scheme
|
|
33
|
+
|
|
34
|
+
Pattern: `[ticket-id]_[approach]_[yyyymmdd-n]`
|
|
35
|
+
|
|
36
|
+
- `[ticket-id]` — Jira/linear ticket key (from `.aiflow/context/current.json`)
|
|
37
|
+
- `[approach]` — short slug describing the method (lowercase, hyphens, no spaces)
|
|
38
|
+
- `[yyyymmdd-n]` — date + 1-based daily sequence counter
|
|
39
|
+
|
|
40
|
+
**Concrete example:**
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
ML-42_lgbm-tfidf_20241115-1
|
|
44
|
+
ML-42_lgbm-tfidf_20241115-2
|
|
45
|
+
ML-42_bert-finetune_20241116-1
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Use this name as the MLflow `run_name` / wandb `run` name and as the artifact folder name under `experiments/`.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Data & Model Versioning
|
|
53
|
+
|
|
54
|
+
- **Datasets** must be versioned with DVC (or an equivalent registry). Never commit raw data or large processed files to git.
|
|
55
|
+
- **Model artifacts** must be registered in the artifact store (MLflow Model Registry, DVC, or equivalent). Record the data version used to produce each artifact.
|
|
56
|
+
- Each artifact's metadata must include: data version, code commit SHA, config file path, and eval metric.
|
|
57
|
+
- `models/` and `data/` directories are git-ignored; tracked via DVC or the registry instead.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Anti-Leakage Rules (Hard Rules)
|
|
62
|
+
|
|
63
|
+
These rules are non-negotiable and override any convenience shortcut:
|
|
64
|
+
|
|
65
|
+
- **Split before fit** — perform the train/validation/test split BEFORE fitting any transformer, imputer, scaler, or encoder.
|
|
66
|
+
- **Fit transforms on train only** — all preprocessing must live inside a `Pipeline` that is fit exclusively on the training fold. Never fit on the full dataset and then split.
|
|
67
|
+
- **No target leakage** — features must not be derived from or computed after the prediction target. Explicitly check every feature's availability time relative to the target.
|
|
68
|
+
- **No temporal leakage** — for time-series data, use time-aware splits (no future data for past predictions). Validate that no feature uses information from future time steps.
|
|
69
|
+
- **Test set is held-out** — the test set is touched only at Gate 4 evaluation. No hyperparameter tuning, no feature selection, and no threshold selection on the test set.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Checklist Before Writing Any Output File
|
|
74
|
+
|
|
75
|
+
Before saving any ML plan, experiment plan, or eval report, verify:
|
|
76
|
+
|
|
77
|
+
- [ ] Output path follows the table above — NOT the skill's default path
|
|
78
|
+
- [ ] `[ticket-id]` is read from `.aiflow/context/current.json`
|
|
79
|
+
- [ ] Directory `plan/[ticket-id]/` exists or will be created
|
|
80
|
+
- [ ] Announced path in the handoff message matches the actual saved path
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Other Conventions
|
|
85
|
+
|
|
86
|
+
- **ML review checklist:** `custom/rules/ml-review-checklist.md`
|
|
87
|
+
- **Code style:** `custom/rules/code-style.md`
|
|
88
|
+
- **Naming:** `custom/rules/naming.md`
|