@planu/cli 4.3.0 → 4.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [4.3.2] - 2026-05-22
2
+
3
+ **Tarball SHA-256:** `7732de964d5e10d24bdab5ea79baee3d281654cf5caff1f713671502c8e09ee3`
4
+
5
+ ### Bug Fixes
6
+ - fix(security): enforce moderate vulnerability gate
7
+
8
+
1
9
  ## [4.3.0] - 2026-05-22
2
10
 
3
11
  **Tarball SHA-256:** `ebc3e7fe0a284d6ba6062dfb9aab41fe6e9396a7763c6d39764d676d20a0b6c3`
@@ -1,34 +1,16 @@
1
- const MAX_SUMMARY_LENGTH = 700;
2
1
  export class FallbackGenerator {
3
2
  generate(request) {
4
- const slug = slugify(request.title);
5
- const pascalName = toPascalCase(request.title);
6
- const sourceSummary = normalizeSummary(request.description, request.title);
3
+ const sourceDescription = normalizeSourceDescription(request.description, request.title);
7
4
  const contextLine = buildContextLine(request);
8
- const technicalSection = buildTechnicalSection(slug, pascalName, contextLine);
5
+ const technicalSection = buildTechnicalSection(contextLine);
9
6
  const specBody = [
10
7
  '## Problem',
11
- sourceSummary,
8
+ sourceDescription,
12
9
  '',
13
10
  '## Solution',
14
- `Implement ${request.title} with explicit behavior, project-scoped file ownership, and verification gates. ${contextLine}`,
15
- '',
16
- '## Acceptance Criteria',
17
- '',
18
- `Scenario: ${request.title} happy path`,
19
- 'GIVEN the relevant user or system context exists',
20
- `WHEN the requested ${request.title} behavior is executed`,
21
- 'THEN the expected outcome from the request is observable',
22
- '',
23
- `Scenario: ${request.title} failure handling`,
24
- 'GIVEN invalid input or an unavailable dependency',
25
- `WHEN the requested ${request.title} behavior runs`,
26
- 'THEN the system returns a clear failure state without corrupting data',
27
- '',
28
- `Scenario: ${request.title} verification`,
29
- 'GIVEN the implementation is complete',
30
- 'WHEN the configured verification commands run',
31
- 'THEN tests and lint pass without regressions',
11
+ 'Use the preserved source description above as the authoritative requirements body. ' +
12
+ 'Do not infer implementation ownership beyond details explicitly provided in the source. ' +
13
+ contextLine,
32
14
  '',
33
15
  technicalSection,
34
16
  ].join('\n');
@@ -38,25 +20,18 @@ export class FallbackGenerator {
38
20
  generatedWithModel: 'deterministic-fallback',
39
21
  generatedAt: new Date().toISOString(),
40
22
  qualityWarnings: [
41
- 'Fallback generator used. Review candidate file paths and replace placeholders with exact code owners before approval.',
23
+ 'Fallback generator used. Source description was preserved; no implementation files, type signatures, or ownership were inferred.',
42
24
  ],
43
25
  fallbackReason: 'No external model generator is configured for create_spec.',
44
26
  });
45
27
  }
46
28
  }
