Commit Graph

128 Commits

Author SHA1 Message Date
Thomas Richter
7f3942eb7c docs(09): capture phase context
Phase 09: CI Pipeline Hardening
- Implementation decisions documented
- Phase boundary established
2026-02-03 23:09:24 +01:00
Thomas Richter
d248cba77f docs(08-03): complete observability verification plan
Tasks completed: 3/3
- Deploy TaskPlanner with ServiceMonitor and verify Prometheus scraping
- Verify critical alert rules exist
- Human verification checkpoint (all OBS requirements verified)

Deviation: Fixed Loki datasource conflict (isDefault collision with Prometheus)

SUMMARY: .planning/phases/08-observability-stack/08-03-SUMMARY.md
2026-02-03 22:45:12 +01:00
Thomas Richter
91f91a3829 fix(08-03): add release label to ServiceMonitor for Prometheus discovery
Some checks failed
Build and Push / build (push) Has been cancelled
- Prometheus serviceMonitorSelector requires 'release: kube-prometheus-stack' label
- Without this label, Prometheus doesn't discover the ServiceMonitor
2026-02-03 22:20:55 +01:00
Thomas Richter
de82532bcd docs(08-02): complete Promtail to Alloy migration plan
Some checks failed
Build and Push / build (push) Has been cancelled
Tasks completed: 2/2
- Deploy Grafana Alloy via Helm (DaemonSet on all 5 nodes)
- Verify log flow and remove Promtail

SUMMARY: .planning/phases/08-observability-stack/08-02-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:13:22 +01:00
Thomas Richter
c2952284f9 feat(08-02): deploy Grafana Alloy for log collection
- Add helm/alloy Chart.yaml as umbrella chart for grafana/alloy
- Configure Alloy River config for Kubernetes pod log discovery
- Set up loki.write endpoint to forward logs to Loki
- Configure DaemonSet with control-plane tolerations for all 5 nodes

Replaces Promtail (EOL March 2026) with Grafana Alloy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:09:50 +01:00
Thomas Richter
c6aa762a6c docs(08-01): complete TaskPlanner metrics and ServiceMonitor plan
Tasks completed: 2/2
- Add prom-client and create /metrics endpoint
- Add ServiceMonitor to Helm chart

SUMMARY: .planning/phases/08-observability-stack/08-01-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:07:43 +01:00
Thomas Richter
f2a289355d feat(08-01): add ServiceMonitor for Prometheus scraping
- Create ServiceMonitor template for Prometheus Operator discovery
- Add metrics.enabled and metrics.interval to values.yaml
- ServiceMonitor selects TaskPlanner pods via selectorLabels
- Scrapes /metrics endpoint every 30s by default

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:06:14 +01:00
Thomas Richter
f60aad2864 feat(08-01): add Prometheus /metrics endpoint with prom-client
- Install prom-client library for Prometheus metrics
- Create src/lib/server/metrics.ts with default Node.js process metrics
- Add /metrics endpoint that returns Prometheus-format text
- Exposes CPU, memory, heap, event loop metrics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:05:16 +01:00
Thomas Richter
8c3dc137ca docs(08): create phase plan
Phase 08: Observability Stack
- 3 plans in 2 waves
- Wave 1: 08-01 (metrics), 08-02 (Alloy) - parallel
- Wave 2: 08-03 (verification) - depends on both
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:24:24 +01:00
Thomas Richter
3d11a090be docs(07): complete GitOps Foundation phase
Phase 7 verified:
- GITOPS-01: ArgoCD server running ✓
- GITOPS-02: Auto-sync verified (137s response time) ✓
- GITOPS-03: Self-heal verified (pod restored) ✓
- GITOPS-04: ArgoCD UI accessible ✓

All 5/5 must-haves passed.
2026-02-03 20:04:52 +01:00
Thomas Richter
6a88c662b0 docs(07-02): complete GitOps verification plan
Tasks completed: 3/3
- Test auto-sync by pushing a helm change
- Test self-heal by deleting a pod
- Checkpoint - Human verification (approved)

