@paths.design/caws-cli 3.2.0 → 3.2.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.
@@ -17,41 +17,41 @@ const { validateWorkingSpec } = require('../validation/spec-validation');
17
17
  */
18
18
  function generateWorkingSpec(answers) {
19
19
  const template = {
20
- id: answers.projectId,
21
- title: answers.projectTitle,
22
- risk_tier: answers.riskTier,
23
- mode: answers.projectMode,
20
+ id: answers.projectId || 'PROJ-001',
21
+ title: answers.projectTitle || 'New CAWS Project',
22
+ risk_tier: answers.riskTier || 2,
23
+ mode: answers.projectMode || 'feature',
24
24
  change_budget: {
25
- max_files: answers.maxFiles,
26
- max_loc: answers.maxLoc,
25
+ max_files: answers.maxFiles || 25,
26
+ max_loc: answers.maxLoc || 1000,
27
27
  },
28
28
  blast_radius: {
29
- modules: answers.blastModules
29
+ modules: (answers.blastModules || 'src, tests')
30
30
  .split(',')
31
31
  .map((m) => m.trim())
32
32
  .filter((m) => m),
33
- data_migration: answers.dataMigration,
33
+ data_migration: answers.dataMigration ?? false,
34
34
  },
35
- operational_rollback_slo: answers.rollbackSlo,
35
+ operational_rollback_slo: answers.rollbackSlo || '5m',
36
36
  threats: (answers.projectThreats || '')
37
37
  .split('\n')
38
38
  .map((t) => t.trim())
39
39
  .filter((t) => t && !t.startsWith('-') === false), // Allow lines starting with -
40
40
  scope: {
41
- in: (answers.scopeIn || '')
41
+ in: (answers.scopeIn || 'src/, tests/')
42
42
  .split(',')
43
43
  .map((s) => s.trim())
44
44
  .filter((s) => s),
45
- out: (answers.scopeOut || '')
45
+ out: (answers.scopeOut || 'node_modules/, dist/')
46
46
  .split(',')
47
47
  .map((s) => s.trim())
48
48
  .filter((s) => s),
49
49
  },
50
- invariants: (answers.projectInvariants || '')
50
+ invariants: (answers.projectInvariants || 'System maintains data consistency')
51
51
  .split('\n')
52
52
  .map((i) => i.trim())
53
53
  .filter((i) => i),
54
- acceptance: answers.acceptanceCriteria
54
+ acceptance: (answers.acceptanceCriteria || 'Given current state, when action occurs, then expected result')
55
55
  .split('\n')
56
56
  .filter((a) => a.trim())
57
57
  .map((criteria, index) => {
@@ -87,32 +87,32 @@ function generateWorkingSpec(answers) {
87
87
  };
88
88
  }),
89
89
  non_functional: {
90
- a11y: answers.a11yRequirements
90
+ a11y: (answers.a11yRequirements || 'keyboard')
91
91
  .split(',')
92
92
  .map((a) => a.trim())
93
93
  .filter((a) => a),
94
- perf: { api_p95_ms: answers.perfBudget },
95
- security: answers.securityRequirements
94
+ perf: { api_p95_ms: answers.perfBudget || 250 },
95
+ security: (answers.securityRequirements || 'validation')
96
96
  .split(',')
97
97
  .map((s) => s.trim())
98
98
  .filter((s) => s),
99
99
  },
100
100
  contracts: [
101
101
  {
102
- type: answers.contractType,
103
- path: answers.contractPath,
102
+ type: answers.contractType || '',
103
+ path: answers.contractPath || '',
104
104
  },
105
105
  ],
106
106
  observability: {
107
- logs: answers.observabilityLogs
107
+ logs: (answers.observabilityLogs || '')
108
108
  .split(',')
109
109
  .map((l) => l.trim())
110
110
  .filter((l) => l),
111
- metrics: answers.observabilityMetrics
111
+ metrics: (answers.observabilityMetrics || '')
112
112
  .split(',')
113
113
  .map((m) => m.trim())
114
114
  .filter((m) => m),
115
- traces: answers.observabilityTraces
115
+ traces: (answers.observabilityTraces || '')
116
116
  .split(',')
117
117
  .map((t) => t.trim())
118
118
  .filter((t) => t),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paths.design/caws-cli",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "CAWS CLI - Coding Agent Workflow System command line tools",
5
5
  "main": "dist/index.js",
6
6
  "bin": {