@planu/cli 5.7.6 → 5.7.7
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 +13 -0
- package/dist/.planu-build.json +1 -1
- package/dist/config/hook-templates/planu-review-panel-trigger.sh +2 -3
- package/dist/config/skill-templates/planu-multi-teammate-review.md +7 -11
- package/dist/engine/evidence-gates/evidence-skeletons.js +3 -1
- package/dist/engine/readiness-checker.js +17 -6
- package/dist/engine/reconcile/propagate-mirrors.js +6 -6
- package/dist/engine/spec-format/lean-spec-generator.js +2 -2
- package/dist/engine/spec-grounding/contract.d.ts +3 -3
- package/dist/engine/spec-grounding/contract.js +23 -76
- package/dist/engine/spec-grounding/grounding-entry-parser.d.ts +5 -0
- package/dist/engine/spec-grounding/grounding-entry-parser.js +185 -0
- package/dist/storage/spec-store.js +8 -1
- package/dist/tools/bump-spec-version.js +5 -5
- package/dist/tools/init-project/skills-multi-teammate-review-writer.js +1 -1
- package/dist/tools/multi-teammate-review.js +1 -14
- package/dist/tools/register-platform-tools/design-stack-tools.js +3 -3
- package/dist/tools/register-spec-tools/analysis-tools.js +22 -9
- package/dist/tools/register-spec-tools/core-spec-tools.js +97 -43
- package/dist/tools/tool-registry/core-tools.js +71 -24
- package/dist/tools/tool-registry/group-quality-compliance.js +11 -14
- package/dist/tools/tool-registry-helpers.js +6 -2
- package/dist/types/spec-grounding.d.ts +14 -0
- package/package.json +1 -1
- package/planu-plugin.json +1 -1
- package/dist/tools/tool-registry/deprecated-stubs.d.ts +0 -19
- package/dist/tools/tool-registry/deprecated-stubs.js +0 -65
|
@@ -3,8 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
import { safeGoverned, safeTracked } from '../safe-handler.js';
|
|
4
4
|
import { projectIdSchema, withProject } from '../tool-registry-helpers.js';
|
|
5
5
|
import { t } from '../../i18n/index.js';
|
|
6
|
-
import { makeDeprecationStub } from './deprecated-stubs.js';
|
|
7
|
-
import { registerFromEntries } from '../tool-entry.js';
|
|
8
6
|
// ── Compliance (register-compliance-tools.ts) ─────────────────────────────────
|
|
9
7
|
import { handleCheckComplianceUnified, handleCheckComplianceLegacyShim, handleComplianceScoreReportShim, handleComplianceGapAnalysisShim, handleVerifySpecComplianceShim, } from '../compliance-unified-handler.js';
|
|
10
8
|
import { handleConfigureCompliance } from '../compliance-handler.js';
|
|
@@ -831,7 +829,7 @@ export function registerQualityComplianceGroupTools(s) {
|
|
|
831
829
|
description: t('tools.check_readiness.description'),
|
|
832
830
|
inputSchema: {
|
|
833
831
|
...projectIdSchema,
|
|
834
|
-
specId: SpecIdSchema.describe('Spec ID to evaluate'),
|
|
832
|
+
specId: SpecIdSchema.describe('Spec ID to evaluate. Must match pattern ^SPEC-\\d+$, max 50 characters.'),
|
|
835
833
|
mode: z
|
|
836
834
|
.enum(['strict', 'lenient'])
|
|
837
835
|
.optional()
|
|
@@ -952,7 +950,7 @@ export function registerQualityComplianceGroupTools(s) {
|
|
|
952
950
|
description: t('tools.package_handoff.description'),
|
|
953
951
|
inputSchema: {
|
|
954
952
|
...projectIdSchema,
|
|
955
|
-
specId: SpecIdSchema.describe('Spec ID to generate handoff package for'),
|
|
953
|
+
specId: SpecIdSchema.describe('Spec ID to generate handoff package for. Must match pattern ^SPEC-\\d+$, max 50 characters.'),
|
|
956
954
|
},
|
|
957
955
|
outputSchema: PackageHandoffOutputSchema,
|
|
958
956
|
annotations: {
|
|
@@ -1049,31 +1047,35 @@ export function registerQualityComplianceGroupTools(s) {
|
|
|
1049
1047
|
description: 'Request changes on a spec. The spec is moved back to draft and prior approvals are cleared. ' +
|
|
1050
1048
|
'A comment explaining the required changes is mandatory.',
|
|
1051
1049
|
inputSchema: {
|
|
1052
|
-
projectPath: z
|
|
1050
|
+
projectPath: z
|
|
1051
|
+
.string()
|
|
1052
|
+
.min(1)
|
|
1053
|
+
.max(4096)
|
|
1054
|
+
.describe('Absolute path to the project root. Max 4096 characters.'),
|
|
1053
1055
|
specId: z
|
|
1054
1056
|
.string()
|
|
1055
1057
|
.min(1)
|
|
1056
1058
|
.max(500)
|
|
1057
|
-
.describe('Spec ID to request changes on (e.g. SPEC-042).'),
|
|
1059
|
+
.describe('Spec ID to request changes on (e.g. SPEC-042). Max 500 characters.'),
|
|
1058
1060
|
reviewer: z
|
|
1059
1061
|
.string()
|
|
1060
1062
|
.trim()
|
|
1061
1063
|
.min(1)
|
|
1062
1064
|
.max(500)
|
|
1063
|
-
.describe('Name, email, or username of the reviewer requesting changes.'),
|
|
1065
|
+
.describe('Name, email, or username of the reviewer requesting changes. Max 500 characters.'),
|
|
1064
1066
|
comment: z
|
|
1065
1067
|
.string()
|
|
1066
1068
|
.trim()
|
|
1067
1069
|
.min(1)
|
|
1068
1070
|
.max(10_000)
|
|
1069
|
-
.describe('Required explanation of what needs to change before re-approval.'),
|
|
1071
|
+
.describe('Required explanation of what needs to change before re-approval. Max 10000 characters.'),
|
|
1070
1072
|
role: z
|
|
1071
1073
|
.string()
|
|
1072
1074
|
.trim()
|
|
1073
1075
|
.min(1)
|
|
1074
1076
|
.max(500)
|
|
1075
1077
|
.optional()
|
|
1076
|
-
.describe('Role of the reviewer (e.g. "tech-lead", "qa").'),
|
|
1078
|
+
.describe('Role of the reviewer (e.g. "tech-lead", "qa"). Max 500 characters.'),
|
|
1077
1079
|
},
|
|
1078
1080
|
annotations: { title: 'Request Changes', destructiveHint: true },
|
|
1079
1081
|
}, safeGoverned('request_changes', (args) => handleRequestChanges(args)));
|
|
@@ -1196,10 +1198,5 @@ export function registerQualityComplianceGroupTools(s) {
|
|
|
1196
1198
|
.describe('Absolute path to the project root. Used to detect language and test framework.'),
|
|
1197
1199
|
},
|
|
1198
1200
|
}, safeTracked('run_mutation_hints', async (args) => handleRunMutationHints({ projectPath: args.projectPath })));
|
|
1199
|
-
// ── SPEC-331: Multi-Agent Orchestration Plan (migrated to skill, SPEC-658) ────
|
|
1200
|
-
// Tool stays registered for backward compat; callers receive a deprecation notice.
|
|
1201
|
-
registerFromEntries(s, [
|
|
1202
|
-
makeDeprecationStub('generate_orchestration_plan', '.claude/skills/parallel-safe.md', 'parallel-safe'),
|
|
1203
|
-
]);
|
|
1204
1201
|
}
|
|
1205
1202
|
//# sourceMappingURL=group-quality-compliance.js.map
|
|
@@ -5,12 +5,16 @@ import { resolveProjectId, missingProjectIdError } from './resolve-project-id.js
|
|
|
5
5
|
// ── Shared schema fragments ──────────────────────────────────────────────────
|
|
6
6
|
/** Standard dual projectId/projectPath optional Zod fields. Spread into inputSchema. */
|
|
7
7
|
export const projectIdSchema = {
|
|
8
|
-
projectId: z
|
|
8
|
+
projectId: z
|
|
9
|
+
.string()
|
|
10
|
+
.max(500)
|
|
11
|
+
.optional()
|
|
12
|
+
.describe('Project ID hash. Prefer projectPath. Max 500 characters.'),
|
|
9
13
|
projectPath: z
|
|
10
14
|
.string()
|
|
11
15
|
.max(4096)
|
|
12
16
|
.optional()
|
|
13
|
-
.describe('Absolute path to project root. Derives projectId automatically.'),
|
|
17
|
+
.describe('Absolute path to project root. Derives projectId automatically. Max 4096 characters.'),
|
|
14
18
|
};
|
|
15
19
|
/**
|
|
16
20
|
* Wraps a handler that requires a resolved projectId.
|
|
@@ -31,4 +31,18 @@ export type FrontmatterYamlOutcome = {
|
|
|
31
31
|
} | {
|
|
32
32
|
parsed: false;
|
|
33
33
|
};
|
|
34
|
+
export interface GroundingParseDiagnostic {
|
|
35
|
+
identifier: string;
|
|
36
|
+
field: string;
|
|
37
|
+
value: string;
|
|
38
|
+
allowed: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface GroundingParseResult<T> {
|
|
41
|
+
records: T[];
|
|
42
|
+
diagnostics: GroundingParseDiagnostic[];
|
|
43
|
+
}
|
|
44
|
+
export interface GroundingEntryOutcome<T> {
|
|
45
|
+
record: T | null;
|
|
46
|
+
diagnostics: GroundingParseDiagnostic[];
|
|
47
|
+
}
|
|
34
48
|
//# sourceMappingURL=spec-grounding.d.ts.map
|
package/package.json
CHANGED
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.
|
|
5
|
+
"version": "5.7.7",
|
|
6
6
|
"icon": "assets/plugin/icon.svg",
|
|
7
7
|
"command": ["npx", "@planu/cli@latest"],
|
|
8
8
|
"packageName": "@planu/cli",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { McpToolEntry } from '../tool-entry.js';
|
|
2
|
-
/** Template for the deprecation message. Interpolated at runtime. */
|
|
3
|
-
export declare const DEPRECATION_MESSAGE_TEMPLATE = "This tool has been migrated to a skill. Use the {skill} skill instead: {path}";
|
|
4
|
-
/**
|
|
5
|
-
* The 5 MCP tool names that have been migrated to skills.
|
|
6
|
-
* Used in smoke tests (Scenario 6) and anywhere a guard on migrated tools is needed.
|
|
7
|
-
*/
|
|
8
|
-
export declare const DEPRECATED_TOOLS: readonly ['execute_sdd_flow', 'implement_plan', 'multi_teammate_review', 'run_healing_loop', 'generate_orchestration_plan'];
|
|
9
|
-
export type DeprecatedToolName = (typeof DEPRECATED_TOOLS)[number];
|
|
10
|
-
/**
|
|
11
|
-
* Create a McpToolEntry-compatible deprecation stub.
|
|
12
|
-
*
|
|
13
|
-
* - Tool stays registered → callers never see "unknown tool".
|
|
14
|
-
* - Description starts with `[Deprecated]` → LLMs stop calling it.
|
|
15
|
-
* - Handler always returns success (no `isError`) regardless of input.
|
|
16
|
-
* - One stderr warning per process per tool (deduped).
|
|
17
|
-
*/
|
|
18
|
-
export declare function makeDeprecationStub(toolName: string, replacementSkillPath: string, replacementSkillName: string): McpToolEntry;
|
|
19
|
-
//# sourceMappingURL=deprecated-stubs.d.ts.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// tools/tool-registry/deprecated-stubs.ts — Shared factory for MCP deprecation stubs (SPEC-658).
|
|
2
|
-
//
|
|
3
|
-
// Tools migrated to skills stay registered so callers receive a helpful message
|
|
4
|
-
// instead of "unknown tool". The stub handler never throws and always returns
|
|
5
|
-
// HTTP 200 with a plain-text deprecation notice.
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
import { compactResult } from '../output-formatter.js';
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
// Constants
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
/** Template for the deprecation message. Interpolated at runtime. */
|
|
12
|
-
export const DEPRECATION_MESSAGE_TEMPLATE = 'This tool has been migrated to a skill. Use the {skill} skill instead: {path}';
|
|
13
|
-
/**
|
|
14
|
-
* The 5 MCP tool names that have been migrated to skills.
|
|
15
|
-
* Used in smoke tests (Scenario 6) and anywhere a guard on migrated tools is needed.
|
|
16
|
-
*/
|
|
17
|
-
export const DEPRECATED_TOOLS = [
|
|
18
|
-
'execute_sdd_flow',
|
|
19
|
-
'implement_plan',
|
|
20
|
-
'multi_teammate_review',
|
|
21
|
-
'run_healing_loop',
|
|
22
|
-
'generate_orchestration_plan',
|
|
23
|
-
];
|
|
24
|
-
// ---------------------------------------------------------------------------
|
|
25
|
-
// Per-process warning dedup (one stderr line per tool name per process)
|
|
26
|
-
// ---------------------------------------------------------------------------
|
|
27
|
-
const _warned = new Set();
|
|
28
|
-
function warnOnce(toolName, skillPath) {
|
|
29
|
-
if (!_warned.has(toolName)) {
|
|
30
|
-
_warned.add(toolName);
|
|
31
|
-
process.stderr.write(`[planu] DEPRECATION: MCP tool "${toolName}" has been migrated to skill "${skillPath}". ` +
|
|
32
|
-
'Update callers to use the skill directly.\n');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
// ---------------------------------------------------------------------------
|
|
36
|
-
// Factory
|
|
37
|
-
// ---------------------------------------------------------------------------
|
|
38
|
-
/**
|
|
39
|
-
* Create a McpToolEntry-compatible deprecation stub.
|
|
40
|
-
*
|
|
41
|
-
* - Tool stays registered → callers never see "unknown tool".
|
|
42
|
-
* - Description starts with `[Deprecated]` → LLMs stop calling it.
|
|
43
|
-
* - Handler always returns success (no `isError`) regardless of input.
|
|
44
|
-
* - One stderr warning per process per tool (deduped).
|
|
45
|
-
*/
|
|
46
|
-
export function makeDeprecationStub(toolName, replacementSkillPath, replacementSkillName) {
|
|
47
|
-
const message = DEPRECATION_MESSAGE_TEMPLATE.replace('{skill}', replacementSkillName).replace('{path}', replacementSkillPath);
|
|
48
|
-
return {
|
|
49
|
-
name: toolName,
|
|
50
|
-
description: `[Deprecated] Migrated to ${replacementSkillName} skill. See ${replacementSkillPath}`,
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
52
|
-
schema: z.object({}).passthrough().shape,
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
-
handler: (_args) => {
|
|
55
|
-
warnOnce(toolName, replacementSkillPath);
|
|
56
|
-
return Promise.resolve(compactResult(message));
|
|
57
|
-
},
|
|
58
|
-
annotations: {
|
|
59
|
-
readOnlyHint: true,
|
|
60
|
-
title: `[Deprecated] ${toolName}`,
|
|
61
|
-
},
|
|
62
|
-
wrap: 'safe',
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=deprecated-stubs.js.map
|