Skip to content

feat(workflow): config-driven status labels with query response support#71

Merged
jpicklyk merged 14 commits intomainfrom
feat/custom-status-labels
Mar 9, 2026
Merged

feat(workflow): config-driven status labels with query response support#71
jpicklyk merged 14 commits intomainfrom
feat/custom-status-labels

Conversation

@jpicklyk
Copy link
Owner

@jpicklyk jpicklyk commented Mar 9, 2026

Summary

  • Add StatusLabelService for config-driven trigger-to-label auto-mapping on role transitions (start→"in-progress", complete→"done", block→"blocked", cancel→"cancelled", cascade→"done")
  • Labels configurable via .taskorchestrator/config.yaml status_labels section with hardcoded defaults as fallback
  • Wire label resolution into AdvanceItemTool and CompleteTreeTool, including cascade events
  • Surface statusLabel in all QueryItemsTool response formats (get, search, overview) via toMinimalJson and toFullJson serializers
  • Label precedence: hardcoded resolution (cancel/reopen) > config-driven > null

New Files

File Purpose
StatusLabelService.kt Interface + NoOpStatusLabelService with hardcoded defaults
YamlStatusLabelService.kt YAML-backed implementation reading from config with AGENT_CONFIG_DIR support
TestStatusLabelService.kt Test double with configurable label map
YamlStatusLabelServiceTest.kt 11 unit tests covering config parsing, defaults, edge cases

Modified Files

File Change
ToolExecutionContext.kt Add statusLabelService parameter with default
CurrentMcpServer.kt Construct and wire YamlStatusLabelService
AdvanceItemTool.kt Resolve config label, compute effectiveLabel, apply to transitions + cascades
CompleteTreeTool.kt Same effectiveLabel pattern for batch completion
QueryItemsTool.kt Add statusLabel to global overview root items and children
EntityJsonSerializers.kt Add statusLabel to toMinimalJson() and toFullJson()
workflow-guide.md New "Status Labels" documentation section
api-reference.md Document statusLabel in response schemas
workflow-orchestrator.md Enforce explicit model parameter in delegation table
implement/SKILL.md Add model selection table for agent dispatches

Test Results

23 new tests added across 4 files, all passing:

Test File New Tests Coverage
YamlStatusLabelServiceTest 11 Config parsing, defaults, partial overrides, coexistence, edge cases
AdvanceItemToolTest 6 Config-driven labels, cascade statusLabel, cascade custom label, cancel precedence, reopen config, block/resume
CompleteTreeToolTest 2 Config-driven labels, cancel precedence
QueryItemsToolTest 4 get non-null/null, includeAncestors behavior, minimal JSON key-absence

Full test suite: BUILD SUCCESSFUL (all existing tests unaffected)

Config Example

# .taskorchestrator/config.yaml
status_labels:
  start: "in-progress"
  complete: "done"
  block: "blocked"
  cancel: "cancelled"
  cascade: "done"
  # resume: null  (inherits pre-block label)
  # reopen: null  (clears label)

MCP Items

  • ddbe1829 — Custom status labels feature (parent)
  • 85321ddd — Status Labels test coverage gaps
  • 4c85f0dc — Model enforcement improvement proposal

🤖 Generated with Claude Code

jpicklyk and others added 14 commits March 8, 2026 12:30
Introduces structured post-implementation analysis — a /session-retrospective
skill that evaluates schema effectiveness, delegation alignment, note quality,
plan-to-execution fit, and friction across five dimensions. Includes run manifest
instructions in the shared orchestrator output style for durable session telemetry,
and a retrospective nudge after implementation completions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address issues found during skill review: remove hardcoded absolute
paths, add early exit for empty sessions, expand trigger description,
simplify terminal advancement, and add recency filter to fallback mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Cascade auto-completion previously bypassed gate enforcement, allowing
parent items with schema tags to reach TERMINAL with required notes
unfilled. Now cascade-to-TERMINAL checks all required notes (matching
the "complete" trigger behavior). Schema-free parents cascade freely.