Phase 7 (GitOps Foundation) complete.
SUMMARY: .planning/phases/07-gitops-foundation/07-02-SUMMARY.md
2026-02-03 20:01:20 +01:00
Thomas Richter
175930c395 test(gitops): verify auto-sync with annotation change
Some checks failed
Build and Push / build (push) Has been cancelled
2026-02-03 15:29:59 +01:00
Thomas Richter
d5fc8c8b2e docs(07-01): complete ArgoCD registration plan
Some checks failed
Build and Push / build (push) Has been cancelled
Tasks completed: 3/3
- Create ArgoCD repository secret for TaskPlanner
- Update and apply ArgoCD Application manifest
- Wait for sync and verify healthy status

SUMMARY: .planning/phases/07-gitops-foundation/07-01-SUMMARY.md
2026-02-03 15:28:27 +01:00
Thomas Richter
5a4d9ed5b9 fix(07-01): use admin namespace for Gitea repository
Some checks failed
Build and Push / build (push) Has been cancelled
- Change repo URL to admin/taskplaner (repo created under admin user)
- Update CI workflow image name to admin/taskplaner
- Update repo secret documentation with correct path
2026-02-03 15:20:47 +01:00
Thomas Richter
eff251ca70 feat(07-01): update ArgoCD application for internal cluster access
Some checks failed
Build and Push / build (push) Has been cancelled
- Change repoURL to internal Gitea cluster service
- Remove inline registry secret placeholder (created via kubectl)
- Registry secret created separately for security
2026-02-03 15:07:40 +01:00
Thomas Richter
54f933b1f7 chore(07-01): add ArgoCD repository secret documentation
- Document taskplaner-repo secret structure for ArgoCD
- Secret created via kubectl (not committed) for security
- Uses internal cluster URL for Gitea access
2026-02-03 15:07:05 +01:00
Thomas Richter
1d4302d5bf docs(07): create phase plan
Phase 07: GitOps Foundation
- 2 plan(s) in 2 wave(s)
- Wave 1: 07-01 (register application)
- Wave 2: 07-02 (verify gitops behavior)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:54:41 +01:00
Thomas Richter
c1c46d9581 docs(07): capture phase context
Phase 07: GitOps Foundation
- ArgoCD already installed, UI accessible
- Apply TaskPlanner Application manifest
- Verify sync, self-heal, auto-deploy
2026-02-03 14:50:19 +01:00
Thomas Richter
27ed813413 docs: create milestone v2.0 roadmap (3 phases)
Phases:
7. GitOps Foundation: ArgoCD installation and configuration
8. Observability Stack: Prometheus/Grafana/Loki + alerts
9. CI Pipeline Hardening: Vitest, Playwright, type checking

All 17 requirements mapped to phases.
2026-02-03 14:41:43 +01:00
Thomas Richter
34b1c05146 docs: define milestone v2.0 requirements
17 requirements across 3 categories:
- GitOps: 4 (ArgoCD installation and configuration)
- Observability: 8 (Prometheus/Grafana/Loki stack + app metrics)
- CI Testing: 5 (Vitest, Playwright, type checking)
2026-02-03 13:27:31 +01:00
Thomas Richter
5dbabe6a2d docs: complete v2.0 CI/CD and observability research
Files:
- STACK-v2-cicd-observability.md (ArgoCD, Prometheus, Loki, Alloy)
- FEATURES.md (updated with CI/CD and observability section)
- ARCHITECTURE.md (updated with v2.0 integration architecture)
- PITFALLS-CICD-OBSERVABILITY.md (14 critical/moderate/minor pitfalls)
- SUMMARY-v2-cicd-observability.md (synthesis with roadmap implications)

