Skip to content

feat: deterministic skills — today/week/clashes/from (ODIAA-2332) - #31

Merged
amirhmoradi merged 4 commits into
mainfrom
odiaa-2332-deterministic-skills
Sep 28, 2026
Merged

amirhmoradi merged 4 commits into
mainfrom
odiaa-2332-deterministic-skills

Conversation

@amirhmoradi

Copy link
Copy Markdown
Contributor

Summary

  • Adds zero-LLM-reasoning "skills" that compose existing read-only bridge endpoints into pre-formatted, compact Markdown: skill_today, skill_week, skill_clashes, skill_from as MCP tools, plus matching tb today, tb week, tb clashes, tb from <address> CLI commands (honouring --output-version 2 / --format json|compact|table for callers that want the JSON envelope instead).
  • Rendering logic lives in a new shared lib/skills.js so the CLI and MCP tools produce byte-identical Markdown from the same data — pure functions that take explicit Date/data inputs (no Date.now() defaults) for deterministic snapshot testing.
  • 29 new unit tests (test/skills.test.mjs) plus 6 new MCP integration test cases covering all four tools end-to-end.
  • Docs updated: docs/COMMANDS.md, SPEC.md, cli/README.md, root README.md, AGENTS.md, and the thunderbird-cli skill (command/tool counts bumped 43→47 / 27→31 where this change invalidates them; unrelated pre-existing stale counts are left untouched).

Non-negotiables checklist (per ODIAA-2306 / docs/PLAN.md)

  • No new extension routes: every dependency (/calendar/events/list, /calendar/clashes, /stats, /messages/search) is an existing, already-ungated, read-only bridge endpoint. No changes to extension/src/access-control.js, access.example.json, or docs/ACCESS-CONTROL.md were needed.
  • No new write switches introduced (this feature is entirely read-only composition).
  • Surface parity maintained: extension (existing routes) → CLI (tb today/week/clashes/from) → MCP (skill_today/week/clashes/from).
  • README/SPEC/SKILL.md docs updated; doc-consistency test (npm run test:docs) passes.
  • Tests added and passing (npm run test:skills, npm run test:mcp).

Test plan

  • npm run test:skills — 29/29 passing (fixed-date Markdown snapshots)
  • npm run test:mcp — 71/71 passing (includes new skill_* integration coverage)
  • npm run test:docs — 93/93 passing
  • npm run test:extension — 59/59 passing (no extension changes, confirms no regression)
  • npm run test:all — full suite green
  • npm run lint — clean (only the pre-existing, tolerated privileged-manifest warning from the calendar Experiment API)
  • Manual smoke of tb today / tb week / tb clashes / tb from <addr> against a live Thunderbird + bridge (not possible from this environment — no browser/GUI access; CLI output was verified against the mock bridge in test/mcp-test.mjs and via unit snapshots instead)

🤖 Generated with Claude Code

amirhmoradi and others added 4 commits September 28, 2026 00:51
…2332)

Add zero-LLM-reasoning skills that compose existing read-only bridge
endpoints (/calendar/events/list, /calendar/clashes, /stats,
/messages/search) into pre-formatted, compact Markdown: skill_today,
skill_week, skill_clashes, skill_from as MCP tools, and matching tb
today/week/clashes/from CLI commands.

Rendering lives in a new shared lib/skills.js so the CLI and MCP tools
produce byte-identical Markdown from the same data — pure functions
taking explicit Date/data inputs (no Date.now() defaults) for
deterministic snapshot testing. No new extension routes or
access-control classifications were needed: every dependency is an
already-ungated, read-only endpoint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bump the tools/list count assertions to 31 and pin TZ=UTC (picked up
by the spawned server subprocess) so the new skills' date/time output
is deterministic regardless of the machine running the suite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cover tb today/week/clashes/from and the matching skill_* MCP tools in
docs/COMMANDS.md, SPEC.md's command reference and MCP tool catalog,
cli/README.md, root README.md, AGENTS.md, and the thunderbird-cli
skill — bumping the command/tool counts these additions invalidate
(43→47 commands, 27→31 MCP tools). Pre-existing, already-stale counts
unrelated to this change (e.g. SKILL.md's version field, SPEC.md's
"16 high-level tools" line) are left as-is.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…tic-skills

# Conflicts:
#	SPEC.md
#	docs/COMMANDS.md
#	mcp/src/tools.js
#	skills/thunderbird-cli/SKILL.md
#	test/mcp-test.mjs
@amirhmoradi
amirhmoradi merged commit 96214f2 into main Sep 28, 2026
2 checks passed
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