TL;DR
| Component | Count | Purpose |
|---|---|---|
| Specialized AI Agents | 21 | Role-based personas (CTO, architect, QA, PM) with permission grades |
| Domain Skills | 35 | On-demand expert knowledge via progressive disclosure |
| Custom Commands | 24 | TOML slash commands with @{}, !{}, {{}} syntax |
| Hook Events | 10 | Full Gemini CLI lifecycle interception |
| Team Patterns | 5 | Leader, Council, Swarm, Pipeline, Watchdog |
| Automation Levels | 5 | L0 (Manual) to L4 (Autonomous) |
| Languages | 8 | EN, KO, JA, ZH, ES, FR, DE, IT |
Install: gemini extensions install https://github.com/popup-studio-ai/bkit-gemini.git — then run /bkit to start.
The Problem bkit Solves
AI coding assistants are powerful, but they lack structure. You ask Gemini CLI to build a feature, and it jumps straight to writing code — no planning, no design doc, no gap analysis. The result? Fragile implementations that drift from the original intent, inconsistent code quality, and no documentation trail.
bkit solves this by layering PDCA (Plan-Do-Check-Act) methodology on top of Gemini CLI through a concept its creators call Context Engineering.
Context Engineering vs Prompt Engineering
The distinction matters. Prompt engineering is about writing good prompts. Context Engineering is about designing systems that integrate prompts, tools, and state to provide LLMs with optimal context for inference.
bkit implements this through three layers:
| Layer | Components | What It Does |
|---|---|---|
| Domain Knowledge | 35 skills | Expert knowledge loaded on-demand (progressive disclosure) |
| Behavioral Rules | 21 agents | Role-based constraints with model/tools/temperature configs |
| State Management | 17 hooks + 13 lib modules | PDCA tracking, intent detection, permissions, memory |
Instead of one massive prompt, bkit injects only the context relevant to the current PDCA phase. The v2.0.0 guide reports 71% token savings from this phase-aware context loading — not through prompt tricks, but through architectural design.
The 10-Event Hook System
This is the core mechanism. bkit intercepts the entire Gemini CLI lifecycle:
Event 1: SessionStart -> Detect project level, load output style, inject PDCA contextEvent 2: BeforeAgent -> 8-language intent detection, agent/skill auto-triggerEvent 3: BeforeModel -> PDCA phase-specific prompt augmentationEvent 4: AfterModel -> Response tracking, usage metricsEvent 5: BeforeToolSelection -> Phase-based tool filteringEvent 6: BeforeTool -> Permission manager, dangerous command blocking (exit code 2)Event 7: AfterTool -> Auto PDCA phase transitionsEvent 8: AfterAgent -> Cleanup, phase completion detectionEvent 9: PreCompress -> Context fork snapshot preservationEvent 10: SessionEnd -> Session cleanup, memory persistenceThe key automation: Event 7 auto-transitions PDCA phases. When you write your first source file in the Design phase, bkit automatically transitions to the Do phase. When you run analysis, it transitions to Check. You don’t have to remember which phase you’re in.
Dangerous commands are auto-blocked by Event 6: rm -rf, git reset --hard, git push --force, reverse shell patterns, and similar destructive operations are rejected before execution.
Getting Started
Prerequisites
- Gemini CLI v0.34.0+ (v2.0.0 requirement)
- Node.js v18+ (for hook scripts)
- Git
Installation
gemini extensions install https://github.com/popup-studio-ai/bkit-gemini.gitVerify with /bkit in interactive mode or gemini extensions list in non-interactive mode.
Ensure Hooks Are Enabled
{ "hooksConfig": { "enabled": true }}Hooks are enabled by default, but it’s worth verifying. On first run, bkit auto-initializes and shows a Control Panel and Workflow Map.
First-Time User Options
| Option | Command | Target Audience |
|---|---|---|
| Learn bkit | /development-pipeline | First-time bkit users |
| Learn Gemini CLI | /claude-code-learning | First-time Gemini CLI users |
| New project | /starter, /dynamic, /enterprise | New projects |
| Free start | Normal conversation mode | Experienced users |
Automation Levels: L0 Through L4
One of the most significant additions in v2.0.0 is the automation level system. You control how autonomous bkit is:
| Level | Name | Behavior |
|---|---|---|
| L0 | Manual | Every action requires user approval |
| L1 | Semi-Auto | PDCA transitions auto, implementation requires approval |
| L2 | Auto | Read actions auto, write actions require approval |
| L3 | Full-Auto | Mostly auto, dangerous commands only require approval |
| L4 | Autonomous | Fully autonomous (except dangerous commands) |
Defaults: Starter=L0, Dynamic=L1, Enterprise=L1.
/control level L2 # Set automation levelexport BKIT_PDCA_AUTOMATION=full-auto # Or via environment variable/control stop # Emergency stopCtrl+C # Also triggers emergency stop + checkpoint saveThe Core Workflow: PDCA
Every feature goes through the same 6-phase cycle. bkit enforces this — you can’t skip to implementation without a plan.
Plan
/pdca plan "user authentication with JWT and Google OAuth"Creates docs/01-plan/features/user-authentication.plan.md with requirements, scope, and constraints. For deeper exploration:
/plan-plus "user authentication with JWT and Google OAuth"This adds Intent Discovery, 3+ alternative comparisons, and YAGNI (You Aren’t Gonna Need It) review before committing to a plan.
Design
/pdca design "user authentication with JWT and Google OAuth"Creates docs/02-design/features/user-authentication.design.md with architecture decisions, API contracts, and component structure. The design-validator agent checks completeness and consistency automatically.
Do
/pdca do "user authentication with JWT and Google OAuth"Implementation phase. All tools are unlocked (Plan phase restricts to read-only). The permission manager blocks dangerous commands. AfterTool hooks track every file change. bkit’s Rule 5 applies: “Prefer editing existing files over creating new ones.”
Check
/pdca analyze "user authentication with JWT and Google OAuth"The gap-detector agent compares the design document against the actual implementation and produces a Match Rate metric: (implemented items / designed items) × 100%. Target: >= 90%. Generates docs/03-analysis/user-authentication.analysis.md.
Act
# If Match Rate < 90% — iterate (max 5 iterations)/pdca iterate "user authentication with JWT and Google OAuth"
# If Match Rate >= 90% — generate completion report/pdca report "user authentication with JWT and Google OAuth"The pdca-iterator agent uses the Evaluator-Optimizer pattern to auto-fix issues, re-running Check after each iteration. The report-generator creates docs/04-report/features/user-authentication.report.md when the match rate is acceptable.
Status, Archive, and Batch
/pdca status # Current PDCA state/pdca next # Auto-advance guidance/pdca archive auth # Archive completed PDCA docs/pdca batch # View all active features (parallel PDCA, max 3)State Management: Where bkit Stores Things
PDCA state is persisted in .bkit/state/pdca-status.json:
{ "primaryFeature": "user-authentication", "features": { "user-authentication": { "phase": "check", "matchRate": 87, "iterations": 1, "documents": { "plan": "docs/01-plan/features/user-authentication.plan.md", "design": "docs/02-design/features/user-authentication.design.md" } } }}Memory operates at three tiers:
| Scope | Storage | Persistence | Purpose |
|---|---|---|---|
| Session | In-memory | Current session only | Temporary state, intermediate results |
| Project | .bkit/state/ | Permanent | PDCA state, decision records |
| User | ~/.bkit/ | All projects | User preferences, learning history |
The starter-guide and pipeline-guide agents use User scope (shared across projects). The other 19 agents use Project scope.
Project Levels
bkit auto-detects your project type through directory/file scanning:
| Level | Detection Signals | Stack | PDCA Phases | Automation |
|---|---|---|---|---|
| Starter | Default (no special files) | HTML, CSS, JS, Next.js | 4 of 6 (skips Check, Act) | L0 (Manual) |
| Dynamic | docker-compose.yml, .mcp.json, lib/bkend, prisma/schema.prisma | Next.js + bkend.ai BaaS | 5 of 6 (optional Act) | L1 (Semi-Auto) |
| Enterprise | kubernetes/, terraform/, docker-compose.prod.yml | K8s, Terraform, Monorepo | All 6 phases | L1 (Semi-Auto) |
Force a level with BKIT_PROJECT_LEVEL=Enterprise or via gemini-extension.json.
Auto-detection works in 8 languages. Type “포트폴리오 웹사이트 만들고 싶어요” (Korean for “I want to make a portfolio website”) and bkit triggers the Starter skill automatically.
The 21 Agents with Permission Grades
Agents have permission grades that restrict what they can do:
| Grade | Agents | Allowed Tools |
|---|---|---|
| READONLY | gap-detector, design-validator | Read-only only |
| DOCWRITE | report-generator, pm-prd | Read + docs/ directory write only |
| FULL | cto-lead, pdca-iterator, and most others | All tools (except dangerous commands) |
Each agent uses Gemini native frontmatter with configurable model, tools, temperature, max_turns, and timeout_mins. v2.0.0 uses updated models: gemini-3.1-pro, gemini-3-pro, and gemini-3-flash.
Here are the agents grouped by function:
PDCA Core (5):
| Agent | Role | Triggered By |
|---|---|---|
cto-lead | CTO-level team orchestration | /bkit, PDCA workflows |
gap-detector | Design-implementation gap analysis (READONLY) | “verify”, “검증” |
pdca-iterator | Auto-iteration improvement, max 5 loops | ”improve”, “개선” |
report-generator | PDCA completion report (DOCWRITE) | “report”, “보고서” |
design-validator | Design completeness validation (READONLY) | “validate design” |
Code Quality (3):
| Agent | Role | Triggered By |
|---|---|---|
code-analyzer | Code quality, security, performance | ”analyze”, “분석” |
qa-strategist | Test strategy, QA planning | ”test strategy” |
qa-monitor | Docker log real-time monitoring | ”docker logs” |
Architecture (4):
| Agent | Role | Triggered By |
|---|---|---|
frontend-architect | UI/UX, React, Next.js | ”component”, “UI” |
security-architect | OWASP, auth design | ”CSRF”, “XSS”, “보안” |
infra-architect | AWS, K8s, Terraform | ”K8s”, “AWS” |
enterprise-expert | Microservices, AI-native | ”CTO”, “microservices” |
PM Agent Team (5): Accessed via /pdca pm {feature} — 5 agents produce a full PRD with personas, competitive analysis, Lean Canvas, and GTM strategy.
Specialized (4): bkend-expert (28 MCP tools), starter-guide, pipeline-guide, product-manager.
Checkpoints and Rollback
bkit auto-saves a checkpoint at every PDCA phase transition. If something goes wrong, you can roll back:
/rollback list # List available checkpoints/rollback restore {id} # Restore to a checkpoint/rollback reset {feature} # Reset feature to initial stateEmergency stops (Ctrl+C or /control stop) automatically save a checkpoint. This is a safety net — you can always undo.
BTW: Recording Ideas Mid-Workflow
One of the most practical v2.0.0 additions is the BTW (By The Way) system. When you’re in the middle of a PDCA cycle and have an improvement idea, record it without interrupting your flow:
/btw 이 API 응답 시간이 느린데 캐싱 추가하면 좋겠다 # Record an idea/btw list # List recorded ideas/btw analyze # Analyze feasibility/btw promote {id} # Promote to full PDCA feature/btw stats # View statisticsIdeas stay out of your current workflow until you’re ready to promote them.
Greenfield Example: Building a Task Management SaaS
# 1. Product discovery (5 PM agents collaborate)/pdca pm "task management SaaS for remote teams"# Produces: personas, competitive analysis, Lean Canvas, PRD, GTM strategy
# 2. Initialize as Dynamic project/dynamic init "taskflow"
# 3. Plan Plus for deeper brainstorming/plan-plus "user signup and login with Google OAuth"
# 4. PDCA each feature/pdca plan "user signup and login with Google OAuth"/pdca design "user signup and login with Google OAuth"/pdca do "user signup and login with Google OAuth"/pdca analyze "user signup and login with Google OAuth"/pdca report "user signup and login with Google OAuth"
# 5. Parallel PDCA (max 3 concurrent features)/pdca plan "todo CRUD with kanban board"/pdca plan "real-time notifications"
# 6. Quality review/review src//simplify/qaResult: docs/ contains plan, design, analysis, and report for every feature. Each agent remembers context across sessions. Checkpoints are auto-saved at every phase transition.
Brownfield Example: Adding Auth to an Existing Next.js App
cd ~/my-existing-nextjs-appgemini
# bkit auto-detects Dynamic level# Rule 5 enforced: "Prefer editing existing files over creating new ones"
/pdca plan "add authentication with role-based access control"/pdca design "add authentication with role-based access control"/pdca do "add authentication with role-based access control"/pdca analyze "add authentication with role-based access control"
# If gap < 90%:/pdca iterate "add authentication with role-based access control"
# If gap >= 90%:/pdca report "add authentication with role-based access control"
# Rollback if something went wrong:/rollback list/rollback restore {checkpoint-id}
# Final code review/review src/middleware.ts src/lib/auth.tsThe gap-detector compares the design doc against your existing codebase, accounting for brownfield constraints rather than assuming a clean implementation.
Enterprise Example: Team Orchestration
For Enterprise-level projects, agents form coordinated teams:
/pdca team user-authenticationThis triggers a structured team composition:
CTO Lead (cto-lead):├── Plan Team (Leader pattern)│ ├── product-manager → requirements analysis│ └── security-architect → security requirements├── Design Team (Council pattern)│ ├── frontend-architect → UI design│ ├── bkend-expert → API design│ └── security-architect → auth design├── Check Team (Watchdog pattern)│ ├── gap-detector → gap analysis│ ├── code-analyzer → code quality│ └── qa-monitor → log monitoring└── Report (Pipeline pattern) └── report-generator → final reportEach pattern serves a different purpose:
| Pattern | Architecture | When Used |
|---|---|---|
| Leader | 1 lead + N workers | Plan and Design phases |
| Council | Equal peers, independent analysis | Architecture decisions |
| Swarm | Dynamic pool, parallel execution | Large-scale code review |
| Pipeline | Sequential chain | PDCA auto-progression |
| Watchdog | Monitor + actors | QA/security verification |
The 9-Phase Development Pipeline
Beyond PDCA, bkit offers a 9-phase pipeline for comprehensive project scaffolding:
| Phase | Description | Starter | Dynamic | Enterprise |
|---|---|---|---|---|
| 1. Schema | Terminology and data models | Required | Required | Required |
| 2. Convention | Coding rules and standards | Required | Required | Required |
| 3. Mockup | UI/UX wireframes | Required | Required | Required |
| 4. API | REST endpoint design | Skip | Required | Required |
| 5. Design System | Component library | Skip | Optional | Required |
| 6. UI Integration | Frontend-to-backend wiring | Required | Required | Required |
| 7. SEO/Security | Hardening | Skip | Optional | Required |
| 8. Review | Architecture review | Skip | Optional | Required |
| 9. Deployment | CI/CD and production | Required | Required | Required |
/development-pipeline start # Start from phase 1/development-pipeline status # Show current phase/development-pipeline next # Advance to next phase/phase-4-api # Jump to a specific phaseAdditional Commands
# Code quality/review <path> # Code review with code-analyzer agent/simplify # Code quality review and complexity reduction/qa # Zero-script QA via Docker log monitoring
# Automation/loop 5m /pdca status # Recurring command execution
# Audit trail/audit # View full audit log/audit {feature} # Audit specific feature/audit decisions # View all recorded decisions
# Custom skills/skill-create # Create project-specific skill (hot-reload supported)The audit log tracks decisions, tool usage, phase transitions, agent activity, and security events — all stored in .bkit/audit/.
Output Styles
Choose a response style that matches your experience level:
/output-style-setup| Style | Default For | Characteristics |
|---|---|---|
bkit-learning | Starter | Beginner-friendly, “Why?” sections, code comments, tips |
bkit-pdca-guide | Dynamic | PDCA-centric, phase indicators, action→result→next flow |
bkit-enterprise | Enterprise | Efficiency-first, minimal explanation, technical terminology |
bkit-pdca-enterprise | Enterprise (optional) | PDCA + Enterprise combined |
Set via /output-style-setup or the BKIT_OUTPUT_STYLE environment variable.
23 Built-in Tools
bkit maps and manages Gemini CLI’s 23 built-in tools, including file management (7), execution (1), info search (2), agent coordination (5), plan mode (2), and Task Tracker tools (6, requires v0.32.0+).
Environment Variables
| Variable | Purpose |
|---|---|
BKIT_PROJECT_LEVEL | Override auto-detected project level |
BKIT_PDCA_AUTOMATION | Set automation level (e.g., full-auto) |
BKIT_OUTPUT_STYLE | Set output style |
When to Use bkit
bkit is worth the setup overhead when:
- You’re building features that benefit from design docs and gap analysis
- You want consistent development processes enforced automatically
- You’re working with Gemini CLI and want more structure than raw prompting
- You’re building a greenfield project that needs systematic scaffolding
- You’re adding features to a brownfield project and need design-to-implementation traceability
- You want AI autonomy with guardrails (L2-L4 automation levels)
- You need audit trails and rollback safety for AI-assisted development
When bkit Is Overkill
- Quick scripts and one-off tasks
- Projects that don’t benefit from formal PDCA cycles
- Teams already using a different project management methodology
- Environments where you can’t install Gemini CLI extensions
- Developers who prefer fully manual control over every AI action
Key Takeaways
- PDCA is enforced by hooks — you can’t skip planning, even if you try
- Context Engineering is architectural — 71% token savings from phase-aware context loading
- Automation levels L0-L4 — start manual, scale to autonomous as you gain trust
- Checkpoints and rollback — every phase transition auto-saves, emergency stop included
- Agent permission grades — READONLY, DOCWRITE, and FULL prevent agents from overstepping
- BTW system — record improvement ideas without interrupting your current workflow
- Parallel PDCA — up to 3 features simultaneously via
/pdca batch - Multi-language auto-detection — works in 8 languages, triggers agents automatically
- Team orchestration — 5 patterns for coordinated multi-agent workflows (Enterprise)
- Audit trail — full logging of decisions, tool usage, phase transitions, and security events
bkit turns Gemini CLI from a raw AI assistant into a structured development environment. It won’t write better code than Gemini already can — but it ensures the code is planned, designed, verified, documented, and auditable in a systematic way that raw prompting never achieves.
This article was written by opencode (GLM-5 Turbo), based on content from: https://github.com/popup-studio-ai/bkit-gemini and the bkit-gemini v2.0.0 User Guide

