agentleFS
holgerleichsenringholgerleichsenring/specification-first-agentic-development/skills/update-project/SKILL.md

update-project

Skill9 starsChanged 56 days agoMITView on GitHub

Sync an existing project's methodology files with a newer plugin version. Triggers when the user says 'update methodology', 'sync templates', 'update spec-first', or when methodology.version in context.yaml is older than the plugin version. Handles the big-bang v1.x → v2.0 layout migration.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. tartinerlabs/skills★ 8same 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 repository9 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 8 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the user's methodology version:

    line 27
  2. Distinctive:

    If they match, tell the user they're up to date.

    line 33
  3. Distinctive:

    Use git mv so history is preserved.

    line 64
  4. Very specific:

    Update the schema reference: # yaml-language-server: $schema=context.schema.json → # yaml-language-server: …

    line 67
  5. Very specific:

    Add meta.workdir: "." (single-stack default — the existing project's code lives at the repo root from this context's perspective).

    line 68
  6. Very specific:

    If a .{project}/context.schema.json exists alongside, leave it at the project root.

    line 71
  7. Very specific:

    Read .{project}/decisions.md.

    line 75
  8. Very specific:

    If .{project}/notes/ or .{project}/concepts/ exist:

    line 116
  9. Distinctive:

    Do NOT automatically move them.

    line 117
  10. Very specific:

    Never overwrite user customizations silently.

    line 151
  11. Very specific:

    If .{project}/memory/ is missing:

    line 159
  12. Very specific:

    Create .{project}/memory/ and copy templates/memory/MEMORY.md into it as the empty index.

    line 161
  13. Very specific:

    If CLAUDE.md has no memory/recall discipline section yet, offer to add the one from templates/prompt.md alongside.

    line 175
  14. Very specific:

    Write the approved changes.

    line 197
  15. Distinctive:

    Before the v1 → v2 migration, require the working tree to be clean (or explicitly confirmed otherwise) so the migration's effects are …

    line 219
  16. Distinctive:

    Use git mv for file moves so history is preserved.

    line 220
  17. Distinctive:

    Never modify files outside the project's methodology directory unless explicitly told to (e.g., updating CLAUDE.md at root).

    line 221
  18. Distinctive:

    Always show diffs before writing.

    line 222

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update Project

Sync an existing project's Specification-First methodology files with the latest plugin version. Preserves user customizations while bringing in methodology improvements.

For v1.x → v2.0 this performs a one-shot structural migration: the flat context.yaml + coding-principles.md move into contexts/default/, and the append-only decisions.md Markdown log splits into per-decision YAML files under decisions/.

When to Use

  • The plugin was updated and the project's methodology.version in context.yaml is older
  • The user explicitly asks to sync or update the methodology
  • New templates or structural changes were introduced in a newer plugin version

How It Works

The plugin's templates carry an inline methodology version (currently 2.4.0). The user's context.yaml has a methodology.version field set during bootstrap. When these differ, this skill helps merge the changes.

Steps

1. Check versions

Read the user's methodology version:

  • v2.x project: read .{project}/contexts/<default-or-only>/context.yaml → methodology.version.
  • v1.x project: read .{project}/context.yaml (flat) → methodology.version. Missing field = treat as 0.0.0.

Compare with the plugin's current version from .claude-plugin/plugin.json (version field).

If they match, tell the user they're up to date. Done.

2. Pick the migration path

FromToPath
0.0.02.4.0v1-to-v2 (treat as v1.0.0), the 2.1.0 additions, then 3d-3f
1.x.x2.4.0v1-to-v2, the 2.1.0 additions, then 3d-3f
2.0.x2.4.02.1.0 additions (3c) + additive merge (3b), then 3d-3f
2.1.x2.4.03d-3f, then additive merge (3b)
2.2.x2.4.03e, 3f, then additive merge (3b)
2.3.x2.4.03f
2.4.x2.y.yadditive/diff merge (no migration)

For v1 → v2 run step 3a (the structural migration), step 3c (the 2.1.0 additions), 3d, 3e and 3f. For 2.0.x run 3c, 3b, 3d, 3e and 3f. For 2.1.x run 3d, 3e, 3f and 3b. For 2.2.x run 3e, 3f and 3b. For 2.3.x run 3f. For later 2.x → 2.y skip to step 3b (additive merge).

3a. v1 → v2 big-bang migration

The migration is mechanical and structural-only. No content is rewritten — files are MOVED, formats are CONVERTED. Show the operator the full plan before touching anything; require explicit approval.

