@peterxiaoyang/superspec 0.1.38 → 0.1.39
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.js +19 -2
- package/dist/code_review.d.ts +17 -2
- package/dist/code_review.js +471 -80
- package/dist/format.d.ts +46 -4
- package/dist/format.js +311 -26
- package/dist/git_state.d.ts +36 -0
- package/dist/git_state.js +174 -0
- package/dist/job_validity.d.ts +1 -0
- package/dist/job_validity.js +11 -8
- package/dist/next.js +46 -314
- package/dist/phase_plan.d.ts +97 -0
- package/dist/phase_plan.js +582 -0
- package/dist/record.js +56 -7
- package/dist/review.d.ts +3 -2
- package/dist/review.js +64 -32
- package/dist/review_job_gates.js +1 -0
- package/dist/store.d.ts +10 -0
- package/dist/store.js +53 -3
- package/dist/sync.js +5 -5
- package/dist/task.js +87 -9
- package/dist/task_evidence.js +80 -0
- package/dist/transition.d.ts +1 -1
- package/dist/transition.js +301 -210
- package/dist/types.d.ts +77 -1
- package/package.json +1 -1
- package/templates/workflow/prompts/architect.md +17 -27
- package/templates/workflow/prompts/code-reviewer.md +13 -2
- package/templates/workflow/prompts/critic.md +62 -61
- package/templates/workflow/prompts/executor.md +1 -1
- package/templates/workflow/prompts/explore.md +38 -26
- package/templates/workflow/prompts/test-engineer.md +18 -32
- package/templates/workflow/prompts/verifier.md +5 -3
- package/templates/workflow/skills/superspec-apply/SKILL.md +34 -11
- package/templates/workflow/skills/superspec-explore/SKILL.md +65 -64
- package/templates/workflow/skills/superspec-propose/SKILL.md +64 -43
- package/templates/workflow/skills/superspec-review/SKILL.md +1 -1
package/dist/cli.js
CHANGED
|
@@ -514,7 +514,7 @@ async function main(argv) {
|
|
|
514
514
|
|
|
515
515
|
transition 子命令:
|
|
516
516
|
init / explore / sync / next / propose-ready / start-apply
|
|
517
|
-
task-start --task <T> / task-complete --task <T>
|
|
517
|
+
task-start --task <T> / task-complete --task <T> [--input -]
|
|
518
518
|
reopen --to apply --reason <TEXT> [--review-fix <JOB#FINDING>]
|
|
519
519
|
reopen --to propose --reason <TEXT> --review-finding <JOB#FINDING>
|
|
520
520
|
review-ready / accept / archive
|
|
@@ -699,7 +699,24 @@ jobs 子命令:
|
|
|
699
699
|
console.error("task-complete 需要 --task");
|
|
700
700
|
return 1;
|
|
701
701
|
}
|
|
702
|
-
|
|
702
|
+
let inputContent = null;
|
|
703
|
+
if (opts.input) {
|
|
704
|
+
if (opts.input !== "-") {
|
|
705
|
+
console.error("task-complete 只接受 --input -");
|
|
706
|
+
return 1;
|
|
707
|
+
}
|
|
708
|
+
try {
|
|
709
|
+
inputContent = readStdinRecordContent("--input");
|
|
710
|
+
}
|
|
711
|
+
catch (err) {
|
|
712
|
+
if (err instanceof StdinRecordInputError) {
|
|
713
|
+
console.error(err.message);
|
|
714
|
+
return 1;
|
|
715
|
+
}
|
|
716
|
+
throw err;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
const result = taskComplete(projectRoot, change, cr, taskId, inputContent);
|
|
703
720
|
console.log(JSON.stringify(result, null, 2));
|
|
704
721
|
return transitionExitCode(result);
|
|
705
722
|
}
|
package/dist/code_review.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { CodeReviewResultKind, Event, Job, Ref } from "./types.ts";
|
|
1
|
+
import type { CodeReviewResultKind, CodeReviewScope, CodeStateCheck, CoverageExemptionRef, Event, Job, JobPacketContext, Ref } from "./types.ts";
|
|
2
2
|
export declare const CODE_REVIEW_REPAIR_SCOPE_PREFIX = "code_reviewer_report_repair:";
|
|
3
3
|
export declare const CODE_REVIEW_DECISION_SCOPE_PREFIX = "code_review_decision:";
|
|
4
|
+
export declare const TEST_COVERAGE_EXEMPTION_SCOPE_PREFIX = "test_coverage_exemption:";
|
|
4
5
|
export type CodeReviewDecisionAnswer = "reopen_propose" | "reopen_apply" | "dismiss";
|
|
5
6
|
export declare const CODE_REVIEW_DECISION_ANSWER_LABELS: Record<CodeReviewDecisionAnswer, string>;
|
|
6
7
|
export interface CodeChangeScan {
|
|
@@ -8,6 +9,7 @@ export interface CodeChangeScan {
|
|
|
8
9
|
hasCodeChanges: boolean;
|
|
9
10
|
paths: string[];
|
|
10
11
|
reason: string;
|
|
12
|
+
scope?: CodeReviewScope;
|
|
11
13
|
}
|
|
12
14
|
export interface CodeReviewTerminalResult {
|
|
13
15
|
job: Job;
|
|
@@ -42,8 +44,16 @@ export interface CodeReviewGateFacts {
|
|
|
42
44
|
latestRejected: CodeReviewTerminalResult | null;
|
|
43
45
|
consecutiveRejected: number;
|
|
44
46
|
}
|
|
45
|
-
export declare function isCodeLikePath(path: string): boolean;
|
|
46
47
|
export declare function scanCodeChanges(projectRoot: string): CodeChangeScan;
|
|
48
|
+
export declare function currentCodeReviewWorkingPaths(projectRoot: string, events: Event[], extraIgnoredPaths?: string[]): string[];
|
|
49
|
+
export declare function knownCodeReviewReportPaths(projectRoot: string, events: Event[]): Set<string>;
|
|
50
|
+
export declare function selectCodeReviewBase(events: Event[]): {
|
|
51
|
+
base_head: string | null;
|
|
52
|
+
kind: "reviewed" | "start_apply" | "empty_tree" | "history_missing";
|
|
53
|
+
reason: string;
|
|
54
|
+
};
|
|
55
|
+
export declare function scanCodeReviewScope(projectRoot: string, events: Event[]): CodeReviewScope;
|
|
56
|
+
export declare function scanCodeChangesForReview(projectRoot: string, events: Event[]): CodeChangeScan;
|
|
47
57
|
export declare function codeReviewBoundFiles(projectRoot: string, paths: string[]): Ref[];
|
|
48
58
|
export declare function codeReviewJobStaleReason(projectRoot: string, job: Job, currentPaths?: string[]): string | null;
|
|
49
59
|
export declare function codeReviewPacketDigest(input: {
|
|
@@ -52,12 +62,16 @@ export declare function codeReviewPacketDigest(input: {
|
|
|
52
62
|
boundFiles: Ref[];
|
|
53
63
|
checkedDocs: string[];
|
|
54
64
|
created_from_transition: string;
|
|
65
|
+
packet_context?: JobPacketContext;
|
|
55
66
|
previous_rejection?: {
|
|
56
67
|
result_kind: CodeReviewResultKind;
|
|
57
68
|
reason: string;
|
|
58
69
|
job_id: string;
|
|
59
70
|
};
|
|
60
71
|
}): string;
|
|
72
|
+
export declare function codeReviewPacketContext(changeRoot: string, projectRoot: string, scope: CodeReviewScope, events: Event[]): JobPacketContext;
|
|
73
|
+
export declare function effectiveCoverageExemptionRefsFromEvents(events: Event[]): CoverageExemptionRef[];
|
|
74
|
+
export declare function missingCoverageExemptionTestIds(changeRoot: string, events: Event[]): string[];
|
|
61
75
|
export declare function codeReviewDecisionScope(jobId: string, findingId: string): string;
|
|
62
76
|
export declare function isCodeReviewDecisionAnswer(value: unknown): value is CodeReviewDecisionAnswer;
|
|
63
77
|
export declare function codeReviewDecisionAnswerLabel(answer: CodeReviewDecisionAnswer): string;
|
|
@@ -73,3 +87,4 @@ export declare function latestApplyDoneToReviewGate(events: Event[]): {
|
|
|
73
87
|
reason?: string;
|
|
74
88
|
} | null;
|
|
75
89
|
export declare function requiresFinalVerifierForCurrentReview(events: Event[]): boolean;
|
|
90
|
+
export declare function computeCodeStateCheck(projectRoot: string, events: Event[], ignoredCodePaths?: string[]): CodeStateCheck;
|