Skip to content

docs: document the notes sync JSON output contract - #8

Open
AdaInTheLab wants to merge 1 commit into
mainfrom
docs/notes-sync-output-contract
Open

AdaInTheLab wants to merge 1 commit into
mainfrom
docs/notes-sync-output-contract

Conversation

@AdaInTheLab

Copy link
Copy Markdown
Owner

Why

docs/CLI_CONTRACT.md had no section on what hpl --json notes sync prints. The shape lives in src/sync/types.ts + src/sync/summary.ts + src/cli/outputContract.ts and is pinned by tests/outputContract.test.ts, but nothing consumer-facing said so. The first prototype of the Sync Explorer guessed synced + failed === total, which rejects every real dry run.

What

Docs only. Adds a notes sync Output section: SyncResult / SyncSummary / SyncReport as emitted (including the source field the command attaches), the invariants, the noop shape, and the no-start case (nothing on stdout, JSON on stderr, exit 1).

No code, output or exit-code changes.

🤖 Generated with Claude Code

The SyncReport shape, its three-term invariant (synced + dryRun + failed
= total), the noop shape and the no-start stderr case were only pinned
in code and tests. Write them down so consumers (the Sync Explorer,
agents) do not guess. No behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

😼✨ Carmel Approval Stamp™

Adequate work, human.

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