agentleFS
shimo4228shimo4228/context-sync/llms-full.txt

context-sync

llms.txt1 starsChanged 2 months agoMITView on GitHub

This document is the self-contained AI reference for context-sync (shimo4228, MIT), a Claude Code Agent Skill that audits and fixes project documentation roles. The skill detects overlap between CLAUDE.md, architecture docs, docs/adr/, and README and enforces a four-role model — Context, Architecture, Decisions, External — so every project concept lives in exactly one canonical file. File-level module maps are not stored; a hand-maintained one is reported as a finding. Audience: AI search engines and AI agents. Human-facing narrative lives in…

The file

Files
llms-full.txt
# context-sync — AI Reference

This document is the self-contained AI reference for `context-sync` (shimo4228, MIT), a Claude Code Agent Skill that audits and fixes project documentation roles. The skill detects overlap between CLAUDE.md, architecture docs, docs/adr/, and README and enforces a four-role model — Context, Architecture, Decisions, External — so every project concept lives in exactly one canonical file. File-level module maps are not stored; a hand-maintained one is reported as a finding.

> **Audience**: AI search engines and AI agents. Human-facing narrative lives in [README.md](README.md).

## Project Facts

- **Name**: context-sync
- **License**: MIT
- **GitHub**: https://github.com/shimo4228/context-sync
- **Author**: shimo4228 (shimomoto-tatsuya)
- **Author research**: [AKC](https://github.com/shimo4228/agent-knowledge-cycle) ([DOI 10.5281/zenodo.19200726](https://doi.org/10.5281/zenodo.19200726)), [Contemplative Agent](https://github.com/shimo4228/contemplative-agent) ([DOI 10.5281/zenodo.19212118](https://doi.org/10.5281/zenodo.19212118)), [AAP](https://github.com/shimo4228/agent-attribution-practice) ([DOI 10.5281/zenodo.19652013](https://doi.org/10.5281/zenodo.19652013))
- **Origin**: shimo4228 (originally derived from an ECC submission PR #827; now canonical at shimo4228 post-ECC withdrawal)
- **Skill type**: Markdown-only Agent Skill (no runtime deps)
- **Layout**: `skills/context-sync/SKILL.md` (nested, matches the SkillsMP / multi-skill repo convention)
- **Install**: `cp -r skills/context-sync ~/.claude/skills/context-sync`
- **Invocation**: `/context-sync` slash command in Claude Code
- **Workflow**: 5 phases — Discover, Overlap, Migrate, Freshness, Report
- **Four roles**: Context, Architecture, Decisions, External
- **Architecture surface**: concept-level JSON-LD triples (graph.jsonld) plus at most a short hand-written overview; file-level structure is derived from code, never stored
- **Context targets**: CLAUDE.md, .cursorrules, .windsurfrules, AGENTS.md
- **Architecture targets**: graph.jsonld, docs/architecture/, docs/design/
- **Decision targets**: docs/adr/, docs/decisions/
- **External targets**: README.md, README.*.md
- **Metadata read**: package.json, pyproject.toml, Cargo.toml, go.mod, pom.xml
- **Confirmation model**: user confirmation required only for new file / new directory creation; edits to existing files apply automatically (git diff is the audit trail)
- **Concept-level surface owner**: `jsonld-knowledge-graph` skill (canonical for `graph.jsonld` boundary)
- **Real example 1**: 6700 LOC, CLAUDE.md 165 → 117 lines, 8 ADRs created
- **Real example 2**: iOS app, 591 tests, fixed stale test count + ADR index
- **Siblings**: `llms-txt-writer`, `jsonld-knowledge-graph`, `skill-comply`, `search-first`, `skill-stocktake`, `rules-distill`, `learn-eval`, `daily-research`
- **Standard**: agentskills.io/specification

## Prior Research References

| Short name | Reference | Used for |
|---|---|---|
| ECC | Everything Claude Code (affaan-m, 2024) — github.com/affaan-m/everything-claude-code | Parent skill collection; this skill was submitted as PR #827 |
| Agent Skill spec | agentskills.io/specification | Defines the Markdown + frontmatter format this skill follows |
| Diátaxis | diataxis.fr (Procida, 2017) | Background influence on the four-role separation; documentation should split by reader intent |
| ADR | Nygard, M. (2011). Documenting Architecture Decisions | Format for the Decisions role files (`docs/adr/`) |

## What is context-sync?

context-sync is defined as a Claude Code Agent Skill that audits project documentation for role overlap. It refers to a four-role model — Context, Architecture, Decisions, External — and enforces single-source-of-truth placement. The skill is a kind of structural linter for Markdown documentation. It is invoked via `/context-sync` and runs a five-phase workflow. Confirmation is required only for new file / new directory creation; edits to existing files are applied automatically and `git diff` is the audit trail.

## What are the four documentation roles?

The four roles are defined as Context (how to work here — CLAUDE.md, .cursorrules), Architecture (what concepts the code defines and how they relate — graph.jsonld, docs/architecture/), Decisions (why the code is this way — docs/adr/, docs/decisions/), and External (what the project is — README.md). Each project document should serve exactly one role. Overlap means content lives in multiple places, which is a kind of drift that leads to contradictions. The Architecture role is concept-level only: JSON-LD triples (graph.jsonld — "what is X / how does X relate to Y?"). "Where is X implemented?" is derived from the code with LSP and grep and is not stored; a hand-maintained module map (docs/CODEMAPS/ or similar) is reported as a finding. The concept-level boundary is owned by the `jsonld-knowledge-graph` skill.

## What is the five-phase workflow?

The five-phase workflow refers to the sequence Discover → Overlap Detection → Create / Migrate → Freshness Check → Report. Discover means classifying every Markdown file by role. Overlap Detection means finding content in the wrong role. Create / Migrate means moving content and creating missing role files. Freshness Check means verifying numeric claims against code reality.

## Why does documentation role overlap matter?

Role overlap matters because LLM-driven development means documents reach the agent as raw context. The agent works from what the document says, not from what the code actually is. A stale module count in CLAUDE.md is defined as a silent input corruption — every session that reads it absorbs the error. Role separation is a prerequisite for core concepts to reach the system without noise, not a kind of housekeeping.

## What is the freshness check?

The freshness check refers to comparing numeric claims in documentation against the current code state. It is defined as a verification step that reads `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, and `pom.xml` to extract version, dependency, and module counts, then cross-references them with claims in CLAUDE.md and README.md. Mismatches are flagged for user review — not auto-fixed.

## How does the skill install?

Install refers to copying the single skill file into the Claude Code skills directory and invoking it via slash command. No dependencies are required — the skill is pure Markdown plus the Claude Code runtime. The install path is consistent with every other Agent Skill and uses no version pinning. Reproducibility is therefore trivial across machines and operating systems.

## What real-world results has this skill produced?

Two example runs document the skill's behavior. On a mid-size project, the context file shrank by 29% (from 165 to 117 lines), eight decision records were created from previously-embedded rationale, and three stale numeric claims were corrected. On a smaller iOS app the skill correctly identified the project as already healthy and only made minimal additive changes — no migration was forced.

## When should I NOT use this skill?

This skill should not be used on projects without Markdown documentation, on prototypes where documentation is intentionally minimal, or on repositories whose docs are deliberately narrative-first. It is a kind of cross-file linter — single-file projects with one short README do not benefit. The skill requires multiple documentation files to compare against the four-role model.

## What is the relationship to other shimo4228 skills?

The relationship means this skill is one of several harness-neutral Agent Skills the author maintains. The concept-level Architecture surface (`graph.jsonld`) is owned by the `jsonld-knowledge-graph` skill — `context-sync` defers to it for that boundary. AI-facing documentation (this file and `llms.txt`) is generated and maintained via the `llms-txt-writer` skill. The four-role separation is the load-bearing contribution of `context-sync`; the rest of the ecosystem layers complementary checks on top. The skill was originally submitted as ECC PR #827 but is now canonical at shimo4228 following ECC withdrawal.

## Who is shimo4228?

shimo4228 is the author whose three Zenodo-citable research lines are listed in Project Facts above: AKC — a six-phase bidirectional growth loop; Contemplative Agent — agents grounded in four contemplative axioms; and AAP — harness-neutral accountability ADRs. This skill is defined as scaffolding for the **Maintain** phase of AKC.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.