Haconiwa (็ฎฑๅบญ) is an AI collaborative development support Python CLI tool. This next-generation tool integrates tmux company management, git-worktree integration, task management, and AI agent coordination to provide an efficient development environment.
This project is in early alpha development and in a demonstration phase. Current CLI commands are primarily placeholders showing the intended interface design. Most functionality is actively under development and not yet implemented.
Currently Working:
- CLI installation and command structure
- Help system and documentation
- Basic command routing
To be Implemented:
- Complete implementation of all advertised features
- AI agent collaboration functionality
- Development tool integrations
- Actual task and company management
Production use is not recommended at this time. This is a development preview showing the intended user experience.
โ ๏ธ Note: This project is currently under active development. Features and APIs may change frequently.
This project follows Semantic Versioning.
- ๐ Changelog: CHANGELOG.md - All version change history
- ๐ท๏ธ Latest Version: 0.4.0
- ๐ฆ PyPI: haconiwa
- ๐ GitHub Releases: Releases
Task Branch Fix: Fixed an issue where task branches were being created from the main
branch instead of the YAML-specified defaultBranch
. Now, when you specify defaultBranch: "dev"
in your YAML configuration, all task worktrees will be correctly created from the dev
branch.
- โ
Task CRDs now properly inherit
defaultBranch
from their associated Space CRD - โ Existing incorrect branches are automatically detected and recreated from the correct branch
- โ
All hardcoded references to
main
branch have been replaced with configurable defaults
Environment Setup
# 1. Install tmux
# macOS
brew install tmux
# Ubuntu/Debian
sudo apt-get install tmux
# 2. Python environment setup (3.8+)
python --version # Check version
# 3. Upgrade pip
pip install --upgrade pip
# 4. Claude Code setup
# See detailed instructions: https://docs.anthropic.com/en/docs/claude-code/getting-started
# Set environment variable (if needed)
export ANTHROPIC_API_KEY="your-api-key"
# 5. Install Haconiwa
pip install haconiwa --upgrade
1. Get YAML and Launch Project
# Download YAML file from GitHub
wget https://raw.githubusercontent.com/dai-motoki/haconiwa/main/haconiwa-dev-company.yaml
# Or download with curl
curl -O https://raw.githubusercontent.com/dai-motoki/haconiwa/main/haconiwa-dev-company.yaml
# Apply YAML (automatically attaches to tmux session by default)
haconiwa apply -f haconiwa-dev-company.yaml
# Detach from tmux session: Ctrl+b, d
# Or, apply without attaching
haconiwa apply -f haconiwa-dev-company.yaml --no-attach
# If not attached, explicitly attach
haconiwa space attach -c haconiwa-dev-company
2. Project Operations
# Detach from tmux session: Ctrl+b, d
# Real-time monitoring in another terminal
haconiwa monitor -c haconiwa-dev-company --japanese
# List all projects
haconiwa space list
# Re-attach to project
haconiwa space attach -c haconiwa-dev-company
3. Delete Projects
# Completely delete space and directories
haconiwa space delete -c haconiwa-dev-company --clean-dirs --force
Haconiwa's declarative YAML configuration uses multiple CRDs (Custom Resource Definitions) in multi-document format.
apiVersion: haconiwa.dev/v1
kind: Organization
metadata:
name: haconiwa-dev-company-org # Unique organization identifier
spec:
companyName: "Haconiwa Development Company" # Company name
industry: "AI Development Tools & Infrastructure" # Industry
basePath: "./haconiwa-dev-company" # Organization base path
hierarchy:
departments: # Department definitions
- id: "executive" # Department ID (used for room assignment)
name: "Executive Team"
description: "Company leadership and strategic decision making"
roles: # Role definitions
- roleType: "management" # Management role
title: "Chief Executive Officer"
agentId: "ceo-motoki" # Agent ID
responsibilities:
- "Strategic vision and direction"
- "Company-wide decision making"
- roleType: "engineering" # Engineering role
title: "Senior AI Engineer"
agentId: "ai-lead-nakamura"
responsibilities:
- "AI/ML model development"
- "Algorithm optimization"
Organization CRD Key Elements:
metadata.name
: Unique organization identifier (referenced from Space CRD)spec.hierarchy.departments
: Department definitions (each department maps to a tmux room)spec.hierarchy.departments[].roles
: Role definitions per department (4 roles form 16 panes)
apiVersion: haconiwa.dev/v1
kind: Space
metadata:
name: haconiwa-dev-world # Unique space identifier
spec:
nations: # Nation level (top hierarchy)
- id: jp
name: Japan
cities: # City level
- id: tokyo
name: Tokyo
villages: # Village level
- id: haconiwa-village
name: "Haconiwa Village"
companies: # Company level (tmux session)
- name: haconiwa-dev-company # Session name
grid: "8x4" # Grid size (8 columns ร 4 rows = 32 panes)
basePath: "./haconiwa-dev-world"
organizationRef: "haconiwa-dev-company-org" # Organization reference
gitRepo: # Git repository settings
url: "https://github.com/dai-motoki/haconiwa"
defaultBranch: "dev" # Base branch for task branches
auth: "https"
agentDefaults: # Agent default settings (planned)
type: "claude-code"
permissions: # Permission settings (planned feature)
allow:
- "Bash(python -m pytest)"
- "Bash(python -m ruff)"
- "Bash(python -m mypy)"
- "Read(src/**/*.py)"
- "Write(src/**/*.py)"
deny:
- "Bash(rm -rf /)"
buildings: # Building level
- id: "hq-tower"
name: "Haconiwa HQ Tower"
floors: # Floor level
- id: "executive-floor"
name: "Executive Floor"
rooms: # Room level (tmux windows)
- id: room-executive # Executive window
name: "Executive Room"
description: "C-level executives and senior leadership"
- id: room-standby # Standby window
name: "Standby Room"
description: "Ready-to-deploy talent pool"
Space CRD Hierarchy Structure:
nations
>cities
>villages
>companies
>buildings
>floors
>rooms
- Legal framework (law/) can be placed at each hierarchy level
companies
map to tmux sessionsrooms
map to tmux windows
gitRepo Configuration Detailed Explanation:
url
: URL of the Git repository to clonedefaultBranch
: Base branch from which task branches are created- Example: When
defaultBranch: "dev"
, all task branches are created from thedev
branch - This allows protecting the
main
branch while deriving feature branches from the development branch
- Example: When
auth
: Authentication method ("https" or "ssh")
Important: With the defaultBranch
setting, tasks with worktree: true
in Task CRD will create new branches and worktrees from this branch. By using Git worktree, each task is isolated in its own directory, providing the following benefits:
- Each task has its own working directory, enabling parallel development
- Multiple tasks can progress simultaneously without branch switching
- Each agent can develop without affecting other tasks' work
- Example:
task_ai_strategy_01
is created as an isolated working environment in./haconiwa-dev-world/tasks/task_ai_strategy_01/
agentDefaults.permissions (Planned Feature):
- Feature to restrict commands and operations that agents can execute
allow
: Permitted command patternsdeny
: Prohibited command patterns- Currently can be written as configuration values, but actual permission control is not yet implemented
apiVersion: haconiwa.dev/v1
kind: Task
metadata:
name: task_ai_strategy_01 # Unique task identifier
spec:
taskId: task_ai_strategy_01 # Task ID
title: "AI Strategy Development" # Task title
description: | # Detailed description in markdown format
## AI Strategy Development
Develop comprehensive AI strategy for Haconiwa platform.
### Requirements:
- Market analysis
- Technology roadmap
- Competitive analysis
- Investment planning
assignee: "ceo-motoki" # Assigned agent ID
spaceRef: "haconiwa-dev-company" # Belonging space
priority: "high" # Priority (high/medium/low)
worktree: true # Whether to create Git worktree
branch: "strategy/ai-roadmap" # Branch name
Task CRD Key Elements:
assignee
: Specify agent ID defined in Organization CRDspaceRef
: Specify the belonging company nameworktree
: If true, creates branch from defaultBranchbranch
: Branch name to create
# Organization definition
---
apiVersion: haconiwa.dev/v1
kind: Organization
metadata:
name: my-org
spec:
# ...
---
# Space definition
apiVersion: haconiwa.dev/v1
kind: Space
metadata:
name: my-space
spec:
# ...
---
# Task definitions (multiple allowed)
apiVersion: haconiwa.dev/v1
kind: Task
metadata:
name: task-1
spec:
# ...
YAML File Configuration Best Practices:
- Place organization definition first
- Place space definition next
- Place task definitions last (recommend grouping by room)
- Separate each document with
---
- YAML Parsing: Decompose multi-document into individual CRD objects
- Organization Creation: Build department/role structure from Organization CRD
- Space Creation: Build tmux session/window structure from Space CRD
- Task Creation: Create Git worktrees and task assignments from Task CRD
- Create each task branch from
defaultBranch
- Place agents in task directories
- Create each task branch from
- Claude Execution: Auto-execute
cd {path} && claude
in each pane
apiVersion: haconiwa.dev/v1
kind: Law
metadata:
name: haconiwa-legal-framework
spec:
globalRules: # Global rules
- name: "security-policy"
description: "Security policy for all agents"
content: |
## Security Policy
- Confidential information handling
- Access control management
- Data protection policies
- name: "code-standards"
description: "Coding standards"
content: |
## Coding Standards
- PEP 8 compliance (Python)
- ESLint configuration (JavaScript)
- Type safety enforcement
hierarchicalRules: # Hierarchical rules
nation:
enabled: true
rules:
- "National legal requirements"
- "Data sovereignty regulations"
city:
enabled: true
rules:
- "Regional compliance requirements"
- "Industry standard adherence"
company:
enabled: true
rules:
- "Organizational governance policies"
- "Internal control regulations"
permissions: # Permission management
defaultPolicy: "deny" # Default deny
rules:
- resource: "production-database"
actions: ["read"]
subjects: ["senior-engineers", "cto"]
- resource: "source-code"
actions: ["read", "write"]
subjects: ["all-engineers"]
- resource: "financial-data"
actions: ["read", "write"]
subjects: ["cfo", "finance-team"]
systemPrompts: # Agent system prompts
base: |
You are an AI agent of Haconiwa Development Company.
Please follow these rules and policies in your actions.
roleSpecific:
ceo: "Focus on strategic decision-making and company-wide direction."
engineer: "Prioritize code quality and best practices."
security: "Put security and compliance first."
Law CRD Key Elements (Planned):
globalRules
: Global rules applied to all hierarchieshierarchicalRules
: Rules definition by hierarchy (nation/city/company etc.)permissions
: Resource access control managementsystemPrompts
: Role-specific agent behavior guidelines
Planned Integration Features:
- Automatic reference from Organization/Space CRDs
- Hierarchical rule inheritance mechanism
- Runtime permission checking
- Automatic prompt injection to agents
Complete command guides with detailed examples:
- ๐ apply - Environment variable management with .env file distribution
- ๐ scan - AI model search, analysis, and parallel config generation
- โก tool parallel-dev - Claude Code SDK parallel execution
# Apply YAML with environment variables
haconiwa apply -f config.yaml --env .env.base --env .env.local
# Search AI models and generate configs
haconiwa scan model gpt-4
haconiwa scan generate-parallel-config --action add_tests
# Parallel file editing with Claude Code SDK
haconiwa tool parallel-dev claude -f file1.py,file2.py -p "prompt1","prompt2" -m 5
## ๐ Ready-to-Use Features
### apply yaml Pattern (v1.0 New Feature)
Declarative YAML file-based multiroom multi-agent environment management is available **right now**:
```bash
# 1. Installation
pip install haconiwa --upgrade
# 2. Download YAML file (directly from GitHub)
wget https://raw.githubusercontent.com/dai-motoki/haconiwa/main/test-multiroom-with-tasks.yaml
# Or download with curl
curl -O https://raw.githubusercontent.com/dai-motoki/haconiwa/main/test-multiroom-with-tasks.yaml
# Check file contents
cat test-multiroom-with-tasks.yaml
# 3. Apply YAML to create multiroom environment (auto-attach by default)
haconiwa apply -f test-multiroom-with-tasks.yaml
# 3b. Apply without auto-attach
haconiwa apply -f test-multiroom-with-tasks.yaml --no-attach
# 4. List spaces
haconiwa space list
# 5. List spaces (short form)
haconiwa space ls
# 6. Attach to specific room (if not auto-attached)
haconiwa space attach -c test-company-multiroom-tasks -r room-frontend
# 7. Execute claude command on all panes
haconiwa space run -c test-company-multiroom-tasks --claude-code
# 8. Execute custom command on specific room
haconiwa space run -c test-company-multiroom-tasks --cmd "echo hello" -r room-backend
# 9. Dry-run to check commands
haconiwa space run -c test-company-multiroom-tasks --claude-code --dry-run
# 10. Stop session
haconiwa space stop -c test-company-multiroom-tasks
# 11. Complete deletion (delete directories too)
haconiwa space delete -c test-company-multiroom-tasks --clean-dirs --force
# 12. Complete deletion (keep directories)
haconiwa space delete -c test-company-multiroom-tasks --force
๐ Auto-created Multiroom Structure (Hierarchical Legal Framework):
./test-multiroom-desks/
โโโ jp/ # Nation Level (ๅฝใฌใใซ)
โ โโโ law/ # National Law Directory
โ โ โโโ global-rules.md # ใฐใญใผใใซ่ฆๅ
โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โโโ nation-agent-prompt.md
โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โโโ code-permissions.yaml
โ โ โโโ file-permissions.yaml
โ โโโ tokyo/ # City Level (ๅธใฌใใซ)
โ โโโ law/ # City Law Directory
โ โ โโโ regional-rules.md # ๅฐๅ่ฆๅ
โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โโโ city-agent-prompt.md
โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โโโ code-permissions.yaml
โ โ โโโ file-permissions.yaml
โ โโโ test-village/ # Village Level (ๆใฌใใซ)
โ โโโ law/ # Village Law Directory
โ โ โโโ local-rules.md # ใญใผใซใซ่ฆๅ
โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โโโ village-agent-prompt.md
โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โโโ code-permissions.yaml
โ โ โโโ file-permissions.yaml
โ โโโ test-multiroom-company/ # Company Level (ไผ็คพใฌใใซ)
โ โโโ law/ # Company Law Directory
โ โ โโโ project-rules.md # ใใญใธใงใฏใ่ฆๅ
โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โโโ company-agent-prompt.md
โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โโโ code-permissions.yaml
โ โ โโโ file-permissions.yaml
โ โโโ headquarters/ # Building Level (ๅปบ็ฉใฌใใซ)
โ โโโ law/ # Building Law Directory
โ โ โโโ building-rules.md # ๅปบ็ฉ่ฆๅ
โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โโโ building-agent-prompt.md
โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โโโ code-permissions.yaml
โ โ โโโ file-permissions.yaml
โ โโโ floor-1/ # Floor Level (้ๅฑคใฌใใซ)
โ โโโ law/ # Floor Law Directory
โ โ โโโ floor-rules.md # ้ๅฑค่ฆๅ
โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โโโ floor-agent-prompt.md
โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โโโ code-permissions.yaml
โ โ โโโ file-permissions.yaml
โ โโโ room-01/ # Room Level (้จๅฑใฌใใซ)
โ โ โโโ law/ # Room Law Directory
โ โ โ โโโ team-rules.md # ใใผใ ่ฆๅ
โ โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โ โโโ room-agent-prompt.md
โ โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โ โโโ code-permissions.yaml
โ โ โ โโโ file-permissions.yaml
โ โ โโโ desks/ # Desk Level (ใในใฏใฌใใซ)
โ โ โโโ law/ # Desk Law Directory
โ โ โ โโโ agent-rules.md # ใจใผใธใงใณใ่ฆๅ
โ โ โ โโโ system-prompts/ # ใทในใใ ใใญใณใใ
โ โ โ โ โโโ desk-agent-prompt.md
โ โ โ โโโ permissions/ # ๆจฉ้็ฎก็
โ โ โ โโโ code-permissions.yaml
โ โ โ โโโ file-permissions.yaml
โ โ โโโ org-01-pm/
โ โ โโโ org-01-worker-a/
โ โ โโโ org-01-worker-b/
โ โ โโโ org-01-worker-c/
โ โ โโโ org-02-pm/
โ โ โโโ org-02-worker-a/
โ โ โโโ org-02-worker-b/
โ โ โโโ org-02-worker-c/
โ โ โโโ org-03-pm/
โ โ โโโ org-03-worker-a/
โ โ โโโ org-03-worker-b/
โ โ โโโ org-03-worker-c/
โ โ โโโ org-04-pm/
โ โ โโโ org-04-worker-a/
โ โ โโโ org-04-worker-b/
โ โ โโโ org-04-worker-c/
โ โโโ room-02/ # Room Level (้จๅฑใฌใใซ)
โ โโโ law/ # Room Law Directory (ๅๆงใฎๆงๆ)
โ โโโ desks/ # Desk Level (ๅๆงใฎๆงๆ)
โโโ standby/ # Standby agents (26 agents)
โ โโโ README.md # Auto-generated explanation file
โโโ tasks/ # Task-assigned agents (6 agents)
โโโ main/ # Main Git repository
โโโ 20250609061748_frontend-ui-design_01/ # Task 1
โโโ 20250609061749_backend-api-development_02/ # Task 2
โโโ 20250609061750_database-schema-design_03/ # Task 3
โโโ 20250609061751_devops-ci-cd-pipeline_04/ # Task 4
โโโ 20250609061752_user-authentication_05/ # Task 5
โโโ 20250609061753_performance-optimization_06/ # Task 6
๐ข tmux Structure (Multiroom):
test-multiroom-company (Session)
โโโ Window 0: Alpha Room (16 panes)
โ โโโ org-01 (4 panes): pm, worker-a, worker-b, worker-c
โ โโโ org-02 (4 panes): pm, worker-a, worker-b, worker-c
โ โโโ org-03 (4 panes): pm, worker-a, worker-b, worker-c
โ โโโ org-04 (4 panes): pm, worker-a, worker-b, worker-c
โโโ Window 1: Beta Room (16 panes)
โโโ org-01 (4 panes): pm, worker-a, worker-b, worker-c
โโโ org-02 (4 panes): pm, worker-a, worker-b, worker-c
โโโ org-03 (4 panes): pm, worker-a, worker-b, worker-c
โโโ org-04 (4 panes): pm, worker-a, worker-b, worker-c
โ YAML Apply Pattern Actual Features:
- ๐ข Declarative Management: Environment definition via YAML files
- ๐ค Multiroom Support: Window separation by room units (Frontend/Backend)
- ๐ Auto Room Distribution: Pane arrangement per room windows
- ๐ Bulk Command Execution: All panes or room-specific execution
- ๐ฏ Flexible Targeting: Room-specific command execution
- ๐๏ธ Hierarchical Management: Nation > City > Village > Company
- ๐ External Configuration: Complete management via YAML configuration files
- ๐๏ธ Flexible Cleanup: Choice of directory retention or deletion
- ๐ 32 Pane Management: 2 rooms ร 16 panes configuration
- ๐ง Dry-run Support: Command verification before execution
- ๐ฏ Task Assignment System: Automatic agent directory movement
- ๐ Log File Management: Assignment records via agent_assignment.json
- ๐ Auto-attach Feature: Automatically attach to session after apply (disable with --no-attach)
- ๐ค Claude Auto-execution: Claude command executed in all panes after creation
- ๐ Relative Path Support: Clean path display using ~ prefix for home directories
Create and manage a 4x4 grid multi-agent development environment right now:
# 1. Installation
pip install haconiwa
# 2. Create multi-agent environment (4 organizations ร 4 roles = 16 panes)
haconiwa company build --name my-company \
--base-path /path/to/desks \
--org01-name "Frontend Development" --task01 "UI Design" \
--org02-name "Backend Development" --task02 "API Development" \
--org03-name "Database Team" --task03 "Schema Design" \
--org04-name "DevOps Team" --task04 "Infrastructure"
# 3. List companies
haconiwa company list
# 4. Attach to existing company
haconiwa company attach my-company
# 5. Update company settings (organization name changes)
haconiwa company build --name my-company \
--org01-name "New Frontend Team" --task01 "React Development"
# 6. Force rebuild existing company
haconiwa company build --name my-company \
--base-path /path/to/desks \
--org01-name "Renewed Development Team" \
--rebuild
# 7. Terminate company (with directory cleanup)
haconiwa company kill my-company --clean-dirs --base-path /path/to/desks --force
# 8. Terminate company (keep directories)
haconiwa company kill my-company --force
๐ Auto-created Directory Structure:
/path/to/desks/
โโโ org-01/
โ โโโ 01boss/ # PM desk
โ โโโ 01worker-a/ # Worker-A desk
โ โโโ 01worker-b/ # Worker-B desk
โ โโโ 01worker-c/ # Worker-C desk
โโโ org-02/
โ โโโ 02boss/
โ โโโ 02worker-a/
โ โโโ 02worker-b/
โ โโโ 02worker-c/
โโโ org-03/ (same structure)
โโโ org-04/ (same structure)
โ Actually Working Features:
- ๐ข Integrated Build Command: Create, update, and rebuild with a single command
- ๐ค Automatic Existence Check: Auto-detect company existence and choose appropriate action
- ๐ Seamless Updates: Safely modify existing company configurations
- ๐จ Force Rebuild: Complete recreation with --rebuild option
- ๐๏ธ Auto Directory Structure: Automatic desk creation by organization/role
- ๐ท๏ธ Custom Organization & Task Names: Dynamic title configuration
- ๐๏ธ Flexible Cleanup: Choose to keep or delete directories
- ๐๏ธ Company Management: Complete support for create/list/attach/delete
- ๐ Auto README Generation: Automatic README.md creation in each desk
- ๐ 4x4 Multi-Agent: Organizational tmux layout (16 panes)
# Simple company creation (default settings)
haconiwa company build --name my-company
# Custom base path specification
haconiwa company build --name my-company --base-path ./workspace
haconiwa company build --name my-company \
--base-path ./workspace \
--org01-name "Frontend Team" --task01 "UI/UX Development" \
--org02-name "Backend Team" --task02 "API Design" \
--org03-name "Infrastructure Team" --task03 "DevOps" \
--org04-name "QA Team" --task04 "Quality Assurance" \
--no-attach # Don't auto-attach after creation
# Change organization name only (auto-detect update mode)
haconiwa company build --name my-company \
--org01-name "New Frontend Team"
# Update multiple settings simultaneously
haconiwa company build --name my-company \
--org01-name "React Development Team" --task01 "SPA Application Development" \
--org02-name "Node.js Development Team" --task02 "RESTful API"
# Completely recreate existing company
haconiwa company build --name my-company \
--base-path ./workspace \
--org01-name "Renewed Development Team" \
--rebuild
# Specify workspace (desk) for each organization
haconiwa company build --name my-company \
--desk01 "react-frontend-desk" \
--desk02 "nodejs-backend-desk" \
--desk03 "docker-infra-desk" \
--desk04 "testing-qa-desk"
# Terminate company (delete tmux session only, keep directories)
haconiwa company kill my-company --force
# Complete deletion (delete directories too)
haconiwa company kill my-company \
--clean-dirs \
--base-path ./workspace \
--force
The build command automatically detects company existence status and chooses the appropriate action:
Situation | Action | Example Message |
---|---|---|
Company doesn't exist | New Creation | ๐๏ธ Building new company: 'my-company' |
Company exists + configuration changes | Update | ๐ Updating existing company: 'my-company' |
Company exists + no configuration changes | Information Display | โน๏ธ No changes specified for company 'my-company' |
--rebuild option specified | Force Rebuild | ๐ Rebuilding company: 'my-company' |
Issue: Company not responding
# 1. Check company status
haconiwa company list
# 2. Force terminate
haconiwa company kill my-company --force
# 3. Recreate
haconiwa company build --name my-company --rebuild
Issue: Directory permission errors
# Check and fix base path permissions
chmod 755 ./workspace
haconiwa company build --name my-company --base-path ./workspace
Issue: tmux session remains
# Manually check tmux sessions
tmux list-sessions
# Manual deletion
tmux kill-session -t my-company
- ๐ค AI Agent Management: Create and monitor Boss/Worker agents
- ๐ฆ World Management: Build and manage development environments
- ๐ฅ๏ธ tmux Company Integration: Efficient development space management
- ๐ Task Management: Task management system integrated with git-worktree
- ๐ Resource Management: Efficient scanning of databases and file paths
- ๐๏ธ Real-time Monitoring: Progress monitoring of agents and tasks
Haconiwa is built around four main CRDs (Custom Resource Definitions):
Haconiwa CRD Architecture
โโโ Organization CRD (Organization Definition)
โ โโโ Department Structure (departments)
โ โโโ Role Definitions (roles)
โ โโโ Responsibilities (responsibilities)
โโโ Space CRD (Space Definition)
โ โโโ Hierarchy (nations > cities > villages > companies > buildings > floors > rooms)
โ โโโ Git Repository Settings (gitRepo)
โ โโโ tmux Session/Window Mapping
โโโ Task CRD (Task Definition)
โ โโโ Task Details (title, description)
โ โโโ Agent Assignment (assignee)
โ โโโ Git Worktree Settings (branch, worktree)
โโโ Law CRD (Legal Framework) - Planned
โโโ Global Rules (globalRules)
โโโ Hierarchical Rules (hierarchicalRules)
โโโ Permission Management (permissions)
1. Organization CRD
โ Defines
Agent Structure (Departments & Roles)
โ
2. Space CRD
โ References (organizationRef)
Physical Layout (tmux Sessions & Windows)
โ
3. Task CRD
โ References (spaceRef, assignee)
Work Assignment & Git Worktree Creation
โ
4. Law CRD (Planned)
โ Integrates
Rules & Permissions Applied to All CRDs
Haconiwa CRD | tmux Concept | Main Role |
---|---|---|
Organization | - | Define agent organizational structure |
Space (Company) | Session | Top-level container for development environment |
Space (Room) | Window | Functional work groups |
Task + Agent | Pane | Individual agent work environment |
1. Declarative Environment Management
- Define all configuration in YAML files
- Build reproducible development environments
2. Task Isolation with Git Worktree
- Each task works in an independent directory
- Automatic branch creation from
defaultBranch
- Enable parallel development
3. Hierarchical Structure
- Space CRD hierarchy (Nation โ City โ Village โ Company โ Building โ Floor โ Room)
- Future hierarchical rule inheritance via Law CRD
4. Automated Agent Placement
- Automatic placement of agents defined in Organization CRD
- Work assignment via Task CRD
- Automatic mapping to tmux panes
pip install haconiwa
๐ Development Note: The package is available on PyPI, but many features are still under development.
๐ญ Important: The commands shown below are for demonstration purposes. Currently, these commands display help information and basic structure, but the actual functionality is under development. We are actively working toward complete feature implementation.
haconiwa --help
haconiwa core init
haconiwa world create local-dev
# Create boss agent
haconiwa agent spawn boss
# Create worker agent
haconiwa agent spawn worker-a
# Create new task
haconiwa task new feature-login
# Assign task to agent
haconiwa task assign feature-login worker-a
# Monitor progress
haconiwa watch tail worker-a
๐ง Development Note: The commands listed below are currently for demonstration and testing purposes. The CLI structure is functional, but most commands display help information or placeholder responses. We are actively developing the core functionality behind each command group.
The CLI tool provides 7 main command groups:
Manage AI agents (Boss/Worker) for collaborative development
haconiwa agent spawn <type>
- Create agenthaconiwa agent ps
- List agentshaconiwa agent kill <name>
- Stop agent
System core management and configuration
haconiwa core init
- Initialize projecthaconiwa core status
- Check system statushaconiwa core upgrade
- Upgrade system
Scan and manage project resources (databases, files, etc.)
haconiwa resource scan
- Resource scanninghaconiwa resource list
- List resources
Efficient development enterprise environment management using tmux
haconiwa company build <name>
- Create, update, and rebuild tmux companieshaconiwa company list
- List companieshaconiwa company attach <name>
- Attach to companyhaconiwa company kill <name>
- Terminate/delete companyhaconiwa company resize <name>
- Adjust company layout
Task management integrated with git-worktree
haconiwa task new <name>
- Create new taskhaconiwa task assign <task> <agent>
- Assign taskhaconiwa task status
- Check task status
Real-time monitoring of agents and tasks
haconiwa watch tail <target>
- Real-time monitoringhaconiwa watch logs
- Display logs
Development environment and world management
haconiwa world create <name>
- Create new development worldhaconiwa world list
- List worldshaconiwa world switch <name>
- Switch world
Advanced search and analysis functionality for AI model-related files in projects
haconiwa scan model <name>
- Search by model name (with automatic prefix stripping)haconiwa scan content <pattern>
- Search file contents with regexhaconiwa scan list
- List available AI modelshaconiwa scan analyze
- Analyze directory structure and categorizationhaconiwa scan compare <model1> <model2>
- Compare multiple modelshaconiwa scan guide <model>
- Generate development guide for specific modelhaconiwa scan generate-parallel-config
- Generate parallel development configuration YAML
๐ฌ Current Phase: Demonstration & Prototyping
Most CLI commands are currently demonstration placeholders showing the intended structure and help information. We are actively developing the core functionality behind each command.
- Basic CLI structure with 7 command groups
- PyPI package distribution and installation
- Core project initialization framework
- tmux Company Management System (company build command)
- Multi-Agent 4x4 Layout Auto-Construction
- Organization, Task, and Desk Customization Features
- Automatic Company Existence Check and Update Functionality
- Flexible Cleanup System
- ๐ AI Model Search & Analysis System (scan command)
- ๐ Model name search with automatic prefix stripping
- ๐ File content search with regex support
- ๐ Model comparison analysis and development guide generation
- Help system and command documentation
- Command group organization and routing
- AI agent generation and management (placeholder โ implementation)
- git-worktree task management integration (placeholder โ implementation)
- Resource scanning functionality (placeholder โ implementation)
- Real-time monitoring system (placeholder โ implementation)
- World/environment management (placeholder โ implementation)
- Advanced AI agent collaboration
- Integration with popular development tools
- Plugin system for extensibility
- Web-based monitoring dashboard
git clone https://github.com/dai-motoki/haconiwa.git
cd haconiwa
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e .[dev]
pytest tests/
Test Directory Structure:
tests/
โโโ test_scan/ # scan command test module
โ โโโ __init__.py
โ โโโ test_scanner.py # Scanner class tests
โ โโโ test_analyzer.py # Analyzer class tests
โ โโโ test_formatter.py # Formatter class tests
โ โโโ test_comparator.py # Comparator class tests
โ โโโ test_guide_generator.py # Guide generator tests
โ โโโ test_generate_parallel.py # Parallel YAML generator tests
โ โโโ test_cli.py # CLI command tests
โโโ unit/ # Unit tests (optional)
โ โโโ test_<module>.py
โโโ integration/ # Integration tests (optional)
โโโ test_<feature>.py
Test Naming Conventions:
- Test Files:
test_<module_name>.py
- matches the source module being tested - Test Classes:
Test<ClassName>
- PascalCase with "Test" prefix - Test Methods:
test_<functionality_description>
- snake_case with "test_" prefix
Examples:
# File: tests/test_scan/test_scanner.py
class TestModelScanner:
def test_search_by_model_name(self):
"""Test model name search functionality"""
pass
def test_search_with_prefix_stripping(self):
"""Test automatic prefix removal feature"""
pass
# File: tests/test_scan/test_cli.py
class TestScanCLI:
def test_scan_model_command(self):
"""Test the scan model command"""
pass
Test Documentation:
- Each test file should have a module docstring explaining what it tests
- Each test class should have a class docstring describing the test scope
- Each test method should have a clear, descriptive name that explains what it tests
- Use docstrings for complex test scenarios
Test Coverage:
- Aim for high test coverage (>80%)
- Test both happy paths and edge cases
- Include integration tests for CLI commands
- Mock external dependencies appropriately
MIT License - See LICENSE file for details.
We welcome contributions to the project! As this is an active development project, we recommend:
- Check existing issues and discussions
- Fork this repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Create a Pull Request
- GitHub Issues: Issues
- Email: kanri@kandaquantum.co.jp
Haconiwa (็ฎฑๅบญ) - The Future of AI Collaborative Development ๐ง