@varveai/adit-plans 0.2.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/LICENSE +21 -0
- package/dist/generator/plan-manager.d.ts +28 -0
- package/dist/generator/plan-manager.d.ts.map +1 -0
- package/dist/generator/plan-manager.js +101 -0
- package/dist/generator/plan-manager.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/intent.d.ts +8 -0
- package/dist/templates/intent.d.ts.map +1 -0
- package/dist/templates/intent.js +42 -0
- package/dist/templates/intent.js.map +1 -0
- package/dist/templates/roadmap.d.ts +6 -0
- package/dist/templates/roadmap.d.ts.map +1 -0
- package/dist/templates/roadmap.js +49 -0
- package/dist/templates/roadmap.js.map +1 -0
- package/dist/templates/task.d.ts +6 -0
- package/dist/templates/task.d.ts.map +1 -0
- package/dist/templates/task.js +41 -0
- package/dist/templates/task.js.map +1 -0
- package/package.json +28 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 vkenliu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan manager — creates and manages SpecFlow artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Plans are stored both as Markdown files in .adit/plans/ and
|
|
5
|
+
* as records in the database for timeline linking and cloud sync.
|
|
6
|
+
*/
|
|
7
|
+
import type Database from "better-sqlite3";
|
|
8
|
+
import { type AditConfig, type AditPlan, type PlanType, type PlanStatus } from "@varveai/adit-core";
|
|
9
|
+
export interface PlanManager {
|
|
10
|
+
/** Create a new intent document */
|
|
11
|
+
createIntent(title: string): AditPlan;
|
|
12
|
+
/** Create a roadmap under an intent */
|
|
13
|
+
createRoadmap(title: string, intentId: string): AditPlan;
|
|
14
|
+
/** Create a task under a roadmap */
|
|
15
|
+
createTask(title: string, roadmapId: string, phase: string): AditPlan;
|
|
16
|
+
/** List all plans of a given type */
|
|
17
|
+
list(planType?: PlanType): AditPlan[];
|
|
18
|
+
/** Get plan by ID */
|
|
19
|
+
get(id: string): AditPlan | null;
|
|
20
|
+
/** Get child plans */
|
|
21
|
+
getChildren(parentId: string): AditPlan[];
|
|
22
|
+
/** Update plan status */
|
|
23
|
+
setStatus(id: string, status: PlanStatus): void;
|
|
24
|
+
/** Get the plans directory path */
|
|
25
|
+
getPlansDir(): string;
|
|
26
|
+
}
|
|
27
|
+
export declare function createPlanManager(db: Database.Database, config: AditConfig): PlanManager;
|
|
28
|
+
//# sourceMappingURL=plan-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-manager.d.ts","sourceRoot":"","sources":["../../src/generator/plan-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EASL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,oBAAoB,CAAC;AAK5B,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEtC,uCAAuC;IACvC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEzD,oCAAoC;IACpC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEtE,qCAAqC;IACrC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;IAEtC,qBAAqB;IACrB,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAAC;IAEjC,sBAAsB;IACtB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAC;IAE1C,yBAAyB;IACzB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAEhD,mCAAmC;IACnC,WAAW,IAAI,MAAM,CAAC;CACvB;AAED,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,QAAQ,CAAC,QAAQ,EACrB,MAAM,EAAE,UAAU,GACjB,WAAW,CAgGb"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan manager — creates and manages SpecFlow artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Plans are stored both as Markdown files in .adit/plans/ and
|
|
5
|
+
* as records in the database for timeline linking and cloud sync.
|
|
6
|
+
*/
|
|
7
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { generateId, createClock, serialize, insertPlan, getPlanById, listPlans, getChildPlans, updatePlanStatus, } from "@varveai/adit-core";
|
|
10
|
+
import { renderIntentTemplate } from "../templates/intent.js";
|
|
11
|
+
import { renderRoadmapTemplate } from "../templates/roadmap.js";
|
|
12
|
+
import { renderTaskTemplate } from "../templates/task.js";
|
|
13
|
+
export function createPlanManager(db, config) {
|
|
14
|
+
const plansDir = join(config.dataDir, "plans");
|
|
15
|
+
mkdirSync(plansDir, { recursive: true });
|
|
16
|
+
return {
|
|
17
|
+
createIntent(title) {
|
|
18
|
+
const id = generateId();
|
|
19
|
+
const content = renderIntentTemplate(title);
|
|
20
|
+
const vclock = serialize(createClock(config.clientId));
|
|
21
|
+
// Write to database
|
|
22
|
+
insertPlan(db, {
|
|
23
|
+
id,
|
|
24
|
+
projectId: config.projectId,
|
|
25
|
+
planType: "intent",
|
|
26
|
+
title,
|
|
27
|
+
contentMd: content,
|
|
28
|
+
vclockJson: vclock,
|
|
29
|
+
});
|
|
30
|
+
// Write markdown file
|
|
31
|
+
const fileName = `intent-${sanitizeFilename(title)}.md`;
|
|
32
|
+
writeFileSync(join(plansDir, fileName), content);
|
|
33
|
+
return getPlanById(db, id);
|
|
34
|
+
},
|
|
35
|
+
createRoadmap(title, intentId) {
|
|
36
|
+
const intent = getPlanById(db, intentId);
|
|
37
|
+
if (!intent)
|
|
38
|
+
throw new Error(`Intent not found: ${intentId}`);
|
|
39
|
+
const id = generateId();
|
|
40
|
+
const content = renderRoadmapTemplate(title, intent.title);
|
|
41
|
+
const vclock = serialize(createClock(config.clientId));
|
|
42
|
+
insertPlan(db, {
|
|
43
|
+
id,
|
|
44
|
+
projectId: config.projectId,
|
|
45
|
+
planType: "roadmap",
|
|
46
|
+
parentPlanId: intentId,
|
|
47
|
+
title,
|
|
48
|
+
contentMd: content,
|
|
49
|
+
vclockJson: vclock,
|
|
50
|
+
});
|
|
51
|
+
const fileName = `roadmap-${sanitizeFilename(title)}.md`;
|
|
52
|
+
writeFileSync(join(plansDir, fileName), content);
|
|
53
|
+
return getPlanById(db, id);
|
|
54
|
+
},
|
|
55
|
+
createTask(title, roadmapId, phase) {
|
|
56
|
+
const roadmap = getPlanById(db, roadmapId);
|
|
57
|
+
if (!roadmap)
|
|
58
|
+
throw new Error(`Roadmap not found: ${roadmapId}`);
|
|
59
|
+
const id = generateId();
|
|
60
|
+
const content = renderTaskTemplate(title, roadmap.title, phase);
|
|
61
|
+
const vclock = serialize(createClock(config.clientId));
|
|
62
|
+
insertPlan(db, {
|
|
63
|
+
id,
|
|
64
|
+
projectId: config.projectId,
|
|
65
|
+
planType: "task",
|
|
66
|
+
parentPlanId: roadmapId,
|
|
67
|
+
title,
|
|
68
|
+
contentMd: content,
|
|
69
|
+
vclockJson: vclock,
|
|
70
|
+
});
|
|
71
|
+
const fileName = `task-${sanitizeFilename(title)}.md`;
|
|
72
|
+
writeFileSync(join(plansDir, fileName), content);
|
|
73
|
+
return getPlanById(db, id);
|
|
74
|
+
},
|
|
75
|
+
list(planType) {
|
|
76
|
+
return listPlans(db, config.projectId, planType);
|
|
77
|
+
},
|
|
78
|
+
get(id) {
|
|
79
|
+
return getPlanById(db, id);
|
|
80
|
+
},
|
|
81
|
+
getChildren(parentId) {
|
|
82
|
+
return getChildPlans(db, parentId);
|
|
83
|
+
},
|
|
84
|
+
setStatus(id, status) {
|
|
85
|
+
const vclock = serialize(createClock(config.clientId));
|
|
86
|
+
updatePlanStatus(db, id, status, vclock);
|
|
87
|
+
},
|
|
88
|
+
getPlansDir() {
|
|
89
|
+
return plansDir;
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/** Sanitize a title for use as a filename */
|
|
94
|
+
function sanitizeFilename(title) {
|
|
95
|
+
return title
|
|
96
|
+
.toLowerCase()
|
|
97
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
98
|
+
.replace(/^-|-$/g, "")
|
|
99
|
+
.substring(0, 50);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=plan-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-manager.js","sourceRoot":"","sources":["../../src/generator/plan-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EACL,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,gBAAgB,GAKjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AA4B1D,MAAM,UAAU,iBAAiB,CAC/B,EAAqB,EACrB,MAAkB;IAElB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzC,OAAO;QACL,YAAY,CAAC,KAAa;YACxB,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC;YACxB,MAAM,OAAO,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC5C,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;YAEvD,oBAAoB;YACpB,UAAU,CAAC,EAAE,EAAE;gBACb,EAAE;gBACF,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,QAAQ,EAAE,QAAQ;gBAClB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AE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC3C,CAAC;QAED,WAAW;YACT,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,6CAA6C;AAC7C,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACtB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @varveai/adit-plans — SpecFlow-inspired plan artifact generator.
|
|
3
|
+
*/
|
|
4
|
+
export { renderIntentTemplate } from "./templates/intent.js";
|
|
5
|
+
export { renderRoadmapTemplate } from "./templates/roadmap.js";
|
|
6
|
+
export { renderTaskTemplate } from "./templates/task.js";
|
|
7
|
+
export { createPlanManager, type PlanManager, } from "./generator/plan-manager.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,6BAA6B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @varveai/adit-plans — SpecFlow-inspired plan artifact generator.
|
|
3
|
+
*/
|
|
4
|
+
export { renderIntentTemplate } from "./templates/intent.js";
|
|
5
|
+
export { renderRoadmapTemplate } from "./templates/roadmap.js";
|
|
6
|
+
export { renderTaskTemplate } from "./templates/task.js";
|
|
7
|
+
export { createPlanManager, } from "./generator/plan-manager.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,iBAAiB,GAElB,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent template — the "What & Why" document.
|
|
3
|
+
*
|
|
4
|
+
* Following SpecFlow methodology: define the vision before writing code.
|
|
5
|
+
*/
|
|
6
|
+
export declare const INTENT_TEMPLATE = "# Intent: {{title}}\n\n## Vision\n<!-- What are you building? One paragraph. -->\n\n\n## Problem\n<!-- What specific problem does this solve? Who experiences it? -->\n\n\n## Success Criteria\n<!-- How will you know this is done? Be specific and measurable. -->\n\n- [ ]\n- [ ]\n- [ ]\n\n## Constraints\n<!-- What are the boundaries? Time, tech stack, compatibility, etc. -->\n\n\n## Non-Goals\n<!-- What are you explicitly NOT doing in this scope? -->\n\n\n## Prior Art\n<!-- What existing solutions have you looked at? What can you learn from them? -->\n\n\n---\n*Created: {{date}}*\n*Status: draft*\n";
|
|
7
|
+
export declare function renderIntentTemplate(title: string): string;
|
|
8
|
+
//# sourceMappingURL=intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../src/templates/intent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,eAAe,+lBAgC3B,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK1D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Intent template — the "What & Why" document.
|
|
3
|
+
*
|
|
4
|
+
* Following SpecFlow methodology: define the vision before writing code.
|
|
5
|
+
*/
|
|
6
|
+
export const INTENT_TEMPLATE = `# Intent: {{title}}
|
|
7
|
+
|
|
8
|
+
## Vision
|
|
9
|
+
<!-- What are you building? One paragraph. -->
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Problem
|
|
13
|
+
<!-- What specific problem does this solve? Who experiences it? -->
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Success Criteria
|
|
17
|
+
<!-- How will you know this is done? Be specific and measurable. -->
|
|
18
|
+
|
|
19
|
+
- [ ]
|
|
20
|
+
- [ ]
|
|
21
|
+
- [ ]
|
|
22
|
+
|
|
23
|
+
## Constraints
|
|
24
|
+
<!-- What are the boundaries? Time, tech stack, compatibility, etc. -->
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Non-Goals
|
|
28
|
+
<!-- What are you explicitly NOT doing in this scope? -->
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Prior Art
|
|
32
|
+
<!-- What existing solutions have you looked at? What can you learn from them? -->
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
*Created: {{date}}*
|
|
37
|
+
*Status: draft*
|
|
38
|
+
`;
|
|
39
|
+
export function renderIntentTemplate(title) {
|
|
40
|
+
return INTENT_TEMPLATE.replace(/\{\{title\}\}/g, title).replace(/\{\{date\}\}/g, new Date().toISOString().substring(0, 10));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intent.js","sourceRoot":"","sources":["../../src/templates/intent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC9B,CAAC;AAEF,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,eAAe,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,OAAO,CAC7D,eAAe,EACf,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roadmap template — breaking vision into phases.
|
|
3
|
+
*/
|
|
4
|
+
export declare const ROADMAP_TEMPLATE = "# Roadmap: {{title}}\n\n*Parent Intent: {{intentTitle}}*\n\n## Phase 1: Foundation\n<!-- Core infrastructure and setup -->\n\n**Goal:**\n**Deliverables:**\n- [ ]\n- [ ]\n\n## Phase 2: Core Features\n<!-- The minimum viable functionality -->\n\n**Goal:**\n**Deliverables:**\n- [ ]\n- [ ]\n\n## Phase 3: Enhancement\n<!-- Polish, optimization, additional features -->\n\n**Goal:**\n**Deliverables:**\n- [ ]\n- [ ]\n\n## Dependencies\n<!-- What must happen before each phase? External dependencies? -->\n\n\n## Risks\n<!-- What could go wrong? What's your mitigation strategy? -->\n\n\n---\n*Created: {{date}}*\n*Status: draft*\n";
|
|
5
|
+
export declare function renderRoadmapTemplate(title: string, intentTitle: string): string;
|
|
6
|
+
//# sourceMappingURL=roadmap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roadmap.d.ts","sourceRoot":"","sources":["../../src/templates/roadmap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,gBAAgB,unBAuC5B,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roadmap template — breaking vision into phases.
|
|
3
|
+
*/
|
|
4
|
+
export const ROADMAP_TEMPLATE = `# Roadmap: {{title}}
|
|
5
|
+
|
|
6
|
+
*Parent Intent: {{intentTitle}}*
|
|
7
|
+
|
|
8
|
+
## Phase 1: Foundation
|
|
9
|
+
<!-- Core infrastructure and setup -->
|
|
10
|
+
|
|
11
|
+
**Goal:**
|
|
12
|
+
**Deliverables:**
|
|
13
|
+
- [ ]
|
|
14
|
+
- [ ]
|
|
15
|
+
|
|
16
|
+
## Phase 2: Core Features
|
|
17
|
+
<!-- The minimum viable functionality -->
|
|
18
|
+
|
|
19
|
+
**Goal:**
|
|
20
|
+
**Deliverables:**
|
|
21
|
+
- [ ]
|
|
22
|
+
- [ ]
|
|
23
|
+
|
|
24
|
+
## Phase 3: Enhancement
|
|
25
|
+
<!-- Polish, optimization, additional features -->
|
|
26
|
+
|
|
27
|
+
**Goal:**
|
|
28
|
+
**Deliverables:**
|
|
29
|
+
- [ ]
|
|
30
|
+
- [ ]
|
|
31
|
+
|
|
32
|
+
## Dependencies
|
|
33
|
+
<!-- What must happen before each phase? External dependencies? -->
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Risks
|
|
37
|
+
<!-- What could go wrong? What's your mitigation strategy? -->
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
*Created: {{date}}*
|
|
42
|
+
*Status: draft*
|
|
43
|
+
`;
|
|
44
|
+
export function renderRoadmapTemplate(title, intentTitle) {
|
|
45
|
+
return ROADMAP_TEMPLATE.replace(/\{\{title\}\}/g, title)
|
|
46
|
+
.replace(/\{\{intentTitle\}\}/g, intentTitle)
|
|
47
|
+
.replace(/\{\{date\}\}/g, new Date().toISOString().substring(0, 10));
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=roadmap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roadmap.js","sourceRoot":"","sources":["../../src/templates/roadmap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC/B,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,KAAa,EACb,WAAmB;IAEnB,OAAO,gBAAgB,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC;SACrD,OAAO,CAAC,sBAAsB,EAAE,WAAW,CAAC;SAC5C,OAAO,CAAC,eAAe,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task template — atomic, completable units of work.
|
|
3
|
+
*/
|
|
4
|
+
export declare const TASK_TEMPLATE = "# Task: {{title}}\n\n*Parent Roadmap: {{roadmapTitle}}*\n*Phase: {{phase}}*\n\n## Description\n<!-- What exactly needs to be done? -->\n\n\n## Acceptance Criteria\n<!-- Specific conditions that must be met for this task to be \"done\" -->\n\n- [ ]\n- [ ]\n\n## Implementation Notes\n<!-- Technical approach, files to modify, APIs to use, etc. -->\n\n\n## Session Log\n<!-- Updated during execution \u2014 link ADIT event IDs here -->\n\n| Session | Event ID | Action | Status |\n|---------|----------|--------|--------|\n| | | | |\n\n---\n*Created: {{date}}*\n*Status: draft*\n*Assigned: human | ai | pair*\n";
|
|
5
|
+
export declare function renderTaskTemplate(title: string, roadmapTitle: string, phase: string): string;
|
|
6
|
+
//# sourceMappingURL=task.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/templates/task.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa,ooBA8BzB,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task template — atomic, completable units of work.
|
|
3
|
+
*/
|
|
4
|
+
export const TASK_TEMPLATE = `# Task: {{title}}
|
|
5
|
+
|
|
6
|
+
*Parent Roadmap: {{roadmapTitle}}*
|
|
7
|
+
*Phase: {{phase}}*
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
<!-- What exactly needs to be done? -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Acceptance Criteria
|
|
14
|
+
<!-- Specific conditions that must be met for this task to be "done" -->
|
|
15
|
+
|
|
16
|
+
- [ ]
|
|
17
|
+
- [ ]
|
|
18
|
+
|
|
19
|
+
## Implementation Notes
|
|
20
|
+
<!-- Technical approach, files to modify, APIs to use, etc. -->
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Session Log
|
|
24
|
+
<!-- Updated during execution — link ADIT event IDs here -->
|
|
25
|
+
|
|
26
|
+
| Session | Event ID | Action | Status |
|
|
27
|
+
|---------|----------|--------|--------|
|
|
28
|
+
| | | | |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
*Created: {{date}}*
|
|
32
|
+
*Status: draft*
|
|
33
|
+
*Assigned: human | ai | pair*
|
|
34
|
+
`;
|
|
35
|
+
export function renderTaskTemplate(title, roadmapTitle, phase) {
|
|
36
|
+
return TASK_TEMPLATE.replace(/\{\{title\}\}/g, title)
|
|
37
|
+
.replace(/\{\{roadmapTitle\}\}/g, roadmapTitle)
|
|
38
|
+
.replace(/\{\{phase\}\}/g, phase)
|
|
39
|
+
.replace(/\{\{date\}\}/g, new Date().toISOString().substring(0, 10));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../src/templates/task.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B5B,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAChC,KAAa,EACb,YAAoB,EACpB,KAAa;IAEb,OAAO,aAAa,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC;SAClD,OAAO,CAAC,uBAAuB,EAAE,YAAY,CAAC;SAC9C,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC;SAChC,OAAO,CAAC,eAAe,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AACzE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@varveai/adit-plans",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "SpecFlow-inspired plan artifact generator for ADIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@varveai/adit-core": "0.2.1"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
22
|
+
"typescript": "^5.7.2"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"typecheck": "tsc --noEmit"
|
|
27
|
+
}
|
|
28
|
+
}
|