@danalexilewis/taskgraph 0.1.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/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/cli/block.js +114 -0
- package/dist/cli/context.js +139 -0
- package/dist/cli/done.js +98 -0
- package/dist/cli/edge.js +99 -0
- package/dist/cli/export.js +97 -0
- package/dist/cli/import.js +123 -0
- package/dist/cli/index.js +78 -0
- package/dist/cli/init.js +106 -0
- package/dist/cli/next.js +97 -0
- package/dist/cli/note.js +72 -0
- package/dist/cli/plan.js +108 -0
- package/dist/cli/portfolio.js +159 -0
- package/dist/cli/setup.js +142 -0
- package/dist/cli/show.js +142 -0
- package/dist/cli/split.js +191 -0
- package/dist/cli/start.js +94 -0
- package/dist/cli/status.js +149 -0
- package/dist/cli/task.js +92 -0
- package/dist/cli/utils.js +74 -0
- package/dist/db/commit.js +18 -0
- package/dist/db/connection.js +22 -0
- package/dist/db/escape.js +6 -0
- package/dist/db/migrate.js +159 -0
- package/dist/db/query.js +102 -0
- package/dist/domain/errors.js +33 -0
- package/dist/domain/invariants.js +103 -0
- package/dist/domain/types.js +120 -0
- package/dist/export/dot.js +21 -0
- package/dist/export/graph-data.js +41 -0
- package/dist/export/markdown.js +108 -0
- package/dist/export/mermaid.js +27 -0
- package/dist/plan-import/importer.js +155 -0
- package/dist/plan-import/parser.js +213 -0
- package/dist/template/.cursor/memory.md +14 -0
- package/dist/template/.cursor/rules/memory.mdc +11 -0
- package/dist/template/.cursor/rules/plan-authoring.mdc +42 -0
- package/dist/template/.cursor/rules/session-start.mdc +18 -0
- package/dist/template/.cursor/rules/taskgraph-workflow.mdc +35 -0
- package/dist/template/AGENT.md +73 -0
- package/dist/template/docs/backend.md +33 -0
- package/dist/template/docs/frontend.md +31 -0
- package/dist/template/docs/infra.md +26 -0
- package/dist/template/docs/skills/README.md +14 -0
- package/dist/template/docs/skills/plan-authoring.md +38 -0
- package/dist/template/docs/skills/refactoring-safely.md +21 -0
- package/dist/template/docs/skills/taskgraph-lifecycle-execution.md +23 -0
- package/package.json +47 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# plan-authoring
|
|
2
|
+
|
|
3
|
+
Use this guide when writing plans in Cursor format for import into TaskGraph.
|
|
4
|
+
|
|
5
|
+
## File location
|
|
6
|
+
|
|
7
|
+
- Store plans in `plans/` as `plans/<name>.md`
|
|
8
|
+
|
|
9
|
+
## Minimal Cursor-format frontmatter
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
---
|
|
13
|
+
name: My Plan
|
|
14
|
+
overview: "What this plan accomplishes."
|
|
15
|
+
todos:
|
|
16
|
+
- id: stable-key
|
|
17
|
+
content: "A small task"
|
|
18
|
+
status: pending
|
|
19
|
+
- id: depends-on-first
|
|
20
|
+
content: "Another small task"
|
|
21
|
+
blockedBy: [stable-key]
|
|
22
|
+
---
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Optional task dimensions
|
|
26
|
+
|
|
27
|
+
- `domain`: string or array of strings → `docs/<domain>.md`
|
|
28
|
+
- `skill`: string or array of strings → `docs/skills/<skill>.md`
|
|
29
|
+
- `changeType`: one of `create`, `modify`, `refactor`, `fix`, `investigate`, `test`, `document`
|
|
30
|
+
|
|
31
|
+
Pick dimensions that help an agent load the right conventions and choose the right approach.
|
|
32
|
+
|
|
33
|
+
## Import command
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
tg import plans/<file> --plan "<Plan Name>" --format cursor
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# refactoring-safely
|
|
2
|
+
|
|
3
|
+
Use this guide when the goal is **behavior-preserving change** (rename, reorganize, simplify, extract, delete dead code) while keeping externally-visible behavior stable.
|
|
4
|
+
|
|
5
|
+
## Principles
|
|
6
|
+
|
|
7
|
+
- Make the smallest change that moves you forward.
|
|
8
|
+
- Prefer mechanical edits (rename, move, extract) over semantic changes.
|
|
9
|
+
- Keep diffs reviewable: one intent per commit/PR section.
|
|
10
|
+
|
|
11
|
+
## Workflow
|
|
12
|
+
|
|
13
|
+
1. Identify the behavior you need to preserve.
|
|
14
|
+
2. Add/confirm tests (or a quick script) that will fail if behavior changes.
|
|
15
|
+
3. Refactor in small steps; run the tests after each meaningful step.
|
|
16
|
+
4. Only then do follow-up cleanup (formatting, dead code removal).
|
|
17
|
+
|
|
18
|
+
## When to stop and split
|
|
19
|
+
|
|
20
|
+
If the refactor reveals unrelated issues (bugs, missing coverage, design changes), split into new tasks so the original task stays predictable.
|
|
21
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# taskgraph-lifecycle-execution
|
|
2
|
+
|
|
3
|
+
Use this guide when you are executing tasks in a TaskGraph-backed repo and want to avoid status drift and missing context.
|
|
4
|
+
|
|
5
|
+
## Standard loop (per task)
|
|
6
|
+
|
|
7
|
+
1. `tg start <taskId>`
|
|
8
|
+
2. `tg context <taskId>` (read the printed docs and any related done tasks)
|
|
9
|
+
3. Make the change (stay within task scope)
|
|
10
|
+
4. `tg done <taskId> --evidence "tests run, commands, commit hashes"`
|
|
11
|
+
|
|
12
|
+
If your repo doesn’t have `tg` on PATH, you might use `pnpm tg ...` or `npx tg ...` depending on how you installed the CLI.
|
|
13
|
+
|
|
14
|
+
## Recovery
|
|
15
|
+
|
|
16
|
+
- If work is done but the task is still `todo`: `tg done <taskId> --force --evidence "completed previously"`
|
|
17
|
+
- If a task is stuck in `doing`: `tg done <taskId> --evidence "completed previously"`
|
|
18
|
+
|
|
19
|
+
## When blocked
|
|
20
|
+
|
|
21
|
+
- `tg block <taskId> --on <blockerId> --reason "..."` (block on an existing task)
|
|
22
|
+
- If the blocker doesn’t exist: create a new task (owner=human) and block on it.
|
|
23
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@danalexilewis/taskgraph",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Task Graph CLI for Centaur Development",
|
|
5
|
+
"main": "dist/cli/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"tg": "dist/cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": ["dist", "README.md"],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"tg": "node dist/cli/index.js",
|
|
12
|
+
"dev": "tsx src/cli/index.ts",
|
|
13
|
+
"build": "tsc && node -e \"require('fs').cpSync('src/template','dist/template',{recursive:true})\"",
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
15
|
+
"start": "node dist/cli/index.js",
|
|
16
|
+
"test": "vitest run --dir __tests__",
|
|
17
|
+
"test:e2e": "vitest run --dir __tests__/e2e",
|
|
18
|
+
"test:integration": "vitest run --dir __tests__/integration"
|
|
19
|
+
},
|
|
20
|
+
"keywords": ["cli", "tasks", "plans", "dolt", "cursor", "centaur", "taskgraph", "agent-workflow"],
|
|
21
|
+
"author": "danalexilewis",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/danalexilewis/taskgraph"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/danalexilewis/taskgraph",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"commander": "^12.0.0",
|
|
33
|
+
"execa": "^9.0.0",
|
|
34
|
+
"js-yaml": "^4.1.1",
|
|
35
|
+
"neverthrow": "^6.0.0",
|
|
36
|
+
"uuid": "^9.0.0",
|
|
37
|
+
"zod": "^3.22.4"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/js-yaml": "^4.0.9",
|
|
41
|
+
"@types/node": "^20.11.17",
|
|
42
|
+
"@types/uuid": "^9.0.8",
|
|
43
|
+
"tsx": "^4.7.1",
|
|
44
|
+
"typescript": "^5.3.3",
|
|
45
|
+
"vitest": "^1.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|