Repository navigation
Description
Lane C: CLI commands and the orca-dart skill
Base: upstream main 51e183a08e0 (fork fast-forwarded 2026-10-31). See "Revision 2026-10-31" at the end.
Goal: agents can read and update Dart tasks with orca dart ..., guided by a bundled orca-dart skill that installs from the Dart card.
Delivers: G4 (CLI and skill half; the install row on the card is Lane B).
Depends on: Lane 0 merged (it already provides ORCA_DART_SKILL_NAME); Lane A RPC methods for the final live run, read-only. Input: the user's existing skill at the existing local Dart skill (Nyayasathi project) (SKILL.md, README.md; it uses OAuth and npm run dartai, which the Orca skill replaces with orca dart ...).
Files owned (about 6 new and 5 edits for the CLI, plus skill sources)
New: src/cli/handlers/dart.ts and src/cli/handlers/dart-write.ts (handlers stay in src/cli/handlers/, like Jira's, because src/cli/handler-group-manifest.test.ts:9 scans only that folder for unroutable handler keys), src/cli/dart/ (handler group, request builders, formatters, target gate), src/cli/specs/dart.ts (command specs), skill-guides/orca-dart.md, skill-stubs/orca-dart.md.
Templates (current upstream Jira CLI, flat layout): src/cli/jira-handler-group.ts, src/cli/jira-target.ts, src/cli/jira-format.ts, src/cli/handlers/jira.ts, src/cli/handlers/jira-write.ts, src/cli/specs/jira.ts, and the shipped orca-jira skill (skill-guides/, skill-stubs/orca-jira.md, skill-stubs/_shared), including its safe-write rules. Putting Dart under src/cli/dart/ instead of flat is a deliberate choice to keep upstream merges small.
Edit: src/cli/handler-group-manifest.ts (add DART_HANDLER_GROUP beside JIRA_HANDLER_GROUP and LINEAR_HANDLER_GROUP; the file also has PLUGIN_HANDLER_GROUPS now), src/cli/specs/index.ts (beside JIRA_COMMAND_SPECS), src/main/startup/cli-command-names.ts:46-47 (add 'dart' beside 'jira' and 'linear'; src/cli/specs/cli-command-names-parity.test.ts derives roots from COMMAND_SPECS and fails until it is added), config/scripts/generate-bundled-skill-guides.mjs (three literal edits at :15-55: 'orca-dart' in CANONICAL_GUIDE_NAMES, 'orca-dart': [] in GUIDE_ALIASES, and an orca-dart entry in STUB_TOPICS backed by skill-stubs/orca-dart.md). src/cli/reference-input.ts is not edited in v1 (Jira's equivalent uses a summary-lookup method that the Dart contract does not have). src/cli/args.ts is NOT edited: upstream replaced its hand-listed command roots with spec.browserPageTarget (args.ts:138-139), so a dart spec needs no args.ts change (leave browserPageTarget unset).
Generated (run, do not hand-edit): skills/orca-dart/SKILL.md, src/cli/bundled-skill-guides.ts, resources/skills/*, bundled-skill-sources.ts via pnpm generate:bundled-skill-guides and pnpm generate:skill-bundle-manifest, run on the new base (do not reuse any output generated on the old base).
Must not touch
The Dart card component (Lane B owns it; Lane C only supplies the skill name constant). Ship only orca-dart; alias and stub entries are add-only, so add no dart-tickets. The upstream orca plugin command group (stablyai#36280, stablyai#36288) is unrelated; do not touch it.
Check first (on the new base)
- The guide generator changed (-57 lines): guide markdown is serialized one line at a time (build: serialize bundled guides one markdown line at a time stablyai/orca#33712), and
fullMarkdown/composeFullMarkdownwas replaced by areferencesarray. Read the script and theorca-jiraguide before writingorca-dart. - Whether
skill-stub-composition.mjsandskill-stubs/_sharedimpose a shape on a new stub (unverified); copyskill-stubs/orca-jira.md.
Steps
- Commands (JSON-first), each backed by a Lane 0 contract method:
orca dart status(dart.status),config(dart.config: dartboards, statuses, tags, priorities, assignees by name),list(--mineuses the user id fromdart.status; status, dartboard, tag, priority;--titlemaps to Dart'stitlefilter; add--textonly if Lane P confirms a parameter that also searches descriptions, so the flag never promises more than it does;dart.listTasks),get <id|url>(dart.getTask),comment list|add,create(dart.createTask),update(dart.updateTask: status, priority, assignee, tags, title, description, by name). Version 1 has no key lookup: accept id orhtmlUrl. The CLI never sendsno_defaults=falseand rejects unknown filter flags itself, because Dart ignores unknown parameters silently. Failures print the host's Englisherrorstring and itsdart.*errorCode(taskProviderFailurereturns{ ok: false, error, errorCode }; only the renderer localizes, the CLI has no copy map). - Gate, like the Jira target gate (
src/cli/jira-target.ts:38-45): everyorca dartcommand first callsstatus.get; if the runtime does not advertisedart.provider.v1, it throwsRuntimeClientError('incompatible_runtime', 'Update Orca on the execution host to use Dart.')and exits non-zero. Test with a capability-less runtime. - Skill guide: command reference, untrusted-data rule for task text, the API gaps (no key, no status graph, substring search), how to resolve names via
orca dart config, and safe-write rules modelled onorca-jira. Start from the user's existing skill; keep what it learned. - Generate and verify the bundle.
Guide rules (a test enforces them)
src/cli/specs/bundled-guide-flags.test.ts extracts every ORCA <cmd> --<flag> example from the bundled guides (now also from guide.references[*].markdown) and validates it against COMMAND_SPECS. Every command and flag in skill-guides/orca-dart.md must exist in src/cli/specs/dart.ts; write the guide from the spec, not from memory. Edit only the sources (skill-guides/, skill-stubs/); skills/orca-dart/SKILL.md, src/cli/bundled-skill-guides.ts and bundled-skill-sources.ts are generated. --reference <dart-id> is not supported in v1: reference-input.ts accepts Jira keys and full URLs only.
Done when
pnpm test src/cli/specs/bundled-guide-flags.test.ts src/cli/specs/cli-command-names-parity.test.ts src/cli/handler-group-manifest.test.tspasses, plus a key-parity test: the keys ofCOMMAND_SPECSwhose path starts withdartequalDART_HANDLER_GROUP.keys, and a direct assertion thatCLI_COMMAND_NAMEScontains'dart'.- CLI parse and format tests pass (mock-backed); the capability gate test passes; help text lists
orca dart. pnpm verify:bundled-skill-guidesandpnpm verify:skill-bundle-manifestpass.- Live run (orchestrator or user step, not the lane worker, since workers never receive the token): with Lane A running against the Lane P credential in an isolated profile,
orca dart statusandlistreturn real data, read-only (createandupdateonly against mocks unless the user names a throwaway dartboard). The lane report records "live run by "; no token or real names and ids in any committed output.
Revision 2026-10-31 (b): OMP review applied
- Handlers live in
src/cli/handlers/dart*.tsso the manifest drift test covers them; key-parity andCLI_COMMAND_NAMESassertions added. - The three generator edits spelled out.
--titleinstead of--textunless Lane P confirms description search.- Gate written out (
status.get,dart.provider.v1,incompatible_runtime, message, test). - The live run is an orchestrator or user step; the lane's own acceptance is mock-backed.
Revision 2026-10-31
- Re-based on
51e183a08e0; full paths for every file. - Removed
src/cli/args.tsfrom "Edit": obsolete, browser-page support is nowspec.browserPageTarget. - Named the real Jira CLI template files and the shipped
orca-jiraskill as templates. - Added "Check first" for the changed guide generator (line-by-line serialization,
referencesarray) and the stub composition; regenerate on the new base. - Noted the new
PLUGIN_HANDLER_GROUPSandorca plugingroup (no overlap).
Activity