faf-mcp 2.3.1 โ†’ 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/CHANGELOG.md +49 -4
  2. package/CLAUDE.md +10 -6
  3. package/README.md +95 -86
  4. package/dist/src/faf-core/commands/agents.d.ts +2 -2
  5. package/dist/src/faf-core/commands/agents.js +2 -2
  6. package/dist/src/faf-core/commands/claude.d.ts +31 -0
  7. package/dist/src/faf-core/commands/{bi-sync.js โ†’ claude.js} +39 -77
  8. package/dist/src/faf-core/commands/claude.js.map +1 -0
  9. package/dist/src/faf-core/commands/conductor.d.ts +1 -1
  10. package/dist/src/faf-core/commands/conductor.js +1 -1
  11. package/dist/src/faf-core/commands/cursor.d.ts +2 -2
  12. package/dist/src/faf-core/commands/cursor.js +2 -2
  13. package/dist/src/faf-core/commands/gemini.d.ts +2 -2
  14. package/dist/src/faf-core/commands/gemini.js +2 -2
  15. package/dist/src/faf-core/commands/git-context.d.ts +1 -1
  16. package/dist/src/faf-core/commands/git-context.js +2 -2
  17. package/dist/src/faf-core/commands/git-context.js.map +1 -1
  18. package/dist/src/faf-core/commands/sync.js.map +1 -1
  19. package/dist/src/faf-core/engines/dependency-tsa.js.map +1 -1
  20. package/dist/src/faf-core/fix-once/colors.js +1 -1
  21. package/dist/src/faf-core/fix-once/colors.js.map +1 -1
  22. package/dist/src/faf-core/parsers/agents-parser.d.ts +17 -1
  23. package/dist/src/faf-core/parsers/agents-parser.js +31 -124
  24. package/dist/src/faf-core/parsers/agents-parser.js.map +1 -1
  25. package/dist/src/faf-core/parsers/conductor-parser.d.ts +1 -1
  26. package/dist/src/faf-core/parsers/conductor-parser.js +2 -2
  27. package/dist/src/faf-core/parsers/conductor-parser.js.map +1 -1
  28. package/dist/src/faf-core/parsers/cursorrules-parser.d.ts +17 -1
  29. package/dist/src/faf-core/parsers/cursorrules-parser.js +56 -112
  30. package/dist/src/faf-core/parsers/cursorrules-parser.js.map +1 -1
  31. package/dist/src/faf-core/parsers/faf-git-generator.d.ts +1 -1
  32. package/dist/src/faf-core/parsers/faf-git-generator.js +6 -6
  33. package/dist/src/faf-core/parsers/faf-git-generator.js.map +1 -1
  34. package/dist/src/faf-core/parsers/gemini-parser.d.ts +12 -1
  35. package/dist/src/faf-core/parsers/gemini-parser.js +21 -78
  36. package/dist/src/faf-core/parsers/gemini-parser.js.map +1 -1
  37. package/dist/src/faf-core/parsers/github-extractor.d.ts +1 -1
  38. package/dist/src/faf-core/parsers/github-extractor.js +1 -1
  39. package/dist/src/faf-core/parsers/slot-counter.d.ts +1 -1
  40. package/dist/src/faf-core/parsers/slot-counter.js +1 -1
  41. package/dist/src/handlers/engine-adapter.d.ts +13 -12
  42. package/dist/src/handlers/engine-adapter.js +105 -683
  43. package/dist/src/handlers/engine-adapter.js.map +1 -1
  44. package/dist/src/handlers/resources.d.ts +19 -1
  45. package/dist/src/handlers/resources.js +108 -23
  46. package/dist/src/handlers/resources.js.map +1 -1
  47. package/dist/src/handlers/skills.d.ts +70 -0
  48. package/dist/src/handlers/skills.js +174 -0
  49. package/dist/src/handlers/skills.js.map +1 -0
  50. package/dist/src/handlers/tools.d.ts +43 -7
  51. package/dist/src/handlers/tools.js +300 -375
  52. package/dist/src/handlers/tools.js.map +1 -1
  53. package/dist/src/server.d.ts +4 -0
  54. package/dist/src/server.js +51 -6
  55. package/dist/src/server.js.map +1 -1
  56. package/dist/src/utils/faf-cli-bridge.d.ts +14 -8
  57. package/dist/src/utils/faf-cli-bridge.js +28 -8
  58. package/dist/src/utils/faf-cli-bridge.js.map +1 -1
  59. package/package.json +18 -15
  60. package/project.faf +14 -9
  61. package/scripts/check-engines.mjs +53 -0
  62. package/scripts/sync-version.js +33 -19
  63. package/skills/faf-ide/SKILL.md +40 -0
  64. package/dist/src/config/visibility.d.ts +0 -41
  65. package/dist/src/config/visibility.js +0 -158
  66. package/dist/src/config/visibility.js.map +0 -1
  67. package/dist/src/faf-core/commands/audit.d.ts +0 -21
  68. package/dist/src/faf-core/commands/audit.js +0 -83
  69. package/dist/src/faf-core/commands/audit.js.map +0 -1
  70. package/dist/src/faf-core/commands/auto.d.ts +0 -25
  71. package/dist/src/faf-core/commands/auto.js +0 -74
  72. package/dist/src/faf-core/commands/auto.js.map +0 -1
  73. package/dist/src/faf-core/commands/bi-sync.d.ts +0 -31
  74. package/dist/src/faf-core/commands/bi-sync.js.map +0 -1
  75. package/dist/src/faf-core/commands/doctor.d.ts +0 -17
  76. package/dist/src/faf-core/commands/doctor.js +0 -198
  77. package/dist/src/faf-core/commands/doctor.js.map +0 -1
  78. package/dist/src/faf-core/commands/enhance.d.ts +0 -46
  79. package/dist/src/faf-core/commands/enhance.js +0 -360
  80. package/dist/src/faf-core/commands/enhance.js.map +0 -1
  81. package/dist/src/faf-core/commands/formats.d.ts +0 -22
  82. package/dist/src/faf-core/commands/formats.js +0 -117
  83. package/dist/src/faf-core/commands/formats.js.map +0 -1
  84. package/dist/src/faf-core/commands/human.d.ts +0 -27
  85. package/dist/src/faf-core/commands/human.js +0 -183
  86. package/dist/src/faf-core/commands/human.js.map +0 -1
  87. package/dist/src/faf-core/commands/init.d.ts +0 -26
  88. package/dist/src/faf-core/commands/init.js +0 -114
  89. package/dist/src/faf-core/commands/init.js.map +0 -1
  90. package/dist/src/faf-core/commands/innit.d.ts +0 -7
  91. package/dist/src/faf-core/commands/innit.js +0 -13
  92. package/dist/src/faf-core/commands/innit.js.map +0 -1
  93. package/dist/src/faf-core/commands/migrate.d.ts +0 -15
  94. package/dist/src/faf-core/commands/migrate.js +0 -86
  95. package/dist/src/faf-core/commands/migrate.js.map +0 -1
  96. package/dist/src/faf-core/commands/quick.d.ts +0 -16
  97. package/dist/src/faf-core/commands/quick.js +0 -184
  98. package/dist/src/faf-core/commands/quick.js.map +0 -1
  99. package/dist/src/faf-core/commands/readme.d.ts +0 -47
  100. package/dist/src/faf-core/commands/readme.js +0 -361
  101. package/dist/src/faf-core/commands/readme.js.map +0 -1
  102. package/dist/src/faf-core/commands/score.d.ts +0 -47
  103. package/dist/src/faf-core/commands/score.js +0 -49
  104. package/dist/src/faf-core/commands/score.js.map +0 -1
  105. package/dist/src/faf-core/commands/update.d.ts +0 -12
  106. package/dist/src/faf-core/commands/update.js +0 -46
  107. package/dist/src/faf-core/commands/update.js.map +0 -1
  108. package/dist/src/faf-core/commands/validate.d.ts +0 -21
  109. package/dist/src/faf-core/commands/validate.js +0 -81
  110. package/dist/src/faf-core/commands/validate.js.map +0 -1
  111. package/dist/src/faf-core/compiler/faf-compiler.d.ts +0 -138
  112. package/dist/src/faf-core/compiler/faf-compiler.js +0 -1362
  113. package/dist/src/faf-core/compiler/faf-compiler.js.map +0 -1
  114. package/dist/src/faf-core/engines/fab-formats-processor.d.ts +0 -166
  115. package/dist/src/faf-core/engines/fab-formats-processor.js +0 -1274
  116. package/dist/src/faf-core/engines/fab-formats-processor.js.map +0 -1
  117. package/dist/src/faf-core/engines/faf-dna.d.ts +0 -159
  118. package/dist/src/faf-core/engines/faf-dna.js +0 -555
  119. package/dist/src/faf-core/engines/faf-dna.js.map +0 -1
  120. package/dist/src/faf-core/engines/relentless-context-extractor.d.ts +0 -100
  121. package/dist/src/faf-core/engines/relentless-context-extractor.js +0 -625
  122. package/dist/src/faf-core/engines/relentless-context-extractor.js.map +0 -1
  123. package/dist/src/faf-core/fix-once/types.d.ts +0 -257
  124. package/dist/src/faf-core/fix-once/types.js +0 -26
  125. package/dist/src/faf-core/fix-once/types.js.map +0 -1
  126. package/dist/src/faf-core/generators/faf-generator-championship.d.ts +0 -16
  127. package/dist/src/faf-core/generators/faf-generator-championship.js +0 -463
  128. package/dist/src/faf-core/generators/faf-generator-championship.js.map +0 -1
  129. package/dist/src/faf-core/inject.d.ts +0 -19
  130. package/dist/src/faf-core/inject.js +0 -57
  131. package/dist/src/faf-core/inject.js.map +0 -1
  132. package/dist/src/faf-core/parsers/index.d.ts +0 -12
  133. package/dist/src/faf-core/parsers/index.js +0 -29
  134. package/dist/src/faf-core/parsers/index.js.map +0 -1
  135. package/dist/src/faf-core/utils/balance-visualizer.d.ts +0 -37
  136. package/dist/src/faf-core/utils/balance-visualizer.js +0 -197
  137. package/dist/src/faf-core/utils/balance-visualizer.js.map +0 -1
  138. package/dist/src/faf-core/utils/championship-style.d.ts +0 -109
  139. package/dist/src/faf-core/utils/championship-style.js +0 -219
  140. package/dist/src/faf-core/utils/championship-style.js.map +0 -1
  141. package/dist/src/faf-core/utils/chrome-extension-detector.d.ts +0 -73
  142. package/dist/src/faf-core/utils/chrome-extension-detector.js +0 -268
  143. package/dist/src/faf-core/utils/chrome-extension-detector.js.map +0 -1
  144. package/dist/src/faf-core/utils/platform-detector.d.ts +0 -30
  145. package/dist/src/faf-core/utils/platform-detector.js +0 -218
  146. package/dist/src/faf-core/utils/platform-detector.js.map +0 -1
  147. package/dist/src/faf-core/utils/technical-credit.d.ts +0 -35
  148. package/dist/src/faf-core/utils/technical-credit.js +0 -286
  149. package/dist/src/faf-core/utils/technical-credit.js.map +0 -1
  150. package/dist/src/faf-core/utils/yaml-generator.d.ts +0 -41
  151. package/dist/src/faf-core/utils/yaml-generator.js +0 -360
  152. package/dist/src/faf-core/utils/yaml-generator.js.map +0 -1
  153. package/dist/src/handlers/behavioral-instruction.d.ts +0 -16
  154. package/dist/src/handlers/behavioral-instruction.js +0 -43
  155. package/dist/src/handlers/behavioral-instruction.js.map +0 -1
  156. package/dist/src/handlers/championship-tools.d.ts +0 -116
  157. package/dist/src/handlers/championship-tools.js +0 -2320
  158. package/dist/src/handlers/championship-tools.js.map +0 -1
  159. package/dist/src/handlers/cloud-handler.d.ts +0 -59
  160. package/dist/src/handlers/cloud-handler.js +0 -348
  161. package/dist/src/handlers/cloud-handler.js.map +0 -1
  162. package/dist/src/handlers/tool-registry.d.ts +0 -23
  163. package/dist/src/handlers/tool-registry.js +0 -68
  164. package/dist/src/handlers/tool-registry.js.map +0 -1
  165. package/dist/src/handlers/tool-types.d.ts +0 -167
  166. package/dist/src/handlers/tool-types.js +0 -7
  167. package/dist/src/handlers/tool-types.js.map +0 -1
  168. package/dist/src/test-all-functions.d.ts +0 -15
  169. package/dist/src/test-all-functions.js +0 -163
  170. package/dist/src/test-all-functions.js.map +0 -1
  171. package/dist/src/types/mcp-tools.d.ts +0 -53
  172. package/dist/src/types/mcp-tools.js +0 -77
  173. package/dist/src/types/mcp-tools.js.map +0 -1
  174. package/dist/src/types/tool-visibility.d.ts +0 -36
  175. package/dist/src/types/tool-visibility.js +0 -551
  176. package/dist/src/types/tool-visibility.js.map +0 -1
  177. package/dist/src/utils/auto-path-detection.d.ts +0 -26
  178. package/dist/src/utils/auto-path-detection.js +0 -198
  179. package/dist/src/utils/auto-path-detection.js.map +0 -1
  180. package/dist/src/utils/championship-format.d.ts +0 -30
  181. package/dist/src/utils/championship-format.js +0 -81
  182. package/dist/src/utils/championship-format.js.map +0 -1
  183. package/dist/src/utils/cli-detector.d.ts +0 -17
  184. package/dist/src/utils/cli-detector.js +0 -247
  185. package/dist/src/utils/cli-detector.js.map +0 -1
  186. package/dist/src/utils/display-protocol.d.ts +0 -57
  187. package/dist/src/utils/display-protocol.js +0 -131
  188. package/dist/src/utils/display-protocol.js.map +0 -1
  189. package/dist/src/utils/username-detector.d.ts +0 -27
  190. package/dist/src/utils/username-detector.js +0 -90
  191. package/dist/src/utils/username-detector.js.map +0 -1
  192. package/dist/src/utils/visual-style.d.ts +0 -62
  193. package/dist/src/utils/visual-style.js +0 -166
  194. package/dist/src/utils/visual-style.js.map +0 -1
  195. package/scripts/postinstall.js +0 -50
  196. package/skill/SKILL.md +0 -385
