@difflab/pi 0.3.0-rc.202609200047.ac3661a → 0.3.0
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/README.md +2 -22
- package/agents/diffpi-orchestrator.md +0 -10
- package/agents/diffpi-worker.md +1 -9
- package/dist/commands/index.d.ts +0 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/review.d.ts.map +1 -1
- package/dist/environment.d.ts.map +1 -1
- package/dist/extensions/index.js +844 -2773
- package/dist/extensions/zedx.d.ts +0 -2
- package/dist/extensions/zedx.d.ts.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +128 -1140
- package/dist/setup.d.ts.map +1 -1
- package/dist/store.d.ts +0 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +678 -2400
- package/package.json +1 -4
- package/agents/diffpi-planner.md +0 -30
- package/dist/cli/plan.d.ts +0 -7
- package/dist/cli/plan.d.ts.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -729
- package/dist/commands/background.d.ts +0 -39
- package/dist/commands/background.d.ts.map +0 -1
- package/dist/commands/plan.d.ts +0 -21
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/plan/annotations.d.ts +0 -25
- package/dist/plan/annotations.d.ts.map +0 -1
- package/dist/plan/escalation.d.ts +0 -4
- package/dist/plan/escalation.d.ts.map +0 -1
- package/dist/plan/execution.d.ts +0 -19
- package/dist/plan/execution.d.ts.map +0 -1
- package/dist/plan/index.d.ts +0 -15
- package/dist/plan/index.d.ts.map +0 -1
- package/dist/plan/lock.d.ts +0 -7
- package/dist/plan/lock.d.ts.map +0 -1
- package/dist/plan/log.d.ts +0 -5
- package/dist/plan/log.d.ts.map +0 -1
- package/dist/plan/markdown.d.ts +0 -6
- package/dist/plan/markdown.d.ts.map +0 -1
- package/dist/plan/store.d.ts +0 -34
- package/dist/plan/store.d.ts.map +0 -1
- package/dist/plan/transitions.d.ts +0 -9
- package/dist/plan/transitions.d.ts.map +0 -1
- package/dist/plan/types.d.ts +0 -146
- package/dist/plan/types.d.ts.map +0 -1
- package/dist/tools/plan.d.ts +0 -6
- package/dist/tools/plan.d.ts.map +0 -1
- package/skills/plan/SKILL.md +0 -13
- package/skills/plan/references/workflows/annotate.md +0 -6
- package/skills/plan/references/workflows/finalize.md +0 -7
- package/skills/plan/references/workflows/go.md +0 -7
- package/skills/plan/references/workflows/help.md +0 -13
- package/skills/plan/references/workflows/init.md +0 -6
- package/skills/plan/references/workflows/new.md +0 -7
- package/skills/plan/references/workflows/update.md +0 -7
- package/templates/plan/PLAN.md +0 -38
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
2
|
-
export interface BackgroundPacketLimits {
|
|
3
|
-
maxMessages?: number;
|
|
4
|
-
maxBytes?: number;
|
|
5
|
-
retentionMs?: number;
|
|
6
|
-
}
|
|
7
|
-
export interface BackgroundPacketPayload {
|
|
8
|
-
version: 1;
|
|
9
|
-
command: Record<string, unknown>;
|
|
10
|
-
cwd: string;
|
|
11
|
-
branch: string;
|
|
12
|
-
conversation: Array<{
|
|
13
|
-
role: 'user' | 'assistant';
|
|
14
|
-
text: string;
|
|
15
|
-
}>;
|
|
16
|
-
createdAt: string;
|
|
17
|
-
}
|
|
18
|
-
export interface LaunchBackgroundPiOptions {
|
|
19
|
-
name: string;
|
|
20
|
-
agentPath: string;
|
|
21
|
-
model: string;
|
|
22
|
-
thinking: string;
|
|
23
|
-
cwd: string;
|
|
24
|
-
prompt: string;
|
|
25
|
-
packetPath?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare function launchBackgroundPi(pi: Pick<ExtensionAPI, 'sendUserMessage'>, options: LaunchBackgroundPiOptions): Promise<{
|
|
28
|
-
name: string;
|
|
29
|
-
command: string;
|
|
30
|
-
queued: true;
|
|
31
|
-
}>;
|
|
32
|
-
export declare function createBackgroundPacket(cwd: string, payload: Omit<BackgroundPacketPayload, 'version' | 'createdAt'>, limits?: BackgroundPacketLimits): Promise<string>;
|
|
33
|
-
export declare function normalizeConversation(entries: readonly unknown[], maxMessages?: number, maxBytes?: number): Array<{
|
|
34
|
-
role: 'user' | 'assistant';
|
|
35
|
-
text: string;
|
|
36
|
-
}>;
|
|
37
|
-
export declare function shellQuote(value: string): string;
|
|
38
|
-
export declare function shellCommand(args: readonly string[]): string;
|
|
39
|
-
//# sourceMappingURL=background.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../src/commands/background.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAKpE,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,EACzC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,IAAI,CAAA;CAAE,CAAC,CA0B1D;AAED,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,GAAG,WAAW,CAAC,EAC/D,MAAM,GAAE,sBAA2B,GAClC,OAAO,CAAC,MAAM,CAAC,CAajB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,OAAO,EAAE,EAC3B,WAAW,SAAK,EAChB,QAAQ,SAAY,GACnB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBrD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAE5D"}
|
package/dist/commands/plan.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
2
|
-
import type { ModeController } from '../modes';
|
|
3
|
-
type AuthorVerb = 'init' | 'new' | 'update' | 'annotate' | 'finalize' | 'help';
|
|
4
|
-
export type PlanCommandRequest = {
|
|
5
|
-
verb: AuthorVerb;
|
|
6
|
-
plan?: string;
|
|
7
|
-
branch?: string;
|
|
8
|
-
background: boolean;
|
|
9
|
-
instructions: string;
|
|
10
|
-
} | {
|
|
11
|
-
verb: 'go';
|
|
12
|
-
plan: string;
|
|
13
|
-
background: boolean;
|
|
14
|
-
policy?: 'commit-per-phase' | 'no-commit';
|
|
15
|
-
instructions: '';
|
|
16
|
-
};
|
|
17
|
-
export declare function registerPlanCommand(pi: ExtensionAPI, modes: ModeController): void;
|
|
18
|
-
export declare function parsePlanArgs(raw: string): PlanCommandRequest;
|
|
19
|
-
export declare function tokenizePlanArgs(raw: string): string[];
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/commands/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AAItF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAO/C,KAAK,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GAC/F;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAAC;IAAC,YAAY,EAAE,EAAE,CAAA;CAAE,CAAC;AAEnH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAKjF;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAgD7D;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAwBtD"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { PlanAnnotationComment, PlanAnnotationState, PlanRecord } from './types';
|
|
2
|
-
export interface AnnotationProcessResult {
|
|
3
|
-
code: number;
|
|
4
|
-
stdout: string;
|
|
5
|
-
stderr: string;
|
|
6
|
-
}
|
|
7
|
-
export interface PlanAnnotationRuntime {
|
|
8
|
-
execute?: (command: string, args: string[], cwd: string, interactive: boolean) => Promise<AnnotationProcessResult>;
|
|
9
|
-
}
|
|
10
|
-
export declare function annotatePlan(record: PlanRecord, runtime?: PlanAnnotationRuntime): Promise<{
|
|
11
|
-
sessionSlug: string;
|
|
12
|
-
code: number;
|
|
13
|
-
state: PlanAnnotationState;
|
|
14
|
-
}>;
|
|
15
|
-
export declare function readPlanAnnotations(record: PlanRecord, options?: {
|
|
16
|
-
includeApplied?: boolean;
|
|
17
|
-
runtime?: PlanAnnotationRuntime;
|
|
18
|
-
}): Promise<{
|
|
19
|
-
state?: PlanAnnotationState;
|
|
20
|
-
comments: PlanAnnotationComment[];
|
|
21
|
-
pending: PlanAnnotationComment[];
|
|
22
|
-
}>;
|
|
23
|
-
export declare function acknowledgePlanAnnotations(record: PlanRecord, commentIds: readonly string[], summary: string): Promise<PlanAnnotationState>;
|
|
24
|
-
export declare function annotationStatePath(record: PlanRecord): string;
|
|
25
|
-
//# sourceMappingURL=annotations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/plan/annotations.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACpH;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAE,CAAC,CAsB5E;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,qBAAqB,CAAA;CAAO,GAC1E,OAAO,CAAC;IAAE,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAAC,QAAQ,EAAE,qBAAqB,EAAE,CAAC;IAAC,OAAO,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAAC,CAwB/G;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,mBAAmB,CAAC,CAuB9B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAE9D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"escalation.d.ts","sourceRoot":"","sources":["../../src/plan/escalation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAqBjD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAExE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAWxE"}
|
package/dist/plan/execution.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { PlanDocument, PlanExecutionPolicy, PlanPhase, PlanTask } from './types';
|
|
2
|
-
export interface PlanExecutionPacket {
|
|
3
|
-
version: 1;
|
|
4
|
-
planId: string;
|
|
5
|
-
executionId: string;
|
|
6
|
-
policy: PlanExecutionPolicy;
|
|
7
|
-
cwd: string;
|
|
8
|
-
branch: string;
|
|
9
|
-
coordinator: 'worker' | 'orchestrator';
|
|
10
|
-
}
|
|
11
|
-
export declare function createExecutionPacket(plan: PlanDocument, coordinator: PlanExecutionPacket['coordinator']): PlanExecutionPacket;
|
|
12
|
-
export declare function renderExecutionPrompt(packet: PlanExecutionPacket): string;
|
|
13
|
-
export declare function eligiblePlanTasks(plan: PlanDocument): Array<{
|
|
14
|
-
phase: PlanPhase;
|
|
15
|
-
task: PlanTask;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function tasksMayRunInParallel(left: PlanTask, right: PlanTask): boolean;
|
|
18
|
-
export declare function phaseCommitCommand(policy: PlanExecutionPolicy): string | undefined;
|
|
19
|
-
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/plan/execution.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtF,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,QAAQ,GAAG,cAAc,CAAC;CACxC;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,YAAY,EAClB,WAAW,EAAE,mBAAmB,CAAC,aAAa,CAAC,GAC9C,mBAAmB,CAWrB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAEzE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAoBjG;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAI9E;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,GAAG,SAAS,CAElF"}
|
package/dist/plan/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export { acknowledgePlanAnnotations, annotatePlan, annotationStatePath, readPlanAnnotations } from './annotations';
|
|
2
|
-
export { parsePlannerEscalation, renderPlannerEscalation } from './escalation';
|
|
3
|
-
export { createExecutionPacket, eligiblePlanTasks, phaseCommitCommand, renderExecutionPrompt, tasksMayRunInParallel, } from './execution';
|
|
4
|
-
export { appendPlanLog, readPlanLog } from './log';
|
|
5
|
-
export { countDesignWords, parsePlanDocument, renderPlanDocument, validatePlanDocument } from './markdown';
|
|
6
|
-
export { createPlanStore, planRecordName, resolvePlan } from './store';
|
|
7
|
-
export { assertPhaseTransition, assertPlanTransition, assertStableId, assertTaskTransition, isStableId, } from './transitions';
|
|
8
|
-
export { withPlanLock } from './lock';
|
|
9
|
-
export type { AnnotationProcessResult, PlanAnnotationRuntime } from './annotations';
|
|
10
|
-
export type { PlanExecutionPacket } from './execution';
|
|
11
|
-
export type { NewPlanLogEntry } from './log';
|
|
12
|
-
export type { PlanLockOptions } from './lock';
|
|
13
|
-
export type { InitPlanInput, PlanResolution, PlanStore, PlanStoreOptions, ResolvePlanFilters } from './store';
|
|
14
|
-
export type * from './types';
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/plan/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plan/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACnH,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC3G,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,YAAY,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACpF,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,YAAY,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC9G,mBAAmB,SAAS,CAAC"}
|
package/dist/plan/lock.d.ts
DELETED
package/dist/plan/lock.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/plan/lock.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD,wBAAsB,YAAY,CAAC,CAAC,EAClC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,CAAC,CAAC,CA4CZ"}
|
package/dist/plan/log.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { PlanLogEntry } from './types';
|
|
2
|
-
export type NewPlanLogEntry = Omit<PlanLogEntry, 'version' | 'eventId' | 'timestamp'> & Partial<Pick<PlanLogEntry, 'eventId' | 'timestamp'>>;
|
|
3
|
-
export declare function appendPlanLog(logPath: string, event: NewPlanLogEntry): Promise<PlanLogEntry>;
|
|
4
|
-
export declare function readPlanLog(logPath: string): Promise<PlanLogEntry[]>;
|
|
5
|
-
//# sourceMappingURL=log.d.ts.map
|
package/dist/plan/log.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/plan/log.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC,GACnF,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC;AAEvD,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,CASlG;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAkB1E"}
|
package/dist/plan/markdown.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PlanDocument, PlanValidationIssue, PlanValidationOptions } from './types';
|
|
2
|
-
export declare function countDesignWords(plan: PlanDocument): number;
|
|
3
|
-
export declare function validatePlanDocument(plan: PlanDocument, options?: PlanValidationOptions): PlanValidationIssue[];
|
|
4
|
-
export declare function renderPlanDocument(plan: PlanDocument, previousSource?: string): string;
|
|
5
|
-
export declare function parsePlanDocument(source: string, ref?: string): PlanDocument;
|
|
6
|
-
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/plan/markdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAIZ,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAcjB,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAM3D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,GAAE,qBAA0B,GAAG,mBAAmB,EAAE,CAgDnH;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CA2DtF;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAY,GAAG,YAAY,CA6B/E"}
|
package/dist/plan/store.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { appendPlanLog, type NewPlanLogEntry } from './log';
|
|
2
|
-
import type { PlanDocument, PlanRecord, PlanStatus } from './types';
|
|
3
|
-
export interface PlanStoreOptions {
|
|
4
|
-
homeDir?: string;
|
|
5
|
-
now?: () => Date;
|
|
6
|
-
bundledTemplatesDir?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ResolvePlanFilters {
|
|
9
|
-
branch?: string;
|
|
10
|
-
statuses?: readonly PlanStatus[];
|
|
11
|
-
}
|
|
12
|
-
export interface PlanResolution {
|
|
13
|
-
candidates: PlanRecord[];
|
|
14
|
-
record?: PlanRecord;
|
|
15
|
-
ambiguous: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface InitPlanInput {
|
|
18
|
-
cwd: string;
|
|
19
|
-
shortSlug: string;
|
|
20
|
-
branch: string;
|
|
21
|
-
title?: string;
|
|
22
|
-
intent?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface PlanStore {
|
|
25
|
-
context(cwd: string, query?: string, filters?: ResolvePlanFilters): Promise<PlanResolution>;
|
|
26
|
-
init(input: InitPlanInput): Promise<PlanRecord>;
|
|
27
|
-
read(cwd: string, query: string, filters?: ResolvePlanFilters): Promise<PlanRecord>;
|
|
28
|
-
mutate(cwd: string, query: string, operation: string, update: (document: PlanDocument) => PlanDocument | Promise<PlanDocument>): Promise<PlanRecord>;
|
|
29
|
-
log(cwd: string, query: string, event: NewPlanLogEntry): ReturnType<typeof appendPlanLog>;
|
|
30
|
-
}
|
|
31
|
-
export declare function planRecordName(shortSlug: string, date?: Date): string;
|
|
32
|
-
export declare function resolvePlan(cwd: string, query?: string, filters?: ResolvePlanFilters, options?: PlanStoreOptions): Promise<PlanResolution>;
|
|
33
|
-
export declare function createPlanStore(options?: PlanStoreOptions): PlanStore;
|
|
34
|
-
//# sourceMappingURL=store.d.ts.map
|
package/dist/plan/store.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/plan/store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGpE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB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O,GAAE,kBAAuB,EAChC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAqBzB;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,SAAS,CAmFzE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { PlanPhaseStatus, PlanStatus, PlanTask, PlanTaskStatus } from './types';
|
|
2
|
-
export declare const STABLE_ID: RegExp;
|
|
3
|
-
export declare function isStableId(value: string): boolean;
|
|
4
|
-
export declare function assertStableId(value: string, label?: string): void;
|
|
5
|
-
export declare function assertPlanTransition(from: PlanStatus, to: PlanStatus): void;
|
|
6
|
-
export declare function assertPhaseTransition(from: PlanPhaseStatus, to: PlanPhaseStatus): void;
|
|
7
|
-
export declare function assertTaskTransition(task: PlanTask, to: PlanTaskStatus, executionId?: string, actor?: string): void;
|
|
8
|
-
export declare function assertUniqueIds(ids: readonly string[], label: string): void;
|
|
9
|
-
//# sourceMappingURL=transitions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../src/plan/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAErF,eAAO,MAAM,SAAS,QAA+B,CAAC;AAkBtD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAe,GAAG,IAAI,CAExE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,GAAG,IAAI,CAG3E;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,eAAe,GAAG,IAAI,CAGtF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAUnH;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAO3E"}
|
package/dist/plan/types.d.ts
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import type { GateResult } from '../gates';
|
|
2
|
-
export type PlanStatus = 'draft' | 'ready' | 'in_progress' | 'blocked' | 'completed';
|
|
3
|
-
export type PlanPhaseStatus = 'pending' | 'in_progress' | 'blocked' | 'completed' | 'skipped';
|
|
4
|
-
export type PlanTaskStatus = PlanPhaseStatus;
|
|
5
|
-
export type PlanExecutionMode = 'inline' | 'background';
|
|
6
|
-
export type PlanExecutionPolicy = 'commit-per-phase' | 'no-commit';
|
|
7
|
-
export interface PlanDesign {
|
|
8
|
-
bigIdeas: string;
|
|
9
|
-
keyApiUpdates: string;
|
|
10
|
-
consequences: string;
|
|
11
|
-
}
|
|
12
|
-
export interface PlanReference {
|
|
13
|
-
id: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
|
16
|
-
export interface PlanCommit {
|
|
17
|
-
sha: string;
|
|
18
|
-
subject: string;
|
|
19
|
-
completedAt: string;
|
|
20
|
-
}
|
|
21
|
-
export interface PlanBlocker {
|
|
22
|
-
reason: string;
|
|
23
|
-
attempts?: string[];
|
|
24
|
-
evidence?: string[];
|
|
25
|
-
needsUserDecision?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export interface PlanGateState {
|
|
28
|
-
phaseRevision: number;
|
|
29
|
-
status: 'pending' | 'running' | 'passed' | 'failed' | 'stale';
|
|
30
|
-
results: GateResult[];
|
|
31
|
-
completedAt?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface PlanTask {
|
|
34
|
-
id: string;
|
|
35
|
-
revision: number;
|
|
36
|
-
title: string;
|
|
37
|
-
steps?: string[];
|
|
38
|
-
dependencies: string[];
|
|
39
|
-
fileScopes: string[];
|
|
40
|
-
acceptanceCriteria: string[];
|
|
41
|
-
status: PlanTaskStatus;
|
|
42
|
-
owner?: string;
|
|
43
|
-
executionId?: string;
|
|
44
|
-
blocker?: PlanBlocker;
|
|
45
|
-
}
|
|
46
|
-
export interface PlanPhase {
|
|
47
|
-
id: string;
|
|
48
|
-
revision: number;
|
|
49
|
-
title: string;
|
|
50
|
-
objective: string;
|
|
51
|
-
dependencies: string[];
|
|
52
|
-
tasks: PlanTask[];
|
|
53
|
-
status: PlanPhaseStatus;
|
|
54
|
-
gate: PlanGateState;
|
|
55
|
-
commit?: PlanCommit;
|
|
56
|
-
blocker?: PlanBlocker;
|
|
57
|
-
}
|
|
58
|
-
export interface PlanExecution {
|
|
59
|
-
id: string;
|
|
60
|
-
mode: PlanExecutionMode;
|
|
61
|
-
policy: PlanExecutionPolicy;
|
|
62
|
-
cwd: string;
|
|
63
|
-
branch: string;
|
|
64
|
-
baseHead: string;
|
|
65
|
-
actor: string;
|
|
66
|
-
startedAt: string;
|
|
67
|
-
heartbeatAt: string;
|
|
68
|
-
active: boolean;
|
|
69
|
-
}
|
|
70
|
-
export interface PlanDocument {
|
|
71
|
-
schemaVersion: 1;
|
|
72
|
-
id: string;
|
|
73
|
-
revision: number;
|
|
74
|
-
title: string;
|
|
75
|
-
branch: string;
|
|
76
|
-
intent: string;
|
|
77
|
-
requirements: string[];
|
|
78
|
-
design: PlanDesign;
|
|
79
|
-
phases: PlanPhase[];
|
|
80
|
-
references: PlanReference[];
|
|
81
|
-
status: PlanStatus;
|
|
82
|
-
execution?: PlanExecution;
|
|
83
|
-
createdAt: string;
|
|
84
|
-
updatedAt: string;
|
|
85
|
-
}
|
|
86
|
-
export type PlanLogKind = 'created' | 'updated' | 'status' | 'progress' | 'gate' | 'annotation' | 'execution' | 'commit' | 'blocker';
|
|
87
|
-
export interface PlanLogEntry {
|
|
88
|
-
version: 1;
|
|
89
|
-
eventId: string;
|
|
90
|
-
timestamp: string;
|
|
91
|
-
planRevision: number;
|
|
92
|
-
kind: PlanLogKind;
|
|
93
|
-
actor: string;
|
|
94
|
-
message: string;
|
|
95
|
-
executionId?: string;
|
|
96
|
-
phaseId?: string;
|
|
97
|
-
taskId?: string;
|
|
98
|
-
evidence?: string[];
|
|
99
|
-
data?: Record<string, unknown>;
|
|
100
|
-
}
|
|
101
|
-
export interface PlanAnnotationComment {
|
|
102
|
-
id: string;
|
|
103
|
-
body: string;
|
|
104
|
-
file?: string;
|
|
105
|
-
line?: number;
|
|
106
|
-
endLine?: number;
|
|
107
|
-
context?: string;
|
|
108
|
-
stale?: boolean;
|
|
109
|
-
applied: boolean;
|
|
110
|
-
}
|
|
111
|
-
export interface PlanAnnotationState {
|
|
112
|
-
schemaVersion: 1;
|
|
113
|
-
sessionSlug: string;
|
|
114
|
-
updatedAt: string;
|
|
115
|
-
appliedCommentIds: string[];
|
|
116
|
-
}
|
|
117
|
-
export interface PlannerEscalation {
|
|
118
|
-
planId: string;
|
|
119
|
-
executionId: string;
|
|
120
|
-
phaseId: string;
|
|
121
|
-
taskId?: string;
|
|
122
|
-
blocker: string;
|
|
123
|
-
attempts: string[];
|
|
124
|
-
evidence: string[];
|
|
125
|
-
needsUserDecision: boolean;
|
|
126
|
-
}
|
|
127
|
-
export type PlanValidationSeverity = 'error' | 'warning';
|
|
128
|
-
export interface PlanValidationIssue {
|
|
129
|
-
code: string;
|
|
130
|
-
severity: PlanValidationSeverity;
|
|
131
|
-
message: string;
|
|
132
|
-
path?: string;
|
|
133
|
-
}
|
|
134
|
-
export interface PlanValidationOptions {
|
|
135
|
-
strict?: boolean;
|
|
136
|
-
pendingAnnotations?: number;
|
|
137
|
-
}
|
|
138
|
-
export interface PlanRecord {
|
|
139
|
-
id: string;
|
|
140
|
-
dir: string;
|
|
141
|
-
planPath: string;
|
|
142
|
-
logPath: string;
|
|
143
|
-
document: PlanDocument;
|
|
144
|
-
source: string;
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/plan/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plan/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;AACrF,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAC9F,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,YAAY,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG,WAAW,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC9D,OAAO,EAAE,UAAU,EAAE,CAA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OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,CAAC,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,SAAS,CAAC;AACzD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,sBAAsB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/tools/plan.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ExtensionAPI, ToolDefinition } from '@earendil-works/pi-coding-agent';
|
|
2
|
-
import type { ModeController } from '../modes';
|
|
3
|
-
import { type PlanStore } from '../plan';
|
|
4
|
-
export type PlanToolRuntime = Pick<ExtensionAPI, 'sendUserMessage'> & Partial<Pick<ExtensionAPI, 'sendMessage'>>;
|
|
5
|
-
export declare function createPlanTools(pi: PlanToolRuntime, modes: ModeController, store?: PlanStore): readonly ToolDefinition[];
|
|
6
|
-
//# sourceMappingURL=plan.d.ts.map
|
package/dist/tools/plan.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/tools/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAQtG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAiBL,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAgCjB,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,iBAAiB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC;AAEjH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,eAAe,EACnB,KAAK,EAAE,cAAc,EACrB,KAAK,GAAE,SAA6B,GACnC,SAAS,cAAc,EAAE,CAkgB3B"}
|
package/skills/plan/SKILL.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: plan
|
|
3
|
-
description: Create, annotate, validate, update, and execute durable Diffpi plans. Use for /plan workflows, implementation planning, plan annotations, and resumable plan execution.
|
|
4
|
-
allowed-tools: ask_user_question plan_context plan_init plan_update_overview plan_add_phase plan_remove_phase plan_update_phase plan_validate plan_annotate plan_annotations plan_ack_annotations plan_update_status plan_start_execution diffpi_modes_set diffpi_modes_unset
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# plan
|
|
8
|
-
|
|
9
|
-
Parse the first argument as `init`, `new`, `update`, `annotate`, `finalize`, `go`, or `help`. An empty or unknown verb uses [help](references/workflows/help.md). Read and follow `references/workflows/<verb>.md`.
|
|
10
|
-
|
|
11
|
-
`--bg` is handled and removed by the `/plan` extension command. Background workflows never ask questions. They record safe assumptions and return an actionable blocker for unresolved decisions. Foreground workflows use `ask_user_question` for every choice that cannot be derived from the request; never ask in plain chat.
|
|
12
|
-
|
|
13
|
-
Use plan tools for every `PLAN.md`, status, log, gate, and annotation mutation. Do not edit managed plan files directly. Validate after authoring. Preserve stable IDs, user prose, completed evidence, and annotation acknowledgement order.
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# annotate
|
|
2
|
-
|
|
3
|
-
1. Call `plan_context` and require an exact selection.
|
|
4
|
-
2. Call `plan_annotate`; it uses `tuicr --file PLAN.md`, never `-p` or `--path`.
|
|
5
|
-
3. Report the selected plan, session slug, launch result, and copyable fallback command.
|
|
6
|
-
4. Tell the user to run `/plan update <plan-id>` when comments are ready.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# finalize
|
|
2
|
-
|
|
3
|
-
1. Call `plan_context`, then `plan_annotations`. Apply pending comments through the update workflow before finalization.
|
|
4
|
-
2. Call `plan_validate` with `strict: true`. Stop on errors, pending annotations, or Design above 800 words.
|
|
5
|
-
3. Mark the draft ready with `plan_update_status`.
|
|
6
|
-
4. Use one `ask_user_question` call to choose the next action and, when executing now, commit policy. Choices are inline execution, background execution, execute later, or continue planning; commit policy is commit per phase or no commits.
|
|
7
|
-
5. For execute later or continue planning, do not ask for or apply a commit policy. Otherwise call `plan_start_execution` with the selected mode and policy.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# go
|
|
2
|
-
|
|
3
|
-
1. Require a plan slug and call `plan_context`.
|
|
4
|
-
2. Read explicit `--bg`, `--commit`, and `--no-commit` choices already parsed by the command.
|
|
5
|
-
3. If mode or commit policy is missing in foreground mode, use one `ask_user_question` call for only the missing choices. Never silently default.
|
|
6
|
-
4. Background mode never asks. If a required preference is missing, return a blocker with the exact complete command.
|
|
7
|
-
5. Call `plan_start_execution` with inline/background mode and commit-per-phase/no-commit policy. Report the execution ID and whether the foreground mode changed.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# help
|
|
2
|
-
|
|
3
|
-
Use these commands:
|
|
4
|
-
|
|
5
|
-
- `/plan init <short-slug> [--branch <name>]` creates a phase-less draft.
|
|
6
|
-
- `/plan new <short-slug> [--branch <name>] [--bg] [prompt...]` creates and populates a plan.
|
|
7
|
-
- `/plan update [short-slug] [--branch <name>] [--bg] [instructions...]` applies pending annotations before other instructions.
|
|
8
|
-
- `/plan annotate [short-slug]` opens `PLAN.md` with `tuicr --file`.
|
|
9
|
-
- `/plan finalize [short-slug]` validates and marks a plan ready.
|
|
10
|
-
- `/plan go <short-slug> [--commit|--no-commit] [--bg]` starts execution.
|
|
11
|
-
- `/plan help` shows this reference.
|
|
12
|
-
|
|
13
|
-
`--branch` records or filters a branch. It does not create or switch branches. Background workflows do not ask questions.
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# init
|
|
2
|
-
|
|
3
|
-
1. Require one short slug and accept an optional `--branch`.
|
|
4
|
-
2. Call `plan_init` with the explicit intent and title when supplied. The tool creates only `PLAN.md` and `logs.txt`.
|
|
5
|
-
3. Call `plan_annotate` when the annotation launcher is available. Otherwise show its exact fallback command.
|
|
6
|
-
4. Report the plan ID and explain that `/plan update <id>` imports annotations and populates the draft.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# new
|
|
2
|
-
|
|
3
|
-
1. Require a short slug. Call `plan_context`, then `plan_init` if the plan does not exist.
|
|
4
|
-
2. Ground the plan in repository files and the explicit prompt. If no prompt was supplied, use the current conversation or the bounded context packet supplied by the command.
|
|
5
|
-
3. In foreground mode, use `ask_user_question` only for decisions that materially change scope. In background mode, never ask; record safe assumptions and stop with a blocker if ambiguity cannot be resolved.
|
|
6
|
-
4. Use `plan_update_overview`, `plan_add_phase`, and `plan_update_phase`. Give every phase and task a stable ID, dependencies, file scopes, steps, and acceptance criteria. Do not leave research tasks.
|
|
7
|
-
5. Keep Design near 300 words and call `plan_validate`. Leave the result as a draft for annotation or finalization.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# update
|
|
2
|
-
|
|
3
|
-
1. Call `plan_context`. Omit the slug only when exactly one candidate is selected.
|
|
4
|
-
2. Call `plan_annotations` before interpreting prompt instructions.
|
|
5
|
-
3. Apply each unambiguous pending comment, then the explicit instructions, through `plan_update_overview`, `plan_add_phase`, `plan_remove_phase`, or `plan_update_phase`. Preserve stable IDs and completed evidence.
|
|
6
|
-
4. In foreground mode, use `ask_user_question` for unresolved product decisions. In background mode, do not ask; persist and return a blocker.
|
|
7
|
-
5. Call `plan_validate`. Only after successful application, call `plan_ack_annotations` with exactly the applied comment IDs and a concise summary. Failed or partial updates leave unhandled IDs pending.
|
package/templates/plan/PLAN.md
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<!-- diffpi-plan: {"schemaVersion":1,"id":"{{id}}","revision":0,"branch":"{{branch}}","status":"draft","createdAt":"{{created_at}}","updatedAt":"{{updated_at}}"} -->
|
|
2
|
-
|
|
3
|
-
# {{title}}
|
|
4
|
-
|
|
5
|
-
- **Plan ID:** {{id}}
|
|
6
|
-
- **Branch:** {{branch}}
|
|
7
|
-
- **Status:** draft
|
|
8
|
-
- **Revision:** 0
|
|
9
|
-
|
|
10
|
-
## Intent
|
|
11
|
-
|
|
12
|
-
{{intent}}
|
|
13
|
-
|
|
14
|
-
## Requirements
|
|
15
|
-
|
|
16
|
-
<!-- Add requirements. -->
|
|
17
|
-
|
|
18
|
-
## Design
|
|
19
|
-
|
|
20
|
-
### Big Ideas
|
|
21
|
-
|
|
22
|
-
<!-- Describe the main approach. -->
|
|
23
|
-
|
|
24
|
-
### Key API Addition/Updates
|
|
25
|
-
|
|
26
|
-
<!-- Describe public API changes. -->
|
|
27
|
-
|
|
28
|
-
### Consequences
|
|
29
|
-
|
|
30
|
-
<!-- Describe trade-offs and limitations. -->
|
|
31
|
-
|
|
32
|
-
## Implementation
|
|
33
|
-
|
|
34
|
-
<!-- Add phases with plan_add_phase. -->
|
|
35
|
-
|
|
36
|
-
## References
|
|
37
|
-
|
|
38
|
-
<!-- Add references. -->
|