complexity-cli 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +6 -0
  2. package/dist/index.js +487 -46
  3. package/package.json +10 -6
  4. package/dist/commands/add.d.ts +0 -4
  5. package/dist/commands/add.d.ts.map +0 -1
  6. package/dist/commands/add.js +0 -109
  7. package/dist/commands/add.js.map +0 -1
  8. package/dist/commands/init.d.ts +0 -5
  9. package/dist/commands/init.d.ts.map +0 -1
  10. package/dist/commands/init.js +0 -85
  11. package/dist/commands/init.js.map +0 -1
  12. package/dist/commands/list.d.ts +0 -2
  13. package/dist/commands/list.d.ts.map +0 -1
  14. package/dist/commands/list.js +0 -58
  15. package/dist/commands/list.js.map +0 -1
  16. package/dist/commands/prompt.d.ts +0 -2
  17. package/dist/commands/prompt.d.ts.map +0 -1
  18. package/dist/commands/prompt.js +0 -38
  19. package/dist/commands/prompt.js.map +0 -1
  20. package/dist/commands/remove.d.ts +0 -4
  21. package/dist/commands/remove.d.ts.map +0 -1
  22. package/dist/commands/remove.js +0 -86
  23. package/dist/commands/remove.js.map +0 -1
  24. package/dist/commands/update.d.ts +0 -6
  25. package/dist/commands/update.d.ts.map +0 -1
  26. package/dist/commands/update.js +0 -125
  27. package/dist/commands/update.js.map +0 -1
  28. package/dist/core/generator.d.ts +0 -5
  29. package/dist/core/generator.d.ts.map +0 -1
  30. package/dist/core/generator.js +0 -96
  31. package/dist/core/generator.js.map +0 -1
  32. package/dist/core/parser.d.ts +0 -4
  33. package/dist/core/parser.d.ts.map +0 -1
  34. package/dist/core/parser.js +0 -144
  35. package/dist/core/parser.js.map +0 -1
  36. package/dist/core/validator.d.ts +0 -6
  37. package/dist/core/validator.d.ts.map +0 -1
  38. package/dist/core/validator.js +0 -22
  39. package/dist/core/validator.js.map +0 -1
  40. package/dist/index.d.ts +0 -3
  41. package/dist/index.d.ts.map +0 -1
  42. package/dist/index.js.map +0 -1
  43. package/dist/utils/error-helpers.d.ts +0 -4
  44. package/dist/utils/error-helpers.d.ts.map +0 -1
  45. package/dist/utils/error-helpers.js +0 -26
  46. package/dist/utils/error-helpers.js.map +0 -1
  47. package/dist/utils/prompts.d.ts +0 -3
  48. package/dist/utils/prompts.d.ts.map +0 -1
  49. package/dist/utils/prompts.js +0 -37
  50. package/dist/utils/prompts.js.map +0 -1
  51. package/dist/utils/types.d.ts +0 -17
  52. package/dist/utils/types.d.ts.map +0 -1
  53. package/dist/utils/types.js +0 -3
  54. package/dist/utils/types.js.map +0 -1