Also extracts buildMissingNotesArray() to NoteSchemaJsonHelpers and
replaces inline filledKeys computation with buildFilledKeys() across
all three gate-check paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the /implement skill to reflect the local-first git workflow:
branches stay local, squash-merge into local main, and PRs are batched.
Align CLAUDE.md git workflow section to match.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion

- Add VALID_SCHEMA_ROLES validation in YamlNoteSchemaService.parseEntry()
  to catch typos and invalid role values at config load time (warns + skips)
- Consolidate AdvanceItemTool response fields to use shared
  computePhaseNoteContext() instead of manual NoteSchemaJsonHelpers calls
- Remove findGuidancePointer() and buildNoteProgress() from
  NoteSchemaJsonHelpers (now gate-check helpers only)
- Add plugin-change schema to config.yaml (gitignored, local only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…sion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s, and helpers

Add reusable test utilities under current/src/test/.../test/:
- TestFixtures.kt: makeItem(), blocksDep(), makeNote(), JSON param helpers, response extractors
- BaseRepositoryTest.kt: H2 in-memory DB base class with createPersistedItem/Note/Dependency
- MockRepositoryProvider.kt: MockK-based RepositoryProvider factory with context() builder
- TestNoteSchemaService.kt: In-memory NoteSchemaService with FEATURE_IMPLEMENTATION/BUG_FIX presets
- TestInfrastructureTest.kt: 27 validation tests covering all shared infrastructure

Migrated SQLiteWorkItemRepositoryTest to extend BaseRepositoryTest as proof of concept.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The retrospective nudge previously only fired after complete_tree, missing
single-item runs that reach terminal via advance_item. Updated the nudge
condition to trigger on any terminal transition during an /implement run,
with single-item, multi-item, and fallback detection rules.

Also: minor AdvanceItemTool optimization — derive existingKeys from
notesByKey instead of a separate .map() pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The monolithic run manifest (stored as a CC session task) had a 100%
creation failure rate. Replace it with distributed `session-tracking`
notes on each work item, enforced by schema gates.

- Add default schema fallback to YamlNoteSchemaService (one-line change)
- Add session-tracking note to feature-implementation, bug-fix, and
  plugin-change schemas in config.yaml
- Create new `default` schema as catch-all for untagged items
- Rewrite session-retrospective skill to aggregate distributed notes
- Remove manifest section from workflow-orchestrator output style
- Add lightweight delegation-metadata pattern for orchestrator-side data
- Simplify retrospective nudge (remove manifest references)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split feature work into two schema tiers: feature-implementation for the
parent container (full spec, holistic review with /simplify) and feature-task
for child work items (task-scope, task-level review). Plugin skills updated
to remain generic — they reference config.yaml for schema discovery rather
than hardcoding specific tag names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…responses

Add StatusLabelService for trigger-to-label auto-mapping on role transitions.
Labels are configured in .taskorchestrator/config.yaml (status_labels section)
with hardcoded defaults as fallback. Label precedence: hardcoded resolution
(cancel/reopen) > config-driven > null.

Changes:
- NEW: StatusLabelService interface + NoOpStatusLabelService defaults
- NEW: YamlStatusLabelService reads config with AGENT_CONFIG_DIR support
- Wire label resolution into AdvanceItemTool, CompleteTreeTool (including cascade)
- Surface statusLabel in QueryItemsTool search, overview, and get responses
- Add statusLabel to toMinimalJson and toFullJson serializers
- 23 new tests: YamlStatusLabelService (11), AdvanceItemTool (6),
  CompleteTreeTool (2), QueryItemsTool (4) — covering config-driven labels,
  cascade labels, label precedence, block/resume, and query responses
- Update workflow-guide.md and api-reference.md documentation
- Enforce explicit model parameter in delegation table (plugin/skill update)

Co-Authored-By: Claude <noreply@anthropic.com>
@jpicklyk jpicklyk merged commit 52c5b35 into main Mar 9, 2026
2 checks passed
@jpicklyk jpicklyk deleted the feat/custom-status-labels branch March 9, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant