@planu/cli 4.3.4 → 4.3.6

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 (55) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/config/license-plans.json +2 -0
  3. package/dist/engine/ai-cost-estimator/core.d.ts +1 -1
  4. package/dist/engine/ai-cost-estimator/core.js +2 -2
  5. package/dist/engine/ai-cost-estimator/spec-loader.d.ts +2 -2
  6. package/dist/engine/ai-cost-estimator/spec-loader.js +17 -46
  7. package/dist/engine/ai-cost-estimator/token-estimator.d.ts +1 -1
  8. package/dist/engine/ai-cost-estimator/token-estimator.js +1 -1
  9. package/dist/engine/code-graph-configurator.d.ts +1 -1
  10. package/dist/engine/code-graph-configurator.js +7 -0
  11. package/dist/engine/context-intelligence/compression-guards.d.ts +8 -0
  12. package/dist/engine/context-intelligence/compression-guards.js +74 -0
  13. package/dist/engine/context-intelligence/context-graph-provider.d.ts +9 -0
  14. package/dist/engine/context-intelligence/context-graph-provider.js +98 -0
  15. package/dist/engine/context-intelligence/eval-harness.d.ts +8 -0
  16. package/dist/engine/context-intelligence/eval-harness.js +45 -0
  17. package/dist/engine/context-intelligence/impact-map.d.ts +6 -0
  18. package/dist/engine/context-intelligence/impact-map.js +47 -0
  19. package/dist/engine/context-intelligence/index.d.ts +7 -0
  20. package/dist/engine/context-intelligence/index.js +6 -0
  21. package/dist/engine/context-intelligence/safe-context-compressor.d.ts +3 -0
  22. package/dist/engine/context-intelligence/safe-context-compressor.js +75 -0
  23. package/dist/engine/dashboard/data-loader.js +9 -11
  24. package/dist/engine/dashboard/templates-project.d.ts +1 -1
  25. package/dist/engine/dashboard/templates-project.js +6 -4
  26. package/dist/engine/docs-site-generator/index.js +2 -11
  27. package/dist/engine/drift-monitor.js +13 -11
  28. package/dist/engine/qa-gate.js +6 -1
  29. package/dist/engine/readiness-checker.js +3 -3
  30. package/dist/engine/spec-conflict-graph.d.ts +1 -1
  31. package/dist/engine/spec-conflict-graph.js +2 -3
  32. package/dist/engine/spec-format/read-technical-section.d.ts +1 -7
  33. package/dist/engine/spec-format/read-technical-section.js +4 -30
  34. package/dist/engine/spec-registry/scorer.d.ts +1 -1
  35. package/dist/engine/spec-registry/scorer.js +3 -4
  36. package/dist/engine/validator/extractors.js +4 -2
  37. package/dist/engine/validator.d.ts +1 -1
  38. package/dist/engine/validator.js +40 -2
  39. package/dist/tools/code-graph-handler.js +4 -0
  40. package/dist/tools/create-spec/post-creation.d.ts +2 -0
  41. package/dist/tools/create-spec/post-creation.js +5 -0
  42. package/dist/tools/create-spec.js +2 -2
  43. package/dist/tools/license-gate.js +6 -1
  44. package/dist/tools/output-integrity-guard.d.ts +11 -0
  45. package/dist/tools/output-integrity-guard.js +53 -0
  46. package/dist/tools/register-sdd-tools.d.ts +1 -1
  47. package/dist/tools/register-sdd-tools.js +2 -0
  48. package/dist/tools/safe-handler.js +11 -9
  49. package/dist/tools/tool-registry/group-infra.js +26 -0
  50. package/dist/tools/update-status/dod-gates.js +1 -1
  51. package/dist/types/code-graph-integration.d.ts +2 -2
  52. package/dist/types/context-intelligence.d.ts +61 -0
  53. package/dist/types/context-intelligence.js +2 -0
  54. package/dist/types/qa-gate.d.ts +1 -1
  55. package/package.json +9 -9
