ai-developer-skill-os 8.2.0 → 8.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/.agents/LICENSE +21 -21
  2. package/.agents/README.md +90 -90
  3. package/.agents/docs/CHI_TIET_SKILLS.md +125 -125
  4. package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +36 -36
  5. package/.agents/docs/MIGRATION-STATUS.md +35 -35
  6. package/.agents/docs/MIGRATION-V8.md +10 -10
  7. package/.agents/docs/V8-CERTIFICATION.md +27 -27
  8. package/.agents/docs/decisions/ADR-001-v8-migration.md +58 -58
  9. package/.agents/docs/decisions/ADR-002-workflow-separation.md +50 -50
  10. package/.agents/docs/decisions/ADR-003-registry-generated.md +54 -54
  11. package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +27 -27
  12. package/.agents/registry/graph.json +4 -8
  13. package/.agents/registry/index.yaml +3 -4
  14. package/.agents/registry/skills-index.yml +525 -525
  15. package/.agents/rules/coding.md +10 -0
  16. package/.agents/rules/command-safety.md +37 -14
  17. package/.agents/rules/priorities.yml +13 -2
  18. package/.agents/rules/security.md +47 -7
  19. package/.agents/rules/skill-quality.md +32 -8
  20. package/.agents/skills/_template/SKILL.md +133 -132
  21. package/.agents/skills/_template/capability.yaml +20 -20
  22. package/.agents/skills/_template/evals/scorecard.yaml +19 -19
  23. package/.agents/skills/qk-access-policy/SKILL.md +4 -1
  24. package/.agents/skills/qk-agent-observability/SKILL.md +111 -0
  25. package/.agents/skills/qk-agent-observability/references/scorecard.yaml +80 -0
  26. package/.agents/skills/qk-ai-builder/SKILL.md +74 -5
  27. package/.agents/skills/qk-api-lifecycle/SKILL.md +4 -2
  28. package/.agents/skills/qk-bug-resolution/SKILL.md +3 -21
  29. package/.agents/skills/qk-code-review/SKILL.md +188 -189
  30. package/.agents/skills/qk-context-loader/SKILL.md +3 -47
  31. package/.agents/skills/qk-data-lifecycle/SKILL.md +7 -2
  32. package/.agents/skills/qk-db-optimizer/SKILL.md +3 -2
  33. package/.agents/skills/qk-design-system-engineering/SKILL.md +235 -112
  34. package/.agents/skills/qk-devops-platform/SKILL.md +241 -117
  35. package/.agents/skills/qk-docs/SKILL.md +3 -1
  36. package/.agents/skills/qk-engineering-standard/SKILL.md +4 -75
  37. package/.agents/skills/qk-engineering-standard/references/anti-patterns.md +121 -0
  38. package/.agents/skills/qk-engineering-standard/rules/frontend.md +1 -1
  39. package/.agents/skills/qk-fe-api-integration/SKILL.md +13 -32
  40. package/.agents/skills/qk-feature-delivery/SKILL.md +54 -202
  41. package/.agents/skills/qk-frontend-architecture/SKILL.md +258 -134
  42. package/.agents/skills/qk-help/SKILL.md +21 -159
  43. package/.agents/skills/qk-orchestrator/SKILL.md +2 -78
  44. package/.agents/skills/qk-orchestrator/references/routing-table.md +15 -3
  45. package/.agents/skills/qk-product-specification/SKILL.md +253 -130
  46. package/.agents/skills/qk-production-release/SKILL.md +32 -67
  47. package/.agents/skills/qk-project-bootstrap/SKILL.md +59 -8
  48. package/.agents/skills/qk-project-health/SKILL.md +4 -2
  49. package/.agents/skills/qk-project-memory/SKILL.md +3 -1
  50. package/.agents/skills/qk-security-audit/SKILL.md +259 -135
  51. package/.agents/skills/qk-system-evolution/SKILL.md +18 -68
  52. package/.agents/skills/qk-test-engineering/SKILL.md +262 -139
  53. package/.agents/skills/qk-ui-audit/SKILL.md +16 -89
  54. package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +2 -2
  55. package/.agents/skills/qk-ui-builder/SKILL.md +482 -509
  56. package/.agents/skills/qk-ui-builder/references/component-cookbook.md +455 -1191
  57. package/.agents/skills/qk-ui-system-builder/SKILL.md +1 -5
  58. package/.agents/skills/qk-validation-gate/SKILL.md +0 -74
  59. package/.agents/skills/qk-web-quality-gate/SKILL.md +232 -114
  60. package/.agents/workflows/_schema.yml +146 -109
  61. package/.agents/workflows/bug-resolution.yml +121 -101
  62. package/.agents/workflows/code-review.yml +93 -77
  63. package/.agents/workflows/documentation.yml +90 -75
  64. package/.agents/workflows/feature-delivery.yml +120 -103
  65. package/.agents/workflows/refactor.yml +99 -81
  66. package/.agents/workflows/research.yml +75 -60
  67. package/.agents/workflows/security-audit.yml +115 -72
  68. package/.agents/workflows/skill-evolution.yml +97 -65
  69. package/.agents/workflows/spec-driven-development.yml +87 -57
  70. package/CHANGELOG.md +10 -0
  71. package/README.md +90 -90
  72. package/bin/install.js +330 -180
  73. package/package.json +2 -2
  74. package/.agents/CHANGELOG.md +0 -131
  75. package/.agents/learnings/draft/README.md +0 -37
  76. package/.agents/reports/RELEASE-CHECKLIST.md +0 -29
  77. package/.agents/reports/architecture-audit.md +0 -13
  78. package/.agents/reports/graph-health.md +0 -20
  79. package/.agents/reports/skill-audit.md +0 -215
