agentleFS
ww-w-aiww-w-ai/bkit-codex/.agents/skills/bkit-rules/SKILL.md

bkit-rules

Skill70 starsChanged 9 months agoApache-2.0View on GitHub

Core rules for bkit PDCA methodology. Detailed reference for document-driven development, level detection, task classification, and code quality standards. Use when you need detailed bkit rules beyond what AGENTS.md provides. Triggers: bkit rules, PDCA rules, development rules, coding standards, 개발 규칙, 코딩 표준, ルール, 规则, reglas, règles, Regeln, regole Do NOT use for: specific PDCA actions (use $pdca instead).

  • Reads credentials

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 16 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Before writing code, follow this decision tree:

    line 40
  2. Distinctive:

    If neither exists: suggest creating a plan first

    line 46
  3. Distinctive:

    If plan exists but no design: suggest creating a design

    line 47
  4. Distinctive:

    If both exist: reference design during implementation

    line 48
  5. Distinctive:

    If task is Quick Fix (<10 lines): skip PDCA, proceed directly

    line 49
  6. Distinctive:

    Before writing or editing any source code file:

    line 53
  7. Very specific:

    Call bkit_pre_write_check(filePath) MCP tool

    line 55
  8. Distinctive:

    If response says design document exists: reference it during implementation

    line 56
  9. Distinctive:

    If response says no design document: suggest "Shall I create a design first?"

    line 57
  10. Distinctive:

    After significant code changes:

    line 62
  11. Distinctive:

    Follow the returned guidance

    line 65
  12. Distinctive:

    No Hardcoding: Use meaningful constants

    line 175
  13. Distinctive:

    Extensibility: Write in generalized patterns

    line 176
  14. Very specific:

    Check utils/, hooks/, components/ui/

    line 181
  15. Very specific:

    NEVER commit .env, credentials, or secret files

    line 200
  16. Distinctive:

    ALWAYS validate user input at system boundaries

    line 201
  17. Distinctive:

    Prefer explicit error handling over silent failures

    line 202
  18. Distinctive:

    Follow OWASP Top 10 guidelines for security:

    line 203
  19. Distinctive:

    When PDCA is active, include at the end of responses:

    line 239

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

bkit Core Rules (Detailed Reference)

Comprehensive rules for bkit's document-driven AI-native development methodology.

1. PDCA Auto-Apply Rules

Task Classification

Classify tasks to determine the appropriate PDCA level:

ClassificationContent SizePDCA LevelAction
Quick Fix< 10 linesNoneExecute immediately
Minor Change< 50 linesRecommendedShow summary, proceed
Feature< 200 linesRequiredCheck/create design doc
Major Feature>= 200 linesRequired + SplitRequire design, split into subtasks

Classification Keywords

ClassificationKeywords
Quick Fixfix, typo, correct, adjust, tweak
Minor Changeimprove, refactor, enhance, optimize, update
Featureadd, create, implement, build, new feature
Major Featureredesign, migrate, architecture, overhaul, rewrite

Design Document Check Flow

Before writing code, follow this decision tree:

  1. Extract feature name from file path or user request
  2. Check: docs/01-plan/features/{feature}.plan.md
  3. Check: docs/02-design/features/{feature}.design.md
  4. Decision:
    • If neither exists: suggest creating a plan first
    • If plan exists but no design: suggest creating a design
    • If both exist: reference design during implementation
    • If task is Quick Fix (<10 lines): skip PDCA, proceed directly

Pre-Write Rules

Before writing or editing any source code file:

  1. Call bkit_pre_write_check(filePath) MCP tool
  2. If response says design document exists: reference it during implementation
  3. If response says no design document: suggest "Shall I create a design first?"
  4. For major changes (>200 lines): ALWAYS suggest creating design first

Post-Write Guidance Rules

After significant code changes:

  1. Call bkit_post_write(filePath, linesChanged) MCP tool
  2. Follow the returned guidance
  3. For features with design docs: suggest gap analysis
  4. Format suggestion: "Consider running gap analysis: $pdca analyze {feature}"

2. Level Detection Rules

Detect project level based on directory structure and config files.

Enterprise (2+ conditions met)

  • kubernetes/, terraform/, k8s/, or infra/ directories exist
  • services/ folder with 2+ services
  • turbo.json or pnpm-workspace.yaml
  • docker-compose.yml
  • .github/workflows/ (CI/CD)

Dynamic (1+ conditions met)

  • lib/bkend/ or src/lib/bkend/ directory
  • .mcp.json with bkend configuration
  • supabase/ folder
  • firebase.json
  • api/ or backend/ directory
  • docker-compose.yml (without K8s indicators)
  • package.json containing: bkend, @supabase, firebase

Starter

None of the above conditions met. Default level for simple projects.

Level-Specific Behavior

