このチェックリストは、基本的なDroidインストールを完全に最適化された開発環境に変換します。各セクションは前のセクションをベースに構築されているため、最良の結果を得るためには順番通りに完了してください。
Each section can be done independently if you prefer to spread it out.
Using Factory App? Most of this guide applies to both CLI and Factory App. Where the experience differs, we’ve noted the App-specific approach.
レベル1:基本セットアップ
これらの基盤となる項目は、最大の即時効果をもたらします。
Install the Factory IDE Plugin
The IDE plugin provides real-time context—open files, errors, selections—so Droid sees what you see.VSCode/Cursor:
- Open Extensions (
Cmd+Shift+X)
- Search “Factory”
- Install and reload
Verify: Run droid and check for “IDE connected” in the status bar. Create your AGENTS.md
Create a basic AGENTS.md at your repository root:# Project Guidelines
## Build & Test
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint`
## Code Style
- Use TypeScript strict mode
- Prefer functional components in React
- Write tests for new features
Start minimal—you’ll expand this as you work. See the AGENTS.md guide for more examples. Configure your default model
Set your preferred model in settings:CLI:droid
> /settings
# Navigate to Model and select your default
Factory App: Use the model selector dropdown in the chat interface.Recommendation: Start with Claude Opus 4.5 (default) for complex work, switch to Haiku 4.5 or GPT-5.1-Codex for routine tasks.
Checkpoint: You should now have IDE integration, basic project context, and your preferred model configured.
レベル2:メモリ&コンテキスト
永続的なメモリを構築し、Droidがセッション間であなたの設定を記憶できるようにします。
Create a memories file
Create ~/.factory/memories.md for personal preferences:# My Development Preferences
## Code Style
- I prefer arrow functions over function declarations
- I like early returns over nested conditionals
- I use 2-space indentation
## Testing
- I use React Testing Library, not Enzyme
- I prefer integration tests over unit tests for components
- Mock external APIs, not internal modules
## Past Decisions
- [2024-01] Chose Zustand over Redux for state management
- [2024-02] Using Tailwind CSS for styling
Update this file whenever you find yourself repeating instructions to Droid. Reference memories in AGENTS.md
Add to your AGENTS.md:## Personal Preferences
Refer to `~/.factory/memories.md` for my coding preferences and past decisions.
Create project-specific memories (optional)
For team projects, create .factory/memories.md:# Project Memories
## Architecture Decisions
- We use the repository pattern for data access
- All API routes go through the /api/v1 prefix
- Feature flags are managed via LaunchDarkly
## Known Issues
- The auth service has a 5-second timeout issue (#123)
- Legacy users table uses snake_case columns
Checkpoint: Droid now has access to your preferences and project history without you repeating them.
レベル3:ルール&規約
コーディング標準を整理し、Droidが一貫してそれらに従うようにします。
Create a rules directory
Create .factory/rules/ in your project:.factory/
└── rules/
├── typescript.md
├── testing.md
└── security.md
Add TypeScript rules
Create .factory/rules/typescript.md:# TypeScript Conventions
## General
- Use `interface` for object types, `type` for unions/intersections
- Avoid `any` - use `unknown` with type guards instead
- Export types alongside their implementations
## React Components
- Use functional components with TypeScript FC type
- Props interfaces should be named `{ComponentName}Props`
- Use `React.ReactNode` for children, not `React.ReactChild`
## Imports
- Group imports: React, external libs, internal modules, types
- Use absolute imports from `@/` prefix
- Avoid barrel files (index.ts re-exports) for performance
Add testing rules
Create .factory/rules/testing.md:# Testing Conventions
## File Organization
- Test files live next to source: `Component.tsx` → `Component.test.tsx`
- Integration tests go in `__tests__/integration/`
- E2E tests go in `e2e/`
## Test Structure
- Use descriptive test names: "should [action] when [condition]"
- One assertion per test when possible
- Use `beforeEach` for common setup, not `beforeAll`
## Mocking
- Mock at the boundary (API calls, not internal functions)
- Use MSW for API mocking in integration tests
- Reset mocks in `afterEach`
Reference rules in AGENTS.md
Update your AGENTS.md:## Coding Standards
Follow the conventions documented in:
- `.factory/rules/typescript.md` - TypeScript and React patterns
- `.factory/rules/testing.md` - Testing conventions
- `.factory/rules/security.md` - Security requirements
Checkpoint: Your coding standards are now documented and Droid will follow them consistently.
レベル4:スキル&自動化
再利用可能なスキルと自動化フックを追加します。
Create a prompt refiner skill
Create ~/.factory/skills/prompt-refiner/SKILL.md:---
name: prompt-refiner
description: Improve prompts before sending them to get better results. Use when you want to refine a task description.
---
# Prompt Refiner
## Instructions
When the user wants to refine a prompt:
1. Ask for their draft prompt or task description
2. Analyze it for:
- Clarity: Is the goal specific and measurable?
- Context: Does it include relevant background?
- Constraints: Are requirements and limitations stated?
- Examples: Would examples help clarify expectations?
3. Suggest an improved version with explanations
4. Offer to iterate if needed
## Good Prompt Patterns
- Start with the outcome: "Create a..." not "I want you to..."
- Include acceptance criteria: "The result should..."
- Specify format: "Return as JSON/markdown/code"
- Mention constraints: "Must be compatible with...", "Should not modify..."
Add an auto-formatting hook
Run /hooks and add a PostToolUse hook for automatic formatting:{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Create",
"hooks": [
{
"type": "command",
"command": "cd \"$FACTORY_PROJECT_DIR\" && npx prettier --write \"$(jq -r '.tool_input.file_path' 2>/dev/null || echo '')\" 2>/dev/null || true"
}
]
}
]
}
}
This automatically formats files after Droid edits them. Add a test-on-edit hook (optional)
Run related tests after edits:{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit",
"hooks": [
{
"type": "command",
"command": "cd \"$FACTORY_PROJECT_DIR\" && jq -r '.tool_input.file_path' | xargs -I {} npm test -- --findRelatedTests {} --passWithNoTests 2>/dev/null || true"
}
]
}
]
}
}
Checkpoint: You now have reusable skills and automatic formatting/testing.
レベル5:トークン最適化
品質を犠牲にすることなく、コスト効率を微調整します。
Enable Spec Mode for complex work
Use Shift+Tab or /spec before starting features that touch multiple files. This prevents expensive false starts.
Configure model switching
Set up a spec mode model for planning:droid
> /settings
# Set Spec Mode Model to a reasoning-heavy model
Use Opus 4.5 for planning, then Sonnet or Codex for implementation. Run the readiness report
Check your project’s AI-readiness:CLI:droid
> /readiness-report
Factory App: View your readiness score in the Agent Readiness Dashboard.Address high-impact items first—linting, type checking, and fast tests dramatically reduce token waste.
クイックリファレンス:ファイルの場所
| 目的 | 個人用 | プロジェクト用 |
|---|
| スキル | ~/.factory/skills/<name>/SKILL.md | .factory/skills/<name>/SKILL.md |
| メモリ | ~/.factory/memories.md | .factory/memories.md |
| ルール | ~/.factory/rules/*.md | .factory/rules/*.md |
| 設定 | ~/.factory/settings.json | .factory/settings.json |
| フック | settings.json内 | settings.json内 |
| エージェント指示 | ~/.factory/AGENTS.md | ./AGENTS.md |
| カスタムdroid | ~/.factory/droids/<name>.md | .factory/droids/<name>.md |
検証チェックリスト
セットアップを検証するために、このチェックリストを実行してください:
次のステップ