CI (.gitea/workflows/ci.yaml): lint → typecheck → vitest w/ coverage → OpenNext build → preview smoke → bundle-size budgets; Node 20; npm ci; artifacts; safe env; D1 dry-run scaffold. Budgets: add scripts/budgets.mjs; TOTAL_STATIC_MAX_BYTES and MAX_ASSET_BYTES thresholds; report top offenders; fail on breach; README CI section. Flags: add lib/flags.ts with typed booleans and safe defaults (ADMIN_ENABLED, ARTISTS_MODULE_ENABLED, UPLOADS_ADMIN_ENABLED, BOOKING_ENABLED, PUBLIC_APPOINTMENT_REQUESTS_ENABLED, REFERENCE_UPLOADS_PUBLIC_ENABLED, DEPOSITS_ENABLED, PUBLIC_DB_ARTISTS_ENABLED, ADVANCED_NAV_SCROLL_ANIMATIONS_ENABLED, STRICT_CI_GATES_ENABLED, ISR_CACHE_R2_ENABLED); robust parsing; client provider; unit tests. Wiring: gate Admin shell and admin write APIs (503 JSON on uploads and artists writes); disable booking submit and short-circuit booking mutations when off; render static Hero/Artists when advanced animations off; tests for UI and API guards. Ops: expand docs/prd/rollback-strategy.md with “Feature Flags Operations,” Cloudflare Dashboard and wrangler.toml steps, preview simulation, incident playbook, and post-toggle smoke checklist. Release: add docs/releases/2025-09-19-feature-flags-rollout.md with last-good commit, preview/production flag matrices, rollback notes, and smoke results; link from rollback doc. Chore: fix TS issues (gift-cards boolean handling, Lenis options, tailwind darkMode), remove next-on-pages peer conflict, update package.json scripts, configure Gitea act_runner label, open draft PR to trigger CI. Refs: CI-1, FF-1, FF-2, FF-3, OPS-1 Impact: defaults preserve current behavior; no runtime changes unless flags flipped
4.9 KiB
/brownfield-create-epic Task
When this command is used, execute the following task:
Create Brownfield Epic Task
Purpose
Create a single epic for smaller brownfield enhancements that don't require the full PRD and Architecture documentation process. This task is for isolated features or modifications that can be completed within a focused scope.
When to Use This Task
Use this task when:
- The enhancement can be completed in 1-3 stories
- No significant architectural changes are required
- The enhancement follows existing project patterns
- Integration complexity is minimal
- Risk to existing system is low
Use the full brownfield PRD/Architecture process when:
- The enhancement requires multiple coordinated stories
- Architectural planning is needed
- Significant integration work is required
- Risk assessment and mitigation planning is necessary
Instructions
1. Project Analysis (Required)
Before creating the epic, gather essential information about the existing project:
Existing Project Context:
- Project purpose and current functionality understood
- Existing technology stack identified
- Current architecture patterns noted
- Integration points with existing system identified
Enhancement Scope:
- Enhancement clearly defined and scoped
- Impact on existing functionality assessed
- Required integration points identified
- Success criteria established
2. Epic Creation
Create a focused epic following this structure:
Epic Title
{{Enhancement Name}} - Brownfield Enhancement
Epic Goal
{{1-2 sentences describing what the epic will accomplish and why it adds value}}
Epic Description
Existing System Context:
- Current relevant functionality: {{brief description}}
- Technology stack: {{relevant existing technologies}}
- Integration points: {{where new work connects to existing system}}
Enhancement Details:
- What's being added/changed: {{clear description}}
- How it integrates: {{integration approach}}
- Success criteria: {{measurable outcomes}}
Stories
List 1-3 focused stories that complete the epic:
- Story 1: {{Story title and brief description}}
- Story 2: {{Story title and brief description}}
- Story 3: {{Story title and brief description}}
Compatibility Requirements
- Existing APIs remain unchanged
- Database schema changes are backward compatible
- UI changes follow existing patterns
- Performance impact is minimal
Risk Mitigation
- Primary Risk: {{main risk to existing system}}
- Mitigation: {{how risk will be addressed}}
- Rollback Plan: {{how to undo changes if needed}}
Definition of Done
- All stories completed with acceptance criteria met
- Existing functionality verified through testing
- Integration points working correctly
- Documentation updated appropriately
- No regression in existing features
3. Validation Checklist
Before finalizing the epic, ensure:
Scope Validation:
- Epic can be completed in 1-3 stories maximum
- No architectural documentation is required
- Enhancement follows existing patterns
- Integration complexity is manageable
Risk Assessment:
- Risk to existing system is low
- Rollback plan is feasible
- Testing approach covers existing functionality
- Team has sufficient knowledge of integration points
Completeness Check:
- Epic goal is clear and achievable
- Stories are properly scoped
- Success criteria are measurable
- Dependencies are identified
4. Handoff to Story Manager
Once the epic is validated, provide this handoff to the Story Manager:
Story Manager Handoff:
"Please develop detailed user stories for this brownfield epic. Key considerations:
- This is an enhancement to an existing system running {{technology stack}}
- Integration points: {{list key integration points}}
- Existing patterns to follow: {{relevant existing patterns}}
- Critical compatibility requirements: {{key requirements}}
- Each story must include verification that existing functionality remains intact
The epic should maintain system integrity while delivering {{epic goal}}."
Success Criteria
The epic creation is successful when:
- Enhancement scope is clearly defined and appropriately sized
- Integration approach respects existing system architecture
- Risk to existing functionality is minimized
- Stories are logically sequenced for safe implementation
- Compatibility requirements are clearly specified
- Rollback plan is feasible and documented
Important Notes
- This task is specifically for SMALL brownfield enhancements
- If the scope grows beyond 3 stories, consider the full brownfield PRD process
- Always prioritize existing system integrity over new functionality
- When in doubt about scope or complexity, escalate to full brownfield planning