Decompose architecture into 28 atomic implementation tasks

Break the @alkdev/taskgraph architecture specs into dependency-ordered
implementation tasks across 8 component directories: setup, schema,
error, graph, analysis, cost-benefit, frontmatter, api, and review.
Each task has clear acceptance criteria referencing specific architecture
docs. Three review tasks serve as quality gates at critical junction
points (schemas-and-errors, graph-complete, complete-library). The
dependency graph is validated acyclic with 9 topological levels enabling
significant parallelism across independent work streams.
This commit is contained in:
2026-04-27 08:30:05 +00:00
parent e592caed57
commit 131e3e929b
28 changed files with 1306 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
---
id: setup/project-init
name: Initialize project with package.json, tsconfig, and build tooling
status: pending
depends_on: []
scope: moderate
risk: low
impact: project
level: implementation
---
## Description
Set up the TypeScript project from scratch. This is a greenfield project — the repo currently has only `AGENTS.md` and `docs/`. Initialize everything needed for a pure TypeScript ESM library: package.json, tsconfig.json, gitignore, and the src/ directory skeleton.
Per [build-distribution.md](../../../docs/architecture/build-distribution.md):
- Package name: `@alkdev/taskgraph`
- ESM primary, CJS compat
- Targets: Node 18+, Deno, Bun (pure JS, no native addons)
- Build: `tsc` for declarations + bundler for distribution
- Dependencies: `graphology`, `graphology-dag`, `graphology-metrics`, `graphology-components`, `graphology-operators`, `@alkdev/typebox`, `yaml`
## Acceptance Criteria
- [ ] `package.json` exists with name `@alkdev/taskgraph`, ESM primary (`"type": "module"`), CJS compat config
- [ ] All production dependencies listed per [build-distribution.md](../../../docs/architecture/build-distribution.md) dependencies table
- [ ] Dev dependencies include: `typescript`, `vitest` (or agreed test runner), `@types/node`
- [ ] `tsconfig.json` configured for Node 18+ target, ESM module resolution, strict mode, declaration output
- [ ] `.gitignore` covers `node_modules/`, `dist/`, `*.js.map`, `.env`
- [ ] `src/` directory skeleton created per [build-distribution.md](../../../docs/architecture/build-distribution.md) project structure:
- `src/index.ts`
- `src/schema/index.ts`, `src/schema/enums.ts`, `src/schema/task.ts`, `src/schema/graph.ts`, `src/schema/results.ts`
- `src/graph/index.ts`, `src/graph/construction.ts`, `src/graph/queries.ts`, `src/graph/mutation.ts`
- `src/analysis/index.ts`, `src/analysis/critical-path.ts`, `src/analysis/bottleneck.ts`, `src/analysis/risk.ts`, `src/analysis/cost-benefit.ts`, `src/analysis/decompose.ts`, `src/analysis/defaults.ts`
- `src/frontmatter/index.ts`, `src/frontmatter/parse.ts`, `src/frontmatter/serialize.ts`
- `src/error/index.ts`
- [ ] `test/` directory created with placeholder test files per build-distribution spec
- [ ] `npm install` succeeds without errors
- [ ] `npx tsc --noEmit` succeeds (empty source files, but config is valid)
## References
- docs/architecture/build-distribution.md — project structure, dependencies, targets
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion

View File

@@ -0,0 +1,42 @@
---
id: setup/test-infrastructure
name: Configure test runner and shared test fixtures
status: pending
depends_on:
- setup/project-init
scope: narrow
risk: low
impact: project
level: implementation
---
## Description
Set up the test infrastructure: configure Vitest (or chosen runner), create shared test fixtures and helpers for graph construction that all downstream test files will use. This avoids every test file building graphs from scratch.
## Acceptance Criteria
- [ ] Test runner configured in `package.json` scripts (`"test"`, `"test:watch"`, `"test:coverage"`)
- [ ] Vitest config (or equivalent) exists with ESM support and TypeScript path resolution
- [ ] Shared test fixture file created (e.g., `test/fixtures/graphs.ts`) with:
- A simple linear chain graph (3-4 tasks, A→B→C→D)
- A diamond dependency graph (A→B, A→C, B→D, C→D)
- A graph with mixed categorical fields (some assessed, some null)
- A graph with cycles for testing cycle detection
- A larger graph (20+ nodes) for performance/bottleneck testing
- [ ] Helper function to create a `TaskGraph` from `TaskInput[]` for one-liner test setup
- [ ] Test runner executes successfully against placeholder test files
- [ ] CI-compatible output format (no watch mode in default script)
## References
- docs/architecture/build-distribution.md — test directory structure
- docs/architecture/graph-model.md — graph construction examples for fixtures
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion