Skip to content

README and CLI discoverability updates#82

Merged
obj-p merged 10 commits intomainfrom
worktree-readme-cli-discoverability
Apr 12, 2026
Merged

README and CLI discoverability updates#82
obj-p merged 10 commits intomainfrom
worktree-readme-cli-discoverability

Conversation

@obj-p
Copy link
Copy Markdown
Owner

@obj-p obj-p commented Apr 12, 2026

Summary

  • README rewrite — reframed around the micro app story and CLI discoverability. Quickstart, "Why PreviewsMCP?", concise capabilities list, and previewsmcp help as the entry point instead of exhaustive CLI/MCP reference in the README.
  • Moved detailed content to docs/docs/architecture.md (mermaid flowchart), docs/preview-fidelity.md (spec content), docs/setup-plugin.md (full PreviewSetupKit integration guide with Package.swift scaffold, protocol impl, config wiring).
  • Renamed CLAUDE.md → AGENTS.md — agent-agnostic project instructions; CLAUDE.md kept as a pointer stub for Claude Code autoload.
  • Added SwiftLint.swiftlint.yml with semantic rules (formatting rules disabled — swift-format owns those), new CI lint job, pre-commit hook integration, Brewfile and bootstrap skill updated.
  • Code fixesfor_where improvements in LiteralDiffer and XcodeBuildSystem.
  • Filed previewsmcp init — scaffold project config and setup plugin #87previewsmcp init scaffolding command for .previewsmcp.json and setup plugin package.

Test plan

  • swift build — zero warnings
  • swift test --filter PreviewsCoreTests — 176 tests pass (9 suites)
  • swift-format lint --strict — passes on all edited files
  • swiftlint lint --quiet Sources/ Tests/ — zero errors, warnings only on pre-existing large files
  • CI format, lint, and build-and-test jobs pass

🤖 Generated with Claude Code

obj-p and others added 9 commits April 11, 2026 21:01
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collapses the long CLI-examples block and MCP tools table in favor of
`previewsmcp help <subcommand>` and an agent-driven tool discovery line.
Expands the root command and `serve` subcommand help so `--help` is
self-sufficient for users landing there from the README.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Moves the architecture flowchart and module layout out of the README to
keep the landing page focused on install + usage. The diagram remains
accessible via docs/architecture.md, which also cross-links the existing
build-system, communication-protocol, and reverse-engineering docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AGENTS.md is the emerging cross-tool convention (Codex, Cursor, Aider,
etc. all look for it). CLAUDE.md is kept as a thin stub so Claude Code's
autoload continues to find project instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add a one-command Quickstart above Installation using
  examples/spm/Sources/ToDo/ToDoView.swift as the canonical target.
- Add a 5-bullet Capabilities section surfacing the full trait matrix
  (colorScheme, dynamicTypeSize, locale, layoutDirection, legibilityWeight
  with rtl/ltr/boldText presets), multi-preview selection, iOS touch and
  a11y inspection, and the setup plugin / project config.
- Fold .previewsmcp.json into the Usage → CLI subsection with a short
  example and a link to examples/.previewsmcp.json. Deep schema reference
  stays in Sources/PreviewsCore/ProjectConfig.swift.
- Collapse the MCP-server subsection to a single JSON snippet plus a
  one-liner enumerating the per-client config paths (Claude Code, Cursor,
  VS Code, Claude Desktop) — same mcpServers shape everywhere, so a
  four-way <details> block would be busywork.
- Add a Why / why not section at the bottom with the macOS dynamicTypeSize
  limitation. Private-framework warning moves to docs/architecture.md
  where it lives alongside the reverse-engineering notes.
- Update AGENTS.md so its own title says "AGENTS.md" instead of "CLAUDE.md"
  and add a one-line preamble clarifying the cross-tool intent.
- Append a "Private-framework surface & stability" subsection to
  docs/architecture.md covering CoreSimulator, IOKit, BackBoardServices,
  and UIApplication._enqueueHIDEvent, linking to docs/reverse-engineering.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…icro app story

- SPEC-config-traits-setup.md → docs/preview-fidelity.md with updated title
- Add "Why PreviewsMCP?" section: Xcode sandbox problem, micro app tax, real-app-process architecture, setup plugin as replacement
- Mention SPM / Xcode / Bazel build system support
- Split setup plugin and project config into separate capability bullets
- Remove redundant "Why / why not" section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@obj-p obj-p enabled auto-merge (squash) April 12, 2026 15:32
@obj-p obj-p disabled auto-merge April 12, 2026 15:36
- Add .swiftlint.yml with semantic rules (formatting rules disabled —
  swift-format owns those). Thresholds tuned for the existing codebase.
- Add SwiftLint to Brewfile, pre-commit hook, and CI workflow (new lint job).
- Add docs/setup-plugin.md with full PreviewSetupKit integration guide;
  link from README capabilities bullet.
- Apply for_where improvements in LiteralDiffer and XcodeBuildSystem.
- Update AGENTS.md formatting section and bootstrap skill for SwiftLint.

Scaffolding command proposed in #87.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@obj-p obj-p enabled auto-merge (squash) April 12, 2026 18:08
@obj-p obj-p merged commit 496d655 into main Apr 12, 2026
5 checks passed
@obj-p obj-p deleted the worktree-readme-cli-discoverability branch April 12, 2026 18:26
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