feat(staleness): add check_workspace_staleness helper + bump 0.14.0#39
Merged
Merged
Conversation
…ump 0.14.0 Adds a thin public wrapper that locates `.help/` under a workspace, loads the manifest, and runs check_staleness — returning an empty StalenessReport when no manifest is present. Motivates the attune-gui staleness model fix: the GUI currently uses mtime > 14 days as a stale signal and disagrees with attune-author's content-drift definition. With this helper, the GUI can call one function with just a workspace path instead of duplicating the manifest-load + `.help/` convention. Also fixes the stale __version__ string in __init__.py (was pinned at 0.11.1 through the 0.12/0.13 releases). 3 new tests cover: parity with the direct API, empty-report-on-missing manifest, and features= filter passthrough. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
silversurfer562
added a commit
that referenced
this pull request
May 22, 2026
… helper (#40) Promotes the [Unreleased] block (Phase 2 ground-truth context injection, Phase 3 faithfulness judge, Phase 4 tutorial static check, and the check_workspace_staleness convenience helper) into a versioned 0.14.0 heading. Version was already bumped in #39. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
check_workspace_staleness(workspace, features=None) -> StalenessReportthat locates.help/under a workspace, loads the manifest, and runs the existingcheck_staleness. Returns an empty report when no manifest is present (notry/except FileNotFoundErrorneeded by callers).0.13.0→0.14.0. Also fixes a pre-existing bug:src/attune_author/__init__.py:__version__was pinned at"0.11.1"through the 0.12/0.13 releases.TestCheckWorkspaceStaleness: parity with direct API, empty-report-on-missing-manifest,features=filter passthrough.Motivation
The attune-gui dashboard currently calls templates "stale" when their mtime > 14 days, while
attune-author statusdefines stale as source-hash drift. End result: GUI cries wolf on current templates, users runattune-author regenerateand get "Stale features: 0."The right model is attune-author's (content drift). The GUI should ask this library, not stat the filesystem. This helper makes it a one-liner.
What changed
src/attune_author/staleness.pycheck_workspace_staleness(). Importsload_manifest.src/attune_author/__init__.py__version__to0.14.0.pyproject.toml0.13.0→0.14.0.CHANGELOG.md[Unreleased] → Added.tests/test_staleness.pyTestCheckWorkspaceStalenessclass (3 tests).check_stalenessis unchanged. The helper is pure composition.Test plan
pytest tests/test_staleness.py— 19 passed (16 existing + 3 new).pytest tests/test_manifest.py tests/test_staleness_relocated.py tests/test_freshness_symbols_relocated.py— 71 passed. No regressions in adjacent modules./attune-release-checkthen tagv0.14.0and publish to PyPI.Follow-up (separate PRs)
attune-author[ai]>=0.9.1,<0.10→>=0.14.0,<0.15._FRESH_DAYS/_STALE_DAYS/_staleness()insidecar/attune_gui/routes/cowork_templates.pywithcheck_workspace_staleness(workspace_path).🤖 Generated with Claude Code