@planu/cli 5.7.13 → 5.7.15

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 (33) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +3 -6
  3. package/dist/.planu-build.json +1 -1
  4. package/dist/config/negative-predicate-phrases.json +33 -0
  5. package/dist/config/runtime-policy.json +1 -1
  6. package/dist/engine/mcp-config/mcp-config-writer.d.ts +1 -0
  7. package/dist/engine/mcp-config/mcp-config-writer.js +11 -0
  8. package/dist/engine/spec-format/bdd-parser.d.ts +2 -0
  9. package/dist/engine/spec-format/bdd-parser.js +70 -4
  10. package/dist/engine/validator/analyzer.d.ts +0 -9
  11. package/dist/engine/validator/analyzer.js +33 -9
  12. package/dist/engine/validator/blast-radius-gate.js +86 -1
  13. package/dist/engine/validator/deep-code-checker.js +2 -5
  14. package/dist/engine/validator/negative-predicate.d.ts +18 -0
  15. package/dist/engine/validator/negative-predicate.js +240 -0
  16. package/dist/engine/validator/spec-compliance-runner.js +17 -2
  17. package/dist/storage/runtime-db.d.ts +1 -1
  18. package/dist/storage/runtime-db.js +15 -2
  19. package/dist/tools/create-spec.js +10 -0
  20. package/dist/tools/init-project/handler.js +3 -1
  21. package/dist/tools/jobs/handlers.d.ts +2 -1
  22. package/dist/tools/jobs/handlers.js +17 -3
  23. package/dist/tools/tool-registry/core-tools.js +28 -2
  24. package/dist/tools/update-status/evidence-gate.js +13 -1
  25. package/dist/tools/update-status/transition-guard.js +33 -9
  26. package/dist/tools/validate.js +14 -2
  27. package/dist/types/analysis.d.ts +20 -0
  28. package/dist/types/errors/structured-error.d.ts +1 -1
  29. package/dist/types/plugin-configs.d.ts +4 -0
  30. package/dist/types/spec/inputs.d.ts +14 -0
  31. package/dist/types/validation-evidence.d.ts +3 -1
  32. package/package.json +2 -1
  33. package/planu-plugin.json +1 -1
@@ -327,6 +327,26 @@ export interface DeepCheckResult {
327
327
  expected: number;
328
328
  description: string;
329
329
  }
