13 Commits

Author SHA1 Message Date
e592caed57 Add architecture review findings and address documentation issues
Review of all ADR documents (001-007) and peripheral architecture docs
identified 3 critical, 10 warning, and 7 suggestion issues.

Addressed in this commit:
- W-1: Add draft qualifier to ADR-002 reference to incremental exploration
- W-2: Add Alternatives Considered section to ADR-001
- W-3: Add Document Lifecycle section to README.md (draft/stable/deprecated)
- W-4: Clarify includeCompleted semantics (only 'completed' status triggers exclusion)
- W-5: Document file I/O runtime constraints in frontmatter.md
- W-6: Add ADR reference to architecture.md redirect
- W-7: Verify CVE-2025-64718 (confirmed real, improved description)
- W-9: Convert workspace-absolute paths to relative/monorepo references
- S-7: Add future ADR-008 note to incremental-update-exploration.md

Critical issues (C-1, C-2, C-3) and remaining warnings (W-8, W-10, S-4, S-5)
were addressed by a parallel agent in a prior commit.

All 16 review tasks created and resolved.
2026-04-26 09:41:05 +00:00
4244c054b7 Fix critical architecture review issues
Critical fixes:
- Rename qualityDegradation → qualityRetention across all docs
  (semantically inverted: 0.9 meant 90% quality RETAINED, not 90%
  degradation). Updated schemas, graph-model, cost-benefit, ADRs.
- Add TaskInput → TaskGraphNodeAttributes transformation section
  to graph-model.md, documenting how Nullable(Optional) input fields
  map to Optional graph attributes
- Fix DuplicateEdgeError fields: source/target → prerequisite/dependent
  to match the established edge direction convention
- Fix resolveDefaults signature: Partial<TaskGraphNodeAttributes>
  → Partial<...> & Pick<TaskGraphNodeAttributes, 'name'> to
  require the name field
- Move Nullable helper definition before its first use in schemas.md
- Fix 'construction never throws' contradiction: rephrase to
  'construction enforces uniqueness, not data quality'
- Define all 6 enum value sets in schemas.md (previously only
  TaskScope and TaskRisk were explicit)
- Add EvConfig parameter table with defaults and semantics
- Document WorkflowCostOptions.limit parameter
- Add construction error handling table to graph-model.md
- Add graph.raw mutation safety warning to api-surface.md
- Update build-distribution.md error class list to include
  DuplicateNodeError and DuplicateEdgeError
2026-04-26 09:13:14 +00:00
13d55b981e Add incremental update exploration doc and update ADR-002
Explores the diff-based approach (TypeBox Value.Diff → graphology mutation
mapping) as an alternative to rebuild-on-change. Key findings:

- The diff must happen at the graph level, not the source level, because
  TaskInput.dependsOn doesn't directly map to edge mutations
- graphology's import(merge=true) handles merges but not deletions
- The real win is reactivity (fine-grained event notifications), not performance
- For <200 node graphs, rebuild is always sub-millisecond
- A hybrid approach (diff for attribute-only changes, rebuild for structural
  changes) is possible but adds significant complexity

Decision: defer to v2. ADR-002 (rebuild) stands. The exploration is preserved
for future reference.
2026-04-26 08:41:19 +00:00
ac9dee9c10 Fix TypeBox schema consistency and add TypeBox patterns research
- schemas.md: Replace interface ResolvedTaskAttributes with TypeBox schema
  + Static<typeof> derivation (was the only raw interface in the doc set)
- schemas.md: Add explicit TypeBox naming convention table and pattern guide
- schemas.md: Use Nullable() helper for TaskInput optional categorical fields
  that can be explicitly set to null in YAML
- schemas.md: Reference typebox-patterns.md research for full analysis
- api-surface.md: Add note about Static<typeof> pattern consistency
- errors-validation.md: Use Value.Errors() for structured validation instead
  of bare Value.Check()