@@ -1,183 +0,0 @@
1
- "use strict";
2
- /**
3
- * Human Context Management - MCP Bundled Version
4
- * Non-interactive YAML merge for MCP context
5
- */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || (function () {
23
- var ownKeys = function(o) {
24
- ownKeys = Object.getOwnPropertyNames || function (o) {
25
- var ar = [];
26
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
- return ar;
28
- };
29
- return ownKeys(o);
30
- };
31
- return function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
- })();
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.humanAddCommand = humanAddCommand;
41
- exports.humanSetCommand = humanSetCommand;
42
- const fs_1 = require("fs");
43
- const yaml_1 = require("yaml");
44
- const path = __importStar(require("path"));
45
- /**
46
- * Find project.faf file
47
- */
48
- async function findFafFile(startPath) {
49
- const possiblePaths = [
50
- path.join(startPath, 'project.faf'),
51
- path.join(startPath, '.faf'),
52
- path.join(startPath, 'faf.yml'),
53
- path.join(startPath, 'faf.yaml'),
54
- ];
55
- for (const fafPath of possiblePaths) {
56
- try {
57
- await fs_1.promises.access(fafPath);
58
- return fafPath;
59
- }
60
- catch {
61
- // File doesn't exist, continue
62
- }
63
- }
64
- return null;
65
- }
66
- /**
67
- * Add or update human_context in project.faf
68
- * MCP-compatible non-interactive version
69
- */
70
- async function humanAddCommand(projectPath, options = {}) {
71
- try {
72
- // Find existing .faf file
73
- const fafPath = await findFafFile(projectPath);
74
- if (!fafPath) {
75
- // Create new project.faf if it doesn't exist
76
- const newFafPath = path.join(projectPath, 'project.faf');
77
- if (options.yaml) {
78
- // Parse the input YAML
79
- const inputData = (0, yaml_1.parse)(options.yaml);
80
- // If input has human_context key, use it directly
81
- // Otherwise wrap the input as human_context
82
- const fafData = inputData.human_context
83
- ? inputData
84
- : { human_context: inputData };
85
- await fs_1.promises.writeFile(newFafPath, (0, yaml_1.stringify)(fafData), 'utf-8');
86
- const fields = Object.keys(fafData.human_context || {});
87
- return {
88
- success: true,
89
- message: `Created ${newFafPath} with human_context`,
90
- fieldsUpdated: fields
91
- };
92
- }
93
- else if (options.field && options.value) {
94
- // Single field mode
95
- const fafData = {
96
- human_context: {
97
- [options.field]: options.value
98
- }
99
- };
100
- await fs_1.promises.writeFile(newFafPath, (0, yaml_1.stringify)(fafData), 'utf-8');
101
- return {
102
- success: true,
103
- message: `Created ${newFafPath} with ${options.field}`,
104
- fieldsUpdated: [options.field]
105
- };
106
- }
107
- else {
108
- return {
109
- success: false,
110
- message: 'No .faf file found and no input provided',
111
- error: 'Run faf_init first or provide YAML/field input'
112
- };
113
- }
114
- }
115
- // Read existing .faf file
116
- const fafContent = await fs_1.promises.readFile(fafPath, 'utf-8');
117
- const fafData = (0, yaml_1.parse)(fafContent) || {};
118
- if (!fafData.human_context) {
119
- fafData.human_context = {};
120
- }
121
- const fieldsUpdated = [];
122
- // YAML merge mode
123
- if (options.yaml) {
124
- const inputData = (0, yaml_1.parse)(options.yaml);
125
- // Extract human_context from input
126
- const humanContext = inputData.human_context || inputData;
127
- // Merge fields
128
- for (const [key, value] of Object.entries(humanContext)) {
129
- if (value !== null && value !== undefined && value !== '') {
130
- fafData.human_context[key] = value;
131
- fieldsUpdated.push(key);
132
- }
133
- }
134
- }
135
- // Single field mode
136
- if (options.field && options.value) {
137
- fafData.human_context[options.field] = options.value;
138
- fieldsUpdated.push(options.field);
139
- }
140
- // Save updated .faf
141
- if (fieldsUpdated.length > 0) {
142
- await fs_1.promises.writeFile(fafPath, (0, yaml_1.stringify)(fafData), 'utf-8');
143
- return {
144
- success: true,
145
- message: `Updated ${fieldsUpdated.length} field(s) in ${fafPath}`,
146
- fieldsUpdated
147
- };
148
- }
149
- else {
150
- return {
151
- success: false,
152
- message: 'No fields to update',
153
- error: 'Provide yaml or field/value parameters'
154
- };
155
- }
156
- }
157
- catch (error) {
158
- return {
159
- success: false,
160
- message: 'Failed to add human context',
161
- error: error instanceof Error ? error.message : String(error)
162
- };
163
- }
164
- }
165
- /**
166
- * Set a single human_context field
167
- * Convenience wrapper for single field updates
168
- */
169
- async function humanSetCommand(projectPath, field, value) {
170
- const validFields = ['who', 'what', 'where', 'why', 'when', 'how'];
171
- if (!validFields.includes(field.toLowerCase())) {
172
- return {
173
- success: false,
174
- message: `Invalid field: ${field}`,
175
- error: `Valid fields: ${validFields.join(', ')}`
176
- };
177
- }
178
- return humanAddCommand(projectPath, {
179
- field: field.toLowerCase(),
180
- value
181
- });
182
- }
183
- //# sourceMappingURL=human.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"human.js","sourceRoot":"","sources":["../../../../src/faf-core/commands/human.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDH,0CA8GC;AAMD,0CAmBC;AArLD,2BAAoC;AACpC,+BAAsE;AACtE,2CAA6B;AAiB7B;;GAEG;AACH,KAAK,UAAU,WAAW,CAAC,SAAiB;IAC1C,MAAM,aAAa,GAAG;QACpB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;KACjC,CAAC;IAEF,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;QACpC,IAAI,CAAC;YAC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AAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QAC/C,OAAO;YACL,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,kBAAkB,KAAK,EAAE;YAClC,KAAK,EAAE,iBAAiB,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SACjD,CAAC;IACJ,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,EAAE;QAClC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE;QAC1B,KAAK;KACN,CAAC,CAAC;AACL,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * faf init - Programmatic API (MCP-ready)
3
- * No console output, returns structured data
4
- */
5
- export interface InitOptions {
6
- force?: boolean;
7
- new?: boolean;
8
- choose?: boolean;
9
- template?: string;
10
- output?: string;
11
- quiet?: boolean;
12
- }
13
- export interface InitResult {
14
- success: boolean;
15
- outputPath?: string;
16
- projectType?: string;
17
- score?: number;
18
- duration?: number;
19
- error?: string;
20
- alreadyExists?: boolean;
21
- }
22
- /**
23
- * Initialize .faf file - programmatic API
24
- * Returns structured data, no console output
25
- */
26
- export declare function initFafFile(projectPath?: string, options?: InitOptions): Promise<InitResult>;
@@ -1,114 +0,0 @@
1
- "use strict";
2
- /**
3
- * faf init - Programmatic API (MCP-ready)
4
- * No console output, returns structured data
5
- */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || (function () {
23
- var ownKeys = function(o) {
24
- ownKeys = Object.getOwnPropertyNames || function (o) {
25
- var ar = [];
26
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
- return ar;
28
- };
29
- return ownKeys(o);
30
- };
31
- return function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
- })();
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.initFafFile = initFafFile;
41
- const fs_1 = require("fs");
42
- const path = __importStar(require("path"));
43
- const file_utils_js_1 = require("../utils/file-utils.js");
44
- const faf_generator_championship_js_1 = require("../generators/faf-generator-championship.js");
45
- const fafignore_parser_js_1 = require("../utils/fafignore-parser.js");
46
- const faf_compiler_js_1 = require("../compiler/faf-compiler.js");
47
- /**
48
- * Initialize .faf file - programmatic API
49
- * Returns structured data, no console output
50
- */
51
- async function initFafFile(projectPath, options = {}) {
52
- const startTime = Date.now();
53
- try {
54
- const projectRoot = projectPath || process.cwd();
55
- const homeDir = require('os').homedir();
56
- // CRITICAL: Prevent running in home or root directory
57
- if (!projectPath && (projectRoot === homeDir || projectRoot === '/')) {
58
- return {
59
- success: false,
60
- error: 'Cannot run in home or root directory for safety',
61
- duration: Date.now() - startTime
62
- };
63
- }
64
- // v3.0.0: ONLY supports project.faf (no legacy .faf)
65
- const outputPath = options.output || `${projectRoot}/project.faf`;
66
- // Check if project.faf file already exists
67
- if ((await (0, file_utils_js_1.fileExists)(outputPath)) && !options.force && !options.new && !options.choose) {
68
- return {
69
- success: true,
70
- alreadyExists: true,
71
- outputPath,
72
- duration: Date.now() - startTime
73
- };
74
- }
75
- // Check for .fafignore
76
- const fafIgnorePath = path.join(projectRoot, '.fafignore');
77
- if (!(await (0, file_utils_js_1.fileExists)(fafIgnorePath))) {
78
- await (0, fafignore_parser_js_1.createDefaultFafIgnore)(projectRoot);
79
- }
80
- // Detect project structure
81
- const projectType = options.template === 'auto'
82
- ? await (0, file_utils_js_1.detectProjectType)(projectRoot)
83
- : options.template || (await (0, file_utils_js_1.detectProjectType)(projectRoot));
84
- // Generate .faf content
85
- const fafContent = await (0, faf_generator_championship_js_1.generateFafFromProject)({
86
- projectType,
87
- outputPath,
88
- projectRoot: projectRoot,
89
- });
90
- // Write .faf file
91
- await fs_1.promises.writeFile(outputPath, fafContent, 'utf-8');
92
- // Score the newly created file
93
- const compiler = new faf_compiler_js_1.FafCompiler();
94
- const scoreResult = await compiler.compile(outputPath);
95
- const duration = Date.now() - startTime;
96
- return {
97
- success: true,
98
- outputPath,
99
- projectType,
100
- score: scoreResult.score,
101
- duration
102
- };
103
- }
104
- catch (error) {
105
- const duration = Date.now() - startTime;
106
- const errorMessage = error instanceof Error ? error.message : 'Init failed';
107
- return {
108
- success: false,
109
- error: errorMessage,
110
- duration
111
- };
112
- }
113
- }
114
- //# sourceMappingURL=init.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../src/faf-core/commands/init.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,kCA4EC;AA1GD,2BAAoC;AACpC,2CAA6B;AAC7B,0DAAuE;AACvE,+FAAqF;AACrF,sEAAsE;AACtE,iEAA0D;AAqB1D;;;GAGG;AACI,KAAK,UAAU,WAAW,CAC/B,WAAoB,EACpB,UAAuB,EAAE;IAEzB,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACjD,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;Q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W,EAAE,WAAW;SACzB,CAAC,CAAC;QAEH,kBAAkB;QAClB,MAAM,aAAE,CAAC,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QAEpD,+BAA+B;QAC/B,MAAM,QAAQ,GAAG,IAAI,6BAAW,EAAE,CAAC;QACnC,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAEvD,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QAExC,OAAO;YACL,OAAO,EAAE,IAAI;YACb,UAAU;YACV,WAAW;YACX,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,QAAQ;SACT,CAAC;IACJ,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;QACxC,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;QAE5E,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,YAAY;YACnB,QAAQ;SACT,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * ๐Ÿ‡ฌ๐Ÿ‡ง faf innit - British Init Command (Mk3 Bundled)
3
- * "Innit bruv" - Initialize with style
4
- */
5
- import { type InitOptions, type InitResult } from './init';
6
- export type { InitOptions, InitResult };
7
- export declare function innitFafFile(projectPath?: string, options?: InitOptions): Promise<InitResult>;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- /**
3
- * ๐Ÿ‡ฌ๐Ÿ‡ง faf innit - British Init Command (Mk3 Bundled)
4
- * "Innit bruv" - Initialize with style
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.innitFafFile = innitFafFile;
8
- const init_1 = require("./init");
9
- async function innitFafFile(projectPath, options = {}) {
10
- // Just delegate to init - same functionality, British flavor
11
- return (0, init_1.initFafFile)(projectPath, options);
12
- }
13
- //# sourceMappingURL=innit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"innit.js","sourceRoot":"","sources":["../../../../src/faf-core/commands/innit.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAMH,oCAGC;AAPD,iCAAwE;AAIjE,KAAK,UAAU,YAAY,CAAC,WAAoB,EAAE,UAAuB,EAAE;IAChF,6DAA6D;IAC7D,OAAO,IAAA,kBAAW,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,15 +0,0 @@
1
- /**
2
- * ๐Ÿ”„ faf migrate - Migrate legacy .faf to project.faf (Mk3 Bundled)
3
- */
4
- export interface MigrateOptions {
5
- force?: boolean;
6
- json?: boolean;
7
- }
8
- export interface MigrateResult {
9
- success: boolean;
10
- migrated: boolean;
11
- from?: string;
12
- to?: string;
13
- message: string;
14
- }
15
- export declare function migrateFafFile(projectPath?: string, options?: MigrateOptions): Promise<MigrateResult>;
@@ -1,86 +0,0 @@
1
- "use strict";
2
- /**
3
- * ๐Ÿ”„ faf migrate - Migrate legacy .faf to project.faf (Mk3 Bundled)
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.migrateFafFile = migrateFafFile;
40
- const fs_1 = require("fs");
41
- const path = __importStar(require("path"));
42
- const file_utils_1 = require("../utils/file-utils");
43
- async function migrateFafFile(projectPath, options = {}) {
44
- try {
45
- const projectRoot = projectPath || process.cwd();
46
- const legacyPath = path.join(projectRoot, '.faf');
47
- const newPath = path.join(projectRoot, 'project.faf');
48
- // Check if legacy file exists
49
- if (!await (0, file_utils_1.fileExists)(legacyPath)) {
50
- return {
51
- success: true,
52
- migrated: false,
53
- message: 'No legacy .faf file found - nothing to migrate'
54
- };
55
- }
56
- // Check if new file already exists
57
- if (await (0, file_utils_1.fileExists)(newPath) && !options.force) {
58
- return {
59
- success: false,
60
- migrated: false,
61
- message: 'project.faf already exists. Use --force to overwrite.'
62
- };
63
- }
64
- // Read legacy file
65
- const content = await fs_1.promises.readFile(legacyPath, 'utf-8');
66
- // Write to new location
67
- await fs_1.promises.writeFile(newPath, content, 'utf-8');
68
- // Delete legacy file (optional - could keep as backup)
69
- // await fs.unlink(legacyPath);
70
- return {
71
- success: true,
72
- migrated: true,
73
- from: legacyPath,
74
- to: newPath,
75
- message: 'Successfully migrated .faf to project.faf'
76
- };
77
- }
78
- catch (error) {
79
- return {
80
- success: false,
81
- migrated: false,
82
- message: error instanceof Error ? error.message : 'Migration failed'
83
- };
84
- }
85
- }
86
- //# sourceMappingURL=migrate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"migrate.js","sourceRoot":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,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB;SACrE,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * โšก FAF Quick - Lightning-fast .faf creation (Mk3 Bundled)
3
- * One-liner format for instant context generation
4
- */
5
- interface QuickOptions {
6
- force?: boolean;
7
- json?: boolean;
8
- }
9
- export interface QuickResult {
10
- success: boolean;
11
- created: boolean;
12
- filePath?: string;
13
- message: string;
14
- }
15
- export declare function quickCommand(projectPath: string, input?: string, options?: QuickOptions): Promise<QuickResult>;
16
- export {};
@@ -1,184 +0,0 @@
1
- "use strict";
2
- /**
3
- * โšก FAF Quick - Lightning-fast .faf creation (Mk3 Bundled)
4
- * One-liner format for instant context generation
5
- */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || (function () {
23
- var ownKeys = function(o) {
24
- ownKeys = Object.getOwnPropertyNames || function (o) {
25
- var ar = [];
26
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
- return ar;
28
- };
29
- return ownKeys(o);
30
- };
31
- return function (mod) {
32
- if (mod && mod.__esModule) return mod;
33
- var result = {};
34
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
- __setModuleDefault(result, mod);
36
- return result;
37
- };
38
- })();
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.quickCommand = quickCommand;
41
- const fs_1 = require("fs");
42
- const path = __importStar(require("path"));
43
- const yaml_1 = require("../fix-once/yaml");
44
- const file_utils_1 = require("../utils/file-utils");
45
- /**
46
- * Quick format parser - accepts simple comma-separated values
47
- * Format: "project name, what it does, main language, framework, where deployed"
48
- */
49
- function parseQuickInput(input) {
50
- if (!input) {
51
- return {
52
- projectName: 'my-project',
53
- projectGoal: 'Build amazing software',
54
- mainLanguage: 'TypeScript',
55
- framework: 'none',
56
- hosting: 'cloud',
57
- slotBasedPercentage: 50,
58
- fafScore: 50
59
- };
60
- }
61
- const parts = input.split(',').map(s => s.trim());
62
- return {
63
- projectName: parts[0] || 'my-project',
64
- projectGoal: parts[1] || 'Build amazing software',
65
- mainLanguage: parts[2] || 'TypeScript',
66
- framework: parts[3] || 'none',
67
- hosting: parts[4] || 'cloud',
68
- slotBasedPercentage: 60,
69
- fafScore: 60
70
- };
71
- }
72
- async function quickCommand(projectPath, input, options = {}) {
73
- try {
74
- const fafPath = path.join(projectPath, 'project.faf');
75
- // Check if file exists
76
- if (await (0, file_utils_1.fileExists)(fafPath) && !options.force) {
77
- return {
78
- success: false,
79
- created: false,
80
- message: 'project.faf already exists. Use --force to overwrite.'
81
- };
82
- }
83
- // Parse input
84
- const parsed = parseQuickInput(input);
85
- // Generate quick .faf file
86
- const fafData = {
87
- faf_version: '2.5.0',
88
- ai_scoring_system: '2025-09-20',
89
- ai_score: `${parsed.fafScore}%`,
90
- ai_confidence: 'MEDIUM',
91
- ai_value: '30_seconds_replaces_20_minutes_of_questions',
92
- ai_tldr: {
93
- project: `${parsed.projectName} - ${parsed.projectGoal}`,
94
- stack: `${parsed.mainLanguage}/${parsed.framework}`,
95
- quality_bar: 'ZERO_ERRORS_F1_STANDARDS',
96
- current_focus: 'Quick start - ready to build',
97
- your_role: 'Build features with context'
98
- },
99
- instant_context: {
100
- what_building: parsed.projectGoal,
101
- tech_stack: `${parsed.mainLanguage}/${parsed.framework}`,
102
- main_language: parsed.mainLanguage,
103
- deployment: parsed.hosting,
104
- key_files: ['package.json', 'README.md']
105
- },
106
- context_quality: {
107
- slots_filled: '12/21 (57%)',
108
- ai_confidence: 'MEDIUM',
109
- handoff_ready: true,
110
- missing_context: ['CI/CD pipeline', 'Database', 'Testing strategy']
111
- },
112
- project: {
113
- name: parsed.projectName,
114
- goal: parsed.projectGoal,
115
- main_language: parsed.mainLanguage,
116
- generated: new Date().toISOString(),
117
- mission: '๐Ÿš€ Make Your AI Happy! ๐Ÿงก Trust-Driven ๐Ÿค–',
118
- revolution: '30 seconds replaces 20 minutes of questions',
119
- brand: 'F1-Inspired Software Engineering - Championship AI Context',
120
- version: '1.0.0',
121
- type: parsed.framework.toLowerCase()
122
- },
123
- stack: {
124
- frontend: parsed.framework !== 'none' ? parsed.framework : 'None',
125
- css_framework: 'None',
126
- ui_library: 'None',
127
- state_management: 'None',
128
- backend: 'Node.js',
129
- runtime: 'Node.js',
130
- database: 'None',
131
- build: 'Vite',
132
- package_manager: 'npm',
133
- api_type: 'REST',
134
- hosting: parsed.hosting,
135
- cicd: 'None',
136
- testing: 'None',
137
- language: parsed.mainLanguage
138
- },
139
- preferences: {
140
- quality_bar: 'zero_errors',
141
- commit_style: 'conventional_emoji',
142
- response_style: 'concise_code_first',
143
- explanation_level: 'minimal',
144
- communication: 'direct',
145
- testing: 'required',
146
- documentation: 'as_needed'
147
- },
148
- state: {
149
- phase: 'development',
150
- version: '1.0.0',
151
- focus: 'quick_start',
152
- status: 'green_flag',
153
- next_milestone: 'first_feature',
154
- blockers: null
155
- },
156
- tags: {
157
- auto_generated: [parsed.projectName.toLowerCase(), parsed.mainLanguage.toLowerCase()],
158
- smart_defaults: ['.faf', 'ai-ready', '2025', 'quick-start'],
159
- user_defined: null
160
- },
161
- meta: {
162
- last_enhanced: new Date().toISOString(),
163
- enhanced_by: 'faf-quick-command'
164
- }
165
- };
166
- // Write file
167
- const yamlContent = (0, yaml_1.stringify)(fafData);
168
- await fs_1.promises.writeFile(fafPath, yamlContent, 'utf-8');
169
- return {
170
- success: true,
171
- created: true,
172
- filePath: fafPath,
173
- message: `โšก Created project.faf at ${fafPath} - Score: ${parsed.fafScore}%`
174
- };
175
- }
176
- catch (error) {
177
- return {
178
- success: false,
179
- created: false,
180
- message: error instanceof Error ? error.message : 'Quick command failed'
181
- };
182
- }
183
- }
184
- //# sourceMappingURL=quick.js.map