@docyrus/docyrus 0.0.43 → 0.0.45
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 +116 -83
- package/agent-loader.js +30 -21
- package/agent-loader.js.map +2 -2
- package/main.js +1238 -1189
- package/main.js.map +4 -4
- package/package.json +1 -1
- package/resources/pi-agent/extensions/tasks.ts +41 -12
- package/resources/pi-agent/prompts/agent-system.md +2 -1
- package/resources/pi-agent/prompts/coder-system.md +3 -2
- package/server-loader.js +675 -494
- package/server-loader.js.map +3 -3
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import { Text } from "@mariozechner/pi-tui";
|
|
|
11
11
|
type ITasksAction =
|
|
12
12
|
| "show"
|
|
13
13
|
| "get"
|
|
14
|
+
| "create-section"
|
|
14
15
|
| "create-feature"
|
|
15
16
|
| "create-task"
|
|
16
17
|
| "set-status"
|
|
@@ -53,9 +54,10 @@ interface IProjectFeatureSummary {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
interface IProjectSectionSummary {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
id: string;
|
|
58
|
+
title: string;
|
|
59
|
+
slug: string;
|
|
60
|
+
summary: string;
|
|
59
61
|
status: string;
|
|
60
62
|
featureCount: number;
|
|
61
63
|
taskCount: number;
|
|
@@ -72,6 +74,7 @@ const TaskParams = Type.Object({
|
|
|
72
74
|
action: StringEnum([
|
|
73
75
|
"show",
|
|
74
76
|
"get",
|
|
77
|
+
"create-section",
|
|
75
78
|
"create-feature",
|
|
76
79
|
"create-task",
|
|
77
80
|
"set-status",
|
|
@@ -79,10 +82,10 @@ const TaskParams = Type.Object({
|
|
|
79
82
|
] as const),
|
|
80
83
|
taskId: Type.Optional(Type.String({ description: "Canonical task id" })),
|
|
81
84
|
featureId: Type.Optional(Type.String({ description: "Canonical feature id" })),
|
|
82
|
-
sectionId: Type.Optional(Type.String({ description: "
|
|
83
|
-
title: Type.Optional(Type.String({ description: "
|
|
84
|
-
summary: Type.Optional(Type.String({ description: "
|
|
85
|
-
slug: Type.Optional(Type.String({ description: "
|
|
85
|
+
sectionId: Type.Optional(Type.String({ description: "Project plan section id" })),
|
|
86
|
+
title: Type.Optional(Type.String({ description: "Section, feature, or task title" })),
|
|
87
|
+
summary: Type.Optional(Type.String({ description: "Section, feature, or task summary" })),
|
|
88
|
+
slug: Type.Optional(Type.String({ description: "Section or feature slug" })),
|
|
86
89
|
type: Type.Optional(Type.String({ description: "Task type" })),
|
|
87
90
|
assignee: Type.Optional(Type.String({ description: "Task assignee" })),
|
|
88
91
|
status: Type.Optional(Type.String({ description: "Task status" })),
|
|
@@ -175,7 +178,7 @@ function formatHierarchySummary(payload: IProjectPlanShowPayload): string {
|
|
|
175
178
|
|
|
176
179
|
const lines: string[] = [];
|
|
177
180
|
for (const section of populatedSections) {
|
|
178
|
-
lines.push(`${section.
|
|
181
|
+
lines.push(`${section.title} (${section.status})`);
|
|
179
182
|
for (const feature of section.features) {
|
|
180
183
|
lines.push(` - ${feature.title} (${feature.status})`);
|
|
181
184
|
for (const task of feature.tasks) {
|
|
@@ -212,21 +215,21 @@ async function tasksCommandHandler(pi: ExtensionAPI, ctx: ExtensionCommandContex
|
|
|
212
215
|
|
|
213
216
|
const query = rawArgs.trim().toLowerCase();
|
|
214
217
|
const sections = payload.hierarchy.sections.filter((section) => section.features.length > 0)
|
|
215
|
-
.filter((section) => !query || section.
|
|
218
|
+
.filter((section) => !query || section.title.toLowerCase().includes(query) || section.id.toLowerCase().includes(query));
|
|
216
219
|
if (sections.length === 0) {
|
|
217
220
|
ctx.ui.notify("No project-plan sections with tasks were found.", "info");
|
|
218
221
|
return;
|
|
219
222
|
}
|
|
220
223
|
|
|
221
224
|
const selectedSectionId = await selectFromOptions(ctx, "Project Sections", sections.map((section) => ({
|
|
222
|
-
label: `${section.
|
|
223
|
-
value: section.
|
|
225
|
+
label: `${section.title} (${section.status})`,
|
|
226
|
+
value: section.id,
|
|
224
227
|
})));
|
|
225
228
|
if (!selectedSectionId) {
|
|
226
229
|
return;
|
|
227
230
|
}
|
|
228
231
|
|
|
229
|
-
const section = sections.find((item) => item.
|
|
232
|
+
const section = sections.find((item) => item.id === selectedSectionId);
|
|
230
233
|
if (!section) {
|
|
231
234
|
return;
|
|
232
235
|
}
|
|
@@ -361,6 +364,32 @@ export default function tasksExtension(pi: ExtensionAPI) {
|
|
|
361
364
|
};
|
|
362
365
|
}
|
|
363
366
|
|
|
367
|
+
case "create-section": {
|
|
368
|
+
if (!params.title) {
|
|
369
|
+
return {
|
|
370
|
+
content: [{ type: "text", text: "title required" }],
|
|
371
|
+
isError: true,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
const args = [
|
|
375
|
+
"project-plan",
|
|
376
|
+
"upsert-section",
|
|
377
|
+
"--title",
|
|
378
|
+
String(params.title),
|
|
379
|
+
];
|
|
380
|
+
if (params.slug) {
|
|
381
|
+
args.push("--slug", String(params.slug));
|
|
382
|
+
}
|
|
383
|
+
if (params.summary) {
|
|
384
|
+
args.push("--summary", String(params.summary));
|
|
385
|
+
}
|
|
386
|
+
const payload = await runCliJson<Record<string, unknown>>(environment, args, ctx.cwd);
|
|
387
|
+
return {
|
|
388
|
+
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
389
|
+
details: payload,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
|
|
364
393
|
case "create-feature": {
|
|
365
394
|
if (!params.sectionId || !params.title) {
|
|
366
395
|
return {
|
|
@@ -27,11 +27,12 @@ Docyrus concepts you should understand and use accurately:
|
|
|
27
27
|
|
|
28
28
|
Project plan system:
|
|
29
29
|
|
|
30
|
-
The project-plan is a repo-tracked work graph stored at `docyrus/project-plan/project-plan.json`. It organizes work into sections (
|
|
30
|
+
The project-plan is a repo-tracked work graph stored at `docyrus/project-plan/project-plan.json`. It organizes work into sections (standalone groupings like phases or feature areas), features, and tasks. A derived `PROJECT_PLAN.md` is always kept in sync. Features are also synced into the knowledge base features document when it exists.
|
|
31
31
|
|
|
32
32
|
- `docyrus project-plan show` — view the full hierarchy with statuses
|
|
33
33
|
- `docyrus project-plan get-task --taskId <id>` — inspect a task and its linked local subtasks
|
|
34
34
|
- `docyrus project-plan set-task-status --taskId <id> --status <status>` — advance task status (`planned` → `in_progress` → `done`, or `blocked`)
|
|
35
|
+
- `docyrus project-plan upsert-section --title <title>` — create or update a section
|
|
35
36
|
- `docyrus project-plan check` — validate that all section references and task fields are consistent
|
|
36
37
|
|
|
37
38
|
When working on a repo that has a project plan, read it at the start of a session to understand scope and priorities. Update task status as work progresses and after it completes.
|
|
@@ -72,7 +72,7 @@ Schema-first workflow for new Docyrus-backed apps and major features:
|
|
|
72
72
|
|
|
73
73
|
Project plan system:
|
|
74
74
|
|
|
75
|
-
The project-plan is a repo-tracked work graph stored at `docyrus/project-plan/project-plan.json` with a derived `PROJECT_PLAN.md` always kept in sync. Work is organized into sections (
|
|
75
|
+
The project-plan is a repo-tracked work graph stored at `docyrus/project-plan/project-plan.json` with a derived `PROJECT_PLAN.md` always kept in sync. Work is organized into sections (standalone groupings like phases or feature areas), features, and tasks. Features are also synced into the knowledge base features document when it exists. Tasks have a type (`new-implementation`, `bug-fix`, `api-test`, `browser-automation-test`, `work`), an assignee (`agent` or `user`), a status (`planned`, `in_progress`, `blocked`, `done`), and optional acceptance criteria.
|
|
76
76
|
|
|
77
77
|
Key commands:
|
|
78
78
|
|
|
@@ -80,10 +80,11 @@ Key commands:
|
|
|
80
80
|
- `docyrus project-plan get-task --taskId <id>` — inspect a specific task and its linked local subtasks
|
|
81
81
|
- `docyrus project-plan set-task-status --taskId <id> --status <status>` — advance task status
|
|
82
82
|
- `docyrus project-plan create-linked-todo --taskId <id> --title <title> --body <body>` — create a local `.pi/todos` subtask linked to an agent-assigned canonical task
|
|
83
|
+
- `docyrus project-plan upsert-section --title <title> --slug <slug> --summary <summary>` — create or update a section
|
|
83
84
|
- `docyrus project-plan upsert-feature --sectionId <id> --title <title> --slug <slug>` — create or update a feature
|
|
84
85
|
- `docyrus project-plan upsert-task --featureId <id> --title <title> --type <type> --assignee <assignee>` — create or update a task
|
|
85
86
|
- `docyrus project-plan check` — validate section references and graph integrity
|
|
86
|
-
- `docyrus project-plan ensure` — initialize
|
|
87
|
+
- `docyrus project-plan ensure` — initialize an empty project-plan graph if it does not yet exist
|
|
87
88
|
|
|
88
89
|
Workflow: read the project plan at session start → set relevant tasks to `in_progress` before beginning → create linked todos for complex implementation tasks → set tasks to `done` after work is verified.
|
|
89
90
|
|