Confirm with the operator before starting that:

  • The repo is committed clean (so git diff shows exactly the migration changes).
  • Any in-flight work in phases/active/ is at a safe checkpoint (the migration does not touch phase YAMLs but the operator should know what state they're starting from).

3a.1. Move root context + principles into contexts/default/

.{project}/context.yaml          → .{project}/contexts/default/context.yaml
.{project}/coding-principles.md  → .{project}/contexts/default/coding-principles.md

Use git mv so history is preserved.

Inside the moved context.yaml:

  • Update the schema reference: # yaml-language-server: $schema=context.schema.json → # yaml-language-server: $schema=../../context.schema.json.
  • Add meta.workdir: "." (single-stack default — the existing project's code lives at the repo root from this context's perspective).
  • Bump methodology.version to the plugin's current version (from .claude-plugin/plugin.json).

If a .{project}/context.schema.json exists alongside, leave it at the project root. The relative path adjustment above handles the new depth.

3a.2. Split the decisions.md log into per-phase YAMLs

Read .{project}/decisions.md. The v1 format groups decisions under ## p{NN}: Title headings with - [Category] Decision -- rationale bullets.

One YAML file per phase, all bullets under the heading become entries in that file's decisions: array. NOT one file per bullet.

For each ## p{NN}: Title heading:

  • Collect all - [Category] body bullets underneath (until the next heading).
  • For each bullet:
    • category = {Category}. Normalise off-canonical labels (Scope already canonical; map Fix/Decision/Note/Quality/Cleanup/Reuse/Safety → Implementation; Flow → Architecture; Configuration → Tooling). Warn on anything else and default to Implementation.
    • Split body at the first — (em-dash) or -- (double-dash with spaces) — left side becomes chose:, right side becomes reason:. If there's no separator, the entire body becomes chose: and reason: is omitted.
    • over: is OMITTED unless the body text clearly names a rejected alternative. No <TBD> placeholders — the schema makes over: optional.
  • Emit one file:

    # yaml-language-server: $schema=../decision.schema.json
    phase: p{NN}
    decisions:
      - category: {Category}
        chose: "{...}"
        reason: |
          {...}
      - category: {Category}
        chose: "{...}"
        ...
  • File path: .{project}/decisions/p{NN}.yaml. The filename IS the phase ID — no slug, no per-bullet suffix.

Convert any pre-existing .{project}/decisions/*.md files in the same shape: read each, derive the phase ID from its heading (or from the filename prefix as fallback, e.g. p0146d-observation-fields.md → p0146d.yaml), MERGE its bullets into the same phase's YAML if decisions.md also had entries for that phase, otherwise emit a fresh phase YAML. git rm each .md after.

After the split:

  • git rm .{project}/decisions.md.
  • The big-bang means the Markdown log is gone — every entry now lives in its phase's YAML file.

For a 1000-bullet decisions.md spanning 200 phases, expect ~200 YAML files — one per phase.

3a.3. Add the schemas

Copy templates/decision.schema.json and templates/phase-spec.schema.json from the plugin into .{project}/ if they're missing. Editors pick them up from there.

3a.4. Emit warnings for notes/ and concepts/ directories

If .{project}/notes/ or .{project}/concepts/ exist:

  • Do NOT automatically move them. Per operator instruction: "für mich sind das keine decisions. das sind die konzepte die zu phasen führen und dann hinterher decisions ableiten."
  • Emit a warning listing every file under those directories and recommend the operator choose, per file:
    • (a) Copy the file out of .{project}/ (e.g. into a docs/notes/ or a separate branch) before continuing — they're conceptual exploration, not part of the spec-first artifact set.
    • (b) Rename to phases/done/p{NN}-base-concept-{topic}.yaml with a reserved ID range the operator picks. The file becomes a "base-concept phase" — documented foundation that was never executed as work but shaped subsequent phases.

The migration does NOT pick one — operator decides per file.

3a.5. Update state.{done,active,planned} entries (optional housekeeping)

The state.{done,active,planned} sections in the moved context.yaml still reference phase YAMLs by path. v1 paths like .{project}/phases/... are unchanged in v2 — no rewrite needed. If the operator wants to add new applies_to: annotations to existing phase YAMLs, that's done lazily as each phase comes back into focus, not as part of this migration.

3b. 2.x → 2.y additive merge

For each methodology file, compare the user's version with the plugin's template:

FileWhat to compare
contexts/<name>/context.yamlStructure and field names (not user content)
contexts/<name>/coding-principles.mdSections and rules (not project-specific values)
decision.schema.jsonSchema fields and validation rules
phase-spec.schema.jsonSchema fields and validation rules
context.schema.jsonSchema fields (verify, evidence_roots)
CLAUDE.md / prompt.mdWorkflow steps, read order, rules

Present a summary of what's new or changed per file. Be specific: "New field meta.workdir added to context.yaml", not "context.yaml was updated".

3b.1. Propose merge

For each file with changes:

  • Additive changes (new fields, new sections): propose adding them while keeping all existing user content intact.
  • Modified sections (updated wording, reordered steps): show the diff and let the user choose between old and new.
  • Removed sections: flag them but don't auto-delete. The user decides.

Never overwrite user customizations silently. The user's contexts/<name>/context.yaml stack, arch, quality, and state sections are theirs — only touch the methodology-related structure.

3c. 2.1.0 additions: memory store + root CLAUDE.md read order

Two retroactive changes bring pre-2.1.0 projects to parity with fresh bootstraps.

3c.1. Create the memory store (structural-only)

If .{project}/memory/ is missing:

  • Create .{project}/memory/ and copy templates/memory/MEMORY.md into it as the empty index.
  • Structural-only — no auto-distillation of history. Do NOT convert the project's decisions, git log, or phase records into memory entries as part of this migration. The store opens empty; memories accumulate from future sessions and runs (entry convention: one Markdown file per memory beside the index, frontmatter name kebab-slug / description one line / metadata.type in feedback | project | reference — see templates/memory/example-memory.md), and a feedback entry becomes policy only after operator ratification.

3c.2. Patch the root CLAUDE.md read-order block

A project bootstrapped before 2.1.0 typically still carries the v1 read order in its root CLAUDE.md (flat context.yaml, the retired decisions.md append log, phases/active/*.md). Sessions obey CLAUDE.md first, so they look in the wrong place before recovering — fix it here:

  • Locate the context-file read-order block in the project's root CLAUDE.md.
  • Replace ONLY that block with the v2 order (as in templates/prompt.md):
    1. glob contexts/*/context.yaml
    2. each context's coding-principles.md
    3. phases/active/*.yaml
    4. decisions/*.yaml
    5. memory/MEMORY.md (recall entry detail from memory/<name>.md on demand)
  • If CLAUDE.md has no memory/recall discipline section yet, offer to add the one from templates/prompt.md alongside.

Because the root CLAUDE.md lives OUTSIDE the methodology directory, this edit ALWAYS requires explicit operator approval: show the exact before/after diff of the block and apply only after the operator approves. Leave every other section of CLAUDE.md untouched.

3d. 2.2.0: date-minted ids and premise keys in the schemas

Replace the project's copies of phase-spec.schema.json and decision.schema.json with the plugin's templates. 2.2.0 accepts date-minted ids (2026-08-24-8a3f, series 2026-08-24-8a3fa) beside every counter id the project already carries, and lets a spec state scope, facts and assumptions. Nothing in the project is renamed. Root CLAUDE.md: if it tells sessions to mint the next counter id, point it at create-phase's minting rule instead.

3e. 2.3.0: context schema and the loop

Copy templates/context.schema.json into .{project}/ (it is what every context.yaml's $schema comment already points at; its top level is open, so no existing key fails). Offer the commented verify: and evidence_roots: blocks from templates/contexts/default/context.yaml. Root CLAUDE.md: offer the 12-step workflow from templates/prompt.md — a worktree per phase, review-spec before code, deliver-spec at the end — with the same before/after approval as 3c.2. Nothing is renamed.

3f. 2.4.0: execute-phase is apply-spec, ship-phase is deliver-spec

Nothing in the project is renamed. If the root CLAUDE.md or any project document names execute-phase or ship-phase, replace them with apply-spec and deliver-spec. The old skill names still answer in 2.4.0 and forward to the new ones; they are removed in the next release.

4. Ask approval

Show the complete list of proposed changes and ask the user to approve before writing anything.

5. Apply changes

Write the approved changes. Update methodology.version in every contexts/<name>/context.yaml to match the plugin version.

6. Log the update

Append a decision entry to the phase YAML the project uses for meta updates (or mint a fresh id for the update, as create-phase does, and create decisions/{id}.yaml):

# yaml-language-server: $schema=../decision.schema.json
phase: 2026-08-24-8a3f          # the id you minted, or an existing meta-phase id the project uses

decisions:
  - category: Tooling
    chose: "Updated Spec-First methodology from v{old} to v{new}"
    over: "Staying on v{old}"
    reason: |
      {Summary of key changes: contexts/ layout, YAML decisions, ...}
      Migration mode: {v1-to-v2 big-bang | 2.x additive merge}.

Safety

  • Git is your safety net. If something goes wrong, the user can git diff and revert.
  • Before the v1 → v2 migration, require the working tree to be clean (or explicitly confirmed otherwise) so the migration's effects are isolated in git diff.
  • Use git mv for file moves so history is preserved.
  • Never modify files outside the project's methodology directory unless explicitly told to (e.g., updating CLAUDE.md at root).
  • Always show diffs before writing.
  • Preserve every line of user-written content in contexts/<name>/context.yaml (stack, arch, quality, state sections).
  • For the v1 → v2 decisions-log split: when a bullet's body has no obvious over: (rejected alternative), OMIT the over: field. The schema makes it optional — never invent placeholder text.

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.