feat(tags): Add database schema and tags module (v1.3.0 Phase 1)

Implements tag/category system backend following microformats2 p-category specification.

Database changes:
- Migration 008: Add tags and note_tags tables
- Normalized tag storage (case-insensitive lookup, display name preserved)
- Indexes for performance

New module:
- starpunk/tags.py: Tag management functions
  - normalize_tag: Normalize tag strings
  - get_or_create_tag: Get or create tag records
  - add_tags_to_note: Associate tags with notes (replaces existing)
  - get_note_tags: Retrieve note tags (alphabetically ordered)
  - get_tag_by_name: Lookup tag by normalized name
  - get_notes_by_tag: Get all notes with specific tag
  - parse_tag_input: Parse comma-separated tag input

Model updates:
- Note.tags property (lazy-loaded, prefer pre-loading in routes)
- Note.to_dict() add include_tags parameter

CRUD updates:
- create_note() accepts tags parameter
- update_note() accepts tags parameter (None = no change, [] = remove all)

Micropub integration:
- Pass tags to create_note() (tags already extracted by extract_tags())
- Return tags in q=source response

Per design doc: docs/design/v1.3.0/microformats-tags-design.md

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
philandClaude committed 2025-12-10 11:24:23 -07:00
1 parent 927db4aea0
commit f10d0679da
188 files changed
+601 -945

No files matched your search

