@relipa/ai-flow-kit 0.0.5-beta.0 → 0.0.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -17
- package/custom/skills/{validate-ticket → read-study-requirement}/SKILL.md +27 -17
- package/custom/skills/review-plan/SKILL.md +1 -1
- package/custom/templates/shared/gate-workflow.md +88 -88
- package/custom/templates/tools/claude.md +1 -1
- package/custom/templates/tools/copilot.md +1 -1
- package/custom/templates/tools/cursor.md +1 -1
- package/custom/templates/tools/gemini.md +1 -1
- package/custom/templates/tools/generic.md +1 -1
- package/docs/{AIFLOW.md → common/AIFLOW.md} +462 -463
- package/docs/{CHANGELOG.md → common/CHANGELOG.md} +132 -128
- package/docs/{cli-reference.md → common/cli-reference.md} +1 -1
- package/docs/project/ARCHITECTURE.md +28 -0
- package/package.json +3 -2
- package/scripts/context.js +1 -1
- package/scripts/hooks/session-start.js +145 -145
- package/scripts/init.js +154 -47
- package/scripts/prompt.js +431 -402
- package/scripts/telemetry/cli.js +5 -11
- package/scripts/telemetry/config.js +1 -4
- package/scripts/telemetry/flush.js +16 -13
- package/scripts/use.js +74 -31
- package/docs/IMPLEMENTATION_SUMMARY.md +0 -330
- package/docs/architecture.md +0 -394
- package/docs/developer-overview.md +0 -126
- /package/docs/{QUICK_START.md → common/QUICK_START.md} +0 -0
- /package/docs/{ai-integration.md → common/ai-integration.md} +0 -0
- /package/docs/{configuration.md → common/configuration.md} +0 -0
- /package/docs/{getting-started.md → common/getting-started.md} +0 -0
- /package/docs/{troubleshooting.md → common/troubleshooting.md} +0 -0
- /package/docs/{workflows → common/workflows}/bug-fix.md +0 -0
- /package/docs/{workflows → common/workflows}/feature.md +0 -0
- /package/docs/{workflows → common/workflows}/impact-analysis.md +0 -0
- /package/docs/{workflows → common/workflows}/investigation.md +0 -0
- /package/docs/{workflows → common/workflows}/refactor.md +0 -0
package/scripts/telemetry/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { input
|
|
1
|
+
const { input } = require('@inquirer/prompts');
|
|
2
2
|
const chalk = require('chalk');
|
|
3
3
|
const https = require('https');
|
|
4
4
|
const crypto = require('crypto');
|
|
@@ -21,7 +21,7 @@ function pingServer(url, teamSecret, testEmail) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const payload = {
|
|
24
|
-
email: testEmail || 'ping@
|
|
24
|
+
email: testEmail || 'ping@test.example',
|
|
25
25
|
lines: [signPing(teamSecret)]
|
|
26
26
|
};
|
|
27
27
|
const data = JSON.stringify(payload);
|
|
@@ -141,12 +141,6 @@ async function enableTelemetry() {
|
|
|
141
141
|
default: defaultEmail
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
const confirmEnable = await confirm({ message: 'Confirm enable?', default: true });
|
|
145
|
-
if (!confirmEnable) {
|
|
146
|
-
console.log(chalk.yellow('Cancelled.'));
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
144
|
console.log(chalk.gray('\nTesting authentication... (HMAC ping)'));
|
|
151
145
|
try {
|
|
152
146
|
// We send the inputted email to avoid the "unauthorized_email_domain" false negative/positive issue
|
|
@@ -192,9 +186,9 @@ function statusTelemetry() {
|
|
|
192
186
|
|
|
193
187
|
console.log();
|
|
194
188
|
console.log(chalk.bold('Status: ') + (cfg.enabled ? chalk.green('enabled') : chalk.gray('disabled')));
|
|
195
|
-
console.log(chalk.bold('URL: ') + (cfg.apps_script_url
|
|
196
|
-
console.log(chalk.bold('Email: ') + (cfg.email
|
|
197
|
-
console.log(chalk.bold('Install ID: ') + (cfg.install_id
|
|
189
|
+
console.log(chalk.bold('URL: ') + (cfg.apps_script_url ? maskUrl(cfg.apps_script_url) : '-'));
|
|
190
|
+
console.log(chalk.bold('Email: ') + (cfg.email ? maskSecret(cfg.email) : '-'));
|
|
191
|
+
console.log(chalk.bold('Install ID: ') + (cfg.install_id ? maskSecret(cfg.install_id) : '-'));
|
|
198
192
|
console.log(chalk.bold('Buffer: ') + `${events} events (${(size/1024).toFixed(1)} KB)`);
|
|
199
193
|
console.log(chalk.bold('Last flush: ') + lastFlushStr);
|
|
200
194
|
console.log(chalk.bold('Repo opt-out: ') + repoOptOut + (repoOptOut === 'yes' ? ' (has .aiflow/no-telemetry)' : ' (no .aiflow/no-telemetry)'));
|
|
@@ -66,10 +66,7 @@ function saveConfig(telemetryConfig) {
|
|
|
66
66
|
function detectGitEmail() {
|
|
67
67
|
try {
|
|
68
68
|
const stdout = execSync('git config --global user.email', { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'ignore'] });
|
|
69
|
-
|
|
70
|
-
if (email.endsWith('@relipasoft.com')) {
|
|
71
|
-
return email;
|
|
72
|
-
}
|
|
69
|
+
return stdout.trim();
|
|
73
70
|
} catch (err) {
|
|
74
71
|
// git not installed or no email config
|
|
75
72
|
}
|
|
@@ -33,20 +33,20 @@ function sendData(url, payload) {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
const req = https.request(options, (res) => {
|
|
36
|
-
// Google Apps Script POST to /exec returns 302
|
|
37
|
-
//
|
|
36
|
+
// Google Apps Script POST to /exec returns 302 *after* doPost has already executed.
|
|
37
|
+
// Treat 302 as success immediately — following the redirect is best-effort only.
|
|
38
|
+
// Never retry on 302: the data was already written; retrying causes duplicates.
|
|
38
39
|
if (res.statusCode === 302 || res.statusCode === 301) {
|
|
40
|
+
res.resume(); // drain response body
|
|
39
41
|
const redirectUrl = res.headers.location;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
49
|
-
.on("error", reject);
|
|
42
|
+
if (redirectUrl) {
|
|
43
|
+
https
|
|
44
|
+
.get(redirectUrl, (redirectRes) => {
|
|
45
|
+
redirectRes.resume(); // drain, ignore body
|
|
46
|
+
})
|
|
47
|
+
.on("error", () => {}); // best-effort, do not reject
|
|
48
|
+
}
|
|
49
|
+
resolve(true); // GAS already processed the request
|
|
50
50
|
} else {
|
|
51
51
|
let body = "";
|
|
52
52
|
res.on("data", (chunk) => (body += chunk));
|
|
@@ -70,7 +70,10 @@ function sendData(url, payload) {
|
|
|
70
70
|
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
71
71
|
|
|
72
72
|
async function main() {
|
|
73
|
-
setTimeout(() =>
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
try { if (fs.existsSync(LOCK_PATH)) fs.unlinkSync(LOCK_PATH); } catch (e) {}
|
|
75
|
+
process.exit(0);
|
|
76
|
+
}, 40000); // 40s hard exit — always release lock before dying
|
|
74
77
|
|
|
75
78
|
// Debounce sleep: Wait 10s to accumulate rapid command executions
|
|
76
79
|
await wait(10000);
|
package/scripts/use.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const fs = require('fs-extra');
|
|
2
2
|
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
3
4
|
const chalk = require('chalk');
|
|
4
5
|
const https = require('https');
|
|
5
6
|
const { select, input } = require('@inquirer/prompts');
|
|
@@ -182,7 +183,7 @@ async function loadFromBacklog(issueKey, options = {}) {
|
|
|
182
183
|
const context = buildContextFromBacklog(issue, comments, issueKey, domain);
|
|
183
184
|
await saveContext(context, options.save);
|
|
184
185
|
printContextSummary(context);
|
|
185
|
-
await suggestNextStep(
|
|
186
|
+
await suggestNextStep();
|
|
186
187
|
} catch (err) {
|
|
187
188
|
console.log(chalk.yellow(`⚠ Could not fetch from Backlog: ${err.message}`));
|
|
188
189
|
console.log(chalk.gray('Falling back to manual entry...\n'));
|
|
@@ -339,7 +340,7 @@ async function loadFromJira(issueKey, options = {}) {
|
|
|
339
340
|
const context = buildContextFromJira(issue, issueKey, domain);
|
|
340
341
|
await saveContext(context, options.save);
|
|
341
342
|
printContextSummary(context);
|
|
342
|
-
await suggestNextStep(
|
|
343
|
+
await suggestNextStep();
|
|
343
344
|
} catch (err) {
|
|
344
345
|
console.log(chalk.yellow(`⚠ Could not fetch from Jira: ${err.message}`));
|
|
345
346
|
console.log(chalk.gray('Falling back to manual entry...\n'));
|
|
@@ -410,15 +411,42 @@ function buildContextFromJira(issue, issueKey, domain) {
|
|
|
410
411
|
// ──────────────────────────────────────────────────────────────
|
|
411
412
|
|
|
412
413
|
async function manualContext(prefillId = '') {
|
|
413
|
-
|
|
414
|
+
// Load existing context for pre-fill (Edit mode)
|
|
415
|
+
let existing = {};
|
|
416
|
+
const currentPath = path.join(CONTEXT_DIR, 'current.json');
|
|
417
|
+
if (await fs.pathExists(currentPath)) {
|
|
418
|
+
existing = await fs.readJson(currentPath).catch(() => ({}));
|
|
419
|
+
}
|
|
414
420
|
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
421
|
+
const isEdit = !!(existing.taskId);
|
|
422
|
+
if (isEdit) {
|
|
423
|
+
console.log(chalk.cyan('\nEdit Context\n'));
|
|
424
|
+
console.log(chalk.gray('Press Enter to keep existing value shown in [brackets]\n'));
|
|
425
|
+
} else {
|
|
426
|
+
console.log(chalk.cyan('\nManual Context Entry\n'));
|
|
427
|
+
}
|
|
419
428
|
|
|
420
|
-
|
|
421
|
-
const
|
|
429
|
+
// Ticket ID
|
|
430
|
+
const defaultId = prefillId || existing.taskId || '';
|
|
431
|
+
const idHint = defaultId ? chalk.gray(` [${defaultId}]`) : '';
|
|
432
|
+
const idInput = await input({ message: `Ticket ID (e.g. PROJ-33)${idHint}:`, default: '' });
|
|
433
|
+
const taskId = idInput.trim() || defaultId;
|
|
434
|
+
|
|
435
|
+
// Title
|
|
436
|
+
const defaultTitle = existing.title || '';
|
|
437
|
+
const titlePreview = defaultTitle.length > 50 ? defaultTitle.substring(0, 50) + '…' : defaultTitle;
|
|
438
|
+
const titleHint = defaultTitle ? chalk.gray(` [${titlePreview}]`) : '';
|
|
439
|
+
const titleInput = await input({ message: `Title${titleHint}:`, default: '' });
|
|
440
|
+
const title = titleInput.trim() || defaultTitle;
|
|
441
|
+
|
|
442
|
+
// Description
|
|
443
|
+
const defaultDesc = existing.description || '';
|
|
444
|
+
const descPreview = defaultDesc.length > 60 ? defaultDesc.substring(0, 60) + '…' : defaultDesc;
|
|
445
|
+
const descHint = defaultDesc ? chalk.gray(` [${descPreview}]`) : '';
|
|
446
|
+
const descInput = await input({ message: `Description (brief)${descHint}:`, default: '' });
|
|
447
|
+
const description = descInput.trim() || defaultDesc;
|
|
448
|
+
|
|
449
|
+
// Task type — pre-select existing value if available
|
|
422
450
|
const taskType = await select({
|
|
423
451
|
message: 'Task type:',
|
|
424
452
|
choices: [
|
|
@@ -427,7 +455,8 @@ async function manualContext(prefillId = '') {
|
|
|
427
455
|
{ name: '🔍 Investigation', value: 'investigation' },
|
|
428
456
|
{ name: '♻️ Refactor', value: 'refactor' },
|
|
429
457
|
{ name: '📊 Impact Analysis', value: 'impact-analysis' }
|
|
430
|
-
]
|
|
458
|
+
],
|
|
459
|
+
default: existing.taskType || undefined
|
|
431
460
|
});
|
|
432
461
|
|
|
433
462
|
const context = {
|
|
@@ -435,11 +464,12 @@ async function manualContext(prefillId = '') {
|
|
|
435
464
|
taskType,
|
|
436
465
|
title,
|
|
437
466
|
description,
|
|
438
|
-
status: 'In Progress',
|
|
439
|
-
acceptanceCriteria: [],
|
|
440
|
-
context: { files: [], relatedTickets: [] },
|
|
467
|
+
status: existing.status || 'In Progress',
|
|
468
|
+
acceptanceCriteria: existing.acceptanceCriteria || [],
|
|
469
|
+
context: existing.context || { files: [], relatedTickets: [] },
|
|
441
470
|
metadata: {
|
|
442
|
-
created: new Date().toISOString(),
|
|
471
|
+
created: existing.metadata?.created || new Date().toISOString(),
|
|
472
|
+
updated: new Date().toISOString(),
|
|
443
473
|
loadedFrom: 'manual',
|
|
444
474
|
adapter: 'manual'
|
|
445
475
|
}
|
|
@@ -447,7 +477,7 @@ async function manualContext(prefillId = '') {
|
|
|
447
477
|
|
|
448
478
|
await saveContext(context);
|
|
449
479
|
printContextSummary(context);
|
|
450
|
-
await suggestNextStep(
|
|
480
|
+
await suggestNextStep();
|
|
451
481
|
}
|
|
452
482
|
|
|
453
483
|
// ──────────────────────────────────────────────────────────────
|
|
@@ -462,17 +492,23 @@ async function loadFromFile(filePath, options = {}) {
|
|
|
462
492
|
const context = await fs.readJson(filePath);
|
|
463
493
|
await saveContext(context, options.save);
|
|
464
494
|
printContextSummary(context);
|
|
465
|
-
await suggestNextStep(
|
|
495
|
+
await suggestNextStep();
|
|
466
496
|
}
|
|
467
497
|
|
|
468
498
|
// ──────────────────────────────────────────────────────────────
|
|
469
|
-
// Credentials loader (
|
|
499
|
+
// Credentials loader — global (~/.aiflow/credentials.json) with project fallback
|
|
470
500
|
// ──────────────────────────────────────────────────────────────
|
|
471
501
|
|
|
472
502
|
async function loadCredentials() {
|
|
473
|
-
const
|
|
474
|
-
if (await fs.pathExists(
|
|
475
|
-
|
|
503
|
+
const globalCredsFile = path.join(os.homedir(), '.aiflow', 'credentials.json');
|
|
504
|
+
if (await fs.pathExists(globalCredsFile)) {
|
|
505
|
+
const data = await fs.readJson(globalCredsFile).catch(() => ({}));
|
|
506
|
+
if (data.mcp && Object.keys(data.mcp).length > 0) return data.mcp;
|
|
507
|
+
}
|
|
508
|
+
// Fallback: project-level credentials (legacy support)
|
|
509
|
+
const projectCredsFile = path.join(PROJECT_DIR, '.aiflow', 'credentials.json');
|
|
510
|
+
if (await fs.pathExists(projectCredsFile)) {
|
|
511
|
+
return await fs.readJson(projectCredsFile).catch(() => ({}));
|
|
476
512
|
}
|
|
477
513
|
return {};
|
|
478
514
|
}
|
|
@@ -564,7 +600,7 @@ function printContextSummary(context) {
|
|
|
564
600
|
console.log();
|
|
565
601
|
}
|
|
566
602
|
|
|
567
|
-
async function suggestNextStep(
|
|
603
|
+
async function suggestNextStep() {
|
|
568
604
|
let aiTools = ['claude']; // Default
|
|
569
605
|
try {
|
|
570
606
|
if (await fs.pathExists(STATE_FILE)) {
|
|
@@ -576,17 +612,24 @@ async function suggestNextStep(context) {
|
|
|
576
612
|
} catch (_) {}
|
|
577
613
|
|
|
578
614
|
console.log(chalk.cyan('\nNext Steps:'));
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
615
|
+
|
|
616
|
+
const hasCLI = aiTools.includes('claude') || aiTools.includes('gemini');
|
|
617
|
+
const hasIDE = aiTools.includes('claude') || aiTools.includes('cursor') || aiTools.includes('copilot');
|
|
618
|
+
|
|
619
|
+
if (hasCLI) {
|
|
620
|
+
console.log(chalk.white('\n CLI:'));
|
|
621
|
+
let step = 0;
|
|
622
|
+
if (aiTools.includes('claude')) {
|
|
623
|
+
console.log(` ${++step}. ${chalk.white('Claude:')} Run ${chalk.bold.green('claude start')} in terminal. ${chalk.gray('(Quickest way to start)')}`);
|
|
624
|
+
}
|
|
625
|
+
if (aiTools.includes('gemini')) {
|
|
626
|
+
console.log(` ${++step}. ${chalk.white('Gemini:')} Run ${chalk.bold.green('gemini')} then type ${chalk.bold.green('"start"')} or ${chalk.bold.green('"Gate 1"')}.`);
|
|
627
|
+
}
|
|
586
628
|
}
|
|
587
|
-
|
|
588
|
-
if (
|
|
589
|
-
console.log(
|
|
629
|
+
|
|
630
|
+
if (hasIDE) {
|
|
631
|
+
console.log(chalk.white('\n IDE Extension Chat:'));
|
|
632
|
+
console.log(` Run ${chalk.bold.green('aiflow prompt')} → prompt auto-copied to clipboard → paste into your AI extension chat.`);
|
|
590
633
|
}
|
|
591
634
|
|
|
592
635
|
console.log(`\n ${chalk.yellow('Note:')} If the AI does not start automatically, type ${chalk.bold.green('"Gate 1"')} or ${chalk.bold.green('"Analyze ticket"')} to begin.`);
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
# AI Flow Kit - Implementation Summary
|
|
2
|
-
|
|
3
|
-
Complete overview of what has been implemented.
|
|
4
|
-
|
|
5
|
-
## 📦 Package Overview
|
|
6
|
-
|
|
7
|
-
**AI Flow Kit** is an all-in-one npm package that provides:
|
|
8
|
-
- Pre-built AI skills and workflows
|
|
9
|
-
- Smart task detection and classification
|
|
10
|
-
- Context auto-loading from project management tools
|
|
11
|
-
- Team collaboration and knowledge management
|
|
12
|
-
- Framework-specific templates
|
|
13
|
-
- MCP adapter integration
|
|
14
|
-
|
|
15
|
-
## ✅ Completed Implementations
|
|
16
|
-
|
|
17
|
-
### Tier 1: Core Features (COMPLETED)
|
|
18
|
-
|
|
19
|
-
#### 1. ✅ Auto-Detection & Task Classification
|
|
20
|
-
- **File:** `scripts/detect.js`
|
|
21
|
-
- **Features:**
|
|
22
|
-
- Analyzes description to detect task type (bug-fix, feature, refactor, investigation, impact, documentation)
|
|
23
|
-
- Provides confidence scores and alternative suggestions
|
|
24
|
-
- Keyword-based detection with scoring algorithm
|
|
25
|
-
- CLI integration: `aiflow detect "description"`
|
|
26
|
-
|
|
27
|
-
#### 2. ✅ Context Autofill System
|
|
28
|
-
- **Files:** `scripts/use.js`, context loading logic
|
|
29
|
-
- **Features:**
|
|
30
|
-
- Load context from Jira tickets: `aiflow use JIRA-123`
|
|
31
|
-
- Load context from Backlog: `aiflow use BACKLOG-456`
|
|
32
|
-
- Manual context entry: `aiflow use --manual`
|
|
33
|
-
- Context history and caching
|
|
34
|
-
- Save/load named contexts: `aiflow context --save/load`
|
|
35
|
-
|
|
36
|
-
#### 3. ✅ Smart Prompt Templates
|
|
37
|
-
- **Files:** `custom/prompts/*.md`
|
|
38
|
-
- **Templates Created:**
|
|
39
|
-
- `bug-fix.md` — Bug investigation workflow
|
|
40
|
-
- `feature.md` — Feature development workflow
|
|
41
|
-
- `investigation.md` — Code investigation workflow
|
|
42
|
-
- `refactor.md` — Code improvement workflow (in docs)
|
|
43
|
-
- `impact-analysis.md` — Change impact assessment (in docs)
|
|
44
|
-
- **Features:**
|
|
45
|
-
- Context substitution ({{TITLE}}, {{DESCRIPTION}}, etc)
|
|
46
|
-
- Framework-specific rules included
|
|
47
|
-
- Team standards integration
|
|
48
|
-
- Step-by-step guidance
|
|
49
|
-
- Success criteria checklists
|
|
50
|
-
|
|
51
|
-
#### 4. ✅ Enhanced MCP Preset System
|
|
52
|
-
- **Files:** `custom/mcp-presets/*.json`
|
|
53
|
-
- **Presets Configured:**
|
|
54
|
-
- `jira.json` — Atlassian Jira adapter
|
|
55
|
-
- `backlog.json` — Nulab Backlog adapter
|
|
56
|
-
- `google-sheets.json` — Google Sheets adapter
|
|
57
|
-
- **Features:**
|
|
58
|
-
- Pre-configured environment variables
|
|
59
|
-
- Interactive setup during `aiflow init`
|
|
60
|
-
- Credential management
|
|
61
|
-
- Documentation and setup guides
|
|
62
|
-
- Fallback to manual entry if MCP fails
|
|
63
|
-
|
|
64
|
-
### Tier 2: Developer Experience (COMPLETED)
|
|
65
|
-
|
|
66
|
-
#### 5. ✅ Documentation & Onboarding
|
|
67
|
-
- **Files:** `docs/*.md`
|
|
68
|
-
- **Documentation Includes:**
|
|
69
|
-
- **README.md** — Package overview, features, usage
|
|
70
|
-
- **QUICK_START.md** — 5-minute getting started
|
|
71
|
-
- **docs/getting-started.md** — Step-by-step setup guide
|
|
72
|
-
- **docs/architecture.md** — System design and customization
|
|
73
|
-
- **docs/configuration.md** — All configuration options
|
|
74
|
-
- **docs/cli-reference.md** — Complete CLI command reference
|
|
75
|
-
- **docs/troubleshooting.md** — Common issues and solutions
|
|
76
|
-
- **Workflow Guides:**
|
|
77
|
-
- `docs/workflows/bug-fix.md` — Fix production issues
|
|
78
|
-
- `docs/workflows/feature.md` — Build new features
|
|
79
|
-
- `docs/workflows/investigation.md` — Analyze code
|
|
80
|
-
- `docs/workflows/refactor.md` — Improve existing code
|
|
81
|
-
- `docs/workflows/impact-analysis.md` — Assess change scope
|
|
82
|
-
|
|
83
|
-
#### 6. ✅ Project Configuration System
|
|
84
|
-
- **Files:** `scripts/config.js`, `.aiflowrc.json.example`
|
|
85
|
-
- **Features:**
|
|
86
|
-
- Configuration with proper precedence (env vars > CLI flags > project config > global config > defaults)
|
|
87
|
-
- Support for 30+ configuration options
|
|
88
|
-
- Configuration validation
|
|
89
|
-
- Template configs for different team sizes
|
|
90
|
-
- Merge and override capabilities
|
|
91
|
-
- Per-team customization
|
|
92
|
-
|
|
93
|
-
#### 7. ✅ Team Collaboration Features
|
|
94
|
-
- **CLI Commands:**
|
|
95
|
-
- `aiflow context --list` — List saved contexts
|
|
96
|
-
- `aiflow context --save <name>` — Save context
|
|
97
|
-
- `aiflow context --load <name>` — Load saved context
|
|
98
|
-
- `aiflow memory --list` — List team knowledge
|
|
99
|
-
- `aiflow memory --search <query>` — Find knowledge
|
|
100
|
-
- `aiflow memory --save <key> <value>` — Save team knowledge
|
|
101
|
-
|
|
102
|
-
### Tier 3: Advanced Features (MOSTLY COMPLETED)
|
|
103
|
-
|
|
104
|
-
#### 8. ✅ Context & Memory System
|
|
105
|
-
- **File:** `scripts/memory.js`
|
|
106
|
-
- **Features:**
|
|
107
|
-
- Save team knowledge: `aiflow memory --save "key" "value"`
|
|
108
|
-
- Retrieve knowledge: `aiflow memory --get "key"`
|
|
109
|
-
- Search memories: `aiflow memory --search "payment"`
|
|
110
|
-
- Auto-load relevant memories based on context
|
|
111
|
-
- Memory persistence to `.aiflow/memory/`
|
|
112
|
-
- Metadata tracking (created, updated)
|
|
113
|
-
|
|
114
|
-
#### 9. ✅ Validation & Quality Checks
|
|
115
|
-
- **File:** `scripts/validate.js`
|
|
116
|
-
- **Validation Checks:**
|
|
117
|
-
- Code style (indentation, line length, whitespace)
|
|
118
|
-
- Naming conventions (camelCase consistency, single-letter vars)
|
|
119
|
-
- Security issues (eval usage, SQL injection patterns, unsanitized input)
|
|
120
|
-
- Performance issues (N+1 queries, inefficient loops)
|
|
121
|
-
- Testing coverage checks
|
|
122
|
-
- Multiple rule sets: default, strict, lenient
|
|
123
|
-
- **CLI:** `aiflow validate <file> --ruleset strict`
|
|
124
|
-
|
|
125
|
-
#### 10. ✅ CLI & Commands
|
|
126
|
-
- **File:** `bin/aiflow.js`
|
|
127
|
-
- **Commands Implemented:**
|
|
128
|
-
- `aiflow init` — Initialize project
|
|
129
|
-
- `aiflow use [target]` — Load context
|
|
130
|
-
- `aiflow prompt <type>` — Generate prompts
|
|
131
|
-
- `aiflow detect [description]` — Auto-detect task type
|
|
132
|
-
- `aiflow context <action>` — Manage contexts
|
|
133
|
-
- `aiflow validate <file>` — Validate code
|
|
134
|
-
- `aiflow memory <action>` — Manage knowledge
|
|
135
|
-
- `aiflow update` — Update to latest version
|
|
136
|
-
- `aiflow doctor` — Health check
|
|
137
|
-
|
|
138
|
-
#### 11. ✅ Framework Templates
|
|
139
|
-
- **Files:** `custom/templates/*.md`
|
|
140
|
-
- **Templates:**
|
|
141
|
-
- `laravel.md` — Laravel-specific rules
|
|
142
|
-
- `nextjs.md` — Next.js specific rules
|
|
143
|
-
- `vue-nuxt.md` — Vue/Nuxt specific rules
|
|
144
|
-
- **Content:**
|
|
145
|
-
- Architecture patterns
|
|
146
|
-
- Code style conventions
|
|
147
|
-
- Testing frameworks
|
|
148
|
-
- Performance guidelines
|
|
149
|
-
- Security best practices
|
|
150
|
-
|
|
151
|
-
#### 12. ✅ Team Rules & Standards
|
|
152
|
-
- **Files:** `custom/rules/*.md`
|
|
153
|
-
- **Rule Files:**
|
|
154
|
-
- `code-style.md` — Code style guide
|
|
155
|
-
- `naming.md` — Naming conventions
|
|
156
|
-
- `review-checklist.md` — Code review standards
|
|
157
|
-
- **Auto-Inclusion:**
|
|
158
|
-
- Rules included in generated prompts
|
|
159
|
-
- Validated by `aiflow validate`
|
|
160
|
-
- Customizable per team
|
|
161
|
-
|
|
162
|
-
### Tier 3: Advanced Features (PLANNED)
|
|
163
|
-
|
|
164
|
-
#### 11. 🚧 Metrics & Analytics System
|
|
165
|
-
- **Status:** Planned
|
|
166
|
-
- **Will Include:**
|
|
167
|
-
- Track development metrics
|
|
168
|
-
- Time to resolve bugs
|
|
169
|
-
- Feature development cycles
|
|
170
|
-
- Skill usage patterns
|
|
171
|
-
- Error rate analysis
|
|
172
|
-
|
|
173
|
-
#### 12. 🚧 Plugin/Extension System
|
|
174
|
-
- **Status:** Planned
|
|
175
|
-
- **Will Include:**
|
|
176
|
-
- Custom plugin development
|
|
177
|
-
- Plugin installation system
|
|
178
|
-
- Plugin marketplace
|
|
179
|
-
- Hook-based extensibility
|
|
180
|
-
|
|
181
|
-
## 📂 Folder Structure
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
ai-flow-kit/
|
|
185
|
-
├── bin/
|
|
186
|
-
│ └── aiflow.js # CLI entry point
|
|
187
|
-
├── docs/ # Documentation and Guides
|
|
188
|
-
│ ├── README.md # Package overview
|
|
189
|
-
│ ├── QUICK_START.md # Quick start guide
|
|
190
|
-
│ ├── AIFLOW.md # Workflow (5 Gates) detail
|
|
191
|
-
│ ├── CHANGELOG.md # Version history
|
|
192
|
-
│ ├── IMPLEMENTATION_SUMMARY.md # Technical implementation details
|
|
193
|
-
│ ├── getting-started.md
|
|
194
|
-
│ ├── architecture.md
|
|
195
|
-
│ ├── configuration.md
|
|
196
|
-
│ ├── cli-reference.md
|
|
197
|
-
│ ├── troubleshooting.md
|
|
198
|
-
│ └── workflows/
|
|
199
|
-
│ ├── bug-fix.md
|
|
200
|
-
│ ├── feature.md
|
|
201
|
-
│ ├── investigation.md
|
|
202
|
-
│ ├── refactor.md
|
|
203
|
-
│ └── impact-analysis.md
|
|
204
|
-
├── scripts/
|
|
205
|
-
│ ├── init.js # Project initialization
|
|
206
|
-
│ ├── update.js # Version management
|
|
207
|
-
│ ├── doctor.js # Health check
|
|
208
|
-
│ ├── use.js # Context loading
|
|
209
|
-
│ ├── config.js # Configuration system
|
|
210
|
-
│ ├── detect.js # Task detection
|
|
211
|
-
│ ├── validate.js # Code validation
|
|
212
|
-
│ └── memory.js # Knowledge management
|
|
213
|
-
├── custom/
|
|
214
|
-
│ ├── skills/ # Team-specific skills
|
|
215
|
-
│ ├── rules/ # Team standards
|
|
216
|
-
│ ├── templates/ # Tool templates
|
|
217
|
-
│ ├── prompts/ # Task templates
|
|
218
|
-
│ └── mcp-presets/ # MCP adapters
|
|
219
|
-
├── upstream/ # Original obra/superpowers
|
|
220
|
-
├── package.json # Updated with metadata
|
|
221
|
-
├── .gitignore # Updated
|
|
222
|
-
├── .aiflowrc.json.example # Configuration template
|
|
223
|
-
├── index.js # Main entry point
|
|
224
|
-
└── plan.md # TechLead planning (root)
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## 🎯 Key Features Summary
|
|
228
|
-
|
|
229
|
-
| Feature | Status | Details |
|
|
230
|
-
|---------|--------|---------|
|
|
231
|
-
| Auto-detect task type | ✅ Complete | Analyzes description, suggests workflow |
|
|
232
|
-
| Context auto-fill | ✅ Complete | Load from Jira, Backlog, Google Sheets, manual |
|
|
233
|
-
| Smart prompts | ✅ Complete | Context + framework rules + team standards |
|
|
234
|
-
| Framework templates | ✅ Complete | Laravel, Next.js, Vue+Nuxt |
|
|
235
|
-
| MCP adapters | ✅ Complete | Jira, Backlog, Google Sheets |
|
|
236
|
-
| Team rules | ✅ Complete | Code style, naming, review standards |
|
|
237
|
-
| Task classification | ✅ Complete | Bug, feature, refactor, investigation, impact |
|
|
238
|
-
| Memory system | ✅ Complete | Save/search team knowledge |
|
|
239
|
-
| Validation | ✅ Complete | Code quality, style, security checks |
|
|
240
|
-
| Configuration system | ✅ Complete | Global, project, environment overrides |
|
|
241
|
-
| CLI commands | ✅ Complete | 10+ commands for all workflows |
|
|
242
|
-
| Documentation | ✅ Complete | 50+ pages of guides and examples |
|
|
243
|
-
| Skill management | ✅ Complete | Custom skills in custom/skills/ |
|
|
244
|
-
| Version management | ✅ Complete | Multiple versions, easy updates |
|
|
245
|
-
| Health check | ✅ Complete | `aiflow doctor` validates setup |
|
|
246
|
-
| Metrics/analytics | 🚧 Planned | Track development patterns |
|
|
247
|
-
| Plugin system | 🚧 Planned | Extensible architecture |
|
|
248
|
-
|
|
249
|
-
## 🚀 Installation & Usage
|
|
250
|
-
|
|
251
|
-
### Installation
|
|
252
|
-
```bash
|
|
253
|
-
npm install -g ai-flow-kit
|
|
254
|
-
# or
|
|
255
|
-
npm install ai-flow-kit
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Initialize
|
|
259
|
-
```bash
|
|
260
|
-
aiflow init --framework laravel --adapter jira
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### Typical Workflow
|
|
264
|
-
```bash
|
|
265
|
-
# 1. Load task context
|
|
266
|
-
aiflow use JIRA-123
|
|
267
|
-
|
|
268
|
-
# 2. Generate prompt
|
|
269
|
-
aiflow prompt bug-fix
|
|
270
|
-
|
|
271
|
-
# 3. Copy to Claude Code
|
|
272
|
-
# 4. Claude auto-detects and runs skill
|
|
273
|
-
# 5. Review and test
|
|
274
|
-
# 6. Commit with confidence
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
## 📈 Quality Metrics
|
|
278
|
-
|
|
279
|
-
- **Documentation:** 50+ pages across README, docs, workflows
|
|
280
|
-
- **CLI Commands:** 10+ commands (init, use, prompt, detect, context, validate, memory, update, doctor)
|
|
281
|
-
- **Configuration Options:** 30+ options with environment variable support
|
|
282
|
-
- **Task Types:** 6 types (bug-fix, feature, investigation, refactor, impact, documentation)
|
|
283
|
-
- **Adapters:** 3 pre-configured (Jira, Backlog, Google Sheets)
|
|
284
|
-
- **Framework Templates:** 3 templates (Laravel, Next.js, Vue+Nuxt)
|
|
285
|
-
- **Validation Rules:** 4 categories (style, naming, security, performance)
|
|
286
|
-
- **Workflow Guides:** 5 detailed guides
|
|
287
|
-
- **Code Examples:** 20+ examples in documentation
|
|
288
|
-
|
|
289
|
-
## 🎓 Learning Resources
|
|
290
|
-
|
|
291
|
-
- Quick Start: 5 minutes to first task
|
|
292
|
-
- Getting Started: Detailed setup guide
|
|
293
|
-
- Architecture: Understand system design
|
|
294
|
-
- Workflows: Step-by-step for each task type
|
|
295
|
-
- CLI Reference: Complete command documentation
|
|
296
|
-
- Troubleshooting: Solutions to common issues
|
|
297
|
-
- Contributing: Extend for your team
|
|
298
|
-
|
|
299
|
-
## 🔄 Next Steps (For Future Enhancement)
|
|
300
|
-
|
|
301
|
-
1. **Metrics System** — Track development patterns
|
|
302
|
-
2. **Plugin System** — Community extensions
|
|
303
|
-
3. **Linear Adapter** — Support Linear.app
|
|
304
|
-
4. **GitHub Adapter** — Support GitHub Issues
|
|
305
|
-
5. **Automation** — CI/CD integration
|
|
306
|
-
6. **Web Dashboard** — Visual task management
|
|
307
|
-
7. **Team Analytics** — Team insights
|
|
308
|
-
8. **Mobile App** — Mobile support
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
## 📝 Summary
|
|
313
|
-
|
|
314
|
-
AI Flow Kit successfully implements a **complete, production-ready all-in-one package** for AI-powered team development. It combines:
|
|
315
|
-
|
|
316
|
-
✅ **Smart automation** — Auto-detect task types, load context automatically
|
|
317
|
-
✅ **Developer experience** — Simple commands, clear documentation
|
|
318
|
-
✅ **Team collaboration** — Share knowledge, follow standards
|
|
319
|
-
✅ **Framework support** — Laravel, Next.js, Vue+Nuxt out-of-the-box
|
|
320
|
-
✅ **MCP integration** — Jira, Backlog, Google Sheets
|
|
321
|
-
✅ **Quality assurance** — Validation, standards, best practices
|
|
322
|
-
✅ **Comprehensive docs** — 50+ pages of guides and examples
|
|
323
|
-
|
|
324
|
-
**Developers can now:**
|
|
325
|
-
- Install once: `npm install -g ai-flow-kit`
|
|
326
|
-
- Initialize once: `aiflow init`
|
|
327
|
-
- Work efficiently: Load context, generate prompt, let AI help
|
|
328
|
-
- Stay consistent: Automatic framework rules and team standards
|
|
329
|
-
|
|
330
|
-
This is a **complete, professional-grade solution** ready for team adoption! 🚀
|