@@ -1,109 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.addCommand = addCommand;
40
- const fs = __importStar(require("fs"));
41
- const chalk_1 = __importDefault(require("chalk"));
42
- const parser_1 = require("../core/parser");
43
- const generator_1 = require("../core/generator");
44
- const validator_1 = require("../core/validator");
45
- const prompts_1 = require("../utils/prompts");
46
- const error_helpers_1 = require("../utils/error-helpers");
47
- const BLANK_AREA = '___';
48
- function getLevelInput(levelArg, options) {
49
- const levelInput = options.level || levelArg;
50
- if (!levelInput) {
51
- (0, error_helpers_1.exitWithUsageError)('Criticality level is required.', 'complexity add <concept> <level> [area]\n or: complexity add <concept> --level <level> [area]');
52
- }
53
- return levelInput;
54
- }
55
- function validateLevel(levelInput) {
56
- if (!(0, validator_1.isValidLevel)(levelInput)) {
57
- (0, error_helpers_1.exitWithError)('Level must be 1, 2, or 3.');
58
- }
59
- return parseInt(levelInput);
60
- }
61
- function requireComplexityFile() {
62
- const filePath = (0, parser_1.findComplexityFile)();
63
- if (!filePath) {
64
- (0, error_helpers_1.exitWithError)('COMPLEXITY.md not found.', 'Run "complexity init" to create one.');
65
- }
66
- return filePath;
67
- }
68
- function validateConceptDoesNotExist(concept, existingConcepts) {
69
- if ((0, validator_1.isDuplicate)(concept, existingConcepts)) {
70
- (0, error_helpers_1.exitWithError)(`Concept "${concept}" already exists.`, 'Use "complexity update" to modify it.');
71
- }
72
- }
73
- async function confirmNewAreaIfNeeded(area, existingConcepts) {
74
- if (area === BLANK_AREA) {
75
- return;
76
- }
77
- if ((0, validator_1.isExistingArea)(area, existingConcepts)) {
78
- return;
79
- }
80
- const confirmed = await (0, prompts_1.confirmAction)(`No pre-existing area "${area}" found. Would you still like to add it?`);
81
- if (!confirmed) {
82
- (0, error_helpers_1.exitCancelled)();
83
- }
84
- }
85
- function createConcept(concept, level, area) {
86
- return {
87
- topic: concept,
88
- area,
89
- criticality: level
90
- };
91
- }
92
- function saveComplexityFile(filePath, projectName, concepts) {
93
- const markdown = (0, generator_1.generateMarkdown)(projectName, concepts);
94
- fs.writeFileSync(filePath, markdown, 'utf-8');
95
- }
96
- async function addCommand(concept, levelArg, areaArg, options) {
97
- const levelInput = getLevelInput(levelArg, options);
98
- const level = validateLevel(levelInput);
99
- const area = areaArg || BLANK_AREA;
100
- const filePath = requireComplexityFile();
101
- const doc = (0, parser_1.parseComplexityFile)(filePath);
102
- validateConceptDoesNotExist(concept, doc.concepts);
103
- await confirmNewAreaIfNeeded(area, doc.concepts);
104
- const newConcept = createConcept(concept, level, area);
105
- const updatedConcepts = [...doc.concepts, newConcept];
106
- saveComplexityFile(filePath, doc.projectName, updatedConcepts);
107
- console.log(chalk_1.default.green(`✓ Added "${concept}" (Level ${level}, Area: ${area})`));
108
- }
109
- //# sourceMappingURL=add.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,gCAsBC;AApGD,uCAAyB;AACzB,kDAA0B;AAC1B,2CAAyE;AACzE,iDAAqD;AACrD,iDAA8E;AAC9E,8CAAiD;AACjD,0DAA0F;AAG1F,MAAM,UAAU,GAAG,KAAK,CAAC;AAEzB,SAAS,aAAa,CAAC,QAA4B,EAAE,OAA2B;IAC9E,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,QAAQ,CAAC;IAE7C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,IAAA,kCAAkB,EAChB,gCAAgC,EAChC,iGAAiG,CAClG,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,aAAa,CAAC,UAAkB;IACvC,IAAI,CAAC,IAAA,wBAAY,EAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,IAAA,6BAAa,EAAC,2BAA2B,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC9B,CA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A4B,EAC5B,OAA2B,EAC3B,OAA2B;IAE3B,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,OAAO,IAAI,UAAU,CAAC;IAEnC,MAAM,QAAQ,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,IAAA,4BAAmB,EAAC,QAAQ,CAAC,CAAC;IAE1C,2BAA2B,CAAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnD,MAAM,sBAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAEjD,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACvD,MAAM,eAAe,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEtD,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAE/D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,YAAY,OAAO,YAAY,KAAK,WAAW,IAAI,GAAG,CAAC,CAAC,CAAC;AACnF,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare function initCommand(options: {
2
- name?: string;
3
- force?: boolean;
4
- }): Promise<void>;
5
- //# sourceMappingURL=init.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AA2CA,wBAAsB,WAAW,CAAC,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,iBAU5E"}
@@ -1,85 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.initCommand = initCommand;
40
- const fs = __importStar(require("fs"));
41
- const path = __importStar(require("path"));
42
- const chalk_1 = __importDefault(require("chalk"));
43
- const prompts_1 = require("../utils/prompts");
44
- const error_helpers_1 = require("../utils/error-helpers");
45
- const TEMPLATE_FILE = path.join(__dirname, '../../Complexity.template.md');
46
- const OUTPUT_FILE = 'COMPLEXITY.md';
47
- function getOutputPath() {
48
- return path.join(process.cwd(), OUTPUT_FILE);
49
- }
50
- function validateFileDoesNotExist(outputPath, force) {
51
- if (fs.existsSync(outputPath) && !force) {
52
- (0, error_helpers_1.exitWithError)(`${OUTPUT_FILE} already exists in this directory.`, 'Use --force to overwrite it.');
53
- }
54
- }
55
- async function getProjectName(providedName) {
56
- if (providedName) {
57
- return providedName;
58
- }
59
- return (0, prompts_1.promptForInput)('Enter project name:', path.basename(process.cwd()));
60
- }
61
- function readTemplateFile() {
62
- if (!fs.existsSync(TEMPLATE_FILE)) {
63
- (0, error_helpers_1.exitWithError)(`Template file not found at ${TEMPLATE_FILE}`);
64
- }
65
- return fs.readFileSync(TEMPLATE_FILE, 'utf-8');
66
- }
67
- function initializeTemplateContent(template, projectName) {
68
- return template
69
- .replace(/\{Project Name\}/g, projectName)
70
- .replace(/\{X\}/g, '0')
71
- .replace(/\{Y\}/g, '0')
72
- .replace(/\{A\}/g, '0')
73
- .replace(/\{B\}/g, '0')
74
- .replace(/\{C\}/g, '0');
75
- }
76
- async function initCommand(options) {
77
- const outputPath = getOutputPath();
78
- validateFileDoesNotExist(outputPath, options.force ?? false);
79
- const projectName = await getProjectName(options.name);
80
- const template = readTemplateFile();
81
- const content = initializeTemplateContent(template, projectName);
82
- fs.writeFileSync(outputPath, content, 'utf-8');
83
- console.log(chalk_1.default.green(`✓ Created ${OUTPUT_FILE} for project: ${projectName}`));
84
- }
85
- //# sourceMappingURL=init.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,kCAUC;AArDD,uCAAyB;AACzB,2CAA6B;AAC7B,kDAA0B;AAC1B,8CAAkD;AAClD,0DAAuD;AAEvD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,CAAC;AAC3E,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,SAAS,aAAa;IACpB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,wBAAwB,CAAC,UAAkB,EAAE,K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,GAAG,gBAAgB,EAAE,CAAC;IACpC,MAAM,OAAO,GAAG,yBAAyB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAEjE,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,aAAa,WAAW,iBAAiB,WAAW,EAAE,CAAC,CAAC,CAAC;AACnF,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function listCommand(): void;
2
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAuDA,wBAAgB,WAAW,SAiB1B"}
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.listCommand = listCommand;
7
- const chalk_1 = __importDefault(require("chalk"));
8
- const parser_1 = require("../core/parser");
9
- const generator_1 = require("../core/generator");
10
- const error_helpers_1 = require("../utils/error-helpers");
11
- function requireComplexityFile() {
12
- const filePath = (0, parser_1.findComplexityFile)();
13
- if (!filePath) {
14
- (0, error_helpers_1.exitWithError)('COMPLEXITY.md not found.', 'Run "complexity init" to create one.');
15
- }
16
- return filePath;
17
- }
18
- function displayEmptyState(filePath) {
19
- console.log(chalk_1.default.yellow('No concepts found in COMPLEXITY.md'));
20
- console.log(chalk_1.default.gray(`File location: ${filePath}`));
21
- }
22
- function displayHeader(projectName, filePath, totalConcepts) {
23
- console.log(chalk_1.default.bold(`\nProject: ${projectName}`));
24
- console.log(chalk_1.default.gray(`File: ${filePath}`));
25
- console.log(chalk_1.default.gray(`Total concepts: ${totalConcepts}\n`));
26
- }
27
- function displayConceptGroup(title, concepts, color) {
28
- if (concepts.length === 0) {
29
- return;
30
- }
31
- console.log(color(title));
32
- concepts.forEach(concept => {
33
- console.log(` ${chalk_1.default.bold(concept.topic)} ${chalk_1.default.gray(`[${concept.area}]`)}`);
34
- });
35
- console.log('');
36
- }
37
- function groupConceptsByCriticality(concepts) {
38
- return {
39
- critical: concepts.filter(c => c.criticality === 3),
40
- important: concepts.filter(c => c.criticality === 2),
41
- situational: concepts.filter(c => c.criticality === 1),
42
- };
43
- }
44
- function listCommand() {
45
- const filePath = requireComplexityFile();
46
- const doc = (0, parser_1.parseComplexityFile)(filePath);
47
- const sorted = (0, generator_1.sortConcepts)(doc.concepts);
48
- if (sorted.length === 0) {
49
- displayEmptyState(filePath);
50
- return;
51
- }
52
- displayHeader(doc.projectName, filePath, sorted.length);
53
- const groups = groupConceptsByCriticality(sorted);
54
- displayConceptGroup('Critical (Level 3):', groups.critical, chalk_1.default.red.bold);
55
- displayConceptGroup('Important (Level 2):', groups.important, chalk_1.default.yellow.bold);
56
- displayConceptGroup('Situational (Level 1):', groups.situational, chalk_1.default.green.bold);
57
- }
58
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":";;;;;AAuDA,kCAiBC;AAxED,kDAA0B;AAC1B,2CAAyE;AACzE,iDAAiD;AACjD,0DAAuD;AAGvD,SAAS,qBAAqB;IAC5B,MAAM,QAAQ,GAAG,IAAA,2BAAkB,GAAE,CAAC;IAEtC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAA,6BAAa,EAAC,0BAA0B,EAAE,sCAAsC,CAAC,CAAC;IACpF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,oCAAoC,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAA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CAAC;AACJ,CAAC;AAED,SAAgB,WAAW;IACzB,MAAM,QAAQ,GAAG,qBAAqB,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,IAAA,4BAAmB,EAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,wBAAY,EAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE1C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC5B,OAAO;IACT,CAAC;IAED,aAAa,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAExD,MAAM,MAAM,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAElD,mBAAmB,CAAC,qBAAqB,EAAE,MAAM,CAAC,QAAQ,EAAE,eAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5E,mBAAmB,CAAC,sBAAsB,EAAE,MAAM,CAAC,SAAS,EAAE,eAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjF,mBAAmB,CAAC,wBAAwB,EAAE,MAAM,CAAC,WAAW,EAAE,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACtF,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function promptCommand(): void;
2
- //# sourceMappingURL=prompt.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/commands/prompt.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,SAkC5B"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.promptCommand = promptCommand;
4
- function promptCommand() {
5
- const prompt = `
6
- I'd like you to analyze this project and create a comprehensive complexity map. This map should list everything someone needs to know to take full ownership of this software project.
7
-
8
- For each technology, concept, or skill:
9
- - Rate its criticality from 1-3:
10
- * 3 = Can't do meaningful work without it
11
- * 2 = Will encounter regularly; gaps will slow you down
12
- * 1 = Comes up occasionally or is abstracted away
13
-
14
- - Categorize it by area (e.g., backend, frontend, infrastructure, devops, etc.)
15
-
16
- Use the following CLI commands to maintain the COMPLEXITY.md file:
17
- - \`complexity add <concept> <level> [area]\` - Add a new technology
18
- - \`complexity update <concept> --level <level> --area <area>\` - Update existing entry
19
- - \`complexity remove <concept>\` - Remove an entry
20
- - \`complexity list\` - View current entries
21
-
22
- Be thorough and accurate. Consider:
23
- - Programming languages and frameworks
24
- - Databases and data stores
25
- - DevOps and infrastructure tools
26
- - Testing frameworks and methodologies
27
- - Build tools and package managers
28
- - Domain-specific knowledge
29
- - Architectural patterns and design principles
30
- - Third-party services and APIs
31
-
32
- Start by reviewing the existing entries with \`complexity list\`, then add, update, or remove entries as needed to ensure completeness and accuracy.
33
-
34
- Do not update the COMPLEXITY.md file manually.
35
- `.trim();
36
- console.log(prompt);
37
- }
38
- //# sourceMappingURL=prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/commands/prompt.ts"],"names":[],"mappings":";;AAAA,sCAkCC;AAlCD,SAAgB,aAAa;IAC3B,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BhB,CAAC,IAAI,EAAE,CAAC;IAEP,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare function removeCommand(concept: string, options: {
2
- force?: boolean;
3
- }): Promise<void>;
4
- //# sourceMappingURL=remove.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":"AAoDA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,iBAWhF"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.removeCommand = removeCommand;
40
- const fs = __importStar(require("fs"));
41
- const chalk_1 = __importDefault(require("chalk"));
42
- const parser_1 = require("../core/parser");
43
- const generator_1 = require("../core/generator");
44
- const validator_1 = require("../core/validator");
45
- const prompts_1 = require("../utils/prompts");
46
- const error_helpers_1 = require("../utils/error-helpers");
47
- function requireComplexityFile() {
48
- const filePath = (0, parser_1.findComplexityFile)();
49
- if (!filePath) {
50
- (0, error_helpers_1.exitWithError)('COMPLEXITY.md not found.', 'Run "complexity init" to create one.');
51
- }
52
- return filePath;
53
- }
54
- function requireConceptExists(conceptName, concepts) {
55
- const existing = (0, validator_1.findConcept)(conceptName, concepts);
56
- if (!existing) {
57
- (0, error_helpers_1.exitWithError)(`Concept "${conceptName}" not found.`);
58
- }
59
- return existing;
60
- }
61
- async function confirmRemovalIfNeeded(concept, force) {
62
- if (force) {
63
- return;
64
- }
65
- const confirmed = await (0, prompts_1.confirmAction)(`Remove "${concept.topic}" (Level ${concept.criticality}, Area: ${concept.area})?`);
66
- if (!confirmed) {
67
- (0, error_helpers_1.exitCancelled)();
68
- }
69
- }
70
- function removeConcept(conceptName, concepts) {
71
- return concepts.filter(c => c.topic.toLowerCase() !== conceptName.toLowerCase());
72
- }
73
- function saveComplexityFile(filePath, projectName, concepts) {
74
- const markdown = (0, generator_1.generateMarkdown)(projectName, concepts);
75
- fs.writeFileSync(filePath, markdown, 'utf-8');
76
- }
77
- async function removeCommand(concept, options) {
78
- const filePath = requireComplexityFile();
79
- const doc = (0, parser_1.parseComplexityFile)(filePath);
80
- const existing = requireConceptExists(concept, doc.concepts);
81
- await confirmRemovalIfNeeded(existing, options.force ?? false);
82
- const updatedConcepts = removeConcept(concept, doc.concepts);
83
- saveComplexityFile(filePath, doc.projectName, updatedConcepts);
84
- console.log(chalk_1.default.green(`✓ Removed "${existing.topic}"`));
85
- }
86
- //# sourceMappingURL=remove.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/commands/remove.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,sCAWC;AA/DD,uCAAyB;AACzB,kDAA0B;AAC1B,2CAAyE;AACzE,iDAAqD;AACrD,iDAAgD;AAChD,8CAAiD;AACjD,0DAAsE;AAGtE,SAAS,qBAAqB;IAC5B,MAAM,QAAQ,GAAG,IAAA,2BAAkB,GAAE,CAAC;IAEtC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAA,6BAAa,EAAC,0BAA0B,EAAE,s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CAAC;IAC1C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE7D,MAAM,sBAAsB,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC;IAE/D,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7D,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAE/D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,cAAc,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC"}
@@ -1,6 +0,0 @@
1
- export declare function updateCommand(concept: string, options: {
2
- level?: string;
3
- area?: string;
4
- name?: string;
5
- }): Promise<void>;
6
- //# sourceMappingURL=update.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAkHA,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,iBAgB1D"}
@@ -1,125 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.updateCommand = updateCommand;
40
- const fs = __importStar(require("fs"));
41
- const chalk_1 = __importDefault(require("chalk"));
42
- const parser_1 = require("../core/parser");
43
- const generator_1 = require("../core/generator");
44
- const validator_1 = require("../core/validator");
45
- const prompts_1 = require("../utils/prompts");
46
- const error_helpers_1 = require("../utils/error-helpers");
47
- const BLANK_AREA = '___';
48
- function validateAtLeastOneOptionProvided(options) {
49
- if (!options.level && !options.area && !options.name) {
50
- (0, error_helpers_1.exitWithUsageError)('At least one option (--level, --area, or --name) is required.', 'complexity update <concept> [--level <level>] [--area <area>] [--name <new-name>]');
51
- }
52
- }
53
- function requireComplexityFile() {
54
- const filePath = (0, parser_1.findComplexityFile)();
55
- if (!filePath) {
56
- (0, error_helpers_1.exitWithError)('COMPLEXITY.md not found.', 'Run "complexity init" to create one.');
57
- }
58
- return filePath;
59
- }
60
- function requireConceptExists(conceptName, concepts) {
61
- const existing = (0, validator_1.findConcept)(conceptName, concepts);
62
- if (!existing) {
63
- (0, error_helpers_1.exitWithError)(`Concept "${conceptName}" not found.`);
64
- }
65
- return existing;
66
- }
67
- function validateLevelIfProvided(level) {
68
- if (!level) {
69
- return;
70
- }
71
- if (!(0, validator_1.isValidLevel)(level)) {
72
- (0, error_helpers_1.exitWithError)('Level must be 1, 2, or 3.');
73
- }
74
- }
75
- async function confirmNewAreaIfNeeded(area, existingConcepts) {
76
- if (!area || area === BLANK_AREA) {
77
- return;
78
- }
79
- if ((0, validator_1.isExistingArea)(area, existingConcepts)) {
80
- return;
81
- }
82
- const confirmed = await (0, prompts_1.confirmAction)(`No pre-existing area "${area}" found. Would you still like to use it?`);
83
- if (!confirmed) {
84
- (0, error_helpers_1.exitCancelled)();
85
- }
86
- }
87
- function createUpdatedConcept(existing, options) {
88
- return {
89
- topic: options.name || existing.topic,
90
- area: options.area !== undefined ? options.area : existing.area,
91
- criticality: (options.level ? parseInt(options.level) : existing.criticality),
92
- };
93
- }
94
- function replaceConceptInList(conceptName, updatedConcept, concepts) {
95
- return concepts.map(c => c.topic.toLowerCase() === conceptName.toLowerCase() ? updatedConcept : c);
96
- }
97
- function saveComplexityFile(filePath, projectName, concepts) {
98
- const markdown = (0, generator_1.generateMarkdown)(projectName, concepts);
99
- fs.writeFileSync(filePath, markdown, 'utf-8');
100
- }
101
- function displayUpdateSummary(conceptName, updatedConcept, options) {
102
- console.log(chalk_1.default.green(`✓ Updated "${conceptName}"`));
103
- if (options.name) {
104
- console.log(chalk_1.default.gray(` → Name: ${updatedConcept.topic}`));
105
- }
106
- if (options.level) {
107
- console.log(chalk_1.default.gray(` → Level: ${updatedConcept.criticality}`));
108
- }
109
- if (options.area !== undefined) {
110
- console.log(chalk_1.default.gray(` → Area: ${updatedConcept.area}`));
111
- }
112
- }
113
- async function updateCommand(concept, options) {
114
- validateAtLeastOneOptionProvided(options);
115
- validateLevelIfProvided(options.level);
116
- const filePath = requireComplexityFile();
117
- const doc = (0, parser_1.parseComplexityFile)(filePath);
118
- const existing = requireConceptExists(concept, doc.concepts);
119
- await confirmNewAreaIfNeeded(options.area, doc.concepts);
120
- const updatedConcept = createUpdatedConcept(existing, options);
121
- const updatedConcepts = replaceConceptInList(concept, updatedConcept, doc.concepts);
122
- saveComplexityFile(filePath, doc.projectName, updatedConcepts);
123
- displayUpdateSummary(concept, updatedConcept, options);
124
- }
125
- //# sourceMappingURL=update.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,sCAkBC;AApID,uCAAyB;AACzB,kDAA0B;AAC1B,2CAAyE;AACzE,iDAAqD;AACrD,iDAA8E;AAC9E,8CAAiD;AACjD,0DAA0F;AAG1F,MAAM,UAAU,GAAG,KAAK,CAAC;AAEzB,SAAS,gCAAgC,CAAC,OAAyD;IACjG,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACrD,IAAA,kCAAkB,EAChB,+DAA+D,EAC/D,mFAAmF,CACpF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAS,qBAAqB;IAC5B,MAAM,QAAQ,GAAG,IAAA,2BAAkB,GAAE,CAAC;IAEtC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAA,6BAAa,EAAC,0BAA0B,EAAE,sCAAsC,CAAC,CAAC;IACpF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,oBAAoB,CAAC,WAAmB,EAAE,QAAmB;IACpE,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAEpD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,IAAA,6BAAa,EAAC,YAAY,WAAW,cAAc,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAyB;IACxD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;IACT,CAAC;I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C,QAAQ,CAAC,CAAC;IAEzD,MAAM,cAAc,GAAG,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC/D,MAAM,eAAe,GAAG,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IAEpF,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC/D,oBAAoB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC"}
@@ -1,5 +0,0 @@
1
- import { Concept, Stats } from '../utils/types';
2
- export declare function calculateStats(concepts: Concept[]): Stats;
3
- export declare function sortConcepts(concepts: Concept[]): Concept[];
4
- export declare function generateMarkdown(projectName: string, concepts: Concept[]): string;
5
- //# sourceMappingURL=generator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/core/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEhD,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,CAczD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAO3D;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CA4EjF"}