@zhuan-ai/zhuanspec 2.10.0 → 2.11.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/dist/cli/index.js +1 -0
- package/dist/commands/design.d.ts +12 -2
- package/dist/commands/design.js +64 -12
- package/dist/commands/progress.js +11 -0
- package/dist/commands/review.d.ts +1 -0
- package/dist/commands/review.js +13 -0
- package/dist/core/completions/command-registry.js +4 -0
- package/dist/core/hooks/deviation-check.js +42 -0
- package/dist/core/hooks/init.js +21 -4
- package/dist/core/hooks/post-apply.js +2 -0
- package/dist/core/hooks/pre-review.d.ts +27 -0
- package/dist/core/hooks/pre-review.js +169 -0
- package/dist/core/hooks/record-progress.d.ts +25 -0
- package/dist/core/hooks/record-progress.js +88 -1
- package/dist/core/hooks/review-hooks.js +171 -3
- package/dist/core/hooks/review-orchestrator.js +55 -8
- package/dist/core/hooks/tdd-phase-hook.d.ts +59 -0
- package/dist/core/hooks/tdd-phase-hook.js +313 -0
- package/dist/core/init.d.ts +1 -0
- package/dist/core/init.js +27 -0
- package/dist/core/templates/agents-template.d.ts +1 -1
- package/dist/core/templates/agents-template.js +139 -23
- package/dist/core/templates/skill-templates.js +21 -1
- package/dist/core/templates/slash-command-templates.js +129 -49
- package/dist/core/templates/tasks-template.js +89 -0
- package/dist/core/validation/strict-rules.d.ts +47 -0
- package/dist/core/validation/strict-rules.js +589 -42
- package/dist/utils/git-repo-detector.js +1 -1
- package/dist/utils/phase-utils.js +14 -1
- package/package.json +22 -20
|
@@ -15,6 +15,15 @@ export interface StrictValidationResult {
|
|
|
15
15
|
checks: StrictCheckResult[];
|
|
16
16
|
allPassed: boolean;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Rule 0: test-case-inquiry-logged
|
|
20
|
+
*
|
|
21
|
+
* Validates that tasks.md has a "## Test Case Source Log" section with non-empty content.
|
|
22
|
+
* This rule fires UNCONDITIONALLY — whether or not TDD mode is used.
|
|
23
|
+
* The AI must always ask the user about test cases and record the outcome before writing
|
|
24
|
+
* any spec/task content. Absence of this section means the inquiry was skipped.
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkTestCaseInquiryLogged(tasksContent: string): StrictCheckResult;
|
|
18
27
|
/**
|
|
19
28
|
* Rule 1: pre-clarification-completed
|
|
20
29
|
*
|
|
@@ -85,6 +94,25 @@ export declare function checkProposalFormatValid(proposalContent: string): Stric
|
|
|
85
94
|
* 3. If progress.json exists without phase field -> Apply phase (default)
|
|
86
95
|
*/
|
|
87
96
|
export declare function detectPhase(changeDir: string): 'propose' | 'apply' | 'review';
|
|
97
|
+
/** Result of a single code search check */
|
|
98
|
+
interface CodeSearchResult {
|
|
99
|
+
dimension: string;
|
|
100
|
+
keyword: string;
|
|
101
|
+
fileType: string;
|
|
102
|
+
found: boolean;
|
|
103
|
+
matchedFile?: string;
|
|
104
|
+
}
|
|
105
|
+
/** Result for a single scenario's coverage check */
|
|
106
|
+
interface ScenarioResult {
|
|
107
|
+
scenario: string;
|
|
108
|
+
covered: boolean;
|
|
109
|
+
checks: CodeSearchResult[];
|
|
110
|
+
}
|
|
111
|
+
/** Overall consistency result across all scenarios */
|
|
112
|
+
export interface ConsistencyResult {
|
|
113
|
+
scenarios: ScenarioResult[];
|
|
114
|
+
coverageRate: number;
|
|
115
|
+
}
|
|
88
116
|
/**
|
|
89
117
|
* Rule: file-conflict-detection
|
|
90
118
|
*
|
|
@@ -104,6 +132,24 @@ export declare function checkFileConflicts(parsedTasks: ParsedTask[]): StrictChe
|
|
|
104
132
|
* - Column headers must match expected format
|
|
105
133
|
*/
|
|
106
134
|
export declare function checkTestCaseCoverage(tasksContent: string, hasTestCase?: boolean): StrictCheckResult;
|
|
135
|
+
/**
|
|
136
|
+
* Rule: tech-spec-coverage
|
|
137
|
+
*
|
|
138
|
+
* When a tech-spec document exists, validates that the technical spec
|
|
139
|
+
* adequately covers the proposal's requirements.
|
|
140
|
+
* This is a basic framework - full logic will be implemented in Task 7's Skill.
|
|
141
|
+
*
|
|
142
|
+
* Tech spec document lookup order:
|
|
143
|
+
* 1. techDesign/tech-spec.md (standard path)
|
|
144
|
+
* 2. tech-spec.md in the proposal root directory
|
|
145
|
+
* 3. 用户提供本地技术方案路径
|
|
146
|
+
*
|
|
147
|
+
* Checks:
|
|
148
|
+
* - tech-spec.md file exists and is non-empty
|
|
149
|
+
* - tech-spec.md contains substantive content (not just placeholder)
|
|
150
|
+
*/
|
|
151
|
+
export declare function checkTechSpecCoverage(changeDir: string): StrictCheckResult;
|
|
152
|
+
export declare function checkTaskIdFormat(tasksContent: string): StrictCheckResult;
|
|
107
153
|
/**
|
|
108
154
|
* Main entry: Run all strict validation rules
|
|
109
155
|
*/
|
|
@@ -114,4 +160,5 @@ export declare function runStrictValidation(tasksContent: string, parsedTasks: P
|
|
|
114
160
|
changeDir?: string;
|
|
115
161
|
hasTestCase?: boolean;
|
|
116
162
|
}): Promise<StrictValidationResult>;
|
|
163
|
+
export {};
|
|
117
164
|
//# sourceMappingURL=strict-rules.d.ts.map
|