AspectStarterDynamicEnterprise
ExplanationFriendly, avoid jargonTechnical but clearConcise, use terms
Code commentsDetailedCore logic onlyArchitecture only
Error handlingStep-by-step guideTechnical solutionsBrief cause + fix
PDCA docsSimpleFeature-specificDetailed architecture
Reference Skill$starter$dynamic$enterprise

Level Upgrade Signals

  • Starter to Dynamic: "Add login", "Save data", "Admin page"
  • Dynamic to Enterprise: "High traffic", "Microservices", "Own server"

3. 8-Language Trigger Keywords

bkit supports trigger detection in 8 languages:

LanguagePlanDesignAnalyzeReport
ENplan, planningdesign, architectureanalyze, verify, checkreport, summary
KO계획, 기획설계, 아키텍처분석, 검증보고서, 요약
JA計画設計分析, 検証報告
ZH计划设计分析, 验证报告
ESplanificardiseñoanalizarinforme
FRplanifierconceptionanalyserrapport
DEplanenEntwurfanalysierenBericht
ITpianificareprogettazioneanalizzarerapporto

Feature Keywords by Language

LanguageFeature RequestBug FixRefactor
ENadd, create, implementfix, bug, errorrefactor, clean
KO추가, 생성, 구현수정, 버그, 오류리팩토링, 정리
JA追加, 作成, 実装修正, バグ, エラーリファクタリング
ZH添加, 创建, 实现修复, 错误重构
ESagregar, creararreglar, errorrefactorizar
FRajouter, créercorriger, erreurrefactoriser
DEhinzufügen, erstellenbeheben, Fehlerrefaktorisieren
ITaggiungere, crearecorreggere, errorerifattorizzare

4. Naming Conventions

Code Naming Rules

TargetRuleExample
ComponentsPascalCaseUserProfile, LoginForm
FunctionscamelCasegetUserById(), handleSubmit()
ConstantsUPPER_SNAKE_CASEMAX_RETRY_COUNT, API_BASE_URL
Types/InterfacesPascalCaseUserProfile, ApiResponse
Files (component)PascalCase.tsxUserProfile.tsx
Files (utility)camelCase.tsformatDate.ts
Folderskebab-caseuser-profile/, auth-provider/

Document Naming Rules

FormatExampleWhen to Use
{feature}.plan.mduser-auth.plan.mdPlan documents
{feature}.design.mduser-auth.design.mdDesign documents
{feature}.analysis.mduser-auth.analysis.mdAnalysis reports
{feature}.report.mduser-auth.report.mdCompletion reports

5. Code Quality Standards

Core Principles

  • DRY: Extract to common function on 2nd use
  • SRP: One function, one responsibility
  • No Hardcoding: Use meaningful constants
  • Extensibility: Write in generalized patterns

Pre-coding Checks

  1. Does similar functionality exist? Search first
  2. Check utils/, hooks/, components/ui/
  3. Reuse if exists; create if not

Self-Check After Coding

  • Same logic exists elsewhere?
  • Can function be reused?
  • Hardcoded values present?
  • Function does only one thing?

When to Refactor

  • Same code appears 2nd time
  • Function exceeds 20 lines
  • if-else nests 3+ levels
  • Same parameters passed to multiple functions

Safety Rules

  • NEVER commit .env, credentials, or secret files
  • ALWAYS validate user input at system boundaries
  • Prefer explicit error handling over silent failures
  • Follow OWASP Top 10 guidelines for security:
    • Input validation (XSS, SQL Injection prevention)
    • Authentication/authorization handling
    • Sensitive data encryption
    • HTTPS enforcement
    • Rate limiting

6. MCP Tools Quick Reference

ToolWhen to CallPriority
bkit_initSession startP0
bkit_analyze_promptFirst user messageP1
bkit_get_statusBefore any PDCA operationP0
bkit_pre_write_checkBefore writing/editing source codeP0
bkit_post_writeAfter significant code changesP1
bkit_complete_phaseWhen a PDCA phase is doneP0
bkit_detect_levelWhen project level is unclearP1
bkit_classify_taskWhen estimating task sizeP1
bkit_pdca_planCreating plan documentP0
bkit_pdca_designCreating design documentP0
bkit_pdca_analyzeRunning gap analysisP1
bkit_pdca_nextSuggesting next phaseP1
bkit_select_templateSelecting PDCA templateP2
bkit_check_deliverablesVerifying phase deliverablesP2
bkit_memory_readReading session memoryP2
bkit_memory_writeWriting session memoryP2

7. Response Style Guidelines

Include bkit Feature Usage Report

When PDCA is active, include at the end of responses:

---
bkit Status: {feature} | Phase: {phase} | Match Rate: {rate}%
Next: {suggested next action}

Level-Appropriate Formatting

  • Starter: Include learning points, explain concepts simply
  • Dynamic: Include PDCA status badges, checklists, next-step guidance
  • Enterprise: Include tradeoff analysis, cost impact, deployment considerations

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.