sync-md-json
Bidirectional sync between .json (authoritative source of truth) and .md (human-readable derivative) files — command-triggered, always writes fresh data from the source to the target. Trigger when: th
Files1
View on GitHubSKILL.mdskills/sync-md-json/SKILL.md
GitHubSync MD-JSON
Syncs data between .json (source of truth) and .md (human-readable) files.
JSON is primary. On command, the target format overwrites with data from source.
When Invoked
- User says "sync index" / "sync md-json" / "sync to md" / "sync to json"
- On-demand project status requested (sync status to JSON for compact storage)
- Any time you need to ensure both formats are in sync
Sync Direction
JSON → MD (default, most common):
- Read the
.jsonfile - Generate a readable Markdown table from it
- Overwrite the
.mdfile with the new content - Preserve any non-data sections (e.g., section headers, footnotes)
MD → JSON (use when JSON is stale):
- Parse the Markdown table into structured data
- Overwrite the
.jsonfile with the new data - Preserve schema fields not present in the Markdown
Index File Conventions
Source of truth: {project-root}/projects/index.json
Derived: {project-root}/projects/index.md
Schema:
{
"version": 1,
"updated": "YYYY-MM-DD",
"pdInboxRoot": "path/to/inboxes/{team}/{pd-name}.json",
"projects": [
{
"name": "string",
"pd": "string|null",
"path": "string|null",
"stack": ["string"],
"purpose": "string",
"aliases": ["string"]
}
]
}
Markdown Output Format
Always use a table with these columns:
| Project | PD | Path | Stack | Purpose |
Archived entries go under ### Archived section, not in the table.
Key Rules
- JSON is the authoritative source — always prefer JSON for reads
- Only overwrite the target file, never merge and keep both
- Preserve
versionandupdatedfields on every JSON write - Use ISO date format (YYYY-MM-DD) for all dates