Skip to content

Commit c92374f

Browse files
feat: rebuild as Hermes profile distribution
1 parent 62cf926 commit c92374f

17 files changed

Lines changed: 1204 additions & 219 deletions

File tree

.env.EXAMPLE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copy this file to .env and fill in real values for your own machine.
2+
# Never commit .env.
3+
4+
# Optional model provider key. Use your preferred Hermes provider instead if already configured.
5+
# optional
6+
OPENROUTER_API_KEY=
7+
8+
# Optional token for GitHub-heavy smart contract repositories. Prefer gh auth when possible.
9+
# optional
10+
GITHUB_TOKEN=
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Profile improvement
3+
description: Suggest an improvement to the Hermes profile template
4+
title: "Profile improvement: "
5+
labels: [enhancement]
6+
body:
7+
- type: textarea
8+
id: use_case
9+
attributes:
10+
label: Use case
11+
description: What profile authoring problem should this solve?
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: proposal
16+
attributes:
17+
label: Proposal
18+
description: What should change?
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: risks
23+
attributes:
24+
label: Risks
25+
description: Any safety, compatibility, or maintenance risks?
26+
---

.github/workflows/validate.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Validate Hermes Profile Template
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-python@v6
14+
with:
15+
python-version: "3.11"
16+
- name: Install validation dependencies
17+
run: python -m pip install pyyaml
18+
- name: Validate repository profile distribution
19+
run: python3 scripts/validate_profile.py .
20+
- name: Smoke-test profile generators
21+
run: |
22+
python3 scripts/new_profile.py \
23+
--name ci-smoke \
24+
--display-name "CI Smoke" \
25+
--description "Smoke test generated profile" \
26+
--output /tmp/ci-smoke
27+
python3 /tmp/ci-smoke/scripts/validate_profile.py /tmp/ci-smoke
28+
python3 scripts/generate_profile.py \
29+
--params templates/profile.params.yaml \
30+
--output /tmp/ci-params-smoke
31+
python3 /tmp/ci-params-smoke/scripts/validate_profile.py /tmp/ci-params-smoke

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.env
2+
*.db
3+
*.db-shm
4+
*.db-wal
5+
logs/
6+
sessions/
7+
memories/
8+
workspace/
9+
plans/
10+
local/
11+
cache/
12+
__pycache__/
13+
.pytest_cache/
14+
.DS_Store

AGENTS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# ChainForge: Agent Instructions
2+
3+
This repository is a Hermes Agent profile distribution for ChainForge, a production blockchain engineering agent. It is designed to be maintained by AI coding agents.
4+
5+
## Hard rules
6+
7+
1. Never commit secrets. `.env` is forbidden. `.env.EXAMPLE` is allowed.
8+
2. Preserve `distribution.yaml` at the repository root.
9+
3. Keep the profile installable with `hermes profile install <source>`.
10+
4. Run `python3 scripts/validate_profile.py .` after substantive edits.
11+
5. Keep instructions concrete and operational.
12+
6. Do not claim tools, audits, partnerships, deployed contracts, community channels, or integrations that are not verified.
13+
7. Do not weaken ChainForge refusals around rug pulls, hidden controls, exploit activity, or deceptive tokenomics.
14+
15+
## Blockchain profile maintenance
16+
17+
When editing ChainForge:
18+
19+
1. Preserve the security-first identity in `SOUL.md`.
20+
2. Keep EVM, Solana, Move, CosmWasm, tokenomics, governance, and audit-readiness scope accurate.
21+
3. Update `skills/chainforge-blockchain-engineering/SKILL.md` when adding reusable blockchain workflow guidance.
22+
4. Keep `config.yaml` and `distribution.yaml` aligned with files that actually exist.
23+
5. Run validation and at least one install smoke test before pushing.
24+
25+
## Interactive profile creation
26+
27+
If the user asks this profile to create another Hermes profile:
28+
29+
1. Ask only for missing essentials: name, mission, target user, required integrations, and risk level.
30+
2. Write a params YAML file using `templates/profile.params.yaml` as the schema reference.
31+
3. Run `python3 scripts/generate_profile.py --params <params.yaml> --output <target-dir>`.
32+
4. Run `python3 <target-dir>/scripts/validate_profile.py <target-dir>`.
33+
5. Report the target path and validation output.
34+
35+
## Handoff format
36+
37+
When finishing, report files changed, commands run, validation output, and remaining manual steps.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 CodeGraphTheory
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 76 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,112 @@
11
# ChainForge
22

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.
44

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.
66

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
88

9-
---
9+
Use ChainForge when you want help with:
1010

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.
1218

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.
1420

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
1622

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:
1829

19-
## The Five Pillars
30+
```bash
31+
hermes profile install github.com/codegraphtheory/chainforge --name chainforge
32+
hermes -p chainforge chat
33+
```
2034

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
2836

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.
3038

31-
## How to Use ChainForge
39+
If needed:
3240

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+
```
3445

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.
3847

39-
### Example Prompt
48+
## Example prompts
4049

50+
```text
51+
Review this Solidity repository for reentrancy, role-control, oracle, and upgradeability risks. Run the relevant tests and summarize findings by severity.
4152
```
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.
4656
```
4757

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+
```
5461

55-
---
62+
```text
63+
Analyze this tokenomics design for emissions sustainability, governance capture, liquidity risks, and user incentive alignment.
64+
```
5665

57-
## What ChainForge Will NOT Build
66+
## Validate the profile
5867

59-
ChainForge will politely decline any request involving:
68+
From this repository:
6069

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+
```
6673

67-
---
74+
## Local development
6875

69-
## Supported Chains and Standards
76+
Clone and install locally:
7077

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+
```
7985

80-
---
86+
## Generate a related profile
8187

82-
## Why Star This Repo?
88+
ChainForge is based on the CodeGraphTheory Hermes profile template and includes the deterministic profile generator.
8389

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:
8791

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
8996

90-
---
97+
cd ../my-blockchain-profile
98+
python3 scripts/validate_profile.py .
99+
```
91100

92-
## License
101+
## Files to customize
93102

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.
95109

96-
---
110+
## License
97111

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

Comments
 (0)