Key findings:
- Stack: kube-prometheus-stack + Loki monolithic + Alloy (Promtail EOL March 2026)
- Architecture: 3-phase approach - GitOps first, observability second, CI tests last
- Critical pitfall: ArgoCD TLS redirect loop, Loki disk exhaustion, k3s metrics config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 03:29:23 +01:00
Thomas Richter
6cdd5aa8c7 docs: start milestone v2.0 Production Operations 2026-02-03 03:14:14 +01:00
Thomas Richter
51b4b34c19 feat(ci): add GitOps pipeline with Gitea Actions and ArgoCD
- Add Gitea Actions workflow for building and pushing Docker images
- Configure ArgoCD Application for auto-sync deployment
- Update Helm values to use Gitea container registry
- Add setup documentation for GitOps configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 00:05:45 +01:00
Thomas Richter
b205fedde6 fix: remove deleted tags from filter automatically
When a tag is deleted as orphaned, it's now automatically removed
from the active filter selection.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:16:49 +01:00
Thomas Richter
c92aec14d3 feat: auto-cleanup orphaned tags when removed from entries
Tags that are no longer associated with any entry are automatically
deleted from the database when a tag is removed from an entry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 23:13:50 +01:00
Thomas Richter
b00d71956e fix: explicit tag scanning with delete UI
- Remove auto-parsing on collapse
- Add "Scan for #tags" button that parses from current textarea content
- Always show tags section with delete buttons
- Show help text when no tags exist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:41:35 +01:00
Thomas Richter
a19e51b6b9 fix: parse hashtags only when collapsing entry card
Move tag parsing from textarea blur to entry collapse action.
This prevents incomplete tags from being created while editing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:35:32 +01:00
Thomas Richter
79c9b12702 fix: parse hashtags only on blur/submit, add tag delete UI
- Parse hashtags when content textarea loses focus (blur)
- Parse hashtags when QuickCapture form is submitted
- Add tag display with delete buttons in expanded entry view
- Remove automatic hashtag parsing during typing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:27:02 +01:00
Thomas Richter
4a57000c38 fix: only parse complete hashtags (followed by word boundary)
Prevents incomplete hashtags from being saved during typing when
auto-save fires mid-word.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 22:17:39 +01:00
Thomas Richter
ce07d79652 feat: parse hashtags from content instead of dedicated tag input
Tags are now automatically extracted from #hashtags in content text.
Removed TagInput from entry editing, keeping it only in FilterBar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:59:04 +01:00
Thomas Richter
21a11bbb22 docs: add v1.1 milestone for Kubernetes deployment
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:41:28 +01:00
Thomas Richter
e1092ce459 feat(helm): add basic auth support via Traefik middleware
- Add basicAuth.enabled and basicAuth.htpasswd values
- Create middleware.yaml template for Secret and Traefik Middleware
- Update ingress to include middleware annotation when enabled

Usage:
  helm upgrade taskplaner ./helm/taskplaner \
    --set basicAuth.enabled=true \
    --set basicAuth.htpasswd='admin:$apr1$...'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 19:52:43 +01:00
Thomas Richter
5e893aaf23 fix(helm): rename service to avoid envPrefix conflict
SvelteKit adapter-node uses TASKPLANER_ envPrefix for config.
Kubernetes creates SERVICENAME_* env vars for each service.
Service named "taskplaner" creates TASKPLANER_PORT_* which conflicts.

Changes:
- Add service.name option (default: "tp-app")
- Update ingress to reference configured service name

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:49:21 +01:00
Thomas Richter
0945f01563 feat: add Helm chart for Kubernetes deployment
Includes:
- Deployment with health checks and resource limits
- Service (ClusterIP by default)
- PersistentVolumeClaim for data storage
- Optional Ingress with TLS support
- Configurable via values.yaml

Usage: helm install taskplaner ./helm/taskplaner

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:16:11 +01:00
Thomas Richter
37023b2605 docs: complete milestone v1.0 archival
- Archive roadmap, requirements, and audit to .planning/milestones/
- Update PROJECT.md with validated requirements and decisions
- Reset STATE.md for next milestone cycle
- Create MILESTONES.md for project history

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 17:15:53 +01:00
Thomas Richter
8793e155d6 docs: add v1 milestone audit report
All 31 requirements satisfied, 6/6 phases verified, 96% integration score.
Ready for milestone completion.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 16:02:06 +01:00
Thomas Richter
84ad332737 fix(deploy): resolve Docker startup and CSRF issues
- Rename TASKPLANER_DATA_DIR to DATA_DIR (avoid adapter-node envPrefix conflict)
- Add TASKPLANER_ORIGIN for CSRF protection in docker-compose.yml
- Add automatic database schema initialization on startup
- Add Playwright E2E tests for Docker deployment verification
- Update .env.example with correct variable names

