Skip to content

feat(skill): add deft_version field to deft-setup artifact templates (#270)#277

Merged
MScottAdams merged 2 commits intomasterfrom
agent3/feat/270-user-md-versioning
Apr 10, 2026
Merged

feat(skill): add deft_version field to deft-setup artifact templates (#270)#277
MScottAdams merged 2 commits intomasterfrom
agent3/feat/270-user-md-versioning

Conversation

@MScottAdams
Copy link
Copy Markdown
Collaborator

Summary

Add deft_version field to deft-setup artifact templates (USER.md and PROJECT.md) and implement stale USER.md detection via version field comparison.

Implements spec task t3.2.1 -- Validate USER.md against current schema + artifact format versioning (#270).

Changes

skills/deft-setup/SKILL.md

  • Change 1: USER.md template (Phase 1) now includes **deft_version**: 0.15.0 after the legend line
  • Change 2: PROJECT.md template (Phase 2) now includes **deft_version**: 0.15.0 after the legend line
  • Change 3: New ### USER.md Freshness Detection subsection -- detects stale USER.md via missing/outdated deft_version, queries missing fields individually (no full re-interview), writes current version after migration
  • Change 4: New ! rule in Anti-Patterns requiring deft_version on every generate/update; corresponding anti-pattern against omitting it

tests/content/test_skills.py

  • 4 new tests: USER.md template deft_version, PROJECT.md template deft_version, stale detection guidance, ! rule for deft_version

SPECIFICATION.md

  • t3.2.1 status updated from [pending] to [completed]

CHANGELOG.md

  • Entry added under [Unreleased]

Checklist

  • SPECIFICATION.md has task coverage (t3.2.1)
  • CHANGELOG.md entry under [Unreleased]
  • task check passes (95/95 skill tests pass; pre-existing Windows teardown issue unrelated)
  • Feature branch (not direct to master)
  • /deft:change N/A (fewer than 3 files of substance changed)

Closes #270

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 10, 2026

Greptile Summary

This PR implements spec task t3.2.1 by adding a deft_version field (value 0.15.0) to both the USER.md and PROJECT.md templates in skills/deft-setup/SKILL.md, and adds a ### USER.md Freshness Detection subsection that guides the agent to detect stale USER.md files and query only missing fields rather than re-running the full Phase 1 interview. Four companion tests are added to test_skills.py, and SPECIFICATION.md/CHANGELOG.md are updated accordingly.

Confidence Score: 5/5

Safe to merge — all remaining findings are P2 style suggestions with no impact on current correctness.

The feature is correctly implemented: both templates now carry the deft_version field, the Freshness Detection rules cover the expected cases, the four new tests pass, and CHANGELOG/SPECIFICATION are properly updated. The only open finding is a P2 maintenance note about four hard-coded version strings that must stay in sync on future bumps — not a current defect.

skills/deft-setup/SKILL.md — four hard-coded version strings to keep in sync on future version bumps.

Important Files Changed

Filename Overview
skills/deft-setup/SKILL.md Adds deft_version to USER.md and PROJECT.md templates plus Freshness Detection rules; version string is hard-coded in four locations that must stay in sync on each version bump.
tests/content/test_skills.py Adds 4 content-checks for deft_version presence, stale-detection copy, and anti-pattern wording; all checks are correctly anchored to the updated SKILL.md content.
CHANGELOG.md Adds one Unreleased entry describing the deft_version feature; format and placement are correct.
SPECIFICATION.md Updates t3.2.1 status from [pending] to [completed]; no other changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[deft-setup: existing USER.md found] --> B{Check deft_version}
    B -->|missing| C[Rule 1: Treat as stale]
    B -->|present, differs from 0.15.0| D[Rule 2: Check for missing fields]
    B -->|matches 0.15.0 + all fields present| E[Rule 5: USER.md is fresh — skip Phase 1]
    C --> F{Fields missing?}
    D --> F
    F -->|yes| G[Rule 3: Query user for each missing field individually]
    F -->|no — none needed| H[Rule 4: Write deft_version 0.15.0 to USER.md]
    G --> H
    H --> I[Continue to Phase 2]
    E --> I
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: skills/deft-setup/SKILL.md
Line: 93-101

Comment:
**Version string duplicated in four places**

`0.15.0` is hard-coded in four separate locations — rule 2 (comparison value), rule 4 (write value), the USER.md template, and the PROJECT.md template. If any of these drift during a version bump, freshness detection breaks silently: a template that stamps `0.16.0` while rule 2 still compares against `0.15.0` will flag every newly-generated file as immediately stale; the reverse drift causes migration to never trigger. Consider adding a comment pinpointing all four locations so future version bumps are updated atomically.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (3): Last reviewed commit: "fix: address Greptile review findings (b..." | Re-trigger Greptile

Comment thread skills/deft-setup/SKILL.md
@MScottAdams MScottAdams force-pushed the agent3/feat/270-user-md-versioning branch from af2928a to 3e2669a Compare April 10, 2026 01:40
@MScottAdams
Copy link
Copy Markdown
Collaborator Author

rebase-only onto master (post-#276 merge) -- no logic changes

…270)

- USER.md and PROJECT.md templates now include deft_version field

- Returning session: detect stale USER.md via missing/outdated deft_version

- Missing fields queried individually -- no full re-interview on partial staleness

- ! rule: always set deft_version when generating or updating USER.md/PROJECT.md

- tests/content/test_skills.py: 4 new tests for versioning behavior
- Decouple version-write step from field-update step in Freshness Detection

- Rule 4 now fires whenever deft_version is missing/outdated, regardless of

  whether any fields needed updating (fixes stale version for pre-versioning users)
@MScottAdams
Copy link
Copy Markdown
Collaborator Author

rebase-only onto master (post-#276 + #278 merges) -- no logic changes, CHANGELOG conflict resolved

@MScottAdams MScottAdams force-pushed the agent3/feat/270-user-md-versioning branch from 3e2669a to 359cd0e Compare April 10, 2026 01:45
@MScottAdams MScottAdams merged commit 15e97df into master Apr 10, 2026
9 checks passed
@MScottAdams MScottAdams deleted the agent3/feat/270-user-md-versioning branch April 10, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(setup): validate USER.md against current schema -- query user for missing fields if stale

1 participant