Skip to content

feat(skill): add builtin task skill for CLI-driven lifecycle/debug progress tracking#131

Merged
codeaholicguy merged 8 commits into
mainfrom
feature-tracing-integration
Jul 2, 2026
Merged

feat(skill): add builtin task skill for CLI-driven lifecycle/debug progress tracking#131
codeaholicguy merged 8 commits into
mainfrom
feature-tracing-integration

Conversation

@codeaholicguy

@codeaholicguy codeaholicguy commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the built-in task skill so agents record dev-lifecycle / structured-debug progress directly through the ai-devkit task CLI — the same pattern as the memory skill. No package or abstraction layer; the CLI is the entire integration surface.

  • skills/task/SKILL.md — token-efficient, canonical ai-devkit task calls for lifecycle/debug progress (phase, progress, next step, blocker add/resolve, evidence, artifact, attribution, show/list). Agents emit at checkpoints, not streaming.
  • skills/task/agents/openai.yaml — skill interface metadata.
  • packages/cli/src/constants.ts — registers task in BUILTIN_SKILL_NAMES so init / skill add --built-in install it.
  • .ai-devkit.json — installs the task skill in this project.

Design notes

  • Feature key as task-id resolver. Every command uses <feature> positionally (resolves to the latest non-terminal task), so agents do no task-id bookkeeping.
  • Two reviewer-provided canonical examples were adapted to the shipped CLI (verified by running each against a throwaway store):
    • --workflow is not a CLI flag (unknown option); feature key + phase carry the workflow — omitted.
    • progress <id> "text" silently drops the text; the skill uses --text.
    • Flagged in the SKILL.md troubleshooting section. If --workflow / positional progress text are wanted, that is a change to the task CLI elsewhere, not this PR.

Validation (fresh)

  • npm run lint → exit 0 (5 projects)
  • npm run test → exit 0 (870 passed, 5 projects)
  • SKILL.md frontmatter + openai.yaml parse via the CLI's own skill parsers (validateSkillName, extractSkillDescription)

Not merging

Coordinating with the task-CLI feature. No code changes beyond skill registration/install.

codeaholicguy added a commit that referenced this pull request Jul 1, 2026
… docs

Analysis-first simplification of PR #131. No semantics or contract changes.

- Remove src/ActorResolver.ts (+ exports): 0 internal callers, 0 tests, 0
  consumers. It duplicated the TaskService's env-resolution and was trivially
  replaceable by an Actor literal. Cheapest to remove pre-merge (v0.1.0, no
  consumers). README/design/implementation/planning updated; callers pass an
  explicit Actor directly.
- TaskTracer.ts: fix ValidationInput.passed docstring ("defaults to true" was
  false — field is required, no default).
- integration.task-manager.test.ts: drop tautology "integration guard" test
  (asserted `mod === null || mod !== null`, always true). vitest reports the
  skipped suite cleanly without it.

Kept (considered, justified): contract.ts port (decouples from optional peer;
ITaskService is task-tracer's own), InMemoryTaskService (fast hermetic no-IO
unit tests + public export).

Validation (fresh): tsc --noEmit exit 0; eslint 0 errors; build exit 0.
Standalone (task-manager absent): 38 passed | 5 skipped, exit 0.
Real package resolvable: 43 passed (38 unit + 5 real integration), exit 0.
@codeaholicguy codeaholicguy changed the title feat(task-tracer): tracing layer mapping lifecycle progress to the Task contract feat(skill): add builtin task skill for CLI-driven lifecycle/debug progress tracking Jul 1, 2026
…e Task contract

Introduce packages/task-tracer, a port-based (dependency inversion) tracing
layer that maps dev-lifecycle / structured-debug progress semantics onto the
LOCKED Task contract from feature-task-system. Task is the durable unit;
tracing = task progress/events — no separate session-trace model, no task
storage duplication.

- contract.ts: async ITaskService port mirroring the locked TaskService API
  (Task/TaskEvent/Actor/TaskEventType) verbatim; consume-only.
- TaskTracer: one method per semantic; each calls exactly one service mutator
  (phase/progress/nextStep/blocker/evidence/attribution/note/custom/close).
- in-memory.ts: faithful InMemoryTaskService test double (not shipped storage).
- status.ts: readStatus digest with staleness for orchestrator routing.
- cli-argv.ts: pure argv builders for the upstream `ai-devkit task` CLI.
- 38 vitest unit tests across contract conformance, mapping, status, argv.

