Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion NEXT-PHASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Zero-risk automated commits, tags, and pushes
- Protected core architecture
- Protocol identity and concepts defined
- **Smart Brain Automation**: Ongoing integration with development agents (castquest-code) for autonomous protocol evolution

---

Expand Down Expand Up @@ -122,7 +123,40 @@ contract MediaTokenFactory {
}
```

### Priority 3: Bonding Curve Market
### Priority 3: Agentic Development Foundation

**Integration with `castquest-code` for autonomous protocol expansion:**

This priority establishes the foundation for AI-powered development workflows within the CastQuest protocol:

- **Autonomous Protocol Expansion**: Integration with `castquest-code` (from SMSDAO) enables automated proposal and scaffolding of new protocol features, contracts, and extensions.

- **Automated Test Generation**: For custom contracts following V4's "No External Dependency" principle, development agents automatically generate comprehensive unit tests, ensuring code quality and security.
- V4 contracts avoid external dependencies: no OpenZeppelin imports, no proxies, and pure token operations

- **CODE Token Reward Mechanism**: Define and implement the CODE token distribution system that rewards validated code contributions from:
- Autonomous builders and agents
- Smart contract generation and audits
- Protocol improvements and optimizations
- Documentation and testing contributions

- **Smart Brain Integration**: The protocol's Smart Brain architecture coordinates with development agents to:
- Evaluate code quality and security
- Validate contributions before CODE token distribution
- Track contribution history and reputation
- Enable continuous, agent-assisted protocol evolution

**Implementation Tasks**:
- [ ] Define CODE token reward tiers and validation criteria
- [ ] Integrate castquest-code agent framework
- [ ] Build automated contract scaffolding pipeline
- [ ] Implement test generation for custom contracts
- [ ] Create contribution validation and audit system
- [ ] Deploy CODE token minting logic in CodeEngine

---

### Priority 4: Bonding Curve Market

**File**: `packages/contracts/contracts/MarketPlace.sol`

Expand Down
14 changes: 12 additions & 2 deletions docs/architecture/V4.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Five vertical-specific tokens with no supply caps:
- **MEDIA** - Media creation and rewards
- **FRAME** - Frame-related actions
- **GAME** - Game asset economics
- **CODE** - Code generation rewards
- **CODE** - Code generation rewards for autonomous builders and AI agents
- **AGENT** - AI agent operations

These are minted by their respective Engines and used for fees, rewards, and liquidity.
Expand Down Expand Up @@ -168,7 +168,7 @@ Engines:
├── MediaEngine.sol ← Mints MEDIA, creates media assets
├── FrameEngine.sol ← Mints FRAME, processes frames
├── GameEngine.sol ← Mints GAME, handles game logic
├── CodeEngine.sol ← Mints CODE, manages code gen
├── CodeEngine.sol ← Mints CODE, manages autonomous code generation, audits, and agentic incentives
└── AgentEngine.sol ← Mints AGENT, AI operations
```

Expand Down Expand Up @@ -247,6 +247,16 @@ Users choose when to adopt V4 based on:
- SubDAO features
- Lower gas costs on Base

## Agentic Development Integration

V4's Smart Brain architecture integrates with agentic development frameworks to enable:
- **Autonomous Protocol Expansion**: AI agents (e.g., castquest-code from SMSDAO) can propose and scaffold new protocol features
- **Automated Contract Generation**: CodeEngine coordinates with development agents to generate, audit, and deploy smart contracts
- **CODE Token Rewards**: Validated contributions from AI-powered development tools, agentic protocol expansion, and automated smart contract generation are rewarded with CODE tokens
- **Continuous Evolution**: The protocol evolves through a combination of human governance and AI-assisted development

This creates a flywheel where protocol improvements are incentivized through CODE tokens, enabling sustainable, community-driven growth.

## Security Guarantees

1. **Supply Caps**: Enforced on-chain, cannot be bypassed
Expand Down
Loading