@planu/cli 5.3.36 → 5.3.38

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,15 @@
1
+ ## [5.3.38] - 2026-08-23
2
+
3
+ ### Bug Fixes
4
+ - fix(spec-1517): populate preflight guard map + fail-closed rot detector
5
+
6
+
7
+ ## [5.3.37] - 2026-08-23
8
+
9
+ ### Bug Fixes
10
+ - fix(spec-1561): replace non-portable grep -P health checks with pure-Node fastFindPatterns
11
+
12
+
1
13
  ## [5.3.36] - 2026-08-23
2
14
 
3
15
  ### Bug Fixes
@@ -3,8 +3,9 @@ import { technologyValue } from './technology-registry.js';
3
3
  // engine/project-health-checker.ts — SPEC-180 + SPEC-192 + SPEC-177: Project health check with convention scanning
4
4
  import { execSync } from 'node:child_process';
5
5
  import { readFile, access } from 'node:fs/promises';
6
- import { join } from 'node:path';
6
+ import { join, relative } from 'node:path';
7
7
  import { parseConventions, scanConventions } from './convention-scanner/index.js';
8
+ import { fastFindPatterns } from './core-bridge.js';
8
9
  // ── helpers ──────────────────────────────────────────────────────────────────
9
10
  function fileExists(path) {
10
11
  return access(path)
@@ -75,17 +76,17 @@ async function checkConventions(projectPath) {
75
76
  const nonAsciiPattern = /(?:function|const|let|var|export)\s+([À-ÿ\w]*[À-ÿ][À-ÿ\w]*)/;
76
77
  let nonEnglishFiles = 0;
77
78
  for (const dir of srcDirs) {
78
- const result = execSafe(`grep -rl --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" -P "[À-ÿ]" ${dir} 2>/dev/null | head -5`, projectPath);
79
- const files = result.trim().split('\n').filter(Boolean);
80
- for (const file of files) {
81
- const content = await readFile(join(projectPath, file), 'utf-8').catch(() => '');
79
+ const matches = fastFindPatterns(join(projectPath, dir), ['[À-ÿ]'], ['ts', 'js', 'tsx', 'jsx']);
80
+ const absPaths = Array.from(new Set(matches.map((m) => m.path))).slice(0, 5);
81
+ for (const absPath of absPaths) {
82
+ const content = await readFile(absPath, 'utf-8').catch(() => '');
82
83
  if (nonAsciiPattern.test(content)) {
83
84
  nonEnglishFiles++;
84
85
  score -= 25;
85
86
  items.push({
86
87
  severity: 'warning',
87
88
  category: 'conventions',
88
- message: `Non-English identifiers found in ${file}`,
89
+ message: `Non-English identifiers found in ${relative(projectPath, absPath)}`,
89
90
  fix: 'Rename identifiers to English to improve cross-team readability',
90
91
  });
91
92
  if (nonEnglishFiles >= 2) {
@@ -267,15 +268,16 @@ async function checkPlatformFitness(projectPath, knowledge) {
267
268
  (await fileExists(join(projectPath, 'serverless.yml'))) ||
268
269
  (await fileExists(join(projectPath, 'serverless.yaml')));
269
270
  if (isServerless) {
270
- // Crude check: module-level `let` in src/lib files (mutable state = bad for serverless)
271
- const result = execSafe(`grep -rl --include="*.ts" --include="*.js" -P "^let\\s+\\w+" src lib 2>/dev/null | head -3`, projectPath);
272
- const files = result.trim().split('\n').filter(Boolean);
273
- if (files.length > 0) {
271
+ const dirs = ['src', 'lib'];
272
+ const matches = dirs.flatMap((dir) => fastFindPatterns(join(projectPath, dir), ['^let\\s+\\w+'], ['ts', 'js']));
273
+ const absPaths = Array.from(new Set(matches.map((m) => m.path))).slice(0, 3);
274
+ if (absPaths.length > 0) {
275
+ const relPaths = absPaths.map((p) => relative(projectPath, p));
274
276
  score = 50;
275
277
  items.push({
276
278
  severity: 'warning',
277
279
  category: 'platform-fitness',
278
- message: `Module-level mutable state detected in serverless context (${files.slice(0, 2).join(', ')})`,
280
+ message: `Module-level mutable state detected in serverless context (${relPaths.slice(0, 2).join(', ')})`,
279
281
  fix: 'Avoid module-level let in serverless functions — use Redis or database persistence for cross-request data (cold starts reset module state)',
280
282
  });
281
283
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "5.3.36",
3
+ "version": "5.3.38",
4
4
  "description": "Planu — MCP Server for Spec Driven Development. Cross-platform (Linux/macOS/Windows, x64/arm64).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/planu-plugin.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dev.planu.cli",
3
3
  "displayName": "Planu — Spec Driven Development",
4
4
  "description": "Manage software specs, estimations, and autonomous SDD workflows. Language-agnostic MCP server for Claude Code.",
5
- "version": "5.3.36",
5
+ "version": "5.3.38",
6
6
  "icon": "assets/plugin/icon.svg",
7
7
  "command": ["npx", "@planu/cli@latest"],
8
8
  "packageName": "@planu/cli",