Fixes container restart loop and 403 errors on form submission.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 15:54:44 +01:00
Thomas Richter
89e703daa5 docs(06): complete deployment phase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:29:06 +01:00
Thomas Richter
4abff06d26 docs(06-02): complete runtime configuration plan
Tasks completed: 3/3
- Create health check endpoint
- Create environment documentation and backup script
- Add Docker deployment section to README

SUMMARY: .planning/phases/06-deployment/06-02-SUMMARY.md
2026-02-01 13:25:23 +01:00
Thomas Richter
f3a544937b docs(06-02): add Docker deployment section to README
- Quick Start with docker-compose commands
- Configuration with key environment variables
- Reverse proxy setup instructions
- Data persistence and volume info
- Backup and restore procedures
- Health check verification
2026-02-01 13:24:13 +01:00
Thomas Richter
c92cb3e78c feat(06-02): add environment docs and backup script
- .env.example documents all configuration options
- backup.sh creates timestamped archive of Docker volume
- Supports custom volume name via VOLUME_NAME env var
2026-02-01 13:23:48 +01:00
Thomas Richter
de09b14239 feat(06-02): create health check endpoint
- Returns 200 'ok' when database is accessible
- Returns 503 'unhealthy' when database query fails
- Simple text response for Docker HEALTHCHECK
2026-02-01 13:23:12 +01:00
Thomas Richter
8947ba30f0 docs(06-01): complete docker configuration plan
Tasks completed: 3/3
- Switch to adapter-node with environment prefix
- Create Docker configuration files
- Update data paths for environment variable configuration

SUMMARY: .planning/phases/06-deployment/06-01-SUMMARY.md
2026-02-01 13:21:52 +01:00
Thomas Richter
457bacaeab feat(06-01): configure data paths via TASKPLANER_DATA_DIR env var
- Update db/index.ts to read data directory from env var
- Update storage.ts to read data directory from env var
- Both default to ./data for local development
2026-02-01 13:20:49 +01:00
Thomas Richter
5e31b697e7 feat(06-01): add Docker configuration for production deployment
- Create Dockerfile with multi-stage build using node:22-alpine
- Run as non-root 'nodejs' user for security
- Add HEALTHCHECK for container orchestration
- Create docker-compose.yml with taskplaner_data named volume
- Add .dockerignore to optimize build context
2026-02-01 13:20:23 +01:00
Thomas Richter
3b9f434ed5 feat(06-01): switch to adapter-node with environment prefix
- Install @sveltejs/adapter-node as dev dependency
- Configure adapter with out: 'build', precompress: true
- Set envPrefix to 'TASKPLANER_' for environment variables
2026-02-01 13:19:13 +01:00
Thomas Richter
80e4769221 docs(06): create phase plan
Phase 06: Deployment
- 2 plans in 2 waves
- Wave 1: Docker configuration (adapter-node, Dockerfile, docker-compose)
- Wave 2: Runtime configuration (health endpoint, env docs, backup script)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:06:33 +01:00
Thomas Richter
94044cc49a docs(06): research phase domain
Phase 6: Deployment
- Standard stack identified (adapter-node, node:22-alpine)
- Multi-stage Dockerfile patterns documented
- Native module (better-sqlite3, sharp) considerations
- SQLite WAL mode and Docker volume best practices
- Environment variable configuration patterns
- Health check and backup script examples
2026-02-01 13:03:07 +01:00
Thomas Richter
ef89b721f6 docs(06): capture phase context
Phase 06: Deployment
- Implementation decisions documented
- Phase boundary established

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:56:27 +01:00
Thomas Richter
4a5e9ff04f docs(05): complete search phase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 17:24:36 +01:00