package/bin/install.js CHANGED
@@ -1,180 +1,330 @@
1
- #!/usr/bin/env node
2
-
3
- import fs from 'fs';
4
- import path from 'path';
5
- import readline from 'readline';
6
- import { fileURLToPath } from 'url';
7
- import os from 'os';
8
-
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
- const sourceDir = path.resolve(__dirname, '..', '.agents');
12
- const packageJsonPath = path.resolve(__dirname, '..', 'package.json');
13
- const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
14
- const version = pkg.version;
15
- const cwd = process.cwd();
16
-
17
- function parseArgs() {
18
- const args = process.argv.slice(2);
19
- let ide = null;
20
- let scope = null;
21
-
22
- args.forEach(arg => {
23
- if (arg.startsWith('--ide=')) {
24
- ide = arg.split('=')[1];
25
- } else if (arg.startsWith('--scope=')) {
26
- scope = arg.split('=')[1];
27
- }
28
- });
29
-
30
- return { ide, scope };
31
- }
32
-
33
- function copyRecursiveSync(src, dest) {
34
- const exists = fs.existsSync(src);
35
- const stats = exists && fs.statSync(src);
36
- const isDirectory = exists && stats.isDirectory();
37
- if (isDirectory) {
38
- if (!fs.existsSync(dest)) {
39
- fs.mkdirSync(dest, { recursive: true });
40
- }
41
- fs.readdirSync(src).forEach(function (childItemName) {
42
- copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
43
- });
44
- } else {
45
- fs.copyFileSync(src, dest);
46
- }
47
- }
48
-
49
- function runInstall(ideChoice, scopeChoice) {
50
- const mapIde = {
51
- '1': 'cursor',
52
- '2': 'windsurf',
53
- '3': 'cline',
54
- '4': 'antigravity',
55
- '5': 'codex',
56
- '6': 'kilo',
57
- '7': 'multi-ide'
58
- };
59
-
60
- const mapScope = {
61
- '1': 'local',
62
- '2': 'global'
63
- };
64
-
65
- const ide = mapIde[ideChoice] || ideChoice;
66
- const scope = mapScope[scopeChoice] || scopeChoice;
67
- const isGlobal = scope === 'global';
68
-
69
- let targetDir = path.join(cwd, '.agents');
70
-
71
- if (isGlobal) {
72
- const homeDir = os.homedir();
73
- if (ide === 'antigravity') {
74
- targetDir = path.join(homeDir, '.gemini', 'config');
75
- } else {
76
- targetDir = path.join(homeDir, '.ai-developer-skill-os', '.agents');
77
- }
78
- }
79
-
80
- try {
81
- console.log(`\n🚀 Đang cài đặt V${version} Agent Engineering OS...`);
82
-
83
- if (!fs.existsSync(targetDir)) {
84
- fs.mkdirSync(targetDir, { recursive: true });
85
- }
86
-
87
- if (fs.existsSync(sourceDir)) {
88
- copyRecursiveSync(sourceDir, targetDir);
89
- console.log(`✅ Đã copy toàn bộ kiến trúc .agents vào: ${targetDir}`);
90
-
91
- if (isGlobal && ide === 'antigravity') {
92
- const targetDirPosix = targetDir.replace(/\\/g, '/');
93
-
94
- function walkAndReplace(dir) {
95
- const files = fs.readdirSync(dir);
96
- for (const file of files) {
97
- const fullPath = path.join(dir, file);
98
- if (fs.statSync(fullPath).isDirectory()) {
99
- walkAndReplace(fullPath);
100
- } else if (fullPath.endsWith('.md') || fullPath.endsWith('.yml') || fullPath.endsWith('.yaml') || fullPath.endsWith('.json')) {
101
- let content = fs.readFileSync(fullPath, 'utf8');
102
- let modified = false;
103
-
104
- const dirsToRewrite = ['skills', 'registry', 'rules', 'workflows', 'knowledge', 'examples', 'docs'];
105
- for (const d of dirsToRewrite) {
106
- const regex = new RegExp(`\\.agents/${d}`, 'g');
107
- if (regex.test(content)) {
108
- content = content.replace(regex, `${targetDirPosix}/${d}`);
109
- modified = true;
110
- }
111
- }
112
-
113
- if (content.includes('.agents/skills.json')) {
114
- content = content.replace(/\.agents\/skills\.json/g, `${targetDirPosix}/skills.json`);
115
- modified = true;
116
- }
117
-
118
- if (modified) {
119
- fs.writeFileSync(fullPath, content, 'utf8');
120
- }
121
- }
122
- }
123
- }
124
-
125
- walkAndReplace(targetDir);
126
- console.log(`✅ Đã cập nhật đường dẫn tuyệt đối cho cấu hình Global Antigravity`);
127
- }
128
- } else {
129
- console.error(`❌ Lỗi: Không tìm thấy thư mục nguồn ${sourceDir}`);
130
- return;
131
- }
132
-
133
- console.log(`\n🎉 HOÀN TẤT! Kiến trúc V${version} đã sẵn sàng tại: ${targetDir}`);
134
-
135
- if (isGlobal && ide === 'antigravity') {
136
- console.log(`💡 Antigravity đã được cài Global. Từ nay bạn mở BẤT KỲ DỰ ÁN NÀO, Antigravity cũng sẽ tự động có đủ hệ thống OS mới nhất!`);
137
- }
138
-
139
- } catch (error) {
140
- console.error('❌ lỗi xảy ra trong quá trình cài đặt:', error.message);
141
- }
142
- }
143
-
144
- const args = parseArgs();
145
-
146
- if (args.ide && args.scope) {
147
- runInstall(args.ide, args.scope);
148
- } else {
149
- console.log('🚀 Đang chuẩn bị cài đặt AI Developer Skill OS V8...\n');
150
-
151
- const questionIde = `Vui lòng chọn IDE/AI Assistant bạn đang sử dụng:
152
- (1) Cursor
153
- (2) Windsurf
154
- (3) Cline / Roo Code
155
- (4) Antigravity / Gemini
156
- (5) Codex
157
- (6) Kilo Code
158
- (7) Tất cả các IDE (Multi-IDE)
159
-
160
- Nhập số (1-7): `;
161
-
162
- const questionScope = `
163
- Bạn muốn cài đặt bộ kỹ năng ở đâu?
164
- (1) Local (Gắn vào dự án hiện tại - Phù hợp làm việc nhóm)
165
- (2) Global (Cài vào máy tính dùng chung cho mọi dự án - Dành cho cá nhân)
166
-
167
- Nhập số (1-2): `;
168
-
169
- const rl = readline.createInterface({
170
- input: process.stdin,
171
- output: process.stdout
172
- });
173
-
174
- rl.question(questionIde, (answerIde) => {
175
- rl.question(questionScope, (answerScope) => {
176
- rl.close();
177
- runInstall(answerIde.trim(), answerScope.trim());
178
- });
179
- });
180
- }
1
+ #!/usr/bin/env node
2
+
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import readline from 'readline';
6
+ import { fileURLToPath } from 'url';
7
+ import os from 'os';
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+ const sourceDir = path.resolve(__dirname, '..', '.agents');
12
+ const packageJsonPath = path.resolve(__dirname, '..', 'package.json');
13
+ const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
14
+ const version = pkg.version;
15
+ const cwd = process.cwd();
16
+ const homeDir = os.homedir();
17
+
18
+ // Version marker file written after every successful install
19
+ const VERSION_FILE = '.ai-skill-os-version';
20
+
21
+ // ─── IDE Configuration Map ────────────────────────────────────────────────────
22
+ // Each IDE has:
23
+ // localDir — where to install when scope=local (relative to cwd)
24
+ // globalDir — where to install when scope=global (absolute, user-level)
25
+ // postInstall special steps after copy (null = none)
26
+ // ─────────────────────────────────────────────────────────────────────────────
27
+ const IDE_CONFIG = {
28
+ antigravity: {
29
+ label: 'Antigravity (Google Gemini)',
30
+ localDir: path.join(cwd, '.agents'),
31
+ globalDir: path.join(homeDir, '.gemini', 'config'),
32
+ postInstall: 'rewriteAbsolutePaths',
33
+ note: 'Global: ~/.gemini/config — applies to all projects on this machine',
34
+ },
35
+ claude: {
36
+ label: 'Claude Code (Anthropic)',
37
+ localDir: path.join(cwd, '.claude'),
38
+ globalDir: path.join(homeDir, '.claude'),
39
+ postInstall: 'renameToClaude',
40
+ note: 'Global: ~/.claude/CLAUDE.md — applies to all Claude Code sessions',
41
+ },
42
+ cursor: {
43
+ label: 'Cursor IDE',
44
+ localDir: path.join(cwd, '.cursor', 'rules'),
45
+ globalDir: null, // Cursor has no reliable global rules path — use Settings UI
46
+ postInstall: 'exportCursorRules',
47
+ note: 'Local only: .cursor/rules/ — use Cursor Settings > Rules for AI for global rules',
48
+ },
49
+ codex: {
50
+ label: 'OpenAI Codex CLI',
51
+ localDir: path.join(cwd, '.codex'),
52
+ globalDir: path.join(homeDir, '.codex'),
53
+ postInstall: null,
54
+ note: 'Global: ~/.codex — applies to all Codex CLI sessions',
55
+ },
56
+ };
57
+
58
+ // ─── Utilities ───────────────────────────────────────────────────────────────
59
+
60
+ function copyRecursiveSync(src, dest) {
61
+ if (!fs.existsSync(src)) return;
62
+ const stats = fs.statSync(src);
63
+ if (stats.isDirectory()) {
64
+ fs.mkdirSync(dest, { recursive: true });
65
+ for (const child of fs.readdirSync(src)) {
66
+ copyRecursiveSync(path.join(src, child), path.join(dest, child));
67
+ }
68
+ } else {
69
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
70
+ fs.copyFileSync(src, dest);
71
+ }
72
+ }
73
+
74
+ /** Read installed version from marker file. Returns null if not installed. */
75
+ function getInstalledVersion(targetDir) {
76
+ const markerPath = path.join(targetDir, VERSION_FILE);
77
+ if (!fs.existsSync(markerPath)) return null;
78
+ try {
79
+ return fs.readFileSync(markerPath, 'utf8').trim();
80
+ } catch {
81
+ return null;
82
+ }
83
+ }
84
+
85
+ /** Write version marker after successful install. */
86
+ function writeVersionMarker(targetDir) {
87
+ fs.writeFileSync(
88
+ path.join(targetDir, VERSION_FILE),
89
+ `${version}\nInstalled: ${new Date().toISOString()}\n`,
90
+ 'utf8'
91
+ );
92
+ }
93
+
94
+ /** Remove existing install. For Cursor: only delete the .mdc rule file. */
95
+ function removeExistingInstall(targetDir, ide) {
96
+ if (ide === 'cursor') {
97
+ const mdcPath = path.join(targetDir, 'ai-skill-os.mdc');
98
+ if (fs.existsSync(mdcPath)) fs.unlinkSync(mdcPath);
99
+ console.log(' 🗑️ Removed old Cursor rule: ai-skill-os.mdc');
100
+ } else {
101
+ if (fs.existsSync(targetDir)) {
102
+ fs.rmSync(targetDir, { recursive: true, force: true });
103
+ console.log(` 🗑️ Removed old install: ${targetDir}`);
104
+ }
105
+ }
106
+ }
107
+
108
+ /** Prompt user yes/no. Resolves true for yes. */
109
+ function confirm(rl, question) {
110
+ return new Promise((resolve) => {
111
+ rl.question(question, (ans) => resolve(['y', 'yes', ''].includes(ans.trim().toLowerCase())));
112
+ });
113
+ }
114
+
115
+ function parseArgs() {
116
+ const args = process.argv.slice(2);
117
+ const result = { ide: null, scope: null };
118
+ for (const arg of args) {
119
+ if (arg.startsWith('--ide=')) result.ide = arg.split('=')[1];
120
+ else if (arg.startsWith('--scope=')) result.scope = arg.split('=')[1];
121
+ }
122
+ return result;
123
+ }
124
+
125
+ // ─── Post-install handlers ────────────────────────────────────────────────────
126
+
127
+ /**
128
+ * Antigravity global install: rewrite relative .agents/X paths → absolute paths.
129
+ * Required because Antigravity reads SKILL.md files from an absolute global path.
130
+ */
131
+ function rewriteAbsolutePaths(targetDir) {
132
+ const targetPosix = targetDir.replace(/\\/g, '/');
133
+ const DIRS_TO_REWRITE = ['skills', 'registry', 'rules', 'workflows', 'knowledge', 'docs', 'blueprints'];
134
+
135
+ const walk = (dir) => {
136
+ for (const file of fs.readdirSync(dir)) {
137
+ const fullPath = path.join(dir, file);
138
+ if (fs.statSync(fullPath).isDirectory()) {
139
+ walk(fullPath);
140
+ } else if (/\.(md|yml|yaml|json)$/.test(fullPath)) {
141
+ let content = fs.readFileSync(fullPath, 'utf8');
142
+ let changed = false;
143
+
144
+ for (const d of DIRS_TO_REWRITE) {
145
+ const re = new RegExp(`\\.agents/${d}`, 'g');
146
+ if (re.test(content)) {
147
+ content = content.replace(re, `${targetPosix}/${d}`);
148
+ changed = true;
149
+ }
150
+ }
151
+ if (content.includes('.agents/skills.json')) {
152
+ content = content.replace(/\.agents\/skills\.json/g, `${targetPosix}/skills.json`);
153
+ changed = true;
154
+ }
155
+ if (changed) fs.writeFileSync(fullPath, content, 'utf8');
156
+ }
157
+ }
158
+ };
159
+
160
+ walk(targetDir);
161
+ console.log(' ✅ Rewrote .agents/* references → absolute paths for Antigravity global mode');
162
+ }
163
+
164
+ /**
165
+ * Claude Code install: copy AGENTS.md CLAUDE.md at target root.
166
+ * Claude Code reads ~/.claude/CLAUDE.md as global instructions.
167
+ */
168
+ function renameToClaude(targetDir) {
169
+ const agentsMd = path.join(targetDir, 'AGENTS.md');
170
+ const claudeMd = path.join(targetDir, 'CLAUDE.md');
171
+
172
+ if (fs.existsSync(agentsMd) && !fs.existsSync(claudeMd)) {
173
+ fs.copyFileSync(agentsMd, claudeMd);
174
+ console.log(' ✅ Copied AGENTS.md → CLAUDE.md (Claude Code entry point)');
175
+ } else if (fs.existsSync(claudeMd)) {
176
+ console.log(' ℹ️ CLAUDE.md already exists — skipped overwrite');
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Cursor install: export AGENTS.md content as a .mdc rule file.
182
+ * Cursor reads .cursor/rules/*.mdc — each file needs YAML frontmatter.
183
+ */
184
+ function exportCursorRules(targetDir) {
185
+ const agentsMd = path.join(sourceDir, 'AGENTS.md');
186
+ if (!fs.existsSync(agentsMd)) return;
187
+
188
+ const rawContent = fs.readFileSync(agentsMd, 'utf8');
189
+ const mdcContent = `---
190
+ description: "AI Developer Skill OS v${version} — global skill rules"
191
+ alwaysApply: true
192
+ ---
193
+
194
+ ${rawContent}`;
195
+
196
+ const outPath = path.join(targetDir, 'ai-skill-os.mdc');
197
+ fs.mkdirSync(targetDir, { recursive: true });
198
+ fs.writeFileSync(outPath, mdcContent, 'utf8');
199
+ console.log(` ✅ Exported rules → ${outPath}`);
200
+ console.log(' ℹ️ For global rules: Cursor Settings > General > Rules for AI');
201
+ }
202
+
203
+ // ─── Main install logic ───────────────────────────────────────────────────────
204
+
205
+ async function runInstall(ideKey, scopeKey, rl) {
206
+ const ideMap = { '1': 'antigravity', '2': 'claude', '3': 'cursor', '4': 'codex' };
207
+ const scopeMap = { '1': 'local', '2': 'global' };
208
+
209
+ const ide = ideMap[ideKey] || ideKey;
210
+ const scope = scopeMap[scopeKey] || scopeKey;
211
+ const config = IDE_CONFIG[ide];
212
+
213
+ if (!config) {
214
+ console.error(`❌ IDE không hợp lệ: "${ide}". Chọn: antigravity, claude, cursor, codex`);
215
+ process.exit(1);
216
+ }
217
+
218
+ const isGlobal = scope === 'global';
219
+
220
+ if (isGlobal && config.globalDir === null) {
221
+ console.warn(`⚠️ ${config.label} không hỗ trợ cài Global qua file.`);
222
+ console.warn(` ${config.note}`);
223
+ console.warn(' Tiến hành cài Local thay thế...');
224
+ }
225
+
226
+ const targetDir = (isGlobal && config.globalDir) ? config.globalDir : config.localDir;
227
+
228
+ console.log(`\n🚀 AI Developer Skill OS v${version}`);
229
+ console.log(` IDE: ${config.label}`);
230
+ console.log(` Scope: ${isGlobal ? 'Global' : 'Local'}`);
231
+ console.log(` Path: ${targetDir}`);
232
+
233
+ // ── Version check ────────────────────────────────────────────────────────
234
+ const installedVersion = getInstalledVersion(targetDir);
235
+
236
+ if (installedVersion) {
237
+ if (installedVersion === version) {
238
+ console.log(`\n✅ Phiên bản v${version} đã được cài đặt — không cần cập nhật.`);
239
+ console.log(' Dùng --force để cài lại.\n');
240
+ const isForce = process.argv.includes('--force');
241
+ if (!isForce) {
242
+ if (rl) rl.close();
243
+ return;
244
+ }
245
+ console.log(' --force detected: tiến hành cài lại...');
246
+ } else {
247
+ console.log(`\n⚠️ Phát hiện phiên bản cũ: v${installedVersion}`);
248
+ console.log(` Phiên bản mới: v${version}`);
249
+ const shouldUpgrade = rl
250
+ ? await confirm(rl, '\n Xóa bản cũ và cài bản mới? [Y/n]: ')
251
+ : true;
252
+ if (!shouldUpgrade) {
253
+ console.log(' Hủy cài đặt.');
254
+ if (rl) rl.close();
255
+ return;
256
+ }
257
+ }
258
+ // Remove old install before fresh copy
259
+ removeExistingInstall(targetDir, ide);
260
+ } else {
261
+ console.log(' (Chưa cài đặt — fresh install)\n');
262
+ }
263
+
264
+ // ── Install ──────────────────────────────────────────────────────────────
265
+ try {
266
+ if (!fs.existsSync(sourceDir)) {
267
+ console.error(`❌ Không tìm thấy source: ${sourceDir}`);
268
+ process.exit(1);
269
+ }
270
+
271
+ if (ide === 'cursor') {
272
+ exportCursorRules(targetDir);
273
+ } else {
274
+ copyRecursiveSync(sourceDir, targetDir);
275
+ console.log(` ✅ Copied .agents/ → ${targetDir}`);
276
+
277
+ if (isGlobal && config.postInstall === 'rewriteAbsolutePaths') {
278
+ rewriteAbsolutePaths(targetDir);
279
+ }
280
+ if (config.postInstall === 'renameToClaude') {
281
+ renameToClaude(targetDir);
282
+ }
283
+ }
284
+
285
+ writeVersionMarker(targetDir);
286
+ console.log(`\n🎉 Hoàn tất v${version}! ${config.note}\n`);
287
+
288
+ } catch (err) {
289
+ console.error('❌ Lỗi cài đặt:', err.message);
290
+ process.exit(1);
291
+ } finally {
292
+ if (rl) rl.close();
293
+ }
294
+ }
295
+
296
+ // ─── CLI entry point ──────────────────────────────────────────────────────────
297
+
298
+ const args = parseArgs();
299
+
300
+ if (args.ide && args.scope) {
301
+ // Non-interactive mode (called via npm scripts)
302
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
303
+ await runInstall(args.ide, args.scope, rl);
304
+ } else {
305
+ // Interactive mode
306
+ console.log(`\n🚀 AI Developer Skill OS v${version} — Setup\n`);
307
+
308
+ const ideQuestion = `Chọn IDE/AI Assistant:
309
+ (1) Antigravity (Google Gemini)
310
+ (2) Claude Code (Anthropic)
311
+ (3) Cursor IDE
312
+ (4) OpenAI Codex CLI
313
+
314
+ Nhập số (1-4): `;
315
+
316
+ const scopeQuestion = `
317
+ Phạm vi cài đặt:
318
+ (1) Local — Chỉ dự án này (.agents/ hoặc .claude/ trong thư mục hiện tại)
319
+ (2) Global — Toàn bộ máy tính (áp dụng cho mọi dự án)
320
+
321
+ Nhập số (1-2): `;
322
+
323
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
324
+
325
+ rl.question(ideQuestion, async (ideAnswer) => {
326
+ rl.question(scopeQuestion, async (scopeAnswer) => {
327
+ await runInstall(ideAnswer.trim(), scopeAnswer.trim(), rl);
328
+ });
329
+ });
330
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-developer-skill-os",
3
- "version": "8.2.0",
4
- "description": "EDAOS v8.2 — Governed Capability Metadata & Eval Platform: Blueprints organize, manifests govern, registries accelerate.",
3
+ "version": "8.3.0",
4
+ "description": "EDAOS v8.3 — Governed Capability Metadata & Eval Platform: Blueprints organize, manifests govern, registries accelerate.",
5
5
  "main": "bin/install.js",
6
6
  "files": [
7
7
  "bin",
@@ -1,131 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to AI Developer Skill OS are documented here.
4
- Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
5
-
6
- ---
7
-
8
- ## [8.2.0] — 2026-07 — EDAOS v8.2: Governed Capability Metadata & Eval Platform
9
-
10
- ### Added
11
- - **Manifest-First Architecture & Registry Engine**: Created `tooling/build-registry.js` (`npm run build:registry`) generating lightweight lookup index `.agents/registry/index.yaml` and O(1) runtime adjacency graph `.agents/registry/graph.json` with cycle/orphan detection.
12
- - **V8.2 Blueprint Plugins**: Introduced customizable project scaffolding templates under `.agents/blueprints/` (`rag`, `coding`, `workflow`) featuring multi-profile environments (`development`, `production`, `testing`) and feature flags.
13
- - **Governed Capability Manifests**: Created minimalist `.agents/skills/_template/capability.yaml` (`schema_version: 1`) to decouple execution metadata from natural language instructions.
14
- - **Eval Pipeline Platform**: Added quantitative verification frameworks via inheritance-ready `.agents/skills/_template/evals/scorecard.yaml` (`extends: default`), linking ground-truth execution traces with automated score rubrics.
15
- - **Domain Patterns Reference Architecture**: Added reference blueprint for Enterprise Domain AI at `.agents/knowledge/domain-patterns/construction/ddc-construction-ai-blueprint.md` (Construction AI, DDC 192 domain skills, QTO IFC bóc tách, n8n automation workflows) showcasing zero interference with core developer capabilities.
16
-
17
- ### Changed
18
- - **`qk-project-bootstrap` Evolution (v8.2.0)**: Upgraded to support One-Click Blueprint selection, automated `project.yaml` generation, and the Universal 4-Folder RAG Architecture (`prompts/`, `data/`, `agents/`, `evals/`).
19
- - **`qk-validation-gate` Evolution (v8.2.0)**: Integrated automated Eval Pipeline validation, reading `scorecard.yaml` rubrics, verifying trace logs in `evals/traces/`, and enforcing quantitative pass thresholds.
20
- - **`qk-ai-builder` Evolution (v8.2.0)**: Upgraded to Manifest-first capability packaging and strict 4-folder data discipline (immutable `data/raw/` vs cleaned `data/processed/`).
21
- - Updated system core description in `package.json` to reflect the EDAOS v8.2 paradigm shift.
22
- - Synced `.agents/CHANGELOG.md` and `.agents/README.md` with root documentation.
23
-
24
- ---
25
-
26
- ## [8.1.7] — 2026-07 — README Sync
27
-
28
- ### Changed
29
- - **README Sync**: Synced `.agents/README.md` with root `README.md` so the installed documentation is fully up-to-date with V8.1 architecture.
30
- - Bumped version to `8.1.7`.
31
-
32
- ---
33
-
34
- ## [8.1.6] — 2026-07 — Design Intelligence Content & Sync
35
-
36
- ### Added
37
- - **Design Intelligence Populated**: Sourced core market-standard knowledge (Tailwind, Radix, Apple, Vercel-like principles) into `.agents/knowledge/design-intelligence/` covering components, patterns, industries, themes, and references.
38
- - **Animation Knowledge**: Added `visual-language/animation.md` for micro-interactions and transition durations.
39
- - **Dependency Wiring**: Linked `qk-ui-system-builder` to `design-intelligence` so it utilizes the newly generated design constraints.
40
- - **Changelog Sync**: Synced `.agents/CHANGELOG.md` with root `CHANGELOG.md` so the installed copy reflects the true V8 evolution.
41
-
42
- ### Changed
43
- - All skill descriptions properly translated to Vietnamese for ecosystem consistency.
44
- - Bumped version to `8.1.6` for final, truly complete Design Intelligence NPM Release.
45
-
46
- ---
47
-
48
- ## [8.1.4] — 2026-07 — Design Intelligence Pack
49
-
50
- ### Added
51
- - **Design Intelligence Layer**: `.agents/knowledge/design-intelligence/` (industries, themes, patterns, visual-language, components, templates)
52
- - **Knowledge Dependencies**: `qk-design-system-engineering` and `qk-ui-builder` now have strict dependency bounds tied to Design Intelligence without bloating the Capability Graph.
53
- - **Design Routing Test Cases**: `design-intel-01`, `02`, `03` for validating routing logic in design scenarios.
54
- - **Re-introduced CLI Installer**: Restored and refactored `bin/install.js` to correctly copy `.agents` across global/local directories for easy NPM setup.
55
-
56
- ### Changed
57
- - Refined **Decision Boundaries**: `qk-ui-builder` explicitly forbidden from defining visual direction or brand identity (strict capability bounds).
58
- - **README.md** reflects 30 Master Skills and the "Agent Engineering OS" mindset.
59
- - **package.json**: Version bump `8.1.4` and whitelisted files for npm publish.
60
-
61
- ---
62
-
63
- ## [8.1.3] — 2026-07 — Architecture Freeze & Governance
64
-
65
- ### Added
66
- - **Capability Graph & Routing**: `.agents/registry/capability-graph.yml` to define skill relations (`depends_on`, `delegates_to`).
67
- - **Priority Governance**: `.agents/rules/priorities.yml` enforcing safety layers (`P1: System Integrity`, `P2: Guardrails`).
68
- - **Audit Tools**: `tooling/run-aar.js` for architectural acceptance testing.
69
- - Test cases for routing and boundary attacks.
70
-
71
- ### Changed
72
- - Name transition from "Self-Improving" to **Adaptive Agent OS** (Self Optimizing ≠ Self Modifying).
73
- - Enforced hard cap of **30 Skills** to prevent Skill Inflation.
74
- - Frozen Baseline achieved: `v8.1.3-agent-os-production`.
75
-
76
- ---
77
-
78
- ## [8.0.0] — 2026-07 — Agent Knowledge System
79
-
80
- ### Philosophy shift
81
- - **V7:** Skill Repository — human selects skill, AI executes
82
- - **V8:** Agent Knowledge System — AI retrieves context, selects capability, executes workflow, verifies
83
-
84
- ### Added
85
- - `rules/` — Agent behavior policies (global, coding, safety)
86
- - `workflows/` — Reusable execution pipelines (YAML, with inputs/outputs per step)
87
- - `examples/` — Few-shot knowledge (good/, bad/)
88
- - `learnings/` — Evidence-based learning lifecycle (draft/, validated/, deprecated/)
89
- - `registry/` — Generated AI retrieval index (skills-index.yml)
90
- - `docs/ARCHITECTURE.md` — Agent request flow diagram
91
- - `docs/VERSIONING.md` — Semantic versioning policy
92
- - `docs/schemas/` — Schema definitions for all knowledge objects
93
- - `docs/decisions/` — Architecture Decision Records (ADRs)
94
- - `.agentsignore` — AI boundary file (what agents should NOT load)
95
- - `tooling/` — Dev automation (generate-registry.js, validate-skills.js)
96
- - `tests/agent-evaluation/` — Agent behavior test harness
97
-
98
- ### Changed
99
- - SKILL.md schema upgraded to V8: added `type`, `intent`, `triggers`, `complexity`, `workflow`, `verification`, `related_skills`
100
- - `skills.json` demoted to **generated compatibility manifest** (source of truth = SKILL.md)
101
- - Workflows extracted from individual skills → shared reusable templates
102
-
103
- ### Removed
104
- - Embedded workflows inside SKILL.md body (moved to workflows/)
105
- - Old migration scripts (migrate-v*.js, patch*.py, add_lang.*, etc.)
106
- - Duplicate documentation (CLAUDE.md, old docs/)
107
- - Experimental packages (packages/edaos-sdk)
108
- - framework/, knowledge/, specs/, templates/ directories
109
-
110
- ### Migration
111
- - V7.5.1 tagged at git: `v7.5.1`
112
- - V7 skills preserved in git history; migration is additive schema upgrade
113
-
114
- ---
115
-
116
- ## [7.5.1] — 2026-07 — Final V7 Release
117
-
118
- - Bumped all skill versions to 7.5.1
119
- - Added qk-fe-api-integration skill
120
- - Added qk-performance-tuner (global config)
121
- - Stabilized frontmatter schema across all 22 skills
122
-
123
- ## [7.5.0] — 2026-07
124
-
125
- - Major skills refactor with EDAOS runtime adapter
126
- - Added MCP server integration
127
- - Added qk-bug-resolution workflow contracts
128
-
129
- ## [7.0.0] — 2026
130
-
131
- - V7 release: 22 skills, YAML frontmatter, token budget system