Implement Phase 3 of v1.3.0 tags feature per microformats-tags-design.md: Routes (starpunk/routes/public.py): - Add /tag/<tag> archive route with normalization and 404 handling - Pre-load tags in index route for all notes - Pre-load tags in note route for individual notes Admin (starpunk/routes/admin.py): - Parse comma-separated tag input in create route - Parse tag input in update route - Pre-load tags when displaying edit form - Empty tag field removes all tags Templates: - Add tag input field to templates/admin/edit.html - Add tag input field to templates/admin/new.html - Use Jinja2 map filter to display existing tags Implementation details: - Tag URL parameter normalized to lowercase before lookup - Tags pre-loaded using object.__setattr__ pattern (like media) - parse_tag_input() handles trim, dedupe, normalization - All existing tests pass (micropub categories, admin routes) Per architect design: - No pagination on tag archives (acceptable for v1.3.0) - No autocomplete in admin (out of scope) - Follows existing media loading patterns Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
2.3 KiB
Claude Agent Instructions
This file contains operational instructions for Claude agents working on this project.
Python Environment
- We use uv for Python virtual environment management
- All Python commands must be run with
uv runprefix - Example:
uv run pytest,uv run flask run
Agent Protocol (All Agents)
IMPORTANT: All agents must review docs/DOCUMENTATION.md before starting work. This file is the authoritative source for documentation organization and supersedes any other instructions.
Agent-Architect Protocol
When invoking the agent-architect, always remind it to:
-
Review
docs/DOCUMENTATION.mdfor documentation organization standards -
Review documentation in docs/ before working on the task it is given
- docs/architecture, docs/decisions, docs/standards are of particular interest
-
Search for authoritative documentation for any web standard it is implementing on https://www.w3.org/
-
If it is reviewing a developers implementation report and it accepts the completed work it should go back and update the project plan to reflect the completed work
Agent-Developer Protocol
When invoking the agent-developer, always remind it to:
-
Review
docs/DOCUMENTATION.mdfor documentation organization standards -
Document work in design folder
- Create implementation reports in
docs/design/{version}/ - Include date in filename:
YYYY-MM-DD-description.md - All developer interaction (questions, responses, reports, reviews) goes in design/{version}/
- Create implementation reports in
-
Update the changelog
- Add entries to
CHANGELOG.mdfor user-facing changes - Follow existing format
- Add entries to
-
Version number management
- Increment version numbers according to
docs/standards/versioning-strategy.md - Update version in
starpunk/__init__.py
- Increment version numbers according to
-
Follow git protocol
- Adhere to git branching strategy in
docs/standards/git-branching-strategy.md - Create feature branches for non-trivial changes
- Write clear commit messages
- Adhere to git branching strategy in
Documentation
See docs/DOCUMENTATION.md for the authoritative documentation structure, navigation guidance, and key references.
Project Philosophy
"Every line of code must justify its existence. When in doubt, leave it out."
Keep implementations minimal, standards-compliant, and maintainable.