@captain_z/zsk 1.8.1 → 1.8.3
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/bin.js +184 -1
- package/dist/bin.js.map +1 -1
- package/dist/commands/check.js +259 -12
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.d.ts +11 -0
- package/dist/commands/config.js +132 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/demo.js +2 -2
- package/dist/commands/demo.js.map +1 -1
- package/dist/commands/dispatch.d.ts +11 -0
- package/dist/commands/dispatch.js +69 -0
- package/dist/commands/dispatch.js.map +1 -0
- package/dist/commands/gate.d.ts +11 -0
- package/dist/commands/gate.js +50 -0
- package/dist/commands/gate.js.map +1 -0
- package/dist/commands/prep.d.ts +2 -4
- package/dist/commands/prep.js +1 -131
- package/dist/commands/prep.js.map +1 -1
- package/dist/commands/prepare.d.ts +17 -0
- package/dist/commands/prepare.js +259 -0
- package/dist/commands/prepare.js.map +1 -0
- package/dist/commands/project-init.d.ts +1 -0
- package/dist/commands/project-init.js +12 -10
- package/dist/commands/project-init.js.map +1 -1
- package/dist/commands/template.d.ts +2 -0
- package/dist/commands/template.js +34 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/core/config.d.ts +85 -1
- package/dist/core/config.js +141 -7
- package/dist/core/config.js.map +1 -1
- package/dist/core/origin-detection.d.ts +10 -0
- package/dist/core/origin-detection.js +135 -0
- package/dist/core/origin-detection.js.map +1 -0
- package/dist/core/prepare-lifecycle.d.ts +54 -0
- package/dist/core/prepare-lifecycle.js +302 -0
- package/dist/core/prepare-lifecycle.js.map +1 -0
- package/dist/core/prepare-sync.d.ts +82 -0
- package/dist/core/prepare-sync.js +1514 -0
- package/dist/core/prepare-sync.js.map +1 -0
- package/dist/core/raw-manifest.d.ts +10 -0
- package/dist/core/raw-manifest.js +58 -4
- package/dist/core/raw-manifest.js.map +1 -1
- package/dist/core/source-draft.d.ts +14 -0
- package/dist/core/source-draft.js +251 -0
- package/dist/core/source-draft.js.map +1 -0
- package/dist/core/staffing-plan.d.ts +212 -0
- package/dist/core/staffing-plan.js +1238 -0
- package/dist/core/staffing-plan.js.map +1 -0
- package/dist/core/stage-quality.d.ts +64 -0
- package/dist/core/stage-quality.js +847 -0
- package/dist/core/stage-quality.js.map +1 -0
- package/dist/core/template-registry.d.ts +29 -0
- package/dist/core/template-registry.js +295 -0
- package/dist/core/template-registry.js.map +1 -0
- package/dist/core/workspace-layout.d.ts +3 -0
- package/dist/core/workspace-layout.js +14 -1
- package/dist/core/workspace-layout.js.map +1 -1
- package/package.json +2 -2
- package/schemas/zsk-config.schema.json +233 -196
- package/templates/module/frontend-module/design.md +86 -3
- package/templates/module/frontend-module/proposal.md +17 -0
- package/templates/module/frontend-module/spec.md +26 -0
- package/templates/module/frontend-module/tasks.md +53 -7
- package/templates/project-init/.zsk/config.yaml +8 -96
- package/templates/project-init/.zsk/docs/SYSTEM-SPEC.md +2 -0
- package/templates/project-init/.zsk/raws/index.md +11 -0
- package/templates/project-init/.zsk/raws/prepare/backend/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/design/index.md +3 -0
- package/templates/project-init/.zsk/raws/prepare/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/product/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/qa/index.md +4 -0
- package/templates/project-init/.zsk/raws/prepare/ux/index.md +3 -0
- package/templates/project-init/.zsk/roles.yaml +129 -0
- package/templates/project-init/.zsk/raws/backend/index.md +0 -3
- package/templates/project-init/.zsk/raws/jira/index.md +0 -3
- package/templates/project-init/.zsk/raws/manual/index.md +0 -3
- package/templates/project-init/.zsk/raws/product/index.md +0 -3
- package/templates/project-init/.zsk/raws/qa/index.md +0 -3
- package/templates/project-init/.zsk/raws/ue/index.md +0 -3
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { type ProjectConfig } from "./config.js";
|
|
2
|
+
import { type GateAssessment, type ReviewGateMode } from "./stage-quality.js";
|
|
3
|
+
export type StaffingPlanOptions = {
|
|
4
|
+
stage?: string;
|
|
5
|
+
skill?: string;
|
|
6
|
+
surface?: string;
|
|
7
|
+
runId?: string;
|
|
8
|
+
module?: string;
|
|
9
|
+
issue?: string;
|
|
10
|
+
reviewTarget?: string;
|
|
11
|
+
gateThreshold?: number;
|
|
12
|
+
acceptRisk?: string;
|
|
13
|
+
};
|
|
14
|
+
export type StaffingRole = {
|
|
15
|
+
role: string;
|
|
16
|
+
subagentType: string;
|
|
17
|
+
stage: string;
|
|
18
|
+
skill: string;
|
|
19
|
+
active: boolean;
|
|
20
|
+
route: string;
|
|
21
|
+
activation: string;
|
|
22
|
+
reason: string;
|
|
23
|
+
owns: string[];
|
|
24
|
+
doesNotOwn: string[];
|
|
25
|
+
inputs: string[];
|
|
26
|
+
writeScope: string[];
|
|
27
|
+
outputs: string[];
|
|
28
|
+
evidenceRequired: string[];
|
|
29
|
+
forbiddenDecisions: string[];
|
|
30
|
+
handoffTo: string;
|
|
31
|
+
stopCondition: string;
|
|
32
|
+
mustAskWhen: string[];
|
|
33
|
+
};
|
|
34
|
+
export type StaffingOrchestration = {
|
|
35
|
+
requestedSurface: string;
|
|
36
|
+
selectedSurface: "auto" | "native" | "omx" | "sequential";
|
|
37
|
+
mode: string;
|
|
38
|
+
scale: string;
|
|
39
|
+
dispatchRecommended: boolean;
|
|
40
|
+
laneIndependence: "parallel-capable" | "sequential";
|
|
41
|
+
reason: string;
|
|
42
|
+
fallbackOrder: string[];
|
|
43
|
+
maxParallelLanes: number;
|
|
44
|
+
overDispatchGuards: string[];
|
|
45
|
+
};
|
|
46
|
+
export type StaffingEmitPacket = {
|
|
47
|
+
event: "zsk.subagent.request";
|
|
48
|
+
version: 1;
|
|
49
|
+
payload: {
|
|
50
|
+
runId: string;
|
|
51
|
+
packetId: string;
|
|
52
|
+
stage: string;
|
|
53
|
+
skill: string;
|
|
54
|
+
role: string;
|
|
55
|
+
subagentType: string;
|
|
56
|
+
active: boolean;
|
|
57
|
+
route: string;
|
|
58
|
+
activation: string;
|
|
59
|
+
prompt: string;
|
|
60
|
+
inputs: string[];
|
|
61
|
+
writeScope: string[];
|
|
62
|
+
outputs: string[];
|
|
63
|
+
evidenceRequired: string[];
|
|
64
|
+
forbiddenDecisions: string[];
|
|
65
|
+
handoffTo: string;
|
|
66
|
+
stopCondition: string;
|
|
67
|
+
constraints: string[];
|
|
68
|
+
durability: {
|
|
69
|
+
ledgerPath: string;
|
|
70
|
+
statusPath: string;
|
|
71
|
+
status: "pending";
|
|
72
|
+
attempt: number;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
heartbeatIntervalMs: number;
|
|
75
|
+
staleAfterMs: number;
|
|
76
|
+
deadlineAt: string;
|
|
77
|
+
maxAttempts: number;
|
|
78
|
+
onTimeout: "fallback-to-leader-sequential";
|
|
79
|
+
resumeHint: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type StaffingPacketStatus = {
|
|
84
|
+
packetId: string;
|
|
85
|
+
runId: string;
|
|
86
|
+
stage: string;
|
|
87
|
+
skill: string;
|
|
88
|
+
role: string;
|
|
89
|
+
subagentType: string;
|
|
90
|
+
route: string;
|
|
91
|
+
status: "pending" | "running" | "completed" | "blocked" | "failed" | "waived" | "stale";
|
|
92
|
+
attempt: number;
|
|
93
|
+
createdAt: string;
|
|
94
|
+
updatedAt: string;
|
|
95
|
+
lastHeartbeatAt: string;
|
|
96
|
+
deadlineAt: string;
|
|
97
|
+
staleAfterMs: number;
|
|
98
|
+
maxAttempts: number;
|
|
99
|
+
fallbackRoute: "leader-sequential";
|
|
100
|
+
statusPath: string;
|
|
101
|
+
evidence: string[];
|
|
102
|
+
blocker?: string;
|
|
103
|
+
};
|
|
104
|
+
export type StaffingEmitLedger = {
|
|
105
|
+
version: 1;
|
|
106
|
+
runId: string;
|
|
107
|
+
stage: string;
|
|
108
|
+
skill: string;
|
|
109
|
+
ledgerPath: string;
|
|
110
|
+
packetStatusDir: string;
|
|
111
|
+
timeoutPolicy: {
|
|
112
|
+
heartbeatIntervalMs: number;
|
|
113
|
+
staleAfterMs: number;
|
|
114
|
+
maxAttempts: number;
|
|
115
|
+
onTimeout: "fallback-to-leader-sequential";
|
|
116
|
+
};
|
|
117
|
+
packets: StaffingPacketStatus[];
|
|
118
|
+
};
|
|
119
|
+
export type StaffingStageGate = {
|
|
120
|
+
runId: string;
|
|
121
|
+
stage: string;
|
|
122
|
+
module?: string;
|
|
123
|
+
reviewTarget?: string;
|
|
124
|
+
reviewMode?: ReviewGateMode;
|
|
125
|
+
status: GateAssessment["status"];
|
|
126
|
+
decision: GateAssessment["decision"];
|
|
127
|
+
score: number;
|
|
128
|
+
threshold: number;
|
|
129
|
+
blockers: string[];
|
|
130
|
+
gaps: string[];
|
|
131
|
+
assessmentPath: string;
|
|
132
|
+
markdownPath: string;
|
|
133
|
+
waiverPath?: string;
|
|
134
|
+
};
|
|
135
|
+
export type StaffingPlan = {
|
|
136
|
+
runId: string;
|
|
137
|
+
stage: string;
|
|
138
|
+
skill: string;
|
|
139
|
+
module?: string;
|
|
140
|
+
reviewTarget?: string;
|
|
141
|
+
reviewMode?: ReviewGateMode;
|
|
142
|
+
surface: string;
|
|
143
|
+
stageGate?: StaffingStageGate;
|
|
144
|
+
orchestration: StaffingOrchestration;
|
|
145
|
+
uncertaintyPolicy: string[];
|
|
146
|
+
roles: StaffingRole[];
|
|
147
|
+
emitPackets: StaffingEmitPacket[];
|
|
148
|
+
};
|
|
149
|
+
export type StaffingPlanArtifacts = {
|
|
150
|
+
runId: string;
|
|
151
|
+
dir: string;
|
|
152
|
+
jsonPath: string;
|
|
153
|
+
markdownPath: string;
|
|
154
|
+
emitPath: string;
|
|
155
|
+
ledgerPath: string;
|
|
156
|
+
packetStatusDir: string;
|
|
157
|
+
};
|
|
158
|
+
export type StaffingPlanBundle = {
|
|
159
|
+
artifacts: StaffingPlanArtifacts;
|
|
160
|
+
plan: StaffingPlan;
|
|
161
|
+
markdown: string;
|
|
162
|
+
emitJsonl: string;
|
|
163
|
+
ledger: StaffingEmitLedger;
|
|
164
|
+
};
|
|
165
|
+
export type StaffingInspectOptions = {
|
|
166
|
+
runId?: string;
|
|
167
|
+
now?: Date;
|
|
168
|
+
};
|
|
169
|
+
export type StaffingInspectResult = {
|
|
170
|
+
runId: string;
|
|
171
|
+
ledgerPath: string;
|
|
172
|
+
total: number;
|
|
173
|
+
stale: number;
|
|
174
|
+
pending: number;
|
|
175
|
+
running: number;
|
|
176
|
+
completed: number;
|
|
177
|
+
blocked: number;
|
|
178
|
+
failed: number;
|
|
179
|
+
waived: number;
|
|
180
|
+
};
|
|
181
|
+
type RoleContract = {
|
|
182
|
+
owns: string[];
|
|
183
|
+
doesNotOwn: string[];
|
|
184
|
+
outputs: string[];
|
|
185
|
+
evidenceRequired: string[];
|
|
186
|
+
forbiddenDecisions: string[];
|
|
187
|
+
stopCondition: string;
|
|
188
|
+
};
|
|
189
|
+
type RolePoolRole = {
|
|
190
|
+
role: string;
|
|
191
|
+
subagentType?: string;
|
|
192
|
+
reason?: string;
|
|
193
|
+
stages: string[];
|
|
194
|
+
skills: string[];
|
|
195
|
+
lanes: string[];
|
|
196
|
+
required: boolean;
|
|
197
|
+
remoteSources: boolean;
|
|
198
|
+
activation?: string;
|
|
199
|
+
extraInputs: string[];
|
|
200
|
+
writeScope: string[];
|
|
201
|
+
outputs: string[];
|
|
202
|
+
evidenceRequired: string[];
|
|
203
|
+
contract?: Partial<RoleContract>;
|
|
204
|
+
};
|
|
205
|
+
type RolePool = {
|
|
206
|
+
roles: Record<string, RolePoolRole>;
|
|
207
|
+
};
|
|
208
|
+
export declare function writeStaffingPlan(target: string, config: ProjectConfig, opts?: StaffingPlanOptions): Promise<StaffingPlanBundle>;
|
|
209
|
+
export declare function buildStaffingPlan(target: string, config: ProjectConfig, opts?: StaffingPlanOptions, rolePool?: RolePool): StaffingPlanBundle;
|
|
210
|
+
export declare function inspectStaffingRun(target: string, config: ProjectConfig, opts?: StaffingInspectOptions): Promise<StaffingInspectResult>;
|
|
211
|
+
export declare function createStaffingRunId(now?: Date): string;
|
|
212
|
+
export {};
|