-166
View File
@@ -1,166 +0,0 @@
# StarPunk Project Planning Index
## Overview
This directory contains all project planning documentation for StarPunk, organized by version and planning phase. Use this index to navigate to the appropriate documentation.
## Current Status
**Latest Release**: v1.1.0 "SearchLight" (2025-11-25)
**Project Status**: Production Ready - V1 Feature Complete
## Directory Structure
```
/docs/projectplan/
├── INDEX.md (this file)
├── ROADMAP.md → Future development roadmap
├── v1/ → V1.0 planning (COMPLETE)
│ ├── README.md → V1 planning overview
│ ├── implementation-plan.md → Detailed implementation phases
│ ├── feature-scope.md → In/out of scope decisions
│ ├── quick-reference.md → Developer quick reference
│ └── dependencies-diagram.md → Module dependencies
└── v1.1/ → V1.1 planning (COMPLETE)
├── RELEASE-STATUS.md → V1.1.0 release tracking
├── priority-work.md → Completed priority items
└── potential-features.md → Feature backlog
```
## Quick Navigation
### For Current Development
- [Roadmap](/home/phil/Projects/starpunk/docs/projectplan/ROADMAP.md) - Future versions and features
- [V1.1 Release Status](/home/phil/Projects/starpunk/docs/projectplan/v1.1/RELEASE-STATUS.md) - Latest release details
### For Historical Reference
- [V1 Implementation Plan](/home/phil/Projects/starpunk/docs/projectplan/v1/implementation-plan.md) - How V1 was built
- [Feature Scope](/home/phil/Projects/starpunk/docs/projectplan/v1/feature-scope.md) - V1 scope decisions
### For Daily Work
- [Quick Reference](/home/phil/Projects/starpunk/docs/projectplan/v1/quick-reference.md) - Commands and lookups
- [Potential Features](/home/phil/Projects/starpunk/docs/projectplan/v1.1/potential-features.md) - Feature backlog
## Version History
### V1.1.0 "SearchLight" (Released 2025-11-25)
- Full-text search with FTS5
- Custom slugs via Micropub
- RSS feed fixes
- Migration improvements
- [Full Release Details](/home/phil/Projects/starpunk/docs/projectplan/v1.1/RELEASE-STATUS.md)
### V1.0.0 (Released 2025-11-24)
- IndieAuth authentication
- Micropub endpoint
- Notes management
- RSS syndication
- Web interface
- [Implementation Report](/home/phil/Projects/starpunk/docs/reports/v1.0.0-implementation-report.md)
## Key Documents
### Planning Documents
1. **[Roadmap](/home/phil/Projects/starpunk/docs/projectplan/ROADMAP.md)**
- Future version planning
- Feature timeline
- Design principles
2. **[V1 Implementation Plan](/home/phil/Projects/starpunk/docs/projectplan/v1/implementation-plan.md)**
- Phase-by-phase implementation
- Task tracking
- Test requirements
3. **[Feature Scope](/home/phil/Projects/starpunk/docs/projectplan/v1/feature-scope.md)**
- In/out of scope matrix
- Decision framework
- Lines of code budget
### Status Documents
1. **[V1.1 Release Status](/home/phil/Projects/starpunk/docs/projectplan/v1.1/RELEASE-STATUS.md)**
- Latest release tracking
- Completed features
- Test coverage
2. **[Priority Work](/home/phil/Projects/starpunk/docs/projectplan/v1.1/priority-work.md)**
- Critical items (completed)
- Implementation notes
- Success criteria
### Reference Documents
1. **[Quick Reference](/home/phil/Projects/starpunk/docs/projectplan/v1/quick-reference.md)**
- Common commands
- File checklist
- Configuration guide
2. **[Potential Features](/home/phil/Projects/starpunk/docs/projectplan/v1.1/potential-features.md)**
- Feature backlog
- Implementation options
- Priority scoring
## Related Documentation
### Architecture
- [Architecture Overview](/home/phil/Projects/starpunk/docs/architecture/overview.md)
- [Technology Stack](/home/phil/Projects/starpunk/docs/architecture/technology-stack.md)
- [Architecture Decision Records](/home/phil/Projects/starpunk/docs/decisions/)
### Implementation Reports
- [V1.1.0 Implementation Report](/home/phil/Projects/starpunk/docs/reports/v1.1.0-implementation-report.md)
- [V1.0.0 Implementation Report](/home/phil/Projects/starpunk/docs/reports/v1.0.0-implementation-report.md)
- [All Reports](/home/phil/Projects/starpunk/docs/reports/)
### Standards
- [Python Coding Standards](/home/phil/Projects/starpunk/docs/standards/python-coding-standards.md)
- [Git Branching Strategy](/home/phil/Projects/starpunk/docs/standards/git-branching-strategy.md)
- [Versioning Strategy](/home/phil/Projects/starpunk/docs/standards/versioning-strategy.md)
## How to Use This Documentation
### For New Contributors
1. Read the [Roadmap](/home/phil/Projects/starpunk/docs/projectplan/ROADMAP.md)
2. Review [Feature Scope](/home/phil/Projects/starpunk/docs/projectplan/v1/feature-scope.md)
3. Check [Potential Features](/home/phil/Projects/starpunk/docs/projectplan/v1.1/potential-features.md)
### For Implementation
1. Check [Current Status](#current-status) above
2. Review relevant ADRs in `/docs/decisions/`
3. Follow [Quick Reference](/home/phil/Projects/starpunk/docs/projectplan/v1/quick-reference.md)
4. Document in `/docs/reports/`
### For Planning
1. Review [Roadmap](/home/phil/Projects/starpunk/docs/projectplan/ROADMAP.md)
2. Check [Feature Backlog](/home/phil/Projects/starpunk/docs/projectplan/v1.1/potential-features.md)
3. Create ADRs for major decisions
4. Update this index when adding documents
## Maintenance
This planning documentation should be updated:
- After each release (update status, versions)
- When planning new features (update roadmap)
- When making scope decisions (update feature documents)
- When creating new planning documents (update this index)
## Success Metrics
Project planning success is measured by:
- ✅ All V1 features implemented
- ✅ 598 tests (588 passing)
- ✅ IndieWeb compliance achieved
- ✅ Documentation complete
- ✅ Production ready
## Philosophy
> "Every line of code must justify its existence. When in doubt, leave it out."
This philosophy guides all planning and implementation decisions.
---
**Index Created**: 2025-11-25
**Last Updated**: 2025-11-25
**Maintained By**: StarPunk Architect
For questions about project planning, consult the Architect agent or review the ADRs.