@@ -71,6 +71,8 @@ import { handleAuditClaudeConfig } from '../audit-claude-config.js';
71
71
  import { handleGenerateDocsSite } from '../generate-docs-site.js';
72
72
  // ── Memory config tools (register-memory-config-tools.ts) ────────────────────
73
73
  import { handleConfigureMemory, handleMemoryStatus } from '../memory-config-handler.js';
74
+ // ── Code graph tools (SPEC-376 / SPEC-1060) ─────────────────────────────────
75
+ import { handleConfigureCodeGraph, handleCodeGraphStatus } from '../code-graph-handler.js';
74
76
  // ── Onboarding tools (register-onboarding-tools.ts) ──────────────────────────
75
77
  import { handleStartOnboarding, handleGuidedTour, handleOnboardingChecklist, handleQuickStart, handleOnboardingProgress, } from '../onboarding-handler.js';
76
78
  // ── Docs registry tools (register-docs-registry-tools.ts) ────────────────────
@@ -827,6 +829,30 @@ export function registerInfraGroupTools(server) {
827
829
  projectPath: z.string().describe('Absolute path to the project root directory'),
828
830
  },
829
831
  }, safeLicensed('memory_status', async (args) => handleMemoryStatus(args)));
832
+ // ── Code graph tools ──────────────────────────────────────────────────────
833
+ server.registerTool('configure_code_graph', {
834
+ description: 'Configure a local code graph MCP provider for the project. Supports Colby CodeGraph, CodeGraphContext, Pathfinder, and Axon. Writes the provider entry to .claude.json.',
835
+ annotations: { title: 'Configure Code Graph', readOnlyHint: false },
836
+ inputSchema: {
837
+ projectPath: z.string().min(1).max(4096).describe('Absolute path to the project root'),
838
+ action: z
839
+ .enum([
840
+ 'setup-colby-codegraph',
841
+ 'setup-codegraph-context',
842
+ 'setup-pathfinder',
843
+ 'setup-axon',
844
+ 'status',
845
+ ])
846
+ .describe('setup-colby-codegraph: configure @colbymchenry/codegraph | setup-codegraph-context: configure CodeGraphContext | setup-pathfinder: configure Pathfinder | setup-axon: configure Axon | status: show current provider status'),
847
+ },
848
+ }, safeLicensed('configure_code_graph', async (args) => handleConfigureCodeGraph(args)));
849
+ server.registerTool('code_graph_status', {
850
+ description: 'Returns the current code graph MCP provider status from .claude.json, including the active provider if one is configured.',
851
+ annotations: { title: 'Code Graph Status', readOnlyHint: true },
852
+ inputSchema: {
853
+ projectPath: z.string().min(1).max(4096).describe('Absolute path to the project root'),
854
+ },
855
+ }, safeLicensed('code_graph_status', async (args) => handleCodeGraphStatus(args)));
830
856
  // ── Onboarding tools ───────────────────────────────────────────────────────
831
857
  server.registerTool('start_onboarding', {
832
858
  description: 'Start interactive onboarding for a new project. Generates personalized recommendations based on your role, project type, and team size. Returns a markdown guide with next steps.',
@@ -525,7 +525,7 @@ export async function checkQaGate(specId, projectPath, force) {
525
525
  error: 'qa_gate_not_passed',
526
526
  code: 422,
527
527
  context: { specId, reason },
528
- fixHint: 'Run typecheck + test:coverage, record the result, then retry update_status(done). Or use force:true to bypass.',
528
+ fixHint: 'Run the QA gate and record the result: typecheck + test by default, or typecheck + test:coverage when the spec declares a coverage threshold. Then retry update_status(done). Or use force:true to bypass.',
529
529
  },
530
530
  };
531
531
  }
