plan-sync
Skill0 starsChanged 5 months agoMITView on GitHub
Optional integration: parse a plan markdown file into a validated manifest and import it into tools-project via the REST API (POST /v1/projects/{id}/plan-import). Dry-run gate and operator confirmation required.
- Reads credentials
- Sends data out
1 other project uses a version of this.
Adopted by
Most recently taken up by
- callumflack/skillstheir own version, first seen Oct 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- callumflack/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository22 other files it gives its agents.
- ai-directorSkill
- code-implementationSkill
- code-repairSkill
- code-verifySkill
- concept-runSkill
- db-migrationSkill
- deploy-basicSkill
- deploy-filesSkill
- dev-stackSkill
- docsSkill
- feature-specSkill
- infra-terraformSkill
- plan-foundationSkill
- plan-masterSkill
- plan-repairSkill
- plan-verifySkill
- process-routerSkill
- project-bootstrapSkill
- project-query-setupSkill
- session-controlSkill
- tauri-developmentSkill
- x-directorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Key secrecy: never print/echo/log the key.
- Distinctive: line 25
Auth/RBAC failures are reported, never worked around: No privilege escalation attempts, no key sharing.
- Distinctive: line 27
Agent parses semantics, not a rigid grammar: If a section is ambiguous or a table lacks the documented columns → stop and ask (proposal D3 …
- Very specific: line 130
Never write to the plan file or anything under .work/ (sync is one-way, invariant I1).
- Very specific: line 175
If --project argument provided:
- Distinctive: line 176
If UUID format → use directly.
- Very specific: line 178
If exactly one match → show Project: <name> (<id>) and ask for confirmation.
- Distinctive: line 179
If zero or multiple → ask operator to disambiguate.
- Very specific: line 183
Read the plan file at <plan path>.
- Very specific: line 195
Every milestone has non-empty summary
- Very specific: line 196
Every task description starts with ## Intent and contains ## Acceptance (when acceptance exists) and ## Technical details (when provenance …
- Distinctive: line 197
All statuses mapped to valid vocab (unknown → ask)
- Very specific: line 236
Wait for explicit yes. If not yes → stop.
- Very specific: line 261
Run key resolution, test GET /v1/agent/projects, list project names/ids.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
plan-sync
Purpose: Parse a plan markdown file (typically the live plan .work/plans/full/*-full-plan.md; any plan path may be passed) into a JSON manifest v1 and import it into tools-project via the transactional plan-import endpoint. Dry-run preview and explicit operator confirmation are mandatory.
Deploy to: Any Agent OS framework (.ai, .ai.ui, .ai.biz, .ai.soc, .ai.cto, .ai.flutter, .ai.mlt) — optional integration.
Prerequisites: tools-project instance reachable; API key in ~/.tools-project-key or TOOLS_PROJECT_API_KEY env (same resolution as project-query-setup + MCP).
Hard rules
- Read-only toward plan sources and the repo. The only write is the single
POST …/plan-importcall, gated by operator confirmation. - Never commit without operator confirmation. Dry-run → preview → explicit
yes→ commit. No confirmation = stop at preview. - Key secrecy: never print/echo/log the key; never pass it on a command line (
ps-visible) — read the file and set the header in-process or via stdin; never write key material totmp/, repo files, or shell history; remoteBASE_URLmust behttps://…. - No MCP changes; no new endpoints; no local database access; no raw SQL. The MCP remains read-only (project-query-setup hard rule 2).
- Auth/RBAC failures are reported, never worked around. No privilege escalation attempts, no key sharing.
- Terse responses; Operator handoff contract (Form A/B) at end of turn. Per SKILL_DEPENDENCIES.md.
- Agent parses semantics, not a rigid grammar. If a section is ambiguous or a table lacks the documented columns → stop and ask (proposal D3 rejected deterministic parsers for exactly this reason).
- Never edit the plan file or anything under
.work/. Sync is one-way (invariant I1). Format drift is fixed in this skill.
Modes
| Invocation | Mode |
@plan-sync status | Connectivity + key + base URL check; list reachable projects (also the setup verification) |
@plan-sync sync - <plan path> | Full flow: parse → validate → dry-run → preview → operator confirmation → commit → report (default) |
@plan-sync dry-run - <plan path> | Same as sync but stops after the preview; never commits |
@plan-sync help | Usage, auth setup pointer (@project-query-setup key), limits |
Optional argument on sync/dry-run: --project <uuid|slug|project_key>. If omitted or not a UUID: resolve via GET /v1/agent/projects with the same key, match slug/project_key, and show the matched project name + id for operator confirmation before any POST. If ambiguous → ask, never guess.
Auth & endpoint resolution (mirror the MCP exactly — zero new config)
- Key: env
TOOLS_PROJECT_API_KEY→ file~/.tools-project-key(first line that is notBASE_URL=…) → envAGENT_API_KEY(legacy). Same order asmcp_server.py:41-56. - Base URL: env
API_BASE_URL→BASE_URL=line in the key file →http://localhost:8300. Same asmcp_server.py:59-74. - Missing/empty key → stop, print
@project-query-setup keyguidance. Never invent a key. - Security hard rules (copy into skill): never print/echo/log the key; never pass it on a command line (
ps-visible) — read the file and set the header in-process or via stdin; never write key material totmp/, repo files, or shell history; remoteBASE_URLmust behttps://…. - HTTP status mapping:
401→ key missing/invalid →@project-query-setup key403→ project role < contributor → ask owner for role404→ wrong project id400→ print the field-error list verbatim and fix the manifest (nothing was written)500→ project unchanged (transaction rolled back) → report and stop
Manifest envelope (v1) — embed this in the skill
{
"manifest_version": 1,
"source_path": ".work/plans/full/20260925-full-plan.md",
"plan_version": "v1.9",
"project": {"name": "…", "key": "…", "description": "…"},
"milestones": [{"plan_ref": "M1", "key": "M1", "name": "…", "summary": "One plain sentence describing the milestone goal.", "description": "…", "sort_order": 1, "status": "pending"}],
"tasks": [{"plan_ref": "M1-T1", "milestone_ref": "M1", "title": "Enterprise customization cascade (T3, ADR 020)", "description": "## Intent\nImplement the location scope layer cascade (org default → practice → clinic) with safety floors.\n\n## Acceptance\n- A lower scope cannot override an org safety floor\n- A blueprint import carries no PHI and lands disabled\n\n## Technical details\n- plan_ref: M12-T15\n- plan_version: 1.9\n- source: .work/plans/full/20260925-full-plan.md\n- files: customization/**, platform/\n- traces: FR26, NFR19\n- complexity: L", "status": "pending"}],
"components": []
}Constants to embed:
manifest_versionmust be1(server rejects anything else with 400).plan_ref: milestones^M\d+$, tasks^M\d+-T\d+$; unique within the manifest; every task'smilestone_refmust exist inmilestones[].- Limits:
tasks ≤ 500,milestones ≤ 100;title1–120 chars;name1–200 chars. - Task status vocabulary — accepts plan or app vocab; mapping applied server-side:
pending→todo,done→done,blocked→blocked,deferred→cancelled(app vocabtodo|in_progress|blocked|done|cancelledpasses through). - Milestone status:
pending | active | blocked | done | cancelled(defaultpending). At most oneactiveper project at commit (server enforces). - Milestone
summary: one plain sentence (the plan's milestone heading or goal line). Rendered by tools-project under the milestone name. Required for every milestone. - Status application: statuses are applied at task creation only. Tasks that already exist in the app keep their local status (importer R13); a differing plan status is reported as an informational
status_divergenceconflict, never auto-overwritten. Plandoneon an existingtodotask therefore needs a manual change in the app UI after import.
Parsing rules (plan markdown → manifest)
From the actual plan format (.work/plans/full/*-full-plan.md):
- Milestone =
### M<n> — <name>heading sections (metadata:**Objective:**,**Scope — in/out:**,**Deliverables:**, …). Populateplan_ref: "M<n>",name,descriptionfrom the section body,sort_order= section order.summary= one plain sentence from the milestone heading or its goal line (e.g., the**Objective:**first sentence). Required. - Tasks = the
#### Tasks - M<n>: …tables: columns| ID | Description | Files | FR/NFR | Complexity | Acceptance | Status |.ID→plan_ref(e.g.M1-T1), its section →milestone_ref. title= short human label, ≤120 chars, no markdown emphasis markers (**,__, backticks), no trailing ellipsis. Derive from theDescriptioncell: take the leading bold label or first clause before—/em-dash. Example:**Enterprise customization cascade (T3, ADR 020)** — the \location` scope layer…→Enterprise customization cascade (T3, ADR 020)`.description= compose exactly three headings in this order, no---rule, no inline**Provenance:**line:## Intent <one plain-language sentence: what this task delivers, in the plan's own words where possible> ## Acceptance - <criterion 1> - <criterion 2> ## Technical details - plan_ref: M12-T15 - plan_version: 1.9 - source: .work/plans/full/20260925-full-plan.md - files: customization/**, platform/ - traces: FR26, NFR19 - complexity: LRules:
- A1 Heading names and order are fixed:
## Intent,## Acceptance,## Technical details. - A2
## Acceptanceitems are one bullet per criterion — split theAcceptancecell on;and sentence boundaries instead of emitting one run-on line. Never drop a criterion. - A3
## Technical detailsis a bullet list of- key: valuepairs with exact keys:plan_ref,plan_version,source,files,traces,complexity(renamefr_nfr→traces; keep FR/NFR ids verbatim, comma-separated). - A4 Values stay verbatim and lossless:
plan_ref,source,plan_version, FR/NFR ids, file globs, complexity — no truncation, no re-wording. - A5
## Intentis derived, never invented: take the plan row's own words (first clause / goal). If no separable summary, use first clause after the leading bold label. - A6 Omit a block only when it has no content (
## Technical detailsmay be absent for plan rows with no provenance;## Acceptancemay be absent when the plan records none). Never emit an empty heading.
- A1 Heading names and order are fixed:
Complexitymust NEVER becomepriority(SPEC R22) — complexity is description text only.Statuscell → plan status via the mapping above; unknown status → ask operator, never guess.source_path= the plan file path as given;plan_version= derived from the latest amendment when the plan has them (e.g.Amendment (v1.9 — …)), else the header (**Version:**/# Full Plan v…), else prompt.latest= the highestvnumber among the**Amendment (v…)lines — never the last such block in file order (plans append out of order:v1.2, v1.6, v1.7, v1.8, v1.9, v1.5, v1.4, v1.3), otherwise every task'splan_versionis mislabelled. When header ≠ latest amendment, surface the derived value in the preview for operator confirmation before POST (headers often lag amendments).- Copy freshness: if the path points at a copy (e.g. under
.work/feedback/plans-import/), compare its latest amendment (highestv, not file order) + task count against the live plan first — a stale copy silently syncs outdated content. Drift → stop and ask the operator to refresh the copy or pass the live plan (this skill never writes.work/).
Mandatory safety gates
- Always
dry_run=truefirst (SPEC R7 — the preview is what the operator approves). Client-side pre-validate against §Manifest envelope before even the dry run. - Preview must show: milestones/tasks
created / updated / obsolete / reactivatedcounts + fullconflicts[](kind, plan_ref, detail) in a readable table split intoAction required(resolve before/after commit) andInformational(proceeds unchanged — e.g.status_divergence), and state plainly: nothing written yet; obsolete = will be flagged, never deleted; local statuses will be preserved — plan-status-ahead-of-local is informational here and appears again in the post-commit follow-up list. - Real POST only after explicit operator confirmation in the same session. No confirmation → stop at preview.
- Re-runs are safe (idempotent upsert matched by
(project_id, plan_ref)); a second identical import reportsupdatedcounts, zero creates. - Never write to the plan file or anything under
.work/(sync is one-way, invariant I1). Never edit app code — a format drift is fixed in this skill.
Report (post-commit)
Print the server's PlanImportResult: per-entity counts, conflict list, plus a one-line pointer to the project's activity feed (one kind: system summary row is the audit trail). When the plan's status differs from the resulting local status for any task, print a Follow-up in app UI checklist (M{N}-T{N}: plan=<status> / app=<status> → set in the app; MCP is read-only, import preserves local status). Close per the Operator handoff contract (Form B if follow-up decisions exist, else Form A).
Procedure (sync mode)
Step 1 — Resolve auth & endpoint
# Key resolution (mirror mcp_server.py)
if [ -n "$TOOLS_PROJECT_API_KEY" ]; then
KEY="$TOOLS_PROJECT_API_KEY"
elif [ -f ~/.tools-project-key ]; then
KEY=$(grep -v '^BASE_URL=' ~/.tools-project-key | head -n1)
elif [ -n "$AGENT_API_KEY" ]; then
KEY="$AGENT_API_KEY"
else
echo "No API key found. Run @project-query-setup key first."
exit 1
fi
# Base URL resolution
if [ -n "$API_BASE_URL" ]; then
BASE_URL="$API_BASE_URL"
elif [ -f ~/.tools-project-key ] && grep -q '^BASE_URL=' ~/.tools-project-key; then
BASE_URL=$(grep '^BASE_URL=' ~/.tools-project-key | cut -d= -f2-)
else
BASE_URL="http://localhost:8300"
fi
# Validate remote BASE_URL is https
if [[ "$BASE_URL" != http://localhost* && "$BASE_URL" != http://127.0.0.1* && "$BASE_URL" != https://* ]]; then
echo "Remote BASE_URL must be https://"
exit 1
fiStep 2 — Resolve project
If --project argument provided:
- If UUID format → use directly.
- Else →
GET $BASE_URL/v1/agent/projectswithX-Api-Key, find match onslugorproject_key. - If exactly one match → show
Project: <name> (<id>)and ask for confirmation. - If zero or multiple → ask operator to disambiguate.
Step 3 — Parse plan markdown
Read the plan file at <plan path>. Extract:
plan_versionfrom the latest amendment — the highestvnumber, not the last block in file order (see §Parsing rules) — (e.g.Amendment (v1.9 …)), else header (e.g.# Full Plan v1.7or**Version:** v1.7), else prompt; header ≠ latest amendment → show derived value in preview for confirmation.- Milestones from
### M<n> — <name>sections (in order). - Tasks from
#### Tasks - M<n>: …tables with columnsID,Description,Files,FR/NFR,Complexity,Acceptance,Status. - Build manifest per §Manifest envelope.
Validation before dry-run:
manifest_version == 1- All
plan_refunique, correct regex - All
milestone_refexist in milestones tasks ≤ 500,milestones ≤ 100title1–120 chars,name1–200 chars- Every milestone has non-empty
summary - Every task
descriptionstarts with## Intentand contains## Acceptance(when acceptance exists) and## Technical details(when provenance exists) — no**Provenance:**and no---line - All statuses mapped to valid vocab (unknown → ask)
Step 4 — Dry-run preview
curl -s -X POST "$BASE_URL/v1/projects/$PROJECT_ID/plan-import?dry_run=true" \
-H "X-Api-Key: $KEY" \
-H "Content-Type: application/json" \
-d @manifest.jsonParse response. Show table:
| Kind | Count | Details |
| Milestones created | N | … |
| Milestones updated | N | … |
| Milestones obsolete | N | … |
| Tasks created | N | … |
| Tasks updated | N | … |
| Tasks obsolete | N | … |
| Tasks reactivated | N | … |
| Conflicts — action required | N | (kind, plan_ref, detail) — resolve before/after commit |
| Conflicts — informational | N | (kind, plan_ref, detail) — e.g. status_divergence, proceeds unchanged |
Print: Nothing written yet. Obsolete = flagged, never deleted. Local statuses preserved (plan-ahead statuses → follow-up list).
Preview sample (one task): show the composed title (≤120 chars, single clause), and the description with ## Intent, ## Acceptance bullets, ## Technical details list — so the operator can verify the new format before confirming.
Step 5 — Operator confirmation (Form B handoff)
**Needs your approval:**
1. Proceed with import to project <name> (<id>)? — see manifest.json (lines 1–50)
**Next step:**
`@plan-sync sync - <plan path> --project <id> --confirm`Wait for explicit yes. If not yes → stop.
Step 6 — Commit (real POST)
curl -s -X POST "$BASE_URL/v1/projects/$PROJECT_ID/plan-import" \
-H "X-Api-Key: $KEY" \
-H "Content-Type: application/json" \
-d @manifest.jsonStep 7 — Report result
Print PlanImportResult from server. Include activity feed pointer. Close per Operator handoff contract.
Procedure (dry-run mode)
Steps 1–4 only. Stop after preview. Close per Operator handoff contract (Form A or B).
Procedure (status mode)
Run key resolution, test GET /v1/agent/projects, list project names/ids. Close per Operator handoff contract.
Procedure (help mode)
Show modes table, auth setup (@project-query-setup key), limits (500 tasks, 100 milestones), manifest version (1), endpoint (POST /v1/projects/{id}/plan-import), and that dry-run is mandatory before commit. Note that tasks now use the three-block description format (## Intent, ## Acceptance, ## Technical details), titles are short labels (≤120 chars, no markdown), and milestones include a one-sentence summary.
Anti-patterns to refuse
- Claiming "imported" without a live
PlanImportResultresponse - Skipping dry-run and going straight to commit
- Asking the user to paste their API key into chat
- Storing the key in
/tmpor any non-~/.tools-project-keylocation - Logging the key value in any output
- Attempting to work around 401/403/404 errors
- Modifying the plan file or any
.work/artifact - Inventing a resolution for an ambiguous project match — ask the operator
Reference
| Doc | Path |
| Plan import SPEC | .work/features/plan-sync/20260929-SPEC.md (tools-project repo) |
| MCP server (read-only) | .opencode/mcp/project-mcp/mcp_server.py |
| Auth/key setup | @project-query-setup key |
| Operator handoff contract | .ai/skills/SKILL_DEPENDENCIES.md |
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
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.

