framework-aidf 0.0.0-stage → 0.2.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.
- package/CHANGELOG.md +174 -0
- package/INSTALLATION.md +140 -0
- package/LICENSE +21 -0
- package/QODER.md +88 -0
- package/README.md +142 -2
- package/UTILISATION.md +188 -0
- package/assets/adapters/qoder/agents/aidf-orchestrator.md +30 -0
- package/assets/adapters/qoder/rules/00-core.md +28 -0
- package/assets/adapters/qoder/rules/10-security.md +33 -0
- package/assets/adapters/qoder/rules/20-context.md +39 -0
- package/assets/core/AGENTS.fragment.md +18 -0
- package/assets/core/AIDF.md +107 -0
- package/assets/docs/APPFLOW.md +66 -0
- package/assets/docs/BACKEND.md +71 -0
- package/assets/docs/CHANGELOG.md +25 -0
- package/assets/docs/CONVENTIONS.md +95 -0
- package/assets/docs/DECISIONS.md +60 -0
- package/assets/docs/PLAN.md +53 -0
- package/assets/docs/PRD.md +88 -0
- package/assets/docs/SECURITY.md +94 -0
- package/assets/docs/TRD.md +78 -0
- package/assets/docs/UI-UX.md +71 -0
- package/assets/docs/constitution.md +86 -0
- package/assets/hooks/audit.mjs +45 -0
- package/assets/hooks/session-context.mjs +53 -0
- package/assets/integrations/spec-kit/mapping.yaml +92 -0
- package/assets/knowledge/best-practices/testing.md +53 -0
- package/assets/knowledge/best-practices/web-dev-baseline.md +39 -0
- package/assets/knowledge/rules/api.md +45 -0
- package/assets/knowledge/rules/sql.md +44 -0
- package/assets/knowledge/rules/typescript.md +50 -0
- package/assets/knowledge/security-references/owasp-baseline.md +58 -0
- package/assets/registry/activation-map.yaml +83 -0
- package/assets/registry/dependencies.yaml +35 -0
- package/assets/registry/skills.yaml +541 -0
- package/assets/registry/sources.yaml +396 -0
- package/assets/schemas/architecture/v1.json +110 -0
- package/assets/schemas/constraints/v1.json +93 -0
- package/assets/schemas/decision/v1.json +106 -0
- package/assets/schemas/discovery/v1.json +91 -0
- package/assets/schemas/requirement/v1.json +136 -0
- package/assets/schemas/security/threat-model/v1.json +127 -0
- package/assets/schemas/test-plan/v1.json +108 -0
- package/assets/skills/aidf-architecture-review/SKILL.md +49 -0
- package/assets/skills/aidf-backend-implementation/SKILL.md +47 -0
- package/assets/skills/aidf-database-design/SKILL.md +48 -0
- package/assets/skills/aidf-devops-engineering/SKILL.md +41 -0
- package/assets/skills/aidf-documentation-maintenance/SKILL.md +41 -0
- package/assets/skills/aidf-frontend-implementation/SKILL.md +44 -0
- package/assets/skills/aidf-phase-transition/SKILL.md +48 -0
- package/assets/skills/aidf-product-analysis/SKILL.md +47 -0
- package/assets/skills/aidf-project-context/SKILL.md +57 -0
- package/assets/skills/aidf-requirements-engineering/SKILL.md +52 -0
- package/assets/skills/aidf-security-review/SKILL.md +57 -0
- package/assets/skills/aidf-testing-validation/SKILL.md +48 -0
- package/assets/skills/aidf-ui-ux-implementation/SKILL.md +43 -0
- package/assets/workflows/gates.yaml +232 -0
- package/assets/workflows/phases.yaml +161 -0
- package/bin/aidf.mjs +12 -0
- package/demo/run-demo.mjs +97 -0
- package/docs/aidf/ADR-001-artefacts-architectur.md +126 -0
- package/docs/aidf/ADR-002-requirements-registry.md +145 -0
- package/docs/aidf/ADR-003-traceability-chain.md +145 -0
- package/docs/aidf/ADR-004-markdown-generation.md +134 -0
- package/docs/aidf/ADR-005-validation-and-tests.md +170 -0
- package/docs/aidf/ADR-006-cli-commands.md +189 -0
- package/docs/aidf/ADR-007-compatibility-and-migration.md +119 -0
- package/docs/aidf/ADR-008-schema-versioning.md +115 -0
- package/docs/aidf/ADR-009-artefacts-scope.md +84 -0
- package/docs/aidf/ARCHITECTURE.md +137 -0
- package/docs/aidf/COMPATIBILITY.md +90 -0
- package/docs/aidf/DECISIONS.md +200 -0
- package/docs/aidf/FRAMEWORK.md +38 -0
- package/docs/aidf/IDE-QODER.md +61 -0
- package/docs/aidf/INSTALL.md +99 -0
- package/docs/aidf/INVENTORY.md +72 -0
- package/docs/aidf/L1-ARCHITECTURE-RAPPORT.md +353 -0
- package/docs/aidf/LIMITATIONS.md +69 -0
- package/docs/aidf/MATRICE-0.1.0-vers-0.2.0.md +155 -0
- package/docs/aidf/SECURITY.md +86 -0
- package/docs/aidf/SKILLS.md +78 -0
- package/docs/aidf/SPECKIT.md +67 -0
- package/docs/aidf/USAGE.md +113 -0
- package/docs/aidf/VALIDATION.md +55 -0
- package/package.json +37 -4
- package/src/cli.mjs +148 -0
- package/src/commands/artefacts.mjs +129 -0
- package/src/commands/config.mjs +130 -0
- package/src/commands/context.mjs +55 -0
- package/src/commands/decision.mjs +142 -0
- package/src/commands/design.mjs +141 -0
- package/src/commands/docs.mjs +133 -0
- package/src/commands/doctor.mjs +210 -0
- package/src/commands/evidence.mjs +178 -0
- package/src/commands/install.mjs +154 -0
- package/src/commands/release.mjs +214 -0
- package/src/commands/requirements.mjs +196 -0
- package/src/commands/resources.mjs +181 -0
- package/src/commands/scan.mjs +139 -0
- package/src/commands/security.mjs +97 -0
- package/src/commands/setup.mjs +68 -0
- package/src/commands/skills.mjs +204 -0
- package/src/commands/speckit.mjs +78 -0
- package/src/commands/tests.mjs +81 -0
- package/src/commands/traceability.mjs +116 -0
- package/src/commands/uninstall.mjs +238 -0
- package/src/commands/validate.mjs +84 -0
- package/src/commands/workflow.mjs +137 -0
- package/src/core/adapters/base.mjs +32 -0
- package/src/core/adapters/generic.mjs +70 -0
- package/src/core/adapters/index.mjs +24 -0
- package/src/core/adapters/opencode.mjs +115 -0
- package/src/core/adapters/qoder.mjs +228 -0
- package/src/core/artefacts/index.mjs +1 -0
- package/src/core/artefacts/validation.mjs +161 -0
- package/src/core/bootstrap.mjs +179 -0
- package/src/core/config.mjs +123 -0
- package/src/core/context.mjs +187 -0
- package/src/core/design-engineering/complexity-classifier.mjs +78 -0
- package/src/core/design-engineering/engine.mjs +197 -0
- package/src/core/design-engineering/fallback/mockups.mjs +221 -0
- package/src/core/design-engineering/fallback/wireframes.mjs +114 -0
- package/src/core/design-engineering/figma/validators.mjs +178 -0
- package/src/core/design-engineering/index.mjs +9 -0
- package/src/core/design-engineering/visual-parity/capture.mjs +172 -0
- package/src/core/detect.mjs +220 -0
- package/src/core/docsgen.mjs +175 -0
- package/src/core/evidence.mjs +210 -0
- package/src/core/installer.mjs +377 -0
- package/src/core/manifest.mjs +53 -0
- package/src/core/paths.mjs +94 -0
- package/src/core/requirements/index.mjs +13 -0
- package/src/core/requirements/registry.mjs +234 -0
- package/src/core/resource-inventory.mjs +434 -0
- package/src/core/resources.mjs +280 -0
- package/src/core/security/threat-model.mjs +235 -0
- package/src/core/skills.mjs +353 -0
- package/src/core/source-skills.mjs +213 -0
- package/src/core/speckit.mjs +195 -0
- package/src/core/technology-decision/analyzer-deterministic.mjs +240 -0
- package/src/core/technology-decision/engine.mjs +157 -0
- package/src/core/technology-decision/generator.mjs +204 -0
- package/src/core/technology-decision/index.mjs +17 -0
- package/src/core/technology-decision/options/index.mjs +10 -0
- package/src/core/testplan.mjs +176 -0
- package/src/core/traceability/chain.mjs +488 -0
- package/src/core/traceability/index.mjs +12 -0
- package/src/core/workflow.mjs +471 -0
- package/src/util/args.mjs +69 -0
- package/src/util/frontmatter.mjs +26 -0
- package/src/util/fsx.mjs +208 -0
- package/src/util/logger.mjs +74 -0
- package/src/util/text.mjs +66 -0
- package/src/util/yaml.mjs +379 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { parseArgs, assertEnum } from '../util/args.mjs';
|
|
2
|
+
import { resolveProjectRoot, isInitialized } from '../core/paths.mjs';
|
|
3
|
+
import { attachLogFile } from '../util/logger.mjs';
|
|
4
|
+
import {
|
|
5
|
+
generateTraceabilityReport,
|
|
6
|
+
verifyChain,
|
|
7
|
+
findMissingLinks,
|
|
8
|
+
findBrokenLinks,
|
|
9
|
+
TRACEABILITY_TYPES,
|
|
10
|
+
} from '../core/traceability/chain.mjs';
|
|
11
|
+
|
|
12
|
+
export function traceabilityArgSpec() {
|
|
13
|
+
return {
|
|
14
|
+
booleans: ['json', 'help'],
|
|
15
|
+
aliases: { h: 'help', t: 'target' },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function printJson(value) {
|
|
20
|
+
process.stdout.write(`${JSON.stringify(value, null, 2)}\n`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function traceabilityCommand(argv, ctx) {
|
|
24
|
+
const args = parseArgs(argv, traceabilityArgSpec());
|
|
25
|
+
const sub = args._[0] ?? 'report';
|
|
26
|
+
if (args.help) {
|
|
27
|
+
ctx.logger.info('Usage: aidf traceability <report|verify|missing|broken> [id] [--type requirement|design|implementation|test|evidence]');
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
const root = resolveProjectRoot({ target: args.target, cwd: process.cwd() });
|
|
31
|
+
if (!isInitialized(root)) {
|
|
32
|
+
ctx.logger.error(`AIDF is not initialized in ${root}. Run "aidf install" first.`);
|
|
33
|
+
return 1;
|
|
34
|
+
}
|
|
35
|
+
await attachLogFile(ctx.logger, root).catch(() => null);
|
|
36
|
+
|
|
37
|
+
if (sub === 'report') {
|
|
38
|
+
const report = await generateTraceabilityReport(root);
|
|
39
|
+
if (ctx.json) {
|
|
40
|
+
printJson(report);
|
|
41
|
+
} else {
|
|
42
|
+
ctx.logger.info(
|
|
43
|
+
`Artefacts: ${report.summary.totalArtefacts} | `
|
|
44
|
+
+ `coverage ${report.coverage.overall.coveragePercentage}% `
|
|
45
|
+
+ `(${report.coverage.overall.fullyTraced} fully traced, `
|
|
46
|
+
+ `${report.coverage.overall.partiallyTraced} partial, `
|
|
47
|
+
+ `${report.coverage.overall.notTraced} untraced)`,
|
|
48
|
+
);
|
|
49
|
+
ctx.logger.info(`Links: ${report.links.total} | broken: ${report.broken.length}`);
|
|
50
|
+
for (const rec of report.recommendations) ctx.logger.warn(rec);
|
|
51
|
+
}
|
|
52
|
+
return report.broken.length > 0 ? 1 : 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (sub === 'verify') {
|
|
56
|
+
const id = args._[1];
|
|
57
|
+
if (!id) {
|
|
58
|
+
ctx.logger.error('Usage: aidf traceability verify <artefact-id>');
|
|
59
|
+
return 1;
|
|
60
|
+
}
|
|
61
|
+
const result = await verifyChain(root, id);
|
|
62
|
+
if (ctx.json) {
|
|
63
|
+
printJson(result);
|
|
64
|
+
} else {
|
|
65
|
+
ctx.logger.info(`Chain for ${id}: ${result.ok ? 'OK' : 'BROKEN'}`);
|
|
66
|
+
ctx.logger.info(`Path: ${result.path.join(' -> ')}`);
|
|
67
|
+
for (const b of result.brokenLinks) ctx.logger.error(` - ${b}`);
|
|
68
|
+
if (result.coverage) ctx.logger.info(`Coverage: ${JSON.stringify(result.coverage)}`);
|
|
69
|
+
}
|
|
70
|
+
return result.ok ? 0 : 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (sub === 'missing') {
|
|
74
|
+
const type = assertEnum(args.type, Object.keys(TRACEABILITY_TYPES), 'type');
|
|
75
|
+
if (!type) {
|
|
76
|
+
ctx.logger.error('Usage: aidf traceability missing --type requirement|design|implementation|test|evidence');
|
|
77
|
+
return 1;
|
|
78
|
+
}
|
|
79
|
+
const missing = await findMissingLinks(root, { type });
|
|
80
|
+
if (ctx.json) {
|
|
81
|
+
printJson({ type, count: missing.length, missing });
|
|
82
|
+
} else {
|
|
83
|
+
ctx.logger.info(`Artefacts missing a '${type}' link: ${missing.length}`);
|
|
84
|
+
ctx.logger.table(
|
|
85
|
+
missing.map((m) => ({ id: m.id, type: m.type, missing: m.missing })),
|
|
86
|
+
[
|
|
87
|
+
{ key: 'id', label: 'ID' },
|
|
88
|
+
{ key: 'type', label: 'Artefact type' },
|
|
89
|
+
{ key: 'missing', label: 'Missing link to' },
|
|
90
|
+
],
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
return missing.length > 0 ? 1 : 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (sub === 'broken') {
|
|
97
|
+
const broken = await findBrokenLinks(root);
|
|
98
|
+
if (ctx.json) {
|
|
99
|
+
printJson({ count: broken.length, broken });
|
|
100
|
+
} else {
|
|
101
|
+
ctx.logger.info(`Broken links: ${broken.length}`);
|
|
102
|
+
ctx.logger.table(
|
|
103
|
+
broken.map((b) => ({ source: b.sourceId, type: b.linkType, target: b.targetId })),
|
|
104
|
+
[
|
|
105
|
+
{ key: 'source', label: 'Source' },
|
|
106
|
+
{ key: 'type', label: 'Link type' },
|
|
107
|
+
{ key: 'target', label: 'Missing target' },
|
|
108
|
+
],
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
return broken.length > 0 ? 1 : 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
ctx.logger.error(`Unknown traceability subcommand: ${sub}`);
|
|
115
|
+
return 1;
|
|
116
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import fsp from 'node:fs/promises';
|
|
3
|
+
import { parseArgs } from '../util/args.mjs';
|
|
4
|
+
import { resolveProjectRoot, isInitialized, aidfPaths } from '../core/paths.mjs';
|
|
5
|
+
import { loadManifest } from '../core/manifest.mjs';
|
|
6
|
+
import { removeManagedBlock } from '../util/text.mjs';
|
|
7
|
+
import {
|
|
8
|
+
exists, readText, writeAtomic, sha256File, removeFile, removeDir, ensureDir, timestampSlug, toPosix,
|
|
9
|
+
} from '../util/fsx.mjs';
|
|
10
|
+
import { attachLogFile } from '../util/logger.mjs';
|
|
11
|
+
|
|
12
|
+
export function uninstallArgSpec() {
|
|
13
|
+
return {
|
|
14
|
+
booleans: ['dry-run', 'yes', 'force', 'keep-data', 'json', 'help'],
|
|
15
|
+
aliases: { h: 'help', t: 'target' },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const AIDF_OWNED_DIRS = [
|
|
20
|
+
'framework', 'bin', 'registry', 'workflows', 'state', 'logs', 'cache',
|
|
21
|
+
'backups', 'hooks', 'adapters', 'knowledge', 'reports', 'skills',
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
async function removeEmptyParents(root, relPath) {
|
|
25
|
+
let current = path.dirname(path.join(root, relPath));
|
|
26
|
+
const stop = path.resolve(root);
|
|
27
|
+
while (current.startsWith(stop) && current !== stop) {
|
|
28
|
+
try {
|
|
29
|
+
const entries = await fsp.readdir(current);
|
|
30
|
+
if (entries.length > 0) break;
|
|
31
|
+
await fsp.rmdir(current);
|
|
32
|
+
} catch {
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
current = path.dirname(current);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Remove AIDF-managed artefacts. Files whose content no longer matches the
|
|
41
|
+
* manifest hash are treated as project-owned changes and preserved unless
|
|
42
|
+
* --force is passed (in which case they are copied to .aidf-uninstall-backup).
|
|
43
|
+
*/
|
|
44
|
+
export async function uninstallCommand(argv, ctx) {
|
|
45
|
+
const args = parseArgs(argv, uninstallArgSpec());
|
|
46
|
+
if (args.help) {
|
|
47
|
+
ctx.logger.info('Usage: aidf uninstall [--target <dir>] [--dry-run] [--yes] [--keep-data] [--force]');
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
const root = resolveProjectRoot({ target: args.target, cwd: process.cwd() });
|
|
51
|
+
if (!isInitialized(root)) {
|
|
52
|
+
ctx.logger.info(`AIDF is not installed in ${root}; nothing to uninstall.`);
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
await attachLogFile(ctx.logger, root).catch(() => null);
|
|
56
|
+
const manifest = await loadManifest(root);
|
|
57
|
+
const dryRun = Boolean(args['dry-run']);
|
|
58
|
+
const force = Boolean(args.force);
|
|
59
|
+
const keepData = Boolean(args['keep-data']);
|
|
60
|
+
if (!dryRun && !args.yes) {
|
|
61
|
+
ctx.logger.error('Refusing to uninstall without --yes. Use --dry-run to preview the removals.');
|
|
62
|
+
return 1;
|
|
63
|
+
}
|
|
64
|
+
// A dry-run preview must not write anything, including logs.
|
|
65
|
+
if (!dryRun) {
|
|
66
|
+
await attachLogFile(ctx.logger, root).catch(() => null);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const results = [];
|
|
70
|
+
const backupDir = path.join(root, '.aidf-uninstall-backup', timestampSlug());
|
|
71
|
+
|
|
72
|
+
async function backup(relPath, absPath) {
|
|
73
|
+
const target = path.join(backupDir, relPath);
|
|
74
|
+
await ensureDir(path.dirname(target));
|
|
75
|
+
await fsp.copyFile(absPath, target);
|
|
76
|
+
return toPosix(path.relative(root, target));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// 1. Files outside .aidf/ are only removed when their hash still matches.
|
|
80
|
+
// Managed blocks and merged JSON are handled separately so user content and
|
|
81
|
+
// unrelated settings survive.
|
|
82
|
+
const externalFiles = Object.keys(manifest.files).filter((rel) => {
|
|
83
|
+
if (rel.startsWith('.aidf/')) return false;
|
|
84
|
+
const record = manifest.files[rel];
|
|
85
|
+
return !record?.managedBlock && !record?.mergeJson;
|
|
86
|
+
});
|
|
87
|
+
for (const rel of externalFiles) {
|
|
88
|
+
const abs = path.join(root, rel);
|
|
89
|
+
if (!(await exists(abs))) {
|
|
90
|
+
results.push({ path: rel, status: 'ABSENT' });
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const record = manifest.files[rel];
|
|
94
|
+
const currentHash = await sha256File(abs);
|
|
95
|
+
const unmodified = record?.sha256 ? currentHash === record.sha256 : false;
|
|
96
|
+
if (!unmodified && !force) {
|
|
97
|
+
results.push({
|
|
98
|
+
path: rel,
|
|
99
|
+
status: 'CONFLICT',
|
|
100
|
+
reason: 'File was modified after installation; preserved. Use --force to remove it (a backup is kept).',
|
|
101
|
+
});
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (dryRun) {
|
|
105
|
+
results.push({ path: rel, status: 'WOULD_REMOVE' });
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
if (!unmodified && force) {
|
|
109
|
+
const backupPath = await backup(rel, abs);
|
|
110
|
+
await removeFile(abs);
|
|
111
|
+
results.push({ path: rel, status: 'REMOVED', backup: backupPath });
|
|
112
|
+
} else {
|
|
113
|
+
await removeFile(abs);
|
|
114
|
+
results.push({ path: rel, status: 'REMOVED' });
|
|
115
|
+
}
|
|
116
|
+
await removeEmptyParents(root, rel);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// 2. Links created by AIDF.
|
|
120
|
+
for (const rel of Object.keys(manifest.links ?? {})) {
|
|
121
|
+
const abs = path.join(root, rel);
|
|
122
|
+
if (!(await exists(abs))) {
|
|
123
|
+
results.push({ path: rel, status: 'ABSENT', kind: 'link' });
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (dryRun) {
|
|
127
|
+
results.push({ path: rel, status: 'WOULD_REMOVE', kind: 'link' });
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
const stat = await fsp.lstat(abs);
|
|
132
|
+
if (stat.isSymbolicLink()) await fsp.unlink(abs);
|
|
133
|
+
else await removeDir(abs);
|
|
134
|
+
results.push({ path: rel, status: 'REMOVED', kind: 'link' });
|
|
135
|
+
} catch (error) {
|
|
136
|
+
results.push({ path: rel, status: 'FAILED', kind: 'link', reason: error.message });
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// 3. Remove the managed AGENTS.md block, preserving user content.
|
|
141
|
+
const agentsRel = 'AGENTS.md';
|
|
142
|
+
const agentsAbs = path.join(root, agentsRel);
|
|
143
|
+
if (await exists(agentsAbs)) {
|
|
144
|
+
const current = await readText(agentsAbs);
|
|
145
|
+
const next = removeManagedBlock(current, 'default');
|
|
146
|
+
if (next !== current) {
|
|
147
|
+
if (dryRun) {
|
|
148
|
+
results.push({ path: agentsRel, status: 'WOULD_UPDATE', kind: 'managed-block' });
|
|
149
|
+
} else if (next.trim() === '') {
|
|
150
|
+
await removeFile(agentsAbs);
|
|
151
|
+
results.push({ path: agentsRel, status: 'REMOVED', kind: 'managed-block' });
|
|
152
|
+
} else {
|
|
153
|
+
await writeAtomic(agentsAbs, next);
|
|
154
|
+
results.push({ path: agentsRel, status: 'UPDATED', kind: 'managed-block' });
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 4. Remove AIDF hook entries from .qoder/settings.json without touching others.
|
|
160
|
+
const settingsAbs = path.join(root, '.qoder', 'settings.json');
|
|
161
|
+
if (await exists(settingsAbs)) {
|
|
162
|
+
let settings = null;
|
|
163
|
+
try {
|
|
164
|
+
settings = JSON.parse(await readText(settingsAbs));
|
|
165
|
+
} catch {
|
|
166
|
+
results.push({ path: '.qoder/settings.json', status: 'CONFLICT', reason: 'Not valid JSON; left untouched.' });
|
|
167
|
+
}
|
|
168
|
+
if (settings && settings.hooks) {
|
|
169
|
+
let changed = false;
|
|
170
|
+
for (const [event, groups] of Object.entries(settings.hooks)) {
|
|
171
|
+
if (!Array.isArray(groups)) continue;
|
|
172
|
+
const kept = groups
|
|
173
|
+
.map((group) => {
|
|
174
|
+
if (!group || !Array.isArray(group.hooks)) return group;
|
|
175
|
+
const hooks = group.hooks.filter((hook) => !String(hook?.command ?? '').includes('.aidf/hooks/'));
|
|
176
|
+
if (hooks.length !== group.hooks.length) changed = true;
|
|
177
|
+
return hooks.length === 0 ? null : { ...group, hooks };
|
|
178
|
+
})
|
|
179
|
+
.filter(Boolean);
|
|
180
|
+
if (kept.length === 0) {
|
|
181
|
+
delete settings.hooks[event];
|
|
182
|
+
changed = true;
|
|
183
|
+
} else {
|
|
184
|
+
settings.hooks[event] = kept;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (Object.keys(settings.hooks).length === 0) delete settings.hooks;
|
|
188
|
+
if (changed) {
|
|
189
|
+
if (dryRun) {
|
|
190
|
+
results.push({ path: '.qoder/settings.json', status: 'WOULD_UPDATE', kind: 'hooks' });
|
|
191
|
+
} else {
|
|
192
|
+
await writeAtomic(settingsAbs, `${JSON.stringify(settings, null, 2)}\n`);
|
|
193
|
+
results.push({ path: '.qoder/settings.json', status: 'UPDATED', kind: 'hooks' });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// 5. Remove the AIDF data directory (or keep docs/evidence with --keep-data).
|
|
200
|
+
const paths = aidfPaths(root);
|
|
201
|
+
if (dryRun) {
|
|
202
|
+
results.push({ path: '.aidf', status: keepData ? 'WOULD_UPDATE' : 'WOULD_REMOVE', kind: 'directory' });
|
|
203
|
+
} else if (keepData) {
|
|
204
|
+
for (const dir of AIDF_OWNED_DIRS) {
|
|
205
|
+
await removeDir(path.join(paths.base, dir));
|
|
206
|
+
}
|
|
207
|
+
for (const file of ['config.json', 'manifest.json', '.gitignore', 'AIDF.md']) {
|
|
208
|
+
await removeFile(path.join(paths.base, file));
|
|
209
|
+
}
|
|
210
|
+
results.push({
|
|
211
|
+
path: '.aidf',
|
|
212
|
+
status: 'UPDATED',
|
|
213
|
+
kind: 'directory',
|
|
214
|
+
reason: 'Kept .aidf/docs and .aidf/evidence; removed framework and state.',
|
|
215
|
+
});
|
|
216
|
+
} else {
|
|
217
|
+
await removeDir(paths.base);
|
|
218
|
+
results.push({ path: '.aidf', status: 'REMOVED', kind: 'directory' });
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const conflicts = results.filter((r) => r.status === 'CONFLICT');
|
|
222
|
+
if (ctx.json) {
|
|
223
|
+
process.stdout.write(`${JSON.stringify({ root, dryRun, results }, null, 2)}\n`);
|
|
224
|
+
} else {
|
|
225
|
+
ctx.logger.info(`${dryRun ? '[dry-run] ' : ''}AIDF uninstall — ${root}`);
|
|
226
|
+
for (const result of results) {
|
|
227
|
+
const suffix = result.reason ? ` — ${result.reason}` : result.backup ? ` — backup: ${result.backup}` : '';
|
|
228
|
+
ctx.logger.info(`${result.status} ${result.path}${suffix}`);
|
|
229
|
+
}
|
|
230
|
+
if (conflicts.length > 0) {
|
|
231
|
+
ctx.logger.warn(`${conflicts.length} file(s) preserved because they were modified after installation.`);
|
|
232
|
+
}
|
|
233
|
+
if (backupDir && (await exists(backupDir))) {
|
|
234
|
+
ctx.logger.info(`Backups: ${toPosix(path.relative(root, backupDir))}`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return conflicts.length > 0 ? 2 : 0;
|
|
238
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { parseArgs, assertEnum } from '../util/args.mjs';
|
|
2
|
+
import { resolveProjectRoot, isInitialized, PHASES } from '../core/paths.mjs';
|
|
3
|
+
import { runGate, loadGates, GATE_STATUSES } from '../core/workflow.mjs';
|
|
4
|
+
import { attachLogFile } from '../util/logger.mjs';
|
|
5
|
+
|
|
6
|
+
export function validateArgSpec() {
|
|
7
|
+
return {
|
|
8
|
+
booleans: ['json', 'allow-exec', 'help', 'list'],
|
|
9
|
+
aliases: { h: 'help', t: 'target', p: 'phase' },
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export async function validateCommand(argv, ctx) {
|
|
14
|
+
const args = parseArgs(argv, validateArgSpec());
|
|
15
|
+
if (args.help) {
|
|
16
|
+
ctx.logger.info('Usage: aidf validate --phase <phase> [--kind entry|exit] [--allow-exec] [--json]');
|
|
17
|
+
ctx.logger.info(' aidf validate --gate <gate-id> [--allow-exec]');
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
const root = resolveProjectRoot({ target: args.target, cwd: process.cwd() });
|
|
21
|
+
if (!isInitialized(root)) {
|
|
22
|
+
ctx.logger.error(`AIDF is not initialized in ${root}. Run "aidf install" first.`);
|
|
23
|
+
return 1;
|
|
24
|
+
}
|
|
25
|
+
await attachLogFile(ctx.logger, root).catch(() => null);
|
|
26
|
+
const gates = await loadGates(ctx.frameworkRoot);
|
|
27
|
+
|
|
28
|
+
if (args.list) {
|
|
29
|
+
if (ctx.json) process.stdout.write(`${JSON.stringify(gates, null, 2)}\n`);
|
|
30
|
+
else {
|
|
31
|
+
ctx.logger.table(
|
|
32
|
+
gates.map((g) => ({ id: g.id, phase: g.phase, kind: g.kind, checks: (g.checks ?? []).length })),
|
|
33
|
+
[
|
|
34
|
+
{ key: 'id', label: 'Gate' },
|
|
35
|
+
{ key: 'phase', label: 'Phase' },
|
|
36
|
+
{ key: 'kind', label: 'Kind' },
|
|
37
|
+
{ key: 'checks', label: 'Checks' },
|
|
38
|
+
],
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
let gateId = args.gate;
|
|
45
|
+
if (!gateId) {
|
|
46
|
+
const phase = assertEnum(args.phase, PHASES, 'phase');
|
|
47
|
+
if (!phase) {
|
|
48
|
+
ctx.logger.error('Missing --phase or --gate. Use --list to see gates.');
|
|
49
|
+
return 1;
|
|
50
|
+
}
|
|
51
|
+
const kind = assertEnum(args.kind ?? 'exit', ['entry', 'exit'], 'kind');
|
|
52
|
+
gateId = `${phase}-${kind}`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const report = await runGate(root, gateId, {
|
|
56
|
+
frameworkRoot: ctx.frameworkRoot,
|
|
57
|
+
allowExec: Boolean(args['allow-exec']),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (ctx.json) {
|
|
61
|
+
process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
62
|
+
} else {
|
|
63
|
+
ctx.logger.info(`Gate ${report.gate} (${report.phase}/${report.kind}) → ${report.status}`);
|
|
64
|
+
ctx.logger.table(
|
|
65
|
+
report.checks.map((c) => ({
|
|
66
|
+
id: c.id,
|
|
67
|
+
status: c.status,
|
|
68
|
+
blocking: c.blocking ? 'yes' : 'no',
|
|
69
|
+
reason: c.reason,
|
|
70
|
+
})),
|
|
71
|
+
[
|
|
72
|
+
{ key: 'id', label: 'Check' },
|
|
73
|
+
{ key: 'status', label: 'Status' },
|
|
74
|
+
{ key: 'blocking', label: 'Blocking' },
|
|
75
|
+
{ key: 'reason', label: 'Reason' },
|
|
76
|
+
],
|
|
77
|
+
);
|
|
78
|
+
if (report.evidence) ctx.logger.info(`Evidence: ${report.evidence.file} (${report.evidence.hash.slice(0, 12)})`);
|
|
79
|
+
if (report.status !== 'PASS') {
|
|
80
|
+
ctx.logger.warn('A phase is not complete unless its exit gate is PASS with evidence.');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return report.status === 'PASS' ? 0 : 1;
|
|
84
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { parseArgs, assertEnum } from '../util/args.mjs';
|
|
2
|
+
import { resolveProjectRoot, isInitialized, PHASES } from '../core/paths.mjs';
|
|
3
|
+
import {
|
|
4
|
+
workflowStatus, enterPhase, exitPhase, loadWorkflowState, saveWorkflowState,
|
|
5
|
+
loadPhases, nextPhase,
|
|
6
|
+
} from '../core/workflow.mjs';
|
|
7
|
+
import { attachLogFile } from '../util/logger.mjs';
|
|
8
|
+
|
|
9
|
+
export function workflowArgSpec() {
|
|
10
|
+
return {
|
|
11
|
+
booleans: ['json', 'allow-exec', 'yes', 'help'],
|
|
12
|
+
aliases: { h: 'help', t: 'target' },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function printGate(ctx, report) {
|
|
17
|
+
ctx.logger.info(`Gate ${report.gate} (${report.kind}) → ${report.status}`);
|
|
18
|
+
ctx.logger.table(
|
|
19
|
+
report.checks.map((c) => ({
|
|
20
|
+
id: c.id,
|
|
21
|
+
status: c.status,
|
|
22
|
+
blocking: c.blocking ? 'yes' : 'no',
|
|
23
|
+
reason: c.reason,
|
|
24
|
+
})),
|
|
25
|
+
[
|
|
26
|
+
{ key: 'id', label: 'Check' },
|
|
27
|
+
{ key: 'status', label: 'Status' },
|
|
28
|
+
{ key: 'blocking', label: 'Blocking' },
|
|
29
|
+
{ key: 'reason', label: 'Reason' },
|
|
30
|
+
],
|
|
31
|
+
);
|
|
32
|
+
if (report.evidence) ctx.logger.info(`Evidence: ${report.evidence.file}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export async function workflowCommand(argv, ctx) {
|
|
36
|
+
const args = parseArgs(argv, workflowArgSpec());
|
|
37
|
+
const sub = args._[0] ?? 'status';
|
|
38
|
+
if (args.help) {
|
|
39
|
+
ctx.logger.info('Usage: aidf workflow <status|enter <phase>|exit <phase>|next|reset> [--allow-exec] [--json]');
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
42
|
+
const root = resolveProjectRoot({ target: args.target, cwd: process.cwd() });
|
|
43
|
+
if (!isInitialized(root)) {
|
|
44
|
+
ctx.logger.error(`AIDF is not initialized in ${root}. Run "aidf install" first.`);
|
|
45
|
+
return 1;
|
|
46
|
+
}
|
|
47
|
+
await attachLogFile(ctx.logger, root).catch(() => null);
|
|
48
|
+
|
|
49
|
+
if (sub === 'status') {
|
|
50
|
+
const status = await workflowStatus(root, { frameworkRoot: ctx.frameworkRoot });
|
|
51
|
+
if (ctx.json) {
|
|
52
|
+
process.stdout.write(`${JSON.stringify(status, null, 2)}\n`);
|
|
53
|
+
} else {
|
|
54
|
+
ctx.logger.info(`AIDF workflow — current phase: ${status.currentPhase}${status.completed ? ' (completed)' : ''}`);
|
|
55
|
+
ctx.logger.table(
|
|
56
|
+
status.phases.map((p) => ({ ...p, current: p.current ? '→' : '' })),
|
|
57
|
+
[
|
|
58
|
+
{ key: 'current', label: '' },
|
|
59
|
+
{ key: 'phase', label: 'Phase' },
|
|
60
|
+
{ key: 'name', label: 'Name' },
|
|
61
|
+
{ key: 'entry', label: 'Entry gate' },
|
|
62
|
+
{ key: 'exit', label: 'Exit gate' },
|
|
63
|
+
],
|
|
64
|
+
);
|
|
65
|
+
ctx.logger.info('Run `aidf workflow enter <phase>` and `aidf validate --phase <phase> --kind exit --allow-exec`.');
|
|
66
|
+
}
|
|
67
|
+
return 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (sub === 'enter') {
|
|
71
|
+
const phase = assertEnum(args._[1], PHASES, 'phase');
|
|
72
|
+
if (!phase) {
|
|
73
|
+
ctx.logger.error(`Usage: aidf workflow enter <${PHASES.join('|')}>`);
|
|
74
|
+
return 1;
|
|
75
|
+
}
|
|
76
|
+
const result = await enterPhase(root, phase, { frameworkRoot: ctx.frameworkRoot, allowExec: Boolean(args['allow-exec']) });
|
|
77
|
+
if (ctx.json) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
78
|
+
else if (result.alreadyInPhase) ctx.logger.info(`Already in phase ${phase}.`);
|
|
79
|
+
else {
|
|
80
|
+
printGate(ctx, result.gate);
|
|
81
|
+
if (result.status === 'PASS') ctx.logger.info(`Entered phase ${phase}.`);
|
|
82
|
+
else ctx.logger.error(`Entry to ${phase} is ${result.status}. Fix the checks above.`);
|
|
83
|
+
}
|
|
84
|
+
return result.status === 'PASS' ? 0 : 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (sub === 'exit') {
|
|
88
|
+
const phase = assertEnum(args._[1], PHASES, 'phase');
|
|
89
|
+
if (!phase) {
|
|
90
|
+
ctx.logger.error(`Usage: aidf workflow exit <${PHASES.join('|')}>`);
|
|
91
|
+
return 1;
|
|
92
|
+
}
|
|
93
|
+
const result = await exitPhase(root, phase, { frameworkRoot: ctx.frameworkRoot, allowExec: Boolean(args['allow-exec']) });
|
|
94
|
+
if (ctx.json) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
95
|
+
else {
|
|
96
|
+
printGate(ctx, result.gate);
|
|
97
|
+
if (result.status === 'PASS') ctx.logger.info(`Exited ${phase}${result.nextPhase ? `; next phase: ${result.nextPhase}` : '; cycle complete'}.`);
|
|
98
|
+
else ctx.logger.error(`Exit from ${phase} is ${result.status}. The phase is not complete.`);
|
|
99
|
+
}
|
|
100
|
+
return result.status === 'PASS' ? 0 : 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (sub === 'next') {
|
|
104
|
+
const state = await loadWorkflowState(root);
|
|
105
|
+
const phases = await loadPhases(ctx.frameworkRoot);
|
|
106
|
+
const next = nextPhase(phases, state.currentPhase);
|
|
107
|
+
if (!next) {
|
|
108
|
+
ctx.logger.info('No next phase; the cycle is complete.');
|
|
109
|
+
return 0;
|
|
110
|
+
}
|
|
111
|
+
const result = await enterPhase(root, next, { frameworkRoot: ctx.frameworkRoot, allowExec: Boolean(args['allow-exec']) });
|
|
112
|
+
if (ctx.json) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
113
|
+
else {
|
|
114
|
+
printGate(ctx, result.gate);
|
|
115
|
+
ctx.logger.info(result.status === 'PASS' ? `Entered ${next}.` : `Cannot enter ${next}: ${result.status}.`);
|
|
116
|
+
}
|
|
117
|
+
return result.status === 'PASS' ? 0 : 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (sub === 'reset') {
|
|
121
|
+
if (!args.yes) {
|
|
122
|
+
ctx.logger.error('Refusing to reset workflow state without --yes.');
|
|
123
|
+
return 1;
|
|
124
|
+
}
|
|
125
|
+
const state = await loadWorkflowState(root);
|
|
126
|
+
state.currentPhase = 'intake';
|
|
127
|
+
state.completed = false;
|
|
128
|
+
state.gates = {};
|
|
129
|
+
state.history.push({ ts: new Date().toISOString(), event: 'reset' });
|
|
130
|
+
await saveWorkflowState(root, state);
|
|
131
|
+
ctx.logger.info('Workflow state reset to intake. Evidence files were not deleted.');
|
|
132
|
+
return 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
ctx.logger.error(`Unknown workflow subcommand: ${sub}`);
|
|
136
|
+
return 1;
|
|
137
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { exists } from '../../util/fsx.mjs';
|
|
3
|
+
|
|
4
|
+
export class Adapter {
|
|
5
|
+
constructor(options = {}) {
|
|
6
|
+
this.key = options.key ?? 'generic';
|
|
7
|
+
this.name = options.name ?? 'Generic';
|
|
8
|
+
this.capabilities = options.capabilities ?? [];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async detect() {
|
|
12
|
+
return { installed: true, capabilities: this.capabilities };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async plan() {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async verify() {
|
|
20
|
+
return { status: 'NOT_PROVEN', checks: [] };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function readIfExists(file) {
|
|
25
|
+
return (await exists(file)) ? file : null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function skillTargetPath(adapterKey, skillName) {
|
|
29
|
+
if (adapterKey === 'qoder') return path.posix.join('.qoder', 'skills', skillName, 'SKILL.md');
|
|
30
|
+
if (adapterKey === 'opencode') return path.posix.join('.opencode', 'skills', skillName, 'SKILL.md');
|
|
31
|
+
return path.posix.join('.aidf', 'skills', skillName, 'SKILL.md');
|
|
32
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { Adapter } from './base.mjs';
|
|
3
|
+
import { readText, exists } from '../../util/fsx.mjs';
|
|
4
|
+
import { loadSkillCatalog } from '../skills.mjs';
|
|
5
|
+
|
|
6
|
+
export class GenericAdapter extends Adapter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super({
|
|
9
|
+
key: 'generic',
|
|
10
|
+
name: 'Generic (AGENTS.md)',
|
|
11
|
+
capabilities: ['agents-md', 'skills'],
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async detect() {
|
|
16
|
+
return {
|
|
17
|
+
installed: true,
|
|
18
|
+
capabilities: { agentsMd: true, rules: false, skills: true, hooks: false },
|
|
19
|
+
limitations: ['No IDE-specific discovery is configured; the agent must read AGENTS.md, .aidf/AIDF.md and the skill registry.'],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async plan(context) {
|
|
24
|
+
const fragment = await readText(path.join(context.frameworkRoot, 'assets', 'core', 'AGENTS.fragment.md'));
|
|
25
|
+
const actions = [{
|
|
26
|
+
kind: 'managed-block',
|
|
27
|
+
path: 'AGENTS.md',
|
|
28
|
+
blockId: 'default',
|
|
29
|
+
content: fragment,
|
|
30
|
+
category: 'instructions',
|
|
31
|
+
}];
|
|
32
|
+
// Built-in skills are framework assets, not IDE-specific: install them
|
|
33
|
+
// under .aidf/skills/ so any AGENTS.md-compatible agent can discover them
|
|
34
|
+
// through .aidf/registry/skills.yaml.
|
|
35
|
+
const catalog = await loadSkillCatalog(context.frameworkRoot);
|
|
36
|
+
for (const skill of catalog) {
|
|
37
|
+
actions.push({
|
|
38
|
+
kind: 'write',
|
|
39
|
+
path: path.posix.join('.aidf', 'skills', skill.name, 'SKILL.md'),
|
|
40
|
+
content: await readText(path.join(context.frameworkRoot, 'assets', 'skills', skill.name, 'SKILL.md')),
|
|
41
|
+
category: 'skills',
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return actions;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async verify(context) {
|
|
48
|
+
const agents = path.join(context.root, 'AGENTS.md');
|
|
49
|
+
const text = (await exists(agents)) ? await readText(agents) : '';
|
|
50
|
+
const ok = text.includes('<!-- AIDF:BEGIN');
|
|
51
|
+
const catalog = await loadSkillCatalog(context.frameworkRoot);
|
|
52
|
+
let installed = 0;
|
|
53
|
+
for (const skill of catalog) {
|
|
54
|
+
if (await exists(path.join(context.root, '.aidf', 'skills', skill.name, 'SKILL.md'))) installed += 1;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
status: ok && installed === catalog.length ? 'PROVEN' : 'FAIL',
|
|
58
|
+
checks: [{
|
|
59
|
+
id: 'agents-md-block',
|
|
60
|
+
status: ok ? 'PASS' : 'FAIL',
|
|
61
|
+
evidence: 'AGENTS.md managed block',
|
|
62
|
+
}, {
|
|
63
|
+
id: 'aidf-skills-installed',
|
|
64
|
+
status: installed === catalog.length ? 'PASS' : 'FAIL',
|
|
65
|
+
evidence: `${installed}/${catalog.length} built-in SKILL.md files under .aidf/skills/`,
|
|
66
|
+
}],
|
|
67
|
+
limitations: ['Skill availability means the files exist and validate; runtime loading depends on the agent reading the AIDF registry.'],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|