|
1 | 1 | # ChainForge |
2 | 2 |
|
3 | | -> *I build chains that last. I protect value. I grow communities. I never ship garbage.* |
| 3 | +ChainForge is a Hermes Agent profile for serious blockchain engineering. |
4 | 4 |
|
5 | | -ChainForge is an AI agent identity — a battle-hardened blockchain architect that ships production-grade smart contracts, protocols, and ecosystems. Every line of code is treated as a public good that must withstand adversarial environments, economic attacks, and the test of time. |
| 5 | +It is designed for builders who need production-grade help with smart contracts, protocol architecture, tokenomics, security reviews, audits, and deployment planning. ChainForge is intentionally paranoid about adversarial systems and intentionally strict about financial integrity. |
6 | 6 |
|
7 | | -**If you find this useful, [star the repo](https://github.com/codegraphtheory/chainforge) — it tells me this work matters.** |
| 7 | +## What ChainForge is for |
8 | 8 |
|
9 | | ---- |
| 9 | +Use ChainForge when you want help with: |
10 | 10 |
|
11 | | -## What This Is |
| 11 | +- Solidity, Foundry, Hardhat, OpenZeppelin, Solady, and EVM protocol work. |
| 12 | +- Smart contract implementation, review, testing, and hardening. |
| 13 | +- Threat models for contracts, protocols, bridges, governance, oracles, and token systems. |
| 14 | +- Tokenomics and incentive design. |
| 15 | +- Audit readiness and security checklists. |
| 16 | +- Deployment plans with multisig, timelock, verification, monitoring, and incident response. |
| 17 | +- Cross-chain architecture across EVM, Solana, Move, and CosmWasm when enough context is available. |
12 | 18 |
|
13 | | -This repository contains the SOUL.md of ChainForge — an immutable identity document that defines how this agent thinks, builds, and decides. It's not a library, a framework, or a product. It's a constitution. |
| 19 | +ChainForge will not help build rug pulls, hidden admin traps, exploit tooling against live users, fake audit claims, or deceptive tokenomics. |
14 | 20 |
|
15 | | -When ChainForge is asked to build something, it reads this document first. Every pull request, every architecture decision, every tradeoff is evaluated against the principles here. |
| 21 | +## Install |
16 | 22 |
|
17 | | ---- |
| 23 | +```bash |
| 24 | +hermes profile install github.com/codegraphtheory/chainforge --alias |
| 25 | +chainforge chat |
| 26 | +``` |
| 27 | + |
| 28 | +If you do not want an alias: |
18 | 29 |
|
19 | | -## The Five Pillars |
| 30 | +```bash |
| 31 | +hermes profile install github.com/codegraphtheory/chainforge --name chainforge |
| 32 | +hermes -p chainforge chat |
| 33 | +``` |
20 | 34 |
|
21 | | -| Pillar | What It Means | |
22 | | -|--------|--------------| |
23 | | -| **Security Above All** | Default to paranoid threat modeling. One vulnerability can destroy millions. | |
24 | | -| **Efficiency as Ethics** | Wasted gas is theft from users. Optimize ruthlessly without sacrificing auditability. | |
25 | | -| **Community as Co-Owners** | Users are stakeholders, not customers. Transparency and fair incentives are mandatory. | |
26 | | -| **Engineering Excellence** | Code must be verifiable, maintainable, and upgrade-safe. No "move fast and break things." | |
27 | | -| **Financial Integrity** | Tokenomics must be mathematically sound. No rug pulls, predatory farming, or asymmetric extraction. | |
| 35 | +## Configure model credentials |
28 | 36 |
|
29 | | ---- |
| 37 | +ChainForge includes `.env.EXAMPLE` with optional provider keys. If your default Hermes setup already has model credentials, you may not need to add anything. |
30 | 38 |
|
31 | | -## How to Use ChainForge |
| 39 | +If needed: |
32 | 40 |
|
33 | | -ChainForge operates as an AI agent. To work with it: |
| 41 | +```bash |
| 42 | +cp ~/.hermes/profiles/chainforge/.env.EXAMPLE ~/.hermes/profiles/chainforge/.env |
| 43 | +# edit ~/.hermes/profiles/chainforge/.env |
| 44 | +``` |
34 | 45 |
|
35 | | -1. **Load SOUL.md as context** — Provide this document as system-level instructions to the agent. |
36 | | -2. **Describe what you want to build** — Be specific about the chain, the tokenomics, the threat model. |
37 | | -3. **Get production-grade code** — ChainForge delivers complete, copy-paste-ready smart contracts with security rationale. |
| 46 | +Never commit `.env` or real credentials. |
38 | 47 |
|
39 | | -### Example Prompt |
| 48 | +## Example prompts |
40 | 49 |
|
| 50 | +```text |
| 51 | +Review this Solidity repository for reentrancy, role-control, oracle, and upgradeability risks. Run the relevant tests and summarize findings by severity. |
41 | 52 | ``` |
42 | | -I am deploying a new ERC-20 token with staking rewards on Base. |
43 | | -Supply: 1 billion. No mint authority. 2% transfer fee going to stakers. |
44 | | -Multisig governance after 6 months. Audit planned with Trail of Bits. |
45 | | -Build the contracts. |
| 53 | + |
| 54 | +```text |
| 55 | +Design an ERC-4626 vault with guarded deposits, pausable emergency controls, and Foundry fuzz tests. Explain the accounting invariants. |
46 | 56 | ``` |
47 | 57 |
|
48 | | -ChainForge will respond with: |
49 | | -- Complete Solidity contracts (OpenZeppelin-based, gas-optimized) |
50 | | -- Deployment scripts (Foundry/Hardhat) |
51 | | -- Test suite with fuzzing targets |
52 | | -- Risk analysis and known attack vectors |
53 | | -- Tokenomics breakdown and incentive analysis |
| 58 | +```text |
| 59 | +Threat model this bridge architecture. Focus on validator compromise, replay, finality assumptions, message ordering, and economic security. |
| 60 | +``` |
54 | 61 |
|
55 | | ---- |
| 62 | +```text |
| 63 | +Analyze this tokenomics design for emissions sustainability, governance capture, liquidity risks, and user incentive alignment. |
| 64 | +``` |
56 | 65 |
|
57 | | -## What ChainForge Will NOT Build |
| 66 | +## Validate the profile |
58 | 67 |
|
59 | | -ChainForge will politely decline any request involving: |
| 68 | +From this repository: |
60 | 69 |
|
61 | | -- Obfuscated contracts or hidden admin keys |
62 | | -- Ponzi-like tokenomics or unsustainable yields |
63 | | -- Front-running or sandwich attacks |
64 | | -- Unaudited mainnet deployments |
65 | | -- Any form of rug-pull mechanics |
| 70 | +```bash |
| 71 | +python3 scripts/validate_profile.py . |
| 72 | +``` |
66 | 73 |
|
67 | | ---- |
| 74 | +## Local development |
68 | 75 |
|
69 | | -## Supported Chains and Standards |
| 76 | +Clone and install locally: |
70 | 77 |
|
71 | | -| Category | Technologies | |
72 | | -|----------|-------------| |
73 | | -| **EVM** | Solidity, Foundry, Hardhat, OpenZeppelin | |
74 | | -| **Solana** | Rust, Anchor, SPL Token, Token-2022 | |
75 | | -| **Move** | Sui, Aptos, Movement | |
76 | | -| **Cosmos** | CosmWasm, IBC | |
77 | | -| **L2 / ZK** | Arbitrum, Optimism, Base, zkSync, StarkNet | |
78 | | -| **Standards** | ERC-20, ERC-721, ERC-1155, ERC-4626, ERC-4337, SPL Token | |
| 78 | +```bash |
| 79 | +git clone https://github.com/codegraphtheory/chainforge.git |
| 80 | +cd chainforge |
| 81 | +python3 scripts/validate_profile.py . |
| 82 | +hermes profile install . --name chainforge-local --yes |
| 83 | +hermes -p chainforge-local chat |
| 84 | +``` |
79 | 85 |
|
80 | | ---- |
| 86 | +## Generate a related profile |
81 | 87 |
|
82 | | -## Why Star This Repo? |
| 88 | +ChainForge is based on the CodeGraphTheory Hermes profile template and includes the deterministic profile generator. |
83 | 89 |
|
84 | | -- **It keeps the agent honest** — a public, immutable constitution means every decision is auditable. |
85 | | -- **It signals quality** — stargazers tell the community this agent has standards. |
86 | | -- **It funds future work** — more visibility means more edge cases, more feedback, better output. |
| 90 | +Edit `templates/profile.params.yaml`, then run: |
87 | 91 |
|
88 | | -[⭐ Star codegraphtheory/chainforge](https://github.com/codegraphtheory/chainforge) |
| 92 | +```bash |
| 93 | +python3 scripts/generate_profile.py \ |
| 94 | + --params templates/profile.params.yaml \ |
| 95 | + --output ../my-blockchain-profile |
89 | 96 |
|
90 | | ---- |
| 97 | +cd ../my-blockchain-profile |
| 98 | +python3 scripts/validate_profile.py . |
| 99 | +``` |
91 | 100 |
|
92 | | -## License |
| 101 | +## Files to customize |
93 | 102 |
|
94 | | -MIT — free to fork, extend, and use. The SOUL.md itself is meant to be immutable, but if you fork it, you're building your own agent with your own principles. That's the point. |
| 103 | +- `SOUL.md`: ChainForge identity, operating principles, scope, refusals, and output contract. |
| 104 | +- `distribution.yaml`: Hermes profile distribution metadata. |
| 105 | +- `config.yaml`: model, toolsets, terminal, memory, security, and approval defaults. |
| 106 | +- `.env.EXAMPLE`: environment variable documentation only. |
| 107 | +- `skills/`: reusable procedures bundled with the profile. |
| 108 | +- `AGENTS.md`: instructions for AI coding agents that maintain this repository. |
95 | 109 |
|
96 | | ---- |
| 110 | +## License |
97 | 111 |
|
98 | | -*"I am ChainForge. I build chains that last. I protect value. I grow communities. I never ship garbage."* |
| 112 | +MIT. See `LICENSE`. |
0 commit comments