Development guidelines for Agent-Cal, an AI-powered scheduling platform built as a Turborepo monorepo with Next.js, Hono.js, and PostgreSQL. Includes bd (beads) issue tracking integration.
This skill provides comprehensive guidance for working with Agent-Cal, an open-source scheduling infrastructure for AI agents. The project is a Turborepo monorepo with PNPM workspaces, featuring a Next.js frontend, Hono.js API backend, and shared packages.
Agent-Cal is structured as a monorepo with the following key components:
**Technology Stack:**
**CRITICAL:** This project uses **bd (beads)** for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
**✅ Always Use bd For:**
1. Multi-session work that won't complete in one conversation
2. Complex features requiring epic → subtasks with dependencies
3. Discovered work (bugs/tasks you can't fix immediately)
4. Planning phase (structure design docs as bd issues)
5. Follow-up work needing future attention
**🚫 Don't Use bd For:**
1. **Check for existing work at session start:**
```bash
bd ready --json # Show unblocked issues
bd list --json # See all open issues
```
2. **Create new issues:**
```bash
bd create "Issue title" -t bug|feature|task|epic|chore -p 0-4 --json
bd create "Subtask" --parent <epic-id> --json # Hierarchical subtask
bd create "Found bug" -p 1 --deps discovered-from:<parent-id> --json
```
3. **Claim and work on tasks:**
```bash
bd update bd-42 --status in_progress --json
bd update bd-42 --priority 1 --json
```
4. **Complete work:**
```bash
bd close bd-42 --reason "Completed" --json
```
Issues must be fully self-contained and readable without external context. Include:
**Good Example:**
```
Add timeout parameter to fetchUser() in src/api/users.ts
1. Add optional timeout param (default 5000ms)
2. Pass to underlying fetch() call
3. Update tests in src/api/users.test.ts
Example: fetchUser(id) → fetchUser(id, { timeout: 3000 })
Depends on: bd-abc123 (fetch wrapper refactor)
```
`bd dep add X Y` means "X needs Y" (Y blocks X)
**TRAP:** Temporal words invert thinking!
```
WRONG: "Phase 1 before Phase 2" → bd dep add phase1 phase2
RIGHT: "Phase 2 needs Phase 1" → bd dep add phase2 phase1
```
Verify with `bd blocked` to see tasks blocked by prerequisites.
**Types:**
**Priorities:**
```bash
pnpm dev # Start all apps
pnpm dev:web # Frontend only
pnpm dev:api # API only
pnpm dev:docs # Documentation (Mintlify on port 5000)
```
```bash
pnpm build # Build all packages
pnpm lint # Lint all packages
pnpm --filter @workspace/web typecheck
pnpm --filter @workspace/api test
```
```bash
pnpm db:studio # Open Drizzle Studio
pnpm db:generate # Generate migrations
pnpm db:push # Push schema changes
pnpm db:pull # Pull schema from database
```
```bash
pnpm write-openapi # Generate OpenAPI docs
pnpm start:server # Start API server
```
Store ALL AI-generated planning/design docs in a `history/` directory:
**Benefits:**
**When ending a work session:**
1. **Update bd issues**
- Close completed work: `bd close <id> --reason "Done"`
- Update status on partial work
- File issues for discovered follow-up work
2. **Run quality gates** (if code changed)
- Type checking: `pnpm typecheck`
- Tests: `pnpm test`
- Linters: Check for errors
- File P0 issues if builds are broken
3. **Sync issues to JSONL (without committing)**
```bash
bd sync --squash
```
4. **Stop - DO NOT commit or push**
- All changes (code + JSONL) remain uncommitted
- Human reviews everything before committing
- Human handles all git operations
5. **Provide handoff**
- Summarize completed work
- List open bd issues for follow-up
- Note blockers or decisions needed
- Mention quality gate failures
**Critical Rules:**
**Workflow:**
```
Agent work → bd sync --squash → stop → human reviews → human commits → human pushes
```
Environment variables are managed through `@workspace/env-config` with separate client and server configurations. The root `.env` file is loaded by both applications.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/agent-cal-development-guide/raw