@felixdotgo/aidlc-kit 0.0.1
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/DEVELOPMENT.md +31 -0
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/assets/.agents/aidlc/conventions.md +68 -0
- package/dist/assets/.agents/aidlc/orchestrator.md +73 -0
- package/dist/assets/.agents/aidlc/phase-build.md +23 -0
- package/dist/assets/.agents/aidlc/phase-clarify.md +22 -0
- package/dist/assets/.agents/aidlc/phase-index.md +14 -0
- package/dist/assets/.agents/aidlc/phase-plan.md +21 -0
- package/dist/assets/.agents/aidlc/phase-wrap.md +16 -0
- package/dist/assets/.agents/aidlc/profiles/generic/profile.json +9 -0
- package/dist/assets/.agents/aidlc/profiles/git-submodules/profile.json +9 -0
- package/dist/assets/.agents/aidlc/profiles/single/profile.json +9 -0
- package/dist/assets/.agents/aidlc/profiles/workspace/profile.json +12 -0
- package/dist/assets/.agents/aidlc/rules/gate-check.md +16 -0
- package/dist/assets/.agents/aidlc/rules/stack-runtime.md +3 -0
- package/dist/assets/.agents/aidlc/schemas/adapter.schema.json +13 -0
- package/dist/assets/.agents/aidlc/schemas/config.schema.json +26 -0
- package/dist/assets/.agents/aidlc/schemas/manifest.schema.json +12 -0
- package/dist/assets/.agents/aidlc/schemas/profile.schema.json +12 -0
- package/dist/assets/.agents/aidlc/schemas/state.schema.json +108 -0
- package/dist/assets/.agents/aidlc/scripts/context.mjs +15 -0
- package/dist/assets/.agents/aidlc/scripts/gate-check.mjs +16 -0
- package/dist/assets/.agents/aidlc/scripts/gate-view.mjs +16 -0
- package/dist/assets/.agents/aidlc/scripts/lib/context-runtime.mjs +238 -0
- package/dist/assets/.agents/aidlc/scripts/lib/runtime.mjs +2 -0
- package/dist/assets/.agents/aidlc/scripts/lib/store.mjs +341 -0
- package/dist/assets/.agents/aidlc/scripts/render.mjs +24 -0
- package/dist/assets/.agents/aidlc/scripts/state.mjs +222 -0
- package/dist/assets/.agents/aidlc/scripts/task-next.mjs +27 -0
- package/dist/assets/.agents/aidlc/templates/design.md +15 -0
- package/dist/assets/.agents/aidlc/templates/intent.md +17 -0
- package/dist/assets/.agents/aidlc/templates/lesson.md +28 -0
- package/dist/assets/.agents/aidlc/templates/model-contract.md +41 -0
- package/dist/assets/.agents/aidlc/templates/workplan.md +9 -0
- package/dist/assets/.agents/skills/aidlc-build/SKILL.md +19 -0
- package/dist/assets/.agents/skills/aidlc-clarify/SKILL.md +17 -0
- package/dist/assets/.agents/skills/aidlc-index/SKILL.md +17 -0
- package/dist/assets/.agents/skills/aidlc-plan/SKILL.md +17 -0
- package/dist/assets/.agents/skills/aidlc-wrap/SKILL.md +17 -0
- package/dist/services/aidlc-coordination/Dockerfile +10 -0
- package/dist/services/aidlc-coordination/compose.yaml +25 -0
- package/dist/services/aidlc-coordination/package-lock.json +1154 -0
- package/dist/services/aidlc-coordination/package.json +20 -0
- package/dist/services/aidlc-coordination/src/coordination.mjs +68 -0
- package/dist/services/aidlc-coordination/src/lifecycle-core.mjs +341 -0
- package/dist/services/aidlc-coordination/src/providers.mjs +23 -0
- package/dist/services/aidlc-coordination/src/repository.mjs +203 -0
- package/dist/services/aidlc-coordination/src/server.mjs +49 -0
- package/dist/services/aidlc-coordination/test/repository.test.mjs +211 -0
- package/dist/src/adapters.d.ts +7 -0
- package/dist/src/adapters.js +86 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +192 -0
- package/dist/src/context.d.ts +14 -0
- package/dist/src/context.js +90 -0
- package/dist/src/gate.d.ts +40 -0
- package/dist/src/gate.js +176 -0
- package/dist/src/installer.d.ts +11 -0
- package/dist/src/installer.js +173 -0
- package/dist/src/ledger.d.ts +22 -0
- package/dist/src/ledger.js +119 -0
- package/dist/src/legacy.d.ts +2 -0
- package/dist/src/legacy.js +37 -0
- package/dist/src/managed-content.d.ts +3 -0
- package/dist/src/managed-content.js +16 -0
- package/dist/src/mcp-setup.d.ts +20 -0
- package/dist/src/mcp-setup.js +31 -0
- package/dist/src/model.d.ts +249 -0
- package/dist/src/model.js +1 -0
- package/dist/src/profiles.d.ts +28 -0
- package/dist/src/profiles.js +216 -0
- package/dist/src/project-migration.d.ts +2 -0
- package/dist/src/project-migration.js +144 -0
- package/dist/src/project-path.d.ts +2 -0
- package/dist/src/project-path.js +20 -0
- package/dist/src/state.d.ts +110 -0
- package/dist/src/state.js +764 -0
- package/dist/src/tracker.d.ts +29 -0
- package/dist/src/tracker.js +41 -0
- package/dist/src/upgrade.d.ts +11 -0
- package/dist/src/upgrade.js +270 -0
- package/dist/src/workflow.d.ts +7 -0
- package/dist/src/workflow.js +46 -0
- package/docs/README.md +31 -0
- package/docs/architecture.md +72 -0
- package/docs/command-reference.md +110 -0
- package/docs/configuration.md +72 -0
- package/docs/coordination-service.md +42 -0
- package/docs/development.md +106 -0
- package/docs/operating-workflow.md +87 -0
- package/docs/testing-and-release.md +113 -0
- package/package.json +53 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { AgenticMemoryEntry, AgenticMemoryRegistry, Diagnostic, Gate, HandoffKind, LessonIndex, LessonIndexEntry, LessonRecord, Phase, TaskState, WorkflowState } from "./model.js";
|
|
2
|
+
export declare const statePath: (root: string) => string;
|
|
3
|
+
export declare const lessonIndexPath: (root: string) => string;
|
|
4
|
+
export declare const memoryRegistryPath: (root: string) => string;
|
|
5
|
+
export declare const stateLockPath: (root: string) => string;
|
|
6
|
+
export declare const emptyState: () => WorkflowState;
|
|
7
|
+
export declare const legacyG2WaitSource = "schema-v4-migration";
|
|
8
|
+
export declare const emptyMemoryRegistry: () => AgenticMemoryRegistry;
|
|
9
|
+
export interface StateLockOptions {
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
retryMs?: number;
|
|
12
|
+
staleMs?: number;
|
|
13
|
+
}
|
|
14
|
+
/** Serializes lifecycle script mutations across local Node.js processes. */
|
|
15
|
+
export declare const acquireStateLock: (root: string, options?: StateLockOptions) => (() => void);
|
|
16
|
+
export declare const validateMemoryRegistry: (value: unknown) => AgenticMemoryRegistry;
|
|
17
|
+
export declare const loadMemoryRegistry: (root: string) => AgenticMemoryRegistry;
|
|
18
|
+
export declare const saveMemoryRegistry: (root: string, registry: AgenticMemoryRegistry) => void;
|
|
19
|
+
export declare const selectAgenticMemory: (registry: AgenticMemoryRegistry, areas: string[], phase: Exclude<Phase, "done">, maxChars: number) => AgenticMemoryEntry[];
|
|
20
|
+
export declare const promoteAgenticMemory: (root: string, entry: AgenticMemoryEntry) => AgenticMemoryEntry;
|
|
21
|
+
export declare const retireAgenticMemory: (root: string, id: string, reason: string, retiredBy: string, retiredAt?: string) => AgenticMemoryEntry;
|
|
22
|
+
export declare const validateState: (value: unknown) => WorkflowState;
|
|
23
|
+
/** Marks pre-existing ready G2 waits during migration; the marker is the only exemption from repair-bound enforcement. */
|
|
24
|
+
export declare const stampLegacyG2Waits: (state: WorkflowState) => string[];
|
|
25
|
+
export declare const prepareV4Migration: (value: WorkflowState) => {
|
|
26
|
+
state: WorkflowState;
|
|
27
|
+
records: Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
content: string;
|
|
30
|
+
}>;
|
|
31
|
+
lessonIndex: LessonIndex;
|
|
32
|
+
stamped: string[];
|
|
33
|
+
};
|
|
34
|
+
export declare const migrateState: (root: string, state?: WorkflowState) => {
|
|
35
|
+
migrated: boolean;
|
|
36
|
+
archived: string[];
|
|
37
|
+
stamped: string[];
|
|
38
|
+
};
|
|
39
|
+
export declare const loadState: (root: string) => WorkflowState;
|
|
40
|
+
export declare const loadTask: (root: string, id: string, state?: WorkflowState) => TaskState | undefined;
|
|
41
|
+
export declare const saveState: (root: string, state: WorkflowState) => string[];
|
|
42
|
+
export declare const latestApproval: (task: TaskState, gate: Gate) => import("./model.js").Evidence | undefined;
|
|
43
|
+
export declare const buildBoundary: (task: TaskState) => number | undefined;
|
|
44
|
+
export declare const hasApproval: (task: TaskState, gate: Gate) => boolean;
|
|
45
|
+
export declare const hasCurrentBuildApproval: (task: TaskState, gate: Gate) => boolean;
|
|
46
|
+
export declare const hasAreaVerification: (task: TaskState, area: string) => boolean;
|
|
47
|
+
export declare const hasVerification: (task: TaskState) => boolean;
|
|
48
|
+
export declare const hasReview: (task: TaskState) => boolean;
|
|
49
|
+
export interface RepairBounds {
|
|
50
|
+
verifyFailures: Record<string, number>;
|
|
51
|
+
reviewFailures: number;
|
|
52
|
+
exhaustedAreas: string[];
|
|
53
|
+
verifyExhausted: boolean;
|
|
54
|
+
reviewExhausted: boolean;
|
|
55
|
+
}
|
|
56
|
+
export declare const repairBounds: (task: TaskState) => RepairBounds;
|
|
57
|
+
/** True only for a migration-stamped legacy G2 wait that is still fully ready; the stamp is written exclusively by schema migration. */
|
|
58
|
+
export declare const isLegacyG2Wait: (task: TaskState) => boolean;
|
|
59
|
+
export declare const transitionDiagnostics: (task: TaskState, target: Phase) => Diagnostic[];
|
|
60
|
+
export declare const transitionTask: (state: WorkflowState, id: string, target: Phase) => TaskState;
|
|
61
|
+
export interface NextAction {
|
|
62
|
+
classification: "await_user" | "run_phase" | "blocked" | "terminal" | "complete";
|
|
63
|
+
phase: Phase;
|
|
64
|
+
gate: Gate;
|
|
65
|
+
command?: string;
|
|
66
|
+
outcome?: "closed" | "superseded";
|
|
67
|
+
successorTaskId?: string;
|
|
68
|
+
itemId?: string;
|
|
69
|
+
remainingItems?: number;
|
|
70
|
+
actions?: Array<{
|
|
71
|
+
id: "reopen_g1" | "create_successor" | "supersede" | "close" | "record_handoff" | "resume";
|
|
72
|
+
command: string;
|
|
73
|
+
}>;
|
|
74
|
+
reason: string;
|
|
75
|
+
}
|
|
76
|
+
export declare const nextAction: (task: TaskState, root?: string) => NextAction;
|
|
77
|
+
export declare const handoffTask: (state: WorkflowState, id: string, kind: HandoffKind, reason: string, source: string, recordedAt?: string) => TaskState;
|
|
78
|
+
export declare const closeTask: (state: WorkflowState, id: string, reason: string, source: string, recordedAt?: string) => TaskState;
|
|
79
|
+
export declare const supersedeTask: (state: WorkflowState, id: string, successorId: string, reason: string, source: string, recordedAt?: string) => TaskState;
|
|
80
|
+
export declare const reopenTask: (state: WorkflowState, id: string, target: "plan", reason: string, source: string, recordedAt?: string) => TaskState;
|
|
81
|
+
export declare const recordLesson: (task: TaskState, lesson: Omit<LessonRecord, "taskId" | "recordedAt">, recordedAt?: string) => LessonRecord;
|
|
82
|
+
export declare const recordNoLessons: (task: TaskState, reason: string, source: string, recordedAt?: string) => void;
|
|
83
|
+
export declare const lessonStateDigest: (state: WorkflowState) => string;
|
|
84
|
+
export declare const createLessonIndex: (lessons: LessonRecord[], sourceDigest?: string) => LessonIndex;
|
|
85
|
+
export declare const rebuildLessonIndex: (root: string, state?: WorkflowState) => LessonIndex;
|
|
86
|
+
export declare const searchLessons: (root: string, state: WorkflowState, query: string, areas?: string[], limit?: number) => LessonIndexEntry[];
|
|
87
|
+
export interface TaskSummary {
|
|
88
|
+
id: string;
|
|
89
|
+
title: string;
|
|
90
|
+
phase: Phase;
|
|
91
|
+
gate: Gate;
|
|
92
|
+
status: TaskState["status"];
|
|
93
|
+
risk: TaskState["risk"];
|
|
94
|
+
areas: string[];
|
|
95
|
+
updatedAt: string;
|
|
96
|
+
source: "active" | "archive";
|
|
97
|
+
}
|
|
98
|
+
export declare const listTaskSummaries: (state: WorkflowState, options?: {
|
|
99
|
+
includeArchive?: boolean;
|
|
100
|
+
statuses?: string[];
|
|
101
|
+
query?: string;
|
|
102
|
+
limit?: number;
|
|
103
|
+
cursor?: number;
|
|
104
|
+
}) => {
|
|
105
|
+
items: TaskSummary[];
|
|
106
|
+
nextCursor: string | null;
|
|
107
|
+
total: number;
|
|
108
|
+
};
|
|
109
|
+
export declare const renderWorkplan: (task: TaskState) => string;
|
|
110
|
+
export declare const renderViews: (root: string, state?: WorkflowState, selected?: TaskState[]) => void;
|