Document workbench --sync in README files
Description
PR #36 added the workbench --sync command — a 10-step flow that fetches managed files from the source workbench and merges them into the local workbench, with an auto-commit. The implementation is complete but the command is undocumented in both README files. This issue adds user-facing documentation for --sync in the root README.md and the CLI package README.md.
Context
Users who fork or clone the workbench repository need to stay in sync with upstream improvements (updated slash commands, skills, schemas, and README). The --sync command makes this seamless — it clones the source, applies configured sync.paths, and commits the result. Without documentation, users won't discover or understand this capability.
This is a documentation-only issue. No code changes. All sync implementation is already merged and committed in PR #36.
Requirements
Functional Requirements
- Add a
## Syncing Your Workbench section to the root README.md, placed between "Code indexing with ck" and "Development Setup"
- Brief description of what
--sync does (fetches upstream managed files to keep workbench current)
- Mention that sync auto-commits changes with a chore message
- Mention the interactive confirmation prompt before files are overwritten
- One-line usage example:
workbench --sync
- Cross-reference link to
packages/workbench-cli/README.md for full flag documentation
- Note: must be run from an initialized workbench (created via
workbench --init)
- Note: "Run periodically to stay updated" (non-prescriptive guidance)
- Add a
## Sync section to packages/workbench-cli/README.md, placed after "Setup flags"
- One-paragraph narrative explaining what sync does at a high level
- Flag table (matching the "Init flags" / "Setup flags" pattern) with columns
Flag | Description | Default
--sync — Sync workbench files (.opencode/, .workbench/schemas/, README.md) from the source repository — false
- Note that sync auto-commits changes and prompts for confirmation before overwriting
- Add
workbench --sync to the existing "Examples" section in the CLI README
- Add sync-specific error rows to the existing "Error scenarios" table in the CLI README:
No .workbench/config.yaml found — workbench not initialized → Run workbench --init first
No source.repository found in config — config predates sync feature → Re-initialize workbench
Working tree is not clean — uncommitted changes present → Commit or stash changes first
No sync.paths found in source — source workbench doesn't support sync → Contact source maintainer
Non-Functional Requirements
- Follow the existing documentation style and formatting conventions of each README
- Flag table in CLI README must match the column structure (
Flag | Description | Default) of existing tables
- Error table additions must match the existing
Error | Cause | Resolution column structure
Current State
- Root
README.md (188 lines): Sections include Getting Started, Folder Structure, Working on issues, Project Management, Code indexing with ck, Development Setup, etc. No mention of --sync anywhere.
- CLI
README.md (166 lines): Has "Init flags" table and "Setup flags" table. --sync is absent from both. Has "Examples" section and "Error scenarios" table. No mention of sync anywhere.
--help output (packages/workbench-cli/src/args.ts): Already includes --sync in USAGE, OPTIONS, and EXAMPLES blocks (lines 68, 83, 95). No changes needed here — this is explicitly out of scope.
Desired State
After this issue, a user reading either README will:
- Discover that
workbench --sync exists and understand what it does
- Know the prerequisites (must be in an initialized workbench)
- Know what to expect (confirmation prompt, file overwrites, auto-commit)
- Know how to troubleshoot common errors
- Be able to navigate from the root README to the CLI README for full flag details
Research Context
Keywords to Search
sync — flag name and command; used in args.ts, sync.ts, settings.yml
--sync — exact CLI flag format
workbench --sync — usage string
executeSync — main implementation function in packages/workbench-cli/src/commands/sync.ts
sync.paths — configuration key in .workbench/settings.yml
source.repository — config dependency in .workbench/config.yaml
Patterns to Investigate
- Flag table pattern in CLI README — "Init flags" and "Setup flags" use
| Flag | Description | Default | three-column format. New sync table must match exactly.
- Section structure pattern in root README — h2 sections (
##) with brief prose and no tables. New "Syncing Your Workbench" section should follow this style.
- Error table pattern in CLI README — uses
| Error | Cause | Resolution | three-column format. Sync error rows must match.
- Cross-reference pattern — root README line 37 already links to CLI README with
See [packages/workbench-cli/README.md](...) for full CLI documentation. New section should use a similar link.
Key Decisions Made
- Root README: New
## Syncing Your Workbench section inserted between "Code indexing with ck" and "Development Setup" — scope confirmed in Q&A
- CLI README: New
## Sync section after "Setup flags" with flag table + narrative paragraph — scope confirmed in Q&A
- Auto-commit behavior must be documented (users need to know sync creates a commit) — confirmed in Q&A
- Interactive confirmation prompt must be mentioned — confirmed in Q&A
sync.paths configuration is NOT documented for end users — works out of the box — confirmed in Q&A
--help output update, CONTRIBUTING.md update, sync.paths defaults, snapshot/rollback — all explicitly out of scope
- No code changes — documentation only
Environment Context
- Pathway mode: workbench
- ck CLI available: false (disabled in settings)
- PM tool: github-issues
Success Criteria
Automated Verification
Manual Verification
Document
workbench --syncin README filesDescription
PR #36 added the
workbench --synccommand — a 10-step flow that fetches managed files from the source workbench and merges them into the local workbench, with an auto-commit. The implementation is complete but the command is undocumented in both README files. This issue adds user-facing documentation for--syncin the rootREADME.mdand the CLI packageREADME.md.Context
Users who fork or clone the workbench repository need to stay in sync with upstream improvements (updated slash commands, skills, schemas, and README). The
--synccommand makes this seamless — it clones the source, applies configuredsync.paths, and commits the result. Without documentation, users won't discover or understand this capability.This is a documentation-only issue. No code changes. All sync implementation is already merged and committed in PR #36.
Requirements
Functional Requirements
## Syncing Your Workbenchsection to the rootREADME.md, placed between "Code indexing with ck" and "Development Setup"--syncdoes (fetches upstream managed files to keep workbench current)workbench --syncpackages/workbench-cli/README.mdfor full flag documentationworkbench --init)## Syncsection topackages/workbench-cli/README.md, placed after "Setup flags"Flag | Description | Default--sync— Sync workbench files (.opencode/,.workbench/schemas/,README.md) from the source repository —falseworkbench --syncto the existing "Examples" section in the CLI READMENo .workbench/config.yaml found— workbench not initialized → Runworkbench --initfirstNo source.repository found in config— config predates sync feature → Re-initialize workbenchWorking tree is not clean— uncommitted changes present → Commit or stash changes firstNo sync.paths found in source— source workbench doesn't support sync → Contact source maintainerNon-Functional Requirements
Flag | Description | Default) of existing tablesError | Cause | Resolutioncolumn structureCurrent State
README.md(188 lines): Sections include Getting Started, Folder Structure, Working on issues, Project Management, Code indexing with ck, Development Setup, etc. No mention of--syncanywhere.README.md(166 lines): Has "Init flags" table and "Setup flags" table.--syncis absent from both. Has "Examples" section and "Error scenarios" table. No mention of sync anywhere.--helpoutput (packages/workbench-cli/src/args.ts): Already includes--syncin USAGE, OPTIONS, and EXAMPLES blocks (lines 68, 83, 95). No changes needed here — this is explicitly out of scope.Desired State
After this issue, a user reading either README will:
workbench --syncexists and understand what it doesResearch Context
Keywords to Search
sync— flag name and command; used in args.ts, sync.ts, settings.yml--sync— exact CLI flag formatworkbench --sync— usage stringexecuteSync— main implementation function inpackages/workbench-cli/src/commands/sync.tssync.paths— configuration key in.workbench/settings.ymlsource.repository— config dependency in.workbench/config.yamlPatterns to Investigate
| Flag | Description | Default |three-column format. New sync table must match exactly.##) with brief prose and no tables. New "Syncing Your Workbench" section should follow this style.| Error | Cause | Resolution |three-column format. Sync error rows must match.See [packages/workbench-cli/README.md](...) for full CLI documentation. New section should use a similar link.Key Decisions Made
## Syncing Your Workbenchsection inserted between "Code indexing with ck" and "Development Setup" — scope confirmed in Q&A## Syncsection after "Setup flags" with flag table + narrative paragraph — scope confirmed in Q&Async.pathsconfiguration is NOT documented for end users — works out of the box — confirmed in Q&A--helpoutput update,CONTRIBUTING.mdupdate,sync.pathsdefaults, snapshot/rollback — all explicitly out of scopeEnvironment Context
Success Criteria
Automated Verification
Manual Verification
README.mdcontains a## Syncing Your Workbenchsection between "Code indexing with ck" and "Development Setup" with description, example, and cross-referenceREADME.mdcontains a## Syncsection after "Setup flags" with flag table and narrative paragraphworkbench --syncworkbench --helpoutput remains unchanged (out of scope)