@mytechtoday/augment-extensions 3.1.2 → 3.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/AGENTS.md +123 -0
- package/README.md +981 -32
- package/augment-extensions/coding-standards/q/CHANGELOG.md +16 -0
- package/augment-extensions/coding-standards/q/README.md +53 -0
- package/augment-extensions/coding-standards/q/examples/ArrayAndTupleNamingConventions.qs +27 -0
- package/augment-extensions/coding-standards/q/examples/CallableAliasNamingConventions.qs +20 -0
- package/augment-extensions/coding-standards/q/examples/CircuitCompositionNamingConventions.qs +24 -0
- package/augment-extensions/coding-standards/q/examples/ConstantValueNamingConventions.qs +19 -0
- package/augment-extensions/coding-standards/q/examples/EntryPointAttributeNamingConventions.qs +17 -0
- package/augment-extensions/coding-standards/q/examples/FunctorApplicationInControlledCircuits.qs +84 -0
- package/augment-extensions/coding-standards/q/examples/FunctorSpecializationNamingConventions.qs +29 -0
- package/augment-extensions/coding-standards/q/examples/GenericTypeParameterNamingConventions.qs +20 -0
- package/augment-extensions/coding-standards/q/examples/HamiltonianOperatorNamingConventions.qs +24 -0
- package/augment-extensions/coding-standards/q/examples/MeasurementResultNamingConventions.qs +48 -0
- package/augment-extensions/coding-standards/q/examples/NamespaceNamingConventions.qs +30 -0
- package/augment-extensions/coding-standards/q/examples/OperationAndFunctionNamingConventions.qs +31 -0
- package/augment-extensions/coding-standards/q/examples/OracleCallableNamingConventions.qs +41 -0
- package/augment-extensions/coding-standards/q/examples/PauliBasisNamingConventions.qs +42 -0
- package/augment-extensions/coding-standards/q/examples/PauliOperatorNamingConventions.qs +24 -0
- package/augment-extensions/coding-standards/q/examples/QubitManagementAndTeleportation.qs +94 -0
- package/augment-extensions/coding-standards/q/examples/QubitNamingConventions.qs +53 -0
- package/augment-extensions/coding-standards/q/examples/QubitRegisterNamingConventions.qs +30 -0
- package/augment-extensions/coding-standards/q/examples/StateVectorNamingConventions.qs +23 -0
- package/augment-extensions/coding-standards/q/examples/UserDefinedTypeNamingConventions.qs +22 -0
- package/augment-extensions/coding-standards/q/examples/VariableAndParameterNamingConventions.qs +26 -0
- package/augment-extensions/coding-standards/q/examples/bell-state.qs +21 -0
- package/augment-extensions/coding-standards/q/metadata.json +38 -0
- package/augment-extensions/coding-standards/q/module.json +29 -0
- package/augment-extensions/coding-standards/q/rules/q-error-handling.md +143 -0
- package/augment-extensions/coding-standards/q/rules/q-naming-conventions.md +82 -0
- package/augment-extensions/coding-standards/q/rules/q-performance-optimization.md +10 -0
- package/augment-extensions/coding-standards/q/rules/q-qubit-management.md +10 -0
- package/augment-extensions/coding-standards/q/rules/q-security.md +10 -0
- package/augment-extensions/coding-standards/q/rules/q-standards.md +127 -0
- package/augment-extensions/coding-standards/q/rules/q-testing.md +10 -0
- package/augment-extensions/visual-design/CHANGELOG.md +2 -2
- package/augment-extensions/visual-design/README.md +31 -8
- package/augment-extensions/visual-design/VERSION +1 -0
- package/augment-extensions/visual-design/__tests__/README.md +32 -18
- package/augment-extensions/visual-design/__tests__/guidance-contract.test.ts +355 -0
- package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +23 -5
- package/augment-extensions/visual-design/domains/other/dotnet-application.ts +1 -1
- package/augment-extensions/visual-design/domains/other/mobile-application.ts +3 -4
- package/augment-extensions/visual-design/domains/other/os-application.ts +1 -1
- package/augment-extensions/visual-design/domains/other/windows-platform.ts +1 -1
- package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +4 -4
- package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +10 -10
- package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +3 -3
- package/augment-extensions/visual-design/examples/README.md +2 -0
- package/augment-extensions/visual-design/examples/basic-usage.md +5 -3
- package/augment-extensions/visual-design/examples/vendor-comparison.md +2 -2
- package/augment-extensions/visual-design/guidelines/coverage-map.md +30 -0
- package/augment-extensions/visual-design/guidelines/design-levels.md +211 -0
- package/augment-extensions/visual-design/guidelines/index.md +5 -0
- package/augment-extensions/visual-design/metadata.json +26 -5
- package/augment-extensions/visual-design/module.json +39 -6
- package/augment-extensions/visual-design/rules/accessibility-and-color.md +51 -0
- package/augment-extensions/visual-design/rules/design-practice.md +55 -0
- package/augment-extensions/visual-design/rules/index.md +34 -0
- package/augment-extensions/visual-design/rules/platform-guidance.md +47 -0
- package/augment-extensions/visual-design/scripts/validate-guidance.cjs +233 -0
- package/augment-extensions/visual-design/skills/README.md +11 -0
- package/augment-extensions/visual-design/skills/design-brief.md +40 -0
- package/augment-extensions/visual-design/skills/design-review.md +38 -0
- package/augment-extensions/visual-design/skills/responsive-validation/SKILL.md +94 -0
- package/augment-extensions/visual-design/skills/responsive-validation/scripts/responsive-sweep.cjs +457 -0
- package/augment-extensions/visual-design/style-selector.ts +4 -4
- package/augment-extensions/visual-design/types.ts +101 -46
- package/augment-extensions/visual-design/visual-design-core.ts +8 -8
- package/cli/dist/adapters/banner.d.ts +62 -0
- package/cli/dist/adapters/banner.d.ts.map +1 -0
- package/cli/dist/adapters/banner.js +105 -0
- package/cli/dist/adapters/banner.js.map +1 -0
- package/cli/dist/adapters/claude-code.d.ts +13 -0
- package/cli/dist/adapters/claude-code.d.ts.map +1 -0
- package/cli/dist/adapters/claude-code.js +79 -0
- package/cli/dist/adapters/claude-code.js.map +1 -0
- package/cli/dist/adapters/copilot.d.ts +17 -0
- package/cli/dist/adapters/copilot.d.ts.map +1 -0
- package/cli/dist/adapters/copilot.js +81 -0
- package/cli/dist/adapters/copilot.js.map +1 -0
- package/cli/dist/adapters/cursor.d.ts +16 -0
- package/cli/dist/adapters/cursor.d.ts.map +1 -0
- package/cli/dist/adapters/cursor.js +99 -0
- package/cli/dist/adapters/cursor.js.map +1 -0
- package/cli/dist/adapters/index.d.ts +25 -0
- package/cli/dist/adapters/index.d.ts.map +1 -0
- package/cli/dist/adapters/index.js +59 -0
- package/cli/dist/adapters/index.js.map +1 -0
- package/cli/dist/adapters/types.d.ts +113 -0
- package/cli/dist/adapters/types.d.ts.map +1 -0
- package/cli/dist/adapters/types.js +13 -0
- package/cli/dist/adapters/types.js.map +1 -0
- package/cli/dist/adapters/windsurf.d.ts +14 -0
- package/cli/dist/adapters/windsurf.d.ts.map +1 -0
- package/cli/dist/adapters/windsurf.js +78 -0
- package/cli/dist/adapters/windsurf.js.map +1 -0
- package/cli/dist/analysis/index.d.ts +1 -0
- package/cli/dist/analysis/index.d.ts.map +1 -1
- package/cli/dist/analysis/index.js +1 -0
- package/cli/dist/analysis/index.js.map +1 -1
- package/cli/dist/analysis/pattern-analyzer.d.ts +6 -0
- package/cli/dist/analysis/pattern-analyzer.d.ts.map +1 -0
- package/cli/dist/analysis/pattern-analyzer.js +100 -0
- package/cli/dist/analysis/pattern-analyzer.js.map +1 -0
- package/cli/dist/cli.js +62 -35
- package/cli/dist/cli.js.map +1 -1
- package/cli/dist/commands/code-analysis.d.ts.map +1 -1
- package/cli/dist/commands/code-analysis.js +22 -2
- package/cli/dist/commands/code-analysis.js.map +1 -1
- package/cli/dist/commands/export.d.ts +81 -0
- package/cli/dist/commands/export.d.ts.map +1 -0
- package/cli/dist/commands/export.js +334 -0
- package/cli/dist/commands/export.js.map +1 -0
- package/cli/dist/commands/gui.d.ts +3 -1
- package/cli/dist/commands/gui.d.ts.map +1 -1
- package/cli/dist/commands/gui.js +263 -22
- package/cli/dist/commands/gui.js.map +1 -1
- package/cli/dist/commands/init.d.ts +2 -0
- package/cli/dist/commands/init.d.ts.map +1 -1
- package/cli/dist/commands/init.js +84 -3
- package/cli/dist/commands/init.js.map +1 -1
- package/cli/dist/commands/lifecycle.d.ts +14 -0
- package/cli/dist/commands/lifecycle.d.ts.map +1 -0
- package/cli/dist/commands/lifecycle.js +463 -0
- package/cli/dist/commands/lifecycle.js.map +1 -0
- package/cli/dist/commands/link.d.ts +3 -0
- package/cli/dist/commands/link.d.ts.map +1 -1
- package/cli/dist/commands/link.js +126 -16
- package/cli/dist/commands/link.js.map +1 -1
- package/cli/dist/commands/list.js +2 -2
- package/cli/dist/commands/list.js.map +1 -1
- package/cli/dist/commands/mcp.d.ts +1 -2
- package/cli/dist/commands/mcp.d.ts.map +1 -1
- package/cli/dist/commands/mcp.js +20 -20
- package/cli/dist/commands/mcp.js.map +1 -1
- package/cli/dist/commands/module-management.d.ts +9 -0
- package/cli/dist/commands/module-management.d.ts.map +1 -0
- package/cli/dist/commands/module-management.js +420 -0
- package/cli/dist/commands/module-management.js.map +1 -0
- package/cli/dist/commands/self-remove.d.ts.map +1 -1
- package/cli/dist/commands/self-remove.js +98 -44
- package/cli/dist/commands/self-remove.js.map +1 -1
- package/cli/dist/commands/show.d.ts +1 -1
- package/cli/dist/commands/show.d.ts.map +1 -1
- package/cli/dist/commands/show.js +21 -10
- package/cli/dist/commands/show.js.map +1 -1
- package/cli/dist/commands/showCompleted.d.ts +1 -0
- package/cli/dist/commands/showCompleted.d.ts.map +1 -1
- package/cli/dist/commands/showCompleted.js +4 -3
- package/cli/dist/commands/showCompleted.js.map +1 -1
- package/cli/dist/commands/skill.d.ts +7 -1
- package/cli/dist/commands/skill.d.ts.map +1 -1
- package/cli/dist/commands/skill.js +79 -21
- package/cli/dist/commands/skill.js.map +1 -1
- package/cli/dist/commands/unlink.d.ts.map +1 -1
- package/cli/dist/commands/unlink.js +38 -2
- package/cli/dist/commands/unlink.js.map +1 -1
- package/cli/dist/commands/update.d.ts.map +1 -1
- package/cli/dist/commands/update.js +6 -16
- package/cli/dist/commands/update.js.map +1 -1
- package/cli/dist/commands/upgrade.d.ts +2 -0
- package/cli/dist/commands/upgrade.d.ts.map +1 -1
- package/cli/dist/commands/upgrade.js +22 -5
- package/cli/dist/commands/upgrade.js.map +1 -1
- package/cli/dist/commands/use.d.ts.map +1 -1
- package/cli/dist/commands/use.js +2 -68
- package/cli/dist/commands/use.js.map +1 -1
- package/cli/dist/core/compatibility-checker.d.ts +37 -1
- package/cli/dist/core/compatibility-checker.d.ts.map +1 -1
- package/cli/dist/core/compatibility-checker.js +133 -12
- package/cli/dist/core/compatibility-checker.js.map +1 -1
- package/cli/dist/gui/state/navigation-state.d.ts +20 -0
- package/cli/dist/gui/state/navigation-state.d.ts.map +1 -0
- package/cli/dist/gui/state/navigation-state.js +115 -0
- package/cli/dist/gui/state/navigation-state.js.map +1 -0
- package/cli/dist/gui/state/selection-state.d.ts +21 -0
- package/cli/dist/gui/state/selection-state.d.ts.map +1 -0
- package/cli/dist/gui/state/selection-state.js +117 -0
- package/cli/dist/gui/state/selection-state.js.map +1 -0
- package/cli/dist/lib/export-runner.d.ts +76 -0
- package/cli/dist/lib/export-runner.d.ts.map +1 -0
- package/cli/dist/lib/export-runner.js +111 -0
- package/cli/dist/lib/export-runner.js.map +1 -0
- package/cli/dist/lib/mcp-detection.d.ts +40 -0
- package/cli/dist/lib/mcp-detection.d.ts.map +1 -0
- package/cli/dist/lib/mcp-detection.js +167 -0
- package/cli/dist/lib/mcp-detection.js.map +1 -0
- package/cli/dist/lib/mirror-coordination.d.ts +57 -0
- package/cli/dist/lib/mirror-coordination.d.ts.map +1 -0
- package/cli/dist/lib/mirror-coordination.js +151 -0
- package/cli/dist/lib/mirror-coordination.js.map +1 -0
- package/cli/dist/lib/mirror-runner.d.ts +123 -0
- package/cli/dist/lib/mirror-runner.d.ts.map +1 -0
- package/cli/dist/lib/mirror-runner.js +579 -0
- package/cli/dist/lib/mirror-runner.js.map +1 -0
- package/cli/dist/lib/module-resolver.d.ts +65 -0
- package/cli/dist/lib/module-resolver.d.ts.map +1 -0
- package/cli/dist/lib/module-resolver.js +211 -0
- package/cli/dist/lib/module-resolver.js.map +1 -0
- package/cli/dist/lib/source-hash.d.ts +62 -0
- package/cli/dist/lib/source-hash.d.ts.map +1 -0
- package/cli/dist/lib/source-hash.js +99 -0
- package/cli/dist/lib/source-hash.js.map +1 -0
- package/cli/dist/types/coordination-export.d.ts +33 -0
- package/cli/dist/types/coordination-export.d.ts.map +1 -0
- package/cli/dist/types/coordination-export.js +28 -0
- package/cli/dist/types/coordination-export.js.map +1 -0
- package/cli/dist/types/lifecycle.d.ts +81 -0
- package/cli/dist/types/lifecycle.d.ts.map +1 -0
- package/cli/dist/types/lifecycle.js +3 -0
- package/cli/dist/types/lifecycle.js.map +1 -0
- package/cli/dist/utils/beads-sync.d.ts +4 -0
- package/cli/dist/utils/beads-sync.d.ts.map +1 -1
- package/cli/dist/utils/beads-sync.js.map +1 -1
- package/cli/dist/utils/catalog-sync.d.ts.map +1 -1
- package/cli/dist/utils/catalog-sync.js +41 -8
- package/cli/dist/utils/catalog-sync.js.map +1 -1
- package/cli/dist/utils/coordination-queries.d.ts +3 -0
- package/cli/dist/utils/coordination-queries.d.ts.map +1 -1
- package/cli/dist/utils/coordination-queries.js.map +1 -1
- package/cli/dist/utils/extensions-config.d.ts +29 -0
- package/cli/dist/utils/extensions-config.d.ts.map +1 -0
- package/cli/dist/utils/extensions-config.js +151 -0
- package/cli/dist/utils/extensions-config.js.map +1 -0
- package/cli/dist/utils/extractCommandHelp.d.ts.map +1 -1
- package/cli/dist/utils/extractCommandHelp.js +6 -0
- package/cli/dist/utils/extractCommandHelp.js.map +1 -1
- package/cli/dist/utils/file-tracking.d.ts +4 -0
- package/cli/dist/utils/file-tracking.d.ts.map +1 -1
- package/cli/dist/utils/file-tracking.js.map +1 -1
- package/cli/dist/utils/inspection-cache.d.ts +8 -0
- package/cli/dist/utils/inspection-cache.d.ts.map +1 -1
- package/cli/dist/utils/inspection-cache.js +12 -0
- package/cli/dist/utils/inspection-cache.js.map +1 -1
- package/cli/dist/utils/inspection-handlers.d.ts.map +1 -1
- package/cli/dist/utils/inspection-handlers.js +230 -52
- package/cli/dist/utils/inspection-handlers.js.map +1 -1
- package/cli/dist/utils/install-rules.d.ts +15 -0
- package/cli/dist/utils/install-rules.d.ts.map +1 -1
- package/cli/dist/utils/install-rules.js +247 -0
- package/cli/dist/utils/install-rules.js.map +1 -1
- package/cli/dist/utils/interactive-prompt.d.ts +7 -0
- package/cli/dist/utils/interactive-prompt.d.ts.map +1 -0
- package/cli/dist/utils/interactive-prompt.js +41 -0
- package/cli/dist/utils/interactive-prompt.js.map +1 -0
- package/cli/dist/utils/lifecycle.d.ts +47 -0
- package/cli/dist/utils/lifecycle.d.ts.map +1 -0
- package/cli/dist/utils/lifecycle.js +841 -0
- package/cli/dist/utils/lifecycle.js.map +1 -0
- package/cli/dist/utils/mcp-integration.d.ts +24 -3
- package/cli/dist/utils/mcp-integration.d.ts.map +1 -1
- package/cli/dist/utils/mcp-integration.js +364 -151
- package/cli/dist/utils/mcp-integration.js.map +1 -1
- package/cli/dist/utils/module-system.d.ts +5 -0
- package/cli/dist/utils/module-system.d.ts.map +1 -1
- package/cli/dist/utils/module-system.js +113 -29
- package/cli/dist/utils/module-system.js.map +1 -1
- package/cli/dist/utils/openspec-sync.d.ts +4 -0
- package/cli/dist/utils/openspec-sync.d.ts.map +1 -1
- package/cli/dist/utils/openspec-sync.js.map +1 -1
- package/cli/dist/utils/plugin-system.js +1 -1
- package/cli/dist/utils/plugin-system.js.map +1 -1
- package/cli/dist/utils/skill-system.d.ts +11 -0
- package/cli/dist/utils/skill-system.d.ts.map +1 -1
- package/cli/dist/utils/skill-system.js +101 -3
- package/cli/dist/utils/skill-system.js.map +1 -1
- package/cli/dist/utils/zip-archive.d.ts +25 -0
- package/cli/dist/utils/zip-archive.d.ts.map +1 -0
- package/cli/dist/utils/zip-archive.js +287 -0
- package/cli/dist/utils/zip-archive.js.map +1 -0
- package/modules.md +21 -4
- package/package.json +138 -137
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* GitHub Copilot adapter.
|
|
4
|
+
*
|
|
5
|
+
* Aggregator output: `.github/copilot-instructions.md` at the project root.
|
|
6
|
+
* Mirror destination: `.github/instructions/augx-<module>.instructions.md`
|
|
7
|
+
* (one file per module).
|
|
8
|
+
*
|
|
9
|
+
* Copilot reads `.github/copilot-instructions.md` directly; no frontmatter
|
|
10
|
+
* is required, so the format mirrors Windsurf but with Copilot-specific
|
|
11
|
+
* paths.
|
|
12
|
+
*
|
|
13
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
14
|
+
* See: openspec/specs/cross-platform/mirror-hook.md
|
|
15
|
+
*/
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
33
|
+
var ownKeys = function(o) {
|
|
34
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
35
|
+
var ar = [];
|
|
36
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
return ownKeys(o);
|
|
40
|
+
};
|
|
41
|
+
return function (mod) {
|
|
42
|
+
if (mod && mod.__esModule) return mod;
|
|
43
|
+
var result = {};
|
|
44
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
45
|
+
__setModuleDefault(result, mod);
|
|
46
|
+
return result;
|
|
47
|
+
};
|
|
48
|
+
})();
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
exports.copilotAdapter = void 0;
|
|
51
|
+
const path = __importStar(require("path"));
|
|
52
|
+
const banner_1 = require("./banner");
|
|
53
|
+
/**
|
|
54
|
+
* Convert a canonical module id to a single path segment safe for filesystem
|
|
55
|
+
* use within `.github/instructions/augx-<segment>.instructions.md`.
|
|
56
|
+
*/
|
|
57
|
+
function moduleIdToSegment(moduleId) {
|
|
58
|
+
return moduleId.replace(/\//g, '-');
|
|
59
|
+
}
|
|
60
|
+
exports.copilotAdapter = {
|
|
61
|
+
id: 'copilot',
|
|
62
|
+
exportPaths(projectRoot) {
|
|
63
|
+
return {
|
|
64
|
+
single: path.join(projectRoot, '.github', 'copilot-instructions.md'),
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
mirrorPath(projectRoot, moduleId) {
|
|
68
|
+
const fileName = `augx-${moduleIdToSegment(moduleId)}.instructions.md`;
|
|
69
|
+
return path.join(projectRoot, '.github', 'instructions', fileName);
|
|
70
|
+
},
|
|
71
|
+
renderModule(module) {
|
|
72
|
+
return (0, banner_1.renderModuleBody)(module);
|
|
73
|
+
},
|
|
74
|
+
renderHeader(meta) {
|
|
75
|
+
return (0, banner_1.renderHeaderRegion)(meta);
|
|
76
|
+
},
|
|
77
|
+
renderFooter(_meta) {
|
|
78
|
+
return (0, banner_1.renderStandardFooter)();
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=copilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot.js","sourceRoot":"","sources":["../../src/adapters/copilot.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAO7B,qCAIkB;AAElB;;;GAGG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAEY,QAAA,cAAc,GAAgB;IACzC,EAAE,EAAE,SAAS;IAEb,WAAW,CAAC,WAAmB;QAC7B,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,yBAAyB,CAAC;SACrE,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,WAAmB,EAAE,QAAgB;QAC9C,MAAM,QAAQ,GAAG,QAAQ,iBAAiB,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACvE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;IAED,YAAY,CAAC,MAAsB;QACjC,OAAO,IAAA,yBAAgB,EAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,YAAY,CAAC,IAAgB;QAC3B,OAAO,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,YAAY,CAAC,KAAiB;QAC5B,OAAO,IAAA,6BAAoB,GAAE,CAAC;IAChC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor adapter.
|
|
3
|
+
*
|
|
4
|
+
* Aggregator output: `.cursor/rules/augx.mdc` at the project root.
|
|
5
|
+
* Mirror destination: `.cursor/rules/augx-<module>.mdc` (one file per
|
|
6
|
+
* module).
|
|
7
|
+
*
|
|
8
|
+
* Cursor `.mdc` files require YAML frontmatter; the banner is emitted as
|
|
9
|
+
* HTML comments immediately after the closing `---` of the frontmatter.
|
|
10
|
+
*
|
|
11
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
12
|
+
* See: openspec/specs/cross-platform/mirror-hook.md
|
|
13
|
+
*/
|
|
14
|
+
import type { ToolAdapter } from './types';
|
|
15
|
+
export declare const cursorAdapter: ToolAdapter;
|
|
16
|
+
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/adapters/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAIV,WAAW,EACZ,MAAM,SAAS,CAAC;AA4BjB,eAAO,MAAM,aAAa,EAAE,WAmC3B,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Cursor adapter.
|
|
4
|
+
*
|
|
5
|
+
* Aggregator output: `.cursor/rules/augx.mdc` at the project root.
|
|
6
|
+
* Mirror destination: `.cursor/rules/augx-<module>.mdc` (one file per
|
|
7
|
+
* module).
|
|
8
|
+
*
|
|
9
|
+
* Cursor `.mdc` files require YAML frontmatter; the banner is emitted as
|
|
10
|
+
* HTML comments immediately after the closing `---` of the frontmatter.
|
|
11
|
+
*
|
|
12
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
13
|
+
* See: openspec/specs/cross-platform/mirror-hook.md
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.cursorAdapter = void 0;
|
|
50
|
+
const path = __importStar(require("path"));
|
|
51
|
+
const banner_1 = require("./banner");
|
|
52
|
+
/**
|
|
53
|
+
* Canonical Cursor `.mdc` frontmatter for the aggregator output. The block
|
|
54
|
+
* uses `---` delimiters and Cursor's `alwaysApply` flag to ensure the rules
|
|
55
|
+
* load on every editor session.
|
|
56
|
+
*/
|
|
57
|
+
const CURSOR_FRONTMATTER = '---' + banner_1.LF +
|
|
58
|
+
"description: Augx aggregated rules" + banner_1.LF +
|
|
59
|
+
'alwaysApply: true' + banner_1.LF +
|
|
60
|
+
'---' + banner_1.LF;
|
|
61
|
+
/**
|
|
62
|
+
* Convert a canonical module id to a single path segment safe for filesystem
|
|
63
|
+
* use within `.cursor/rules/augx-<segment>.mdc`.
|
|
64
|
+
*/
|
|
65
|
+
function moduleIdToSegment(moduleId) {
|
|
66
|
+
return moduleId.replace(/\//g, '-');
|
|
67
|
+
}
|
|
68
|
+
exports.cursorAdapter = {
|
|
69
|
+
id: 'cursor',
|
|
70
|
+
exportPaths(projectRoot) {
|
|
71
|
+
return {
|
|
72
|
+
single: path.join(projectRoot, '.cursor', 'rules', 'augx.mdc'),
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
mirrorPath(projectRoot, moduleId) {
|
|
76
|
+
const fileName = `augx-${moduleIdToSegment(moduleId)}.mdc`;
|
|
77
|
+
return path.join(projectRoot, '.cursor', 'rules', fileName);
|
|
78
|
+
},
|
|
79
|
+
renderModule(module) {
|
|
80
|
+
return (0, banner_1.renderModuleBody)(module);
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Cursor-specific header: YAML frontmatter precedes the standard banner.
|
|
84
|
+
* MCP snippet (when present) follows the banner, separated by a blank
|
|
85
|
+
* line, matching the layout used by the other adapters.
|
|
86
|
+
*/
|
|
87
|
+
renderHeader(meta) {
|
|
88
|
+
const banner = (0, banner_1.renderBanner)(meta);
|
|
89
|
+
const head = CURSOR_FRONTMATTER + banner;
|
|
90
|
+
if (!meta.mcpSnippet) {
|
|
91
|
+
return head;
|
|
92
|
+
}
|
|
93
|
+
return head + banner_1.LF + (0, banner_1.normalizeBody)(meta.mcpSnippet);
|
|
94
|
+
},
|
|
95
|
+
renderFooter(_meta) {
|
|
96
|
+
return (0, banner_1.renderStandardFooter)();
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=cursor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/adapters/cursor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAO7B,qCAMkB;AAElB;;;;GAIG;AACH,MAAM,kBAAkB,GACtB,KAAK,GAAG,WAAE;IACV,oCAAoC,GAAG,WAAE;IACzC,mBAAmB,GAAG,WAAE;IACxB,KAAK,GAAG,WAAE,CAAC;AAEb;;;GAGG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAEY,QAAA,aAAa,GAAgB;IACxC,EAAE,EAAE,QAAQ;IAEZ,WAAW,CAAC,WAAmB;QAC7B,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,CAAC;SAC/D,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,WAAmB,EAAE,QAAgB;QAC9C,MAAM,QAAQ,GAAG,QAAQ,iBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC9D,CAAC;IAED,YAAY,CAAC,MAAsB;QACjC,OAAO,IAAA,yBAAgB,EAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,IAAgB;QAC3B,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,IAAI,CAAC,CAAC;QAClC,MAAM,IAAI,GAAG,kBAAkB,GAAG,MAAM,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,IAAI,GAAG,WAAE,GAAG,IAAA,sBAAa,EAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;IAED,YAAY,CAAC,KAAiB;QAC5B,OAAO,IAAA,6BAAoB,GAAE,CAAC;IAChC,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapter registry.
|
|
3
|
+
*
|
|
4
|
+
* Maps a `MirrorTool` id to its concrete `ToolAdapter` and exposes helpers
|
|
5
|
+
* for resolving `--target` values, including the special `all` keyword.
|
|
6
|
+
*/
|
|
7
|
+
import type { MirrorTool } from '../types/coordination-export';
|
|
8
|
+
import type { ToolAdapter } from './types';
|
|
9
|
+
import { claudeCodeAdapter } from './claude-code';
|
|
10
|
+
import { cursorAdapter } from './cursor';
|
|
11
|
+
import { windsurfAdapter } from './windsurf';
|
|
12
|
+
import { copilotAdapter } from './copilot';
|
|
13
|
+
/** All adapters indexed by `MirrorTool` id. */
|
|
14
|
+
export declare const ADAPTERS: Readonly<Record<MirrorTool, ToolAdapter>>;
|
|
15
|
+
/** Ordered list of every adapter, alphabetical by id for deterministic loops. */
|
|
16
|
+
export declare function allAdapters(): ToolAdapter[];
|
|
17
|
+
/**
|
|
18
|
+
* Resolve a user-supplied `--target` value into the concrete adapter list.
|
|
19
|
+
* Accepts a single tool id, a comma-separated list, or the keyword `all`.
|
|
20
|
+
*
|
|
21
|
+
* @throws if any token is not a valid tool id (caller maps this to exit 1).
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveTargets(rawTarget: string): ToolAdapter[];
|
|
24
|
+
export { claudeCodeAdapter, cursorAdapter, windsurfAdapter, copilotAdapter };
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,+CAA+C;AAC/C,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,CAK7D,CAAC;AAEH,iFAAiF;AACjF,wBAAgB,WAAW,IAAI,WAAW,EAAE,CAE3C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE,CAsB/D;AAED,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Adapter registry.
|
|
4
|
+
*
|
|
5
|
+
* Maps a `MirrorTool` id to its concrete `ToolAdapter` and exposes helpers
|
|
6
|
+
* for resolving `--target` values, including the special `all` keyword.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.copilotAdapter = exports.windsurfAdapter = exports.cursorAdapter = exports.claudeCodeAdapter = exports.ADAPTERS = void 0;
|
|
10
|
+
exports.allAdapters = allAdapters;
|
|
11
|
+
exports.resolveTargets = resolveTargets;
|
|
12
|
+
const coordination_export_1 = require("../types/coordination-export");
|
|
13
|
+
const claude_code_1 = require("./claude-code");
|
|
14
|
+
Object.defineProperty(exports, "claudeCodeAdapter", { enumerable: true, get: function () { return claude_code_1.claudeCodeAdapter; } });
|
|
15
|
+
const cursor_1 = require("./cursor");
|
|
16
|
+
Object.defineProperty(exports, "cursorAdapter", { enumerable: true, get: function () { return cursor_1.cursorAdapter; } });
|
|
17
|
+
const windsurf_1 = require("./windsurf");
|
|
18
|
+
Object.defineProperty(exports, "windsurfAdapter", { enumerable: true, get: function () { return windsurf_1.windsurfAdapter; } });
|
|
19
|
+
const copilot_1 = require("./copilot");
|
|
20
|
+
Object.defineProperty(exports, "copilotAdapter", { enumerable: true, get: function () { return copilot_1.copilotAdapter; } });
|
|
21
|
+
/** All adapters indexed by `MirrorTool` id. */
|
|
22
|
+
exports.ADAPTERS = Object.freeze({
|
|
23
|
+
'claude-code': claude_code_1.claudeCodeAdapter,
|
|
24
|
+
cursor: cursor_1.cursorAdapter,
|
|
25
|
+
windsurf: windsurf_1.windsurfAdapter,
|
|
26
|
+
copilot: copilot_1.copilotAdapter,
|
|
27
|
+
});
|
|
28
|
+
/** Ordered list of every adapter, alphabetical by id for deterministic loops. */
|
|
29
|
+
function allAdapters() {
|
|
30
|
+
return [...coordination_export_1.MIRROR_TOOLS].sort().map((id) => exports.ADAPTERS[id]);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve a user-supplied `--target` value into the concrete adapter list.
|
|
34
|
+
* Accepts a single tool id, a comma-separated list, or the keyword `all`.
|
|
35
|
+
*
|
|
36
|
+
* @throws if any token is not a valid tool id (caller maps this to exit 1).
|
|
37
|
+
*/
|
|
38
|
+
function resolveTargets(rawTarget) {
|
|
39
|
+
const trimmed = rawTarget.trim();
|
|
40
|
+
if (trimmed.length === 0) {
|
|
41
|
+
throw new Error('Empty --target value.');
|
|
42
|
+
}
|
|
43
|
+
if (trimmed === 'all') {
|
|
44
|
+
return allAdapters();
|
|
45
|
+
}
|
|
46
|
+
const tokens = trimmed
|
|
47
|
+
.split(',')
|
|
48
|
+
.map((t) => t.trim())
|
|
49
|
+
.filter((t) => t.length > 0);
|
|
50
|
+
const adapters = [];
|
|
51
|
+
for (const token of tokens) {
|
|
52
|
+
if (!(0, coordination_export_1.isMirrorTool)(token)) {
|
|
53
|
+
throw new Error(`Unknown --target value: ${token}. Valid: ${coordination_export_1.MIRROR_TOOLS.join(', ')}, all.`);
|
|
54
|
+
}
|
|
55
|
+
adapters.push(exports.ADAPTERS[token]);
|
|
56
|
+
}
|
|
57
|
+
return adapters;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAmBH,kCAEC;AAQD,wCAsBC;AAhDD,sEAA0E;AAE1E,+CAAkD;AAgDzC,kGAhDA,+BAAiB,OAgDA;AA/C1B,qCAAyC;AA+Cb,8FA/CnB,sBAAa,OA+CmB;AA9CzC,yCAA6C;AA8CF,gGA9ClC,0BAAe,OA8CkC;AA7C1D,uCAA2C;AA6CiB,+FA7CnD,wBAAc,OA6CmD;AA3C1E,+CAA+C;AAClC,QAAA,QAAQ,GAA8C,MAAM,CAAC,MAAM,CAAC;IAC/E,aAAa,EAAE,+BAAiB;IAChC,MAAM,EAAE,sBAAa;IACrB,QAAQ,EAAE,0BAAe;IACzB,OAAO,EAAE,wBAAc;CACxB,CAAC,CAAC;AAEH,iFAAiF;AACjF,SAAgB,WAAW;IACzB,OAAO,CAAC,GAAG,kCAAY,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,SAAiB;IAC9C,MAAM,OAAO,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;IACjC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;QACtB,OAAO,WAAW,EAAE,CAAC;IACvB,CAAC;IACD,MAAM,MAAM,GAAG,OAAO;SACnB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,IAAA,kCAAY,EAAC,KAAK,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CACb,2BAA2B,KAAK,YAAY,kCAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAC5E,CAAC;QACJ,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,gBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToolAdapter contract for the cross-platform export layer.
|
|
3
|
+
*
|
|
4
|
+
* One adapter per target tool (Claude Code, Cursor, Windsurf, Copilot).
|
|
5
|
+
* Adapters are PURE FUNCTIONS: given resolved modules and metadata, they
|
|
6
|
+
* return strings. All filesystem I/O happens in the runner.
|
|
7
|
+
*
|
|
8
|
+
* See: openspec/changes/cross-platform/design.md (component 2)
|
|
9
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
10
|
+
*/
|
|
11
|
+
import type { MirrorTool } from '../types/coordination-export';
|
|
12
|
+
/**
|
|
13
|
+
* A loaded rule (or example) file. Adapters are pure functions, so the
|
|
14
|
+
* runner reads file contents from disk and hands them to the adapter as
|
|
15
|
+
* in-memory objects.
|
|
16
|
+
*/
|
|
17
|
+
export interface ResolvedRuleFile {
|
|
18
|
+
/** Forward-slash path relative to the module's `rootPath`. */
|
|
19
|
+
relativePath: string;
|
|
20
|
+
/** UTF-8 file contents, newline-normalized to LF before being passed in. */
|
|
21
|
+
content: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A module after resolution from `.augment/coordination.json`. Adapters
|
|
25
|
+
* consume this; the resolver produces it.
|
|
26
|
+
*/
|
|
27
|
+
export interface ResolvedModule {
|
|
28
|
+
/** Canonical module id, e.g. `coding-standards/typescript`. */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Semantic version string from the module's `module.json`. */
|
|
31
|
+
version: string;
|
|
32
|
+
/** Absolute path to the module root on disk. */
|
|
33
|
+
rootPath: string;
|
|
34
|
+
/** Loaded `rules/*.md` files, alphabetically ordered by `relativePath`. */
|
|
35
|
+
rulesFiles: ResolvedRuleFile[];
|
|
36
|
+
/** Loaded files under `examples/`, alphabetically ordered by `relativePath`. */
|
|
37
|
+
examplesFiles: ResolvedRuleFile[];
|
|
38
|
+
/** Absolute path to the module's `README.md`, or undefined if absent. */
|
|
39
|
+
readmePath?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Module identity tuple embedded in the banner `modules:` comment.
|
|
43
|
+
*/
|
|
44
|
+
export interface ModuleIdentity {
|
|
45
|
+
id: string;
|
|
46
|
+
version: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Metadata threaded into every header/footer the adapter renders.
|
|
50
|
+
* Produced by the runner; never derived inside the adapter.
|
|
51
|
+
*/
|
|
52
|
+
export interface ExportMeta {
|
|
53
|
+
/** Augx CLI version (matches `package.json#version`). */
|
|
54
|
+
augxVersion: string;
|
|
55
|
+
/** ISO-8601 timestamp. Pinnable via `AUGX_FAKE_NOW` for tests. */
|
|
56
|
+
generatedAt: string;
|
|
57
|
+
/** 16-hex truncated SHA-256 from `source-hash.ts`. */
|
|
58
|
+
sourceHash: string;
|
|
59
|
+
/** Alphabetically sorted module identities; mirrored in the banner. */
|
|
60
|
+
modules: ModuleIdentity[];
|
|
61
|
+
/** Inlined MCP wiring snippet body, or undefined to omit. */
|
|
62
|
+
mcpSnippet?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Filesystem destinations a tool writes to.
|
|
66
|
+
*
|
|
67
|
+
* `single` is the aggregator output (single file per project). Adapters that
|
|
68
|
+
* also want a per-module shape can return additional fields under a richer
|
|
69
|
+
* type; this base shape covers all four Phase-1 adapters.
|
|
70
|
+
*/
|
|
71
|
+
export interface ExportPaths {
|
|
72
|
+
/** Absolute or project-relative path to the aggregator file. */
|
|
73
|
+
single: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The contract every tool adapter implements.
|
|
77
|
+
*
|
|
78
|
+
* INVARIANT: every method is a pure function. No `fs`, no `process.cwd()`,
|
|
79
|
+
* no clock reads, no random. All side effects live in the runner.
|
|
80
|
+
*/
|
|
81
|
+
export interface ToolAdapter {
|
|
82
|
+
/** Discriminator matching the `--target` flag and `MirrorTool` union. */
|
|
83
|
+
readonly id: MirrorTool;
|
|
84
|
+
/**
|
|
85
|
+
* Default output destinations for `augx export --target <id>`.
|
|
86
|
+
* The runner may override `single` via `--output`.
|
|
87
|
+
*/
|
|
88
|
+
exportPaths(projectRoot: string): ExportPaths;
|
|
89
|
+
/**
|
|
90
|
+
* Where a single mirrored module's content lands when `augx link --mirror`
|
|
91
|
+
* materializes per-module copies/symlinks.
|
|
92
|
+
*
|
|
93
|
+
* @param projectRoot Absolute path to the consuming project's root.
|
|
94
|
+
* @param moduleId Canonical module id, e.g. `coding-standards/typescript`.
|
|
95
|
+
*/
|
|
96
|
+
mirrorPath(projectRoot: string, moduleId: string): string;
|
|
97
|
+
/**
|
|
98
|
+
* Render the per-module section content for the aggregated output.
|
|
99
|
+
* MUST NOT include the `## Module:` heading; the runner emits headings
|
|
100
|
+
* to keep ordering deterministic across adapters.
|
|
101
|
+
*/
|
|
102
|
+
renderModule(module: ResolvedModule): string;
|
|
103
|
+
/**
|
|
104
|
+
* Render the file header. For formats that require frontmatter (Cursor
|
|
105
|
+
* `.mdc`), this method emits the frontmatter followed by the banner.
|
|
106
|
+
*/
|
|
107
|
+
renderHeader(meta: ExportMeta): string;
|
|
108
|
+
/**
|
|
109
|
+
* Render the closing footer (attribution + canonical pointer).
|
|
110
|
+
*/
|
|
111
|
+
renderFooter(meta: ExportMeta): string;
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,gFAAgF;IAChF,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC;IAE9C;;;;;;OAMG;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1D;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC;IAE7C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;CACxC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ToolAdapter contract for the cross-platform export layer.
|
|
4
|
+
*
|
|
5
|
+
* One adapter per target tool (Claude Code, Cursor, Windsurf, Copilot).
|
|
6
|
+
* Adapters are PURE FUNCTIONS: given resolved modules and metadata, they
|
|
7
|
+
* return strings. All filesystem I/O happens in the runner.
|
|
8
|
+
*
|
|
9
|
+
* See: openspec/changes/cross-platform/design.md (component 2)
|
|
10
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windsurf adapter.
|
|
3
|
+
*
|
|
4
|
+
* Aggregator output: `.windsurfrules` at the project root (single Markdown
|
|
5
|
+
* file, no frontmatter; Windsurf reads the file verbatim).
|
|
6
|
+
* Mirror destination: `.windsurf/rules/augx-<module>.md` (one file per
|
|
7
|
+
* module).
|
|
8
|
+
*
|
|
9
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
10
|
+
* See: openspec/specs/cross-platform/mirror-hook.md
|
|
11
|
+
*/
|
|
12
|
+
import type { ToolAdapter } from './types';
|
|
13
|
+
export declare const windsurfAdapter: ToolAdapter;
|
|
14
|
+
//# sourceMappingURL=windsurf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../src/adapters/windsurf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAIV,WAAW,EACZ,MAAM,SAAS,CAAC;AAejB,eAAO,MAAM,eAAe,EAAE,WAyB7B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Windsurf adapter.
|
|
4
|
+
*
|
|
5
|
+
* Aggregator output: `.windsurfrules` at the project root (single Markdown
|
|
6
|
+
* file, no frontmatter; Windsurf reads the file verbatim).
|
|
7
|
+
* Mirror destination: `.windsurf/rules/augx-<module>.md` (one file per
|
|
8
|
+
* module).
|
|
9
|
+
*
|
|
10
|
+
* See: openspec/specs/cross-platform/export-command.md
|
|
11
|
+
* See: openspec/specs/cross-platform/mirror-hook.md
|
|
12
|
+
*/
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.windsurfAdapter = void 0;
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
const banner_1 = require("./banner");
|
|
50
|
+
/**
|
|
51
|
+
* Convert a canonical module id to a single path segment safe for filesystem
|
|
52
|
+
* use within `.windsurf/rules/augx-<segment>.md`.
|
|
53
|
+
*/
|
|
54
|
+
function moduleIdToSegment(moduleId) {
|
|
55
|
+
return moduleId.replace(/\//g, '-');
|
|
56
|
+
}
|
|
57
|
+
exports.windsurfAdapter = {
|
|
58
|
+
id: 'windsurf',
|
|
59
|
+
exportPaths(projectRoot) {
|
|
60
|
+
return {
|
|
61
|
+
single: path.join(projectRoot, '.windsurfrules'),
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
mirrorPath(projectRoot, moduleId) {
|
|
65
|
+
const fileName = `augx-${moduleIdToSegment(moduleId)}.md`;
|
|
66
|
+
return path.join(projectRoot, '.windsurf', 'rules', fileName);
|
|
67
|
+
},
|
|
68
|
+
renderModule(module) {
|
|
69
|
+
return (0, banner_1.renderModuleBody)(module);
|
|
70
|
+
},
|
|
71
|
+
renderHeader(meta) {
|
|
72
|
+
return (0, banner_1.renderHeaderRegion)(meta);
|
|
73
|
+
},
|
|
74
|
+
renderFooter(_meta) {
|
|
75
|
+
return (0, banner_1.renderStandardFooter)();
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=windsurf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/adapters/windsurf.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAO7B,qCAIkB;AAElB;;;GAGG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAEY,QAAA,eAAe,GAAgB;IAC1C,EAAE,EAAE,UAAU;IAEd,WAAW,CAAC,WAAmB;QAC7B,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC;SACjD,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,WAAmB,EAAE,QAAgB;QAC9C,MAAM,QAAQ,GAAG,QAAQ,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC;IAED,YAAY,CAAC,MAAsB;QACjC,OAAO,IAAA,yBAAgB,EAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,YAAY,CAAC,IAAgB;QAC3B,OAAO,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,YAAY,CAAC,KAAiB;QAC5B,OAAO,IAAA,6BAAoB,GAAE,CAAC;IAChC,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -21,5 +21,6 @@ __exportStar(require("./types"), exports);
|
|
|
21
21
|
__exportStar(require("./ast-parser"), exports);
|
|
22
22
|
__exportStar(require("./complexity-analyzer"), exports);
|
|
23
23
|
__exportStar(require("./dependency-analyzer"), exports);
|
|
24
|
+
__exportStar(require("./pattern-analyzer"), exports);
|
|
24
25
|
__exportStar(require("./security-scanner"), exports);
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,+CAA6B;AAC7B,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,+CAA6B;AAC7B,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pattern-analyzer.d.ts","sourceRoot":"","sources":["../../src/analysis/pattern-analyzer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAW,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAWpD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAanE"}
|