Validation (fresh): tsc --noEmit exit 0; vitest run 38 passed exit 0;
swc + declarations build exit 0.

Wires into @ai-devkit/task-manager (TaskService) with zero mapping changes
when that package ships.
)

Add a guarded integration test proving the real TaskService (shipped on
feature-task-system) satisfies the tracing ITaskService port end-to-end, with
NO mapping-logic divergence. Round-trips every semantic (ensureFeatureTask,
phase/progress/nextStep/blocker/evidence/attribution/note/custom/close) through
the real service + file-backed store and asserts the exact contract event-type
strings + persisted snapshot.

- tests/integration.task-manager.test.ts: skips cleanly (1 passed | 5 skipped)
  when @ai-devkit/task-manager is not resolvable, so standalone CI is green
  before #132 merges; auto-activates once #132 lands. Both states verified.
- .eslintrc.json: add package lint config (mirrors @ai-devkit/agent-manager).
- README/implementation/testing: mark wiring SHIPPED; note the real TaskService
  is assignable to the port via method bivariance (no port change needed).

Validation (fresh, real package resolvable): tsc --noEmit exit 0; vitest run
44 passed (38 unit + 6 real integration) exit 0; build exit 0; eslint 0 errors.
Standalone (package absent): 39 passed | 5 skipped, exit 0.
… docs

Analysis-first simplification of PR #131. No semantics or contract changes.

- Remove src/ActorResolver.ts (+ exports): 0 internal callers, 0 tests, 0
  consumers. It duplicated the TaskService's env-resolution and was trivially
  replaceable by an Actor literal. Cheapest to remove pre-merge (v0.1.0, no
  consumers). README/design/implementation/planning updated; callers pass an
  explicit Actor directly.
- TaskTracer.ts: fix ValidationInput.passed docstring ("defaults to true" was
  false — field is required, no default).
- integration.task-manager.test.ts: drop tautology "integration guard" test
  (asserted `mod === null || mod !== null`, always true). vitest reports the
  skipped suite cleanly without it.

Kept (considered, justified): contract.ts port (decouples from optional peer;
ITaskService is task-tracer's own), InMemoryTaskService (fast hermetic no-IO
unit tests + public export).

Validation (fresh): tsc --noEmit exit 0; eslint 0 errors; build exit 0.
Standalone (task-manager absent): 38 passed | 5 skipped, exit 0.
Real package resolvable: 43 passed (38 unit + 5 real integration), exit 0.
…racing

Replace the packages/task-tracer package + contract/port docs with a focused
skill/docs integration — the same pattern as the memory skill. The integration
surface is the ai-devkit task CLI; no TypeScript abstraction layer.

- skills/task/SKILL.md: canonical ai-devkit task CLI calls for dev-lifecycle /
  verify / structured-debug progress (phase, progress, next, blocker add/resolve,
  evidence, artifact, attribution, show/list). Feature key resolves positionally
  as <id>, so agents do no task-id bookkeeping. Token-efficient, emit-at-checkpoints.
- skills/task/agents/openai.yaml: skill interface metadata.
- constants.ts: register 'task' in BUILTIN_SKILL_NAMES so init/skill add --built-in
  install it.
- .ai-devkit.json: install the task skill in this project.

Removes packages/task-tracer (port, contract, in-memory double, CLI argv
builders, all tests) and the contract/port-oriented feature docs added earlier
on this branch — they net to zero vs main.

Two reviewer-provided canonical examples were adapted to match the SHIPPED CLI
(verified by running each command against a throwaway store):
- '--workflow' is not a CLI flag (unknown option); feature key + phase carry the
  workflow — omitted.
- 'progress <id> "text"' silently drops the text (progress.text stays null); the
  skill uses '--text'.

Validation (fresh): npm run lint exit 0 (5 projects); npm run test exit 0
(870 passed, 5 projects); SKILL.md frontmatter + openai.yaml parse via the CLI's
own skill parsers (validateSkillName, extractSkillDescription).
@codeaholicguy codeaholicguy force-pushed the feature-tracing-integration branch from 86a5e8f to 954eec1 Compare July 2, 2026 12:15
@codeaholicguy codeaholicguy merged commit 8ecb865 into main Jul 2, 2026
7 checks passed
@codeaholicguy codeaholicguy deleted the feature-tracing-integration branch July 2, 2026 13:10
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