330
+ export interface TokenAbsenceResult {
331
+ met: boolean;
332
+ unverifiable: boolean;
333
+ evidence: string[];
334
+ }
335
+ export type ProjectEntryStatus = {
336
+ status: 'absent';
337
+ } | {
338
+ status: 'present';
339
+ } | {
340
+ status: 'unverifiable';
341
+ evidence: string;
342
+ };
343
+ export type TokenHitScan = {
344
+ ok: true;
345
+ hits: string[];
346
+ } | {
347
+ ok: false;
348
+ result: TokenAbsenceResult;
349
+ };
330
350
  export interface DeepCheckConfig {
331
351
  pattern: string;
332
352
  scope: string;
@@ -1,4 +1,4 @@
1
- import type { ToolResult } from '../index.js';
1
+ import type { ToolResult } from '../common/primitives.js';
2
2
  export type ToolHandler = (args: Record<string, unknown>, extra?: unknown) => Promise<ToolResult>;
3
3
  export interface StructuredErrorNextAction {
4
4
  tool: string;
@@ -5,6 +5,10 @@ export interface AcGapKeywordGroup {
5
5
  language: string;
6
6
  keywords: string[];
7
7
  }
8
+ export interface NegativePredicatePhraseGroup {
9
+ id: string;
10
+ phrases: string[];
11
+ }
8
12
  export interface CodeQualityThreshold {
9
13
  id: string;
10
14
  language: string;
@@ -2,6 +2,7 @@ import type { ModelTierUsed, SpecStatus, SpecType, SpecScope, SpecTarget, ToolRe
2
2
  import type { Actuals } from '../estimation.js';
3
3
  import type { GlobalConfig } from '../project/config-metrics.js';
4
4
  import type { ProjectKnowledge } from '../project.js';
5
+ import type { StructuredErrorNextAction } from '../errors/structured-error.js';
5
6
  import type { Spec, ChecklistCategory, SpecDiagram, SpecSplitSuggestion, ReconcileChange } from './core.js';
6
7
  export interface ReconciliationInvocationContext {
7
8
  surface: 'local-mcp' | 'http' | 'dashboard' | 'direct' | 'unknown';
@@ -121,6 +122,19 @@ export interface ReadinessGateOutput {
121
122
  /** Warnings collected when force-approved with score < 70. Empty otherwise. */
122
123
  qualityWarnings: string[];
123
124
  }
125
+ export interface GateUnavailableIdentity {
126
+ specId: string;
127
+ projectId: string;
128
+ projectPath?: string;
129
+ }
130
+ export interface ExternalGateBlockedContext {
131
+ error: string;
132
+ message: string;
133
+ retryable: false;
134
+ externalGateBlocked: true;
135
+ originatingCondition: string;
136
+ nextAction: StructuredErrorNextAction;
137
+ }
124
138
  /**
125
139
  * SPEC-780: Output from the format gate check in update_status(approved).
126
140
  * Mirrors ReadinessGateOutput so callers can merge qualityWarnings from both gates.
@@ -1,4 +1,5 @@
1
1
  import type { AbortableProcessOptions, AbortableProcessResult } from './abortable-process.js';
2
+ import type { BuildFreshnessResult } from './build-freshness.js';
2
3
  export declare const VALIDATION_EVIDENCE_SCHEMA_VERSION: '1.0.0';
3
4
  export type ValidationGateCapability = 'typecheck' | 'lint' | 'test-related' | 'test-full' | 'contract' | 'coverage' | 'migration' | 'fault-injection' | 'security' | 'native' | 'website' | 'reproducibility';
4
5
  export type ValidationEvidenceStatus = 'passed' | 'failed' | 'cancelled' | 'invalidated';
@@ -144,13 +145,14 @@ export interface BlastRadiusGateResult {
144
145
  timedOut: boolean;
145
146
  failures: BlastRadiusGateFailure[];
146
147
  integrationImporters: string[];
147
- warningReason: 'integration-importers-skipped' | null;
148
+ warningReason: 'integration-importers-skipped' | 'stale-dist' | null;
148
149
  }
149
150
  export interface RunBlastRadiusGateOptions {
150
151
  timeoutMs: number;
151
152
  integrationTimeoutMs?: number;
152
153
  signal?: AbortSignal;
153
154
  runProcess?: (command: string, args: string[], options: AbortableProcessOptions) => Promise<AbortableProcessResult>;
155
+ checkBuildFreshness?: (distRoot: string) => BuildFreshnessResult;
154
156
  }
155
157
  export type StrictAuditsSkipReason = 'no-strict-scripts' | 'deadline-exceeded';
156
158
  export interface StrictAuditsGateFinding {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "5.7.13",
3
+ "version": "5.7.15",
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",
@@ -83,6 +83,7 @@
83
83
  "audit:i18n": "bash scripts/audit-i18n.sh",
84
84
  "audit:hardcodes": "node scripts/check-hardcodes.mjs",
85
85
  "audit:mutation": "stryker run",
86
+ "audit:test-suite": "bash scripts/test-suite-audit.sh",
86
87
  "setup:protection": "bash scripts/setup-branch-protection.sh",
87
88
  "prepare": "husky || true",
88
89
  "prepublishOnly": "bash scripts/prepublish-guard.sh",
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.7.13",
5
+ "version": "5.7.15",
6
6
  "icon": "assets/plugin/icon.svg",
7
7
  "command": ["npx", "@planu/cli@latest"],
8
8
  "packageName": "@planu/cli",