- New: docs/research/typebox-patterns.md — comprehensive TypeBox pattern
  evaluation covering Static, Values, Convert, Pointer, TemplateLiteral,
  generics, defaults, and concrete schema recommendations
2026-04-26 07:57:23 +00:00
bde1cc4e70 Decompose monolithic architecture.md into modular docs/architecture/ documents
The 751-line architecture.md violated the SDD process modular documentation
target (~500 lines). It also had duplicate TaskGraph class definitions (one
monolith, one decomposed) that directly contradicted each other, and embedded
consumer-specific tool dispatch mappings that belong in downstream projects.

Changes:
- Split into 8 focused documents + 7 ADR records + redirect page
- Removed the monolithic TaskGraph class (kept only decomposed version)
- Moved CLI→plugin dispatch mapping out (belongs in plugin architecture)
- Extracted implementation code (frontmatter splitter, findCycles, DAG
  propagation) into WHAT/WHY descriptions per architect role spec
- Added proper ADR format for all resolved design decisions
- Fixed review issues: C_fail mapping, DuplicateNodeError/DuplicateEdgeError
  types, ValidationError/GraphValidationError definitions, mutation error
  handling contract, enum naming convention, validation timing clarification
2026-04-26 06:38:52 +00:00
bac335274d Update agent roles and AGENTS.md for open-coordinator and open-memory plugins
Replace outdated worktree_make/worktree_mode/worktree_overview/worktree_cleanup
API references with the new worktree({action, args}) dispatch pattern from
open-coordinator. Add worktree notify tool for implementation/code-review/POC
agents to communicate back to coordinator. Fix stale alkhub_ts paths. Add
open-memory plugin awareness (memory, memory_compact) to AGENTS.md and agent
specs. Update sdd_process.md coordinator section accordingly.
2026-04-26 05:46:20 +00:00
6d391e3ad8 Added agent role defs and ssd_process.md 2026-04-25 12:32:43 +00:00
365e7a61dd Fix supply chain attack date: Sept 2025 → April 2026 2026-04-25 07:14:07 +00:00
3346002fba Resolve all open questions, add class decomposition section
Replace interfaces with typebox equivalents for return types.
Resolve 6 open design questions:
1. Rebuild over incremental (graph sizes too small to matter)
2. Strict internal-only subgraph (matches graphology-operators)
3. Throw CircularDependencyError on cycles (both consumers treat as bugs)
4. Always propagate through completed nodes, exclude from output only
5. Defer depth-escalation to v2 (multiplicative compounding already captures it)
6. Adopt source->target edge keys from the start

Add section decomposing TaskGraph into thin data class + standalone
analysis functions, with operations pattern at the consumer layer.
2026-04-25 05:44:18 +00:00
6b281dee81 Resolve 5 architecture open questions, add new gaps from review
Resolved:
- YAML parser: self-contained frontmatter splitter + yaml (eemeli), no gray-matter/js-yaml
- findCycles: custom DFS with 3-color marking + back-edge path extraction, SCC pre-check
- DAG propagation: default mode for workflowCost, independent as degenerate case
- Zod interop: dropped, typebox is sole schema system
- Graph listeners: expose raw graphology instance, no wrapping

Added:
- DependencyEdge/TaskGraphEdgeAttributes now carry qualityDegradation
- Mutation methods (removeTask, removeDependency, updateTask, updateEdgeAttributes)
- subgraph() method, raw getter, WorkflowCostOptions/EvConfig/EvResult types
- Supply chain security rationale with fear-setting analysis
- 6 new open questions (incremental rebuild, subgraph edges, partial topo, etc.)
2026-04-24 12:22:07 +00:00
e2c872d3a1 Pivot architecture from napi/Rust to pure TypeScript with graphology 2026-04-24 10:49:11 +00:00
ba8c382d53 Add architecture doc and research reports for taskgraph_ts napi wrapper 2026-04-23 10:30:40 +00:00
1517b5459e inital setup 2026-04-23 08:13:39 +00:00