Product Requirements
Requirements for Kun — the configuration engine running Databayt's operations across a 4-person team, 14 repositories, and 5 products.
Constraints
| Constraint | Value |
|---|---|
| Team size | 4 (tech, business, R&D, facilitator) |
| Revenue pipeline | Hogwarts pilot |
| License | SSPL (open source, commercial use requires license) |
Phase 1: Developer Engine (Done)
CLAUDE.md Configuration
| Requirement | Priority | Status |
|---|---|---|
| User-level CLAUDE.md with stack preferences | P0 | Done |
| Project-level CLAUDE.md with context | P0 | Done |
| Repo-level CLAUDE.md with 100+ keywords | P0 | Done |
| Configuration hierarchy respected | P0 | Done |
Agent Fleet
| Requirement | Priority | Status |
|---|---|---|
| Stack chain (7): nextjs, react, typescript, tailwind, prisma, shadcn, authjs | P0 | Done |
| Design chain (4): orchestration, architecture, pattern, structure | P0 | Done |
| UI chain (4): shadcn, atom, template, block | P0 | Done |
| DevOps chain (3): build, deploy, test | P0 | Done |
| VCS chain (2): git, github | P0 | Done |
| Specialized (8): middleware, i18n, semantic, sse, optimize, performance, comment, icon | P1 | Done |
| Reference chain (4): hogwarts, souq, mkan, shifa product agents | P1 | Done |
| Handoff protocol between agents | P0 | Done |
Skills, MCP, Hooks, Rules, Memory
| Requirement | Priority | Status |
|---|---|---|
| 17 skills with keyword triggers | P0 | Done |
| 18 MCP servers connected | P0 | Done |
| 5 hooks (format, port, session) | P0 | Done |
| 8 path-scoped rules | P0 | Done |
| 6 memory files persisting cross-session | P1 | Done |
| 38 allow + 4 deny permission rules | P0 | Done |
Phase 2: Team Engine (Current)
Team Configuration
| Requirement | Priority |
|---|---|
| Shared settings.json via git | P0 |
| Local override support (.local.json) | P0 |
| One-command installer (< 30 min setup) | P0 |
| Role-based configs (engineer, business, content) | P0 |
| Accessibility: screen reader compatible outputs | P0 |
Hogwarts Pilot (King Fahad Schools)
| Requirement | Priority |
|---|---|
| Admission block — 5-pass QA clean | P0 |
| Notification system — SMS + in-app | P0 |
| Messaging — school-parent communication | P1 |
| Arabic RTL — complete, no LTR remnants | P0 |
| Demo environment — demo.databayt.org stable | P0 |
Agent Teams (Experimental)
| Requirement | Priority |
|---|---|
| Lead agent coordination | P0 |
| Parallel agent execution (3+) | P0 |
| Git worktree isolation | P0 |
| Consolidated PR output | P0 |
CI/CD & Automation
| Requirement | Priority |
|---|---|
| GitHub Actions code review via Agent SDK | P0 |
| Pattern compliance check in CI | P0 |
| Scheduled cloud tasks (health, deps, sync) | P1 |
| Auto-fix pipeline for trivial issues | P1 |
Business Operations
| Requirement | Priority |
|---|---|
| Cowork for Ali (client outreach, proposals) | P1 |
| Cowork for Samia (Arabic content, docs, research) | P1 |
| Stripe MCP for financial tracking | P1 |
| Claude Apps (Slack, Figma) | P2 |
Phase 3: Company Engine (Future)
Agent SDK Platform
| Requirement | Priority |
|---|---|
| CI/CD review agent in GitHub Actions | P0 |
| Deploy verification agent | P0 |
| School onboarding automation agent | P1 |
| Client report generation agent | P1 |
Enterprise & Optimization
| Requirement | Priority |
|---|---|
| SSO (SAML/OIDC) + SCIM | P0 |
| Audit logging | P0 |
| Prompt caching (90% savings) | P0 |
| Batch API for CI/CD (50% savings) | P0 |
| Pattern distribution packaging | P1 |
Non-Functional Requirements
| Category | Requirement | Target |
|---|---|---|
| Performance | Claude Code startup | < 5 seconds |
| Performance | Keyword → workflow start | < 3 seconds |
| Performance | Autopilot cycle | 100 turns |
| Reliability | Configuration load | 100% success |
| Reliability | Hook execution | Guaranteed |
| Usability | Engineer onboarding | < 30 minutes |
| Usability | Non-dev onboarding | < 1 hour |
| Accessibility | Screen reader navigation | Full support |
| Accessibility | VoiceOver mobile testing | R&D workflow |
| Quality | Pattern compliance | 90%+ |
| Security | Destructive commands | Always blocked |
| Security | Secrets | Never in git |
| Cost | Total monthly | < $1,000 |
| Cost | API reduction (Phase 3) | 95% via caching + batch |
Acceptance Criteria
Phase 2 Complete When:
- Any team member can set up Kun in < 30 minutes
- Hogwarts admission block passes 5-pass QA on both environments
- Business role can use Cowork for client communication independently
- R&D role can use Cowork with screen reader for content creation
- Agent Teams can parallelize a 3-tab feature build
- Scheduled tasks run daily health checks on ed.databayt.org
On This Page
Product RequirementsConstraintsPhase 1: Developer Engine (Done)CLAUDE.md ConfigurationAgent FleetSkills, MCP, Hooks, Rules, MemoryPhase 2: Team Engine (Current)Team ConfigurationHogwarts Pilot (King Fahad Schools)Agent Teams (Experimental)CI/CD & AutomationBusiness OperationsPhase 3: Company Engine (Future)Agent SDK PlatformEnterprise & OptimizationNon-Functional RequirementsAcceptance CriteriaPhase 2 Complete When: