spec-lock

Synchronize code implementations with documentation and specifications bi-directionally.

11|3|Updated Jun 30, 2025
One-click install
npx skills add https://github.com/aegntic/cldcde --skill spec-lock
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-lock
Source: https://github.com/aegntic/cldcde/tree/main/.claude/skills/spec-lock
Command: npx skills add https://github.com/aegntic/cldcde --skill spec-lock

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents documentation rot by automatically synchronizing code changes with their corresponding documentation and specifications, ensuring they remain accurate and up-to-date.

Core Features & Use Cases

  • Bi-directional Synchronization: Maintains sync between code, API contracts, and documentation.
  • Drift Detection: Automatically identifies discrepancies between code implementation and documentation.
  • Automated Updates: Generates documentation patches and updates dependent docs.
  • Use Case: When you update an API endpoint's parameters, this Skill will detect the change and automatically update the API documentation (SPEC.md) to reflect the new signature, preventing outdated information.

Quick Start

Use the spec-lock skill to check the file 'src/auth/login.ts' for documentation drift.

Frequently Asked Questions about spec-lock

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

FAQPage Schema
How do I keep code and documentation in sync automatically?

To keep code and documentation in sync automatically, you need a tool that performs bi-directional synchronization. This Skill detects discrepancies between your code implementation and documentation files, generating automated patches to resolve any drift.

What is documentation drift and how do I detect it in my codebase?

Documentation drift occurs when evolving code implementations no longer match their corresponding specs. You can detect drift by using semantic analysis to compare code files against documentation, identifying outdated information before it causes integration issues.

How do I automatically update SPEC.md when an API contract changes?

To automatically update SPEC.md when an API contract changes, run a drift detection check on the modified source files. The tool analyzes the new signatures and generates documentation patches to update the dependent specification files.

Can I synchronize CLAUDE.md and SPEC.md files with my source code?

Yes, you can synchronize CLAUDE.md and SPEC.md files with your source code. The tool performs bi-directional synchronization, ensuring that any updates to configuration changes or API contracts are automatically reflected in your documentation.

What's the best way to prevent documentation rot in evolving codebases?

The best way to prevent documentation rot in evolving codebases is to automate drift detection between code and docs. By continuously identifying and resolving discrepancies through automated patching, your specifications remain accurate without manual intervention.

Does this documentation synchronization tool require any external dependencies?

No, this documentation synchronization tool does not require any external dependencies to function. It operates independently using built-in scripts to perform semantic analysis and generate automated patches for resolving drift.