@@ -1,5 +1,5 @@
1
- export type CodeGraphProvider = 'codegraph-context' | 'pathfinder' | 'axon';
2
- export type CodeGraphAction = 'setup-codegraph-context' | 'setup-pathfinder' | 'setup-axon' | 'status';
1
+ export type CodeGraphProvider = 'colby-codegraph' | 'codegraph-context' | 'pathfinder' | 'axon';
2
+ export type CodeGraphAction = 'setup-colby-codegraph' | 'setup-codegraph-context' | 'setup-pathfinder' | 'setup-axon' | 'status';
3
3
  export interface CodeGraphSetupInput {
4
4
  projectPath: string;
5
5
  action: CodeGraphAction;
@@ -0,0 +1,61 @@
1
+ export interface ContextGraphInput {
2
+ projectPath: string;
3
+ specId?: string;
4
+ changedFiles?: string[];
5
+ tokenBudget: number;
6
+ }
7
+ export interface ContextImpactFile {
8
+ path: string;
9
+ reason: string;
10
+ confidence: number;
11
+ }
12
+ export interface ContextImpactSymbol {
13
+ name: string;
14
+ path: string;
15
+ line?: number;
16
+ confidence: number;
17
+ }
18
+ export interface ContextImpactEdge {
19
+ from: string;
20
+ to: string;
21
+ type: 'import' | 'call' | 'test' | 'spec';
22
+ }
23
+ export interface ContextImpactMap {
24
+ files: ContextImpactFile[];
25
+ symbols: ContextImpactSymbol[];
26
+ edges: ContextImpactEdge[];
27
+ truncated: boolean;
28
+ }
29
+ export interface ContextGraphProvider {
30
+ buildImpactMap(input: ContextGraphInput): Promise<ContextImpactMap>;
31
+ }
32
+ export interface SafeCompressionResult {
33
+ ok: boolean;
34
+ originalBytes: number;
35
+ compressedBytes: number;
36
+ refusedReason?: string;
37
+ preservedChecks: string[];
38
+ content?: string;
39
+ }
40
+ export interface SafeContextCompressionInput {
41
+ content: string;
42
+ sourcePath?: string;
43
+ maxBytes?: number;
44
+ flow?: string;
45
+ }
46
+ export interface ContextEvalCase {
47
+ id: string;
48
+ baselineTokens: number;
49
+ specGuidedTokens: number;
50
+ graphGuidedTokens: number;
51
+ leanTokens: number;
52
+ graphLeanTokens: number;
53
+ }
54
+ export type ContextEvalMode = 'baseline' | 'spec-guided' | 'graph-guided' | 'lean' | 'graph+lean';
55
+ export interface ContextEvalResult {
56
+ id: string;
57
+ bestMode: ContextEvalMode;
58
+ savingsVsBaselinePct: number;
59
+ modes: Record<ContextEvalMode, number>;
60
+ }
61
+ //# sourceMappingURL=context-intelligence.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=context-intelligence.js.map
@@ -1,4 +1,4 @@
1
- export type QaCheckName = 'typecheck' | 'test-coverage';
1
+ export type QaCheckName = 'typecheck' | 'test' | 'test-coverage';
2
2
  export interface QaCheckResult {
3
3
  name: QaCheckName;
4
4
  passed: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planu/cli",
3
- "version": "4.3.4",
3
+ "version": "4.3.6",
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.4",
36
- "@planu/core-darwin-x64": "4.3.4",
37
- "@planu/core-linux-arm64-gnu": "4.3.4",
38
- "@planu/core-linux-arm64-musl": "4.3.4",
39
- "@planu/core-linux-x64-gnu": "4.3.4",
40
- "@planu/core-linux-x64-musl": "4.3.4",
41
- "@planu/core-win32-arm64-msvc": "4.3.4",
42
- "@planu/core-win32-x64-msvc": "4.3.4"
35
+ "@planu/core-darwin-arm64": "4.3.6",
36
+ "@planu/core-darwin-x64": "4.3.6",
37
+ "@planu/core-linux-arm64-gnu": "4.3.6",
38
+ "@planu/core-linux-arm64-musl": "4.3.6",
39
+ "@planu/core-linux-x64-gnu": "4.3.6",
40
+ "@planu/core-linux-x64-musl": "4.3.6",
41
+ "@planu/core-win32-arm64-msvc": "4.3.6",
42
+ "@planu/core-win32-x64-msvc": "4.3.6"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=24.0.0"