sync-spec

Synchronizes Notion-backed specifications with local work directories using three-way comparison and guarded publication.

4|1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/alvis/.agents --skill sync-spec-alvis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-spec
Source: https://github.com/alvis/.agents/tree/main/plugins/specification/skills/sync-spec
Command: npx skills add https://github.com/alvis/.agents --skill sync-spec-alvis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Keeping a Notion-hosted specification in sync with a local working copy is error-prone: concurrent edits get silently overwritten, approvals bind to stale content, and cached mirrors masquerade as current remote state. This Skill coordinates three copies of the specification—an immutable recorded base, the work-local authored copy, and a fresh remote staging pull—so changes are detected by direct content comparison and publication only happens against verified, approved content. ## Core Features & Use Cases - Materialize mode: Pulls a fresh remote view and creates or refreshes the requested page tree under .state/works/<work-id>/spec/, classifying the result as initial, unchanged, metadata-only, local-only, remote-only, structural change, or conflict. - Complete mode: Acts as a publication gate that reconciles the authored copy with a fresh remote view, verifies stage-specific approval (specification approval or clean implementation review), delegates guarded transport to sync-notion, and verification-pulls after every push. - Immutable evidence: Creates base snapshots and receipts keyed by a stable base identifier derived from the full accepted byte set, never overwriting earlier receipts. - Use Case: Before planning implementation against a Notion spec, run materialize to confirm the local copy matches the recorded base; after the spec is approved, run complete with the specification stage to publish it and refresh dependent work. ## Quick Start Ask the agent to sync the Notion specification at a given URL into the active work directory using sync-spec before starting specification planning.

Frequently Asked Questions about sync-spec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync a Notion specification with a local project?

Run sync-spec in materialize mode with the Notion URL or page id. It pulls a fresh remote staging copy, compares it against the immutable recorded base and your local copy, then creates or refreshes the spec tree only when the three-way decision permits it.

How do I publish approved specification changes back to Notion?

Use complete mode with the appropriate stage flag. Specification stage requires explicit approval of the final content; implementation stage requires a clean review against that exact content. The skill re-checks the remote immediately before pushing and verification-pulls afterward.

What happens when Notion and local edits conflict?

Concurrent changes produce a materialization_conflict or concurrent classification with B/L/R evidence and merge proposals. The main agent or user selects the resolution; Keep Both requires explicit approval of the synthesized content, and Skip leaves all bytes untouched.

Does a Notion last_edited_time change invalidate approvals?

No. A metadata-only change where only the volatile last_edited_time line and observed revision differ is classified as metadata_only. It refreshes the exact base evidence without invalidating approval, plan, code, or review, provided all structured units otherwise match.

Why does sync-spec refuse to run with a missing transport profile?

Every Notion operation requires an explicit absolute transport profile file or a validated active-state mapping with a recorded SHA-256. A missing, moved, or changed mapping returns transport_unverified rather than falling back to PATH or a conventional location.

Can sync-spec generate version-controlled specification files?

No. External specifications never derive version-controlled files. Pull requests and tracked documents must cite the canonical external URL only, never .state paths, mirrors, absolute paths, or file:// references.