47
- function normalizeSummary(description, title) {
48
- const compact = description
49
- .replace(/\r\n/g, '\n')
50
- .split('\n')
51
- .map((line) => line.trim())
52
- .filter((line) => line.length > 0 && !line.startsWith('- [ ]'))
53
- .join(' ')
54
- .replace(/\s+/g, ' ')
55
- .trim();
56
- const summary = compact.length > 0
57
- ? compact.slice(0, MAX_SUMMARY_LENGTH)
58
- : `The project needs ${title} defined with enough implementation detail to proceed safely.`;
59
- return summary.endsWith('.') ? summary : `${summary}.`;
29
+ function normalizeSourceDescription(description, title) {
30
+ const compact = description.replace(/\r\n/g, '\n').trim();
31
+ if (compact.length > 0) {
32
+ return compact;
33
+ }
34
+ return `The project needs ${title} defined with enough implementation detail to proceed safely.`;
60
35
  }
61
36
  function buildContextLine(request) {
62
37
  const parts = [
@@ -69,34 +44,22 @@ function buildContextLine(request) {
69
44
  }
70
45
  return `Use the existing ${parts.join(' / ')} project conventions.`;
71
46
  }
72
- function buildTechnicalSection(slug, pascalName, contextLine) {
47
+ function buildTechnicalSection(contextLine) {
73
48
  return [
74
49
  '## Technical',
75
50
  '',
76
51
  '### Implementation Notes',
77
52
  `- ${contextLine}`,
78
- '- Replace candidate paths with exact files before moving the spec to approved.',
53
+ '- Preserve the source requirements as the contract until a reviewer or agent adds exact implementation ownership.',
79
54
  '',
80
55
  '## Files',
81
56
  '',
82
57
  '### Create',
83
- `- src/${slug}.ts (candidate path; replace with exact owner during planning)`,
58
+ '- _Not specified in source description._',
84
59
  '### Modify',
85
- '- src/index.ts (candidate integration point; replace with exact owner during planning)',
60
+ '- _Not specified in source description._',
86
61
  '### Test',
87
- `- tests/${slug}.test.ts (focused coverage for the behavior and failure path)`,
88
- '',
89
- '## Type Signatures',
90
- '```typescript',
91
- `interface ${pascalName}Input {`,
92
- ' readonly requestId?: string;',
93
- '}',
94
- '',
95
- `interface ${pascalName}Result {`,
96
- ' readonly ok: boolean;',
97
- ' readonly reason?: string;',
98
- '}',
99
- '```',
62
+ '- _Not specified in source description._',
100
63
  '',
101
64
  '## Verification',
102
65
  '- pnpm typecheck',
@@ -104,17 +67,4 @@ function buildTechnicalSection(slug, pascalName, contextLine) {
104
67
  '- pnpm test',
105
68
  ].join('\n');
106
69
  }
107
- function slugify(input) {
108
- const slug = input
109
- .toLowerCase()
110
- .replace(/[^a-z0-9]+/g, '-')
111
- .replace(/^-+|-+$/g, '');
112
- return slug.length > 0 ? slug : 'generated-spec';
113
- }
114
- function toPascalCase(input) {
115
- const words = input.match(/[a-zA-Z0-9]+/g) ?? ['Generated', 'Spec'];
116
- return words
117
- .map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`)
118
- .join('');
119
- }
120
70
  //# sourceMappingURL=fallback-generator.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "4.3.0",
3
+ "version": "4.3.2",
4
4
  "description": "Planu — MCP Server for Spec Driven Development with native Rust acceleration for hot paths. Cross-platform (Linux/macOS/Windows, x64/arm64, glibc/musl).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,14 +32,14 @@
32
32
  "packageName": "@planu/core"
33
33
  },
34
34
  "optionalDependencies": {
35
- "@planu/core-darwin-arm64": "4.3.0",
36
- "@planu/core-darwin-x64": "4.3.0",
37
- "@planu/core-linux-arm64-gnu": "4.3.0",
38
- "@planu/core-linux-arm64-musl": "4.3.0",
39
- "@planu/core-linux-x64-gnu": "4.3.0",
40
- "@planu/core-linux-x64-musl": "4.3.0",
41
- "@planu/core-win32-arm64-msvc": "4.3.0",
42
- "@planu/core-win32-x64-msvc": "4.3.0"
35
+ "@planu/core-darwin-arm64": "4.3.2",
36
+ "@planu/core-darwin-x64": "4.3.2",
37
+ "@planu/core-linux-arm64-gnu": "4.3.2",
38
+ "@planu/core-linux-arm64-musl": "4.3.2",
39
+ "@planu/core-linux-x64-gnu": "4.3.2",
40
+ "@planu/core-linux-x64-musl": "4.3.2",
41
+ "@planu/core-win32-arm64-msvc": "4.3.2",
42
+ "@planu/core-win32-x64-msvc": "4.3.2"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=24.0.0"
@@ -144,7 +144,8 @@
144
144
  "lodash-es": ">=4.18.0",
145
145
  "hono": ">=4.12.14",
146
146
  "postcss": ">=8.5.10",
147
- "fast-uri": ">=3.1.2"
147
+ "fast-uri": ">=3.1.2",
148
+ "qs": ">=6.15.2"
148
149
  },
149
150
  "supportedArchitectures": {
150
151
  "os": [