Skip to content

Commit cdfaa20

Browse files
feat: add ContextForge RAG profile
1 parent d0a6aa4 commit cdfaa20

27 files changed

Lines changed: 2315 additions & 387 deletions

File tree

.env.EXAMPLE

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Copy this file to .env and fill values locally.
2-
# Never commit .env.
1+
# Copy to .env only if you need local credentials. Never commit .env.
32

4-
# Optional model provider key if this profile uses OpenRouter directly.
3+
# Optional model provider key. You can use any Hermes-supported provider instead.
54
OPENROUTER_API_KEY=
65

7-
# Optional GitHub token for GitHub-heavy profile workflows.
8-
# Prefer `gh auth login` when possible.
6+
# Optional for live Pinecone integration work.
7+
PINECONE_API_KEY=
8+
9+
# Optional for GitHub-heavy workflows. Prefer `gh auth login` when possible.
910
GITHUB_TOKEN=

.github/template-source.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
template:
2+
name: codegraphtheory/hermes-profile-template
3+
url: https://github.com/codegraphtheory/hermes-profile-template
4+
relationship: built-from-template
5+
notes:
6+
- GitHub native generated-from-template linkage is only available when a repository
7+
is created through GitHub template flow.
8+
- This file records explicit template lineage for humans and automation.

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Validate Hermes Profile Template
1+
name: Validate ContextForge RAG
22

33
on:
44
push:

AGENTS.md

Lines changed: 19 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,35 @@
1-
# Hermes Profile Template: AI Agent Instructions
1+
# ContextForge RAG: Agent Instructions
22

3-
This repository is designed to be edited by AI coding agents. Follow these rules exactly.
4-
5-
## Mission
6-
7-
Help users build high quality Hermes Agent profile distributions. A finished profile must be installable with `hermes profile install`, safe to publish, easy to understand, and pleasant to customize.
3+
This repository is an installable Hermes Agent profile for production RAG architecture and AI agent workflow design.
84

95
## Hard rules
106

11-
1. Read this file before editing.
12-
2. Never commit secrets. `.env` is forbidden. `.env.EXAMPLE` is allowed.
13-
3. Never write API keys, OAuth tokens, cookies, session dumps, or private user data.
14-
4. Never modify user-owned runtime paths: `memories/`, `sessions/`, `state.db*`, `auth.json`, `logs/`, `workspace/`, `plans/`, `local/`, `cache/`.
15-
5. Preserve Hermes distribution compatibility. Keep `distribution.yaml` at repository root.
16-
6. Keep the profile installable with `hermes profile install <source>`.
17-
7. Run `python3 scripts/validate_profile.py .` after substantive edits.
18-
8. Use clear, direct language in profile instructions. Avoid vague roleplay.
19-
9. Keep skills reusable and focused. A skill should describe a procedure, not session history.
20-
10. If changing config defaults, explain why in README or comments.
21-
22-
## Files and ownership
23-
24-
| Path | Purpose | Notes |
25-
|---|---|---|
26-
| `distribution.yaml` | Hermes distribution manifest | Required |
27-
| `SOUL.md` | Profile identity and operating principles | Strongly recommended |
28-
| `config.yaml` | Safe profile defaults | No secrets |
29-
| `.env.EXAMPLE` | Env var template | No real values |
30-
| `mcp.json` | MCP server stubs | Avoid local private paths by default |
31-
| `skills/` | Bundled Hermes skills | Each skill needs `SKILL.md` frontmatter |
32-
| `templates/` | Source templates for new profiles and skills | Placeholders are allowed here |
33-
| `scripts/` | Validation and generation tools | Must run on Python 3.10+ |
34-
35-
## Profile design standard
36-
37-
A strong `SOUL.md` should include:
38-
39-
- Name and role.
40-
- First principles.
41-
- Scope of work.
42-
- What the profile refuses to do.
43-
- Tool-use expectations.
44-
- Output contract.
45-
- Quality bar.
46-
- Safety and privacy rules.
7+
1. Keep `distribution.yaml` at the repository root.
8+
2. Keep the profile installable with `hermes profile install <source>`.
9+
3. Never commit secrets, `.env`, tokens, session dumps, private documents, memories, or runtime databases.
10+
4. Do not add unverifiable community links, claims, benchmarks, audits, or affiliations.
11+
5. Keep bundled skills focused on reusable architecture workflows.
12+
6. Run `python3 scripts/validate_profile.py .` after substantive edits.
13+
7. For public commits in this repository, use `GraphTheory <codegraphtheory@pm.me>` as both author and committer.
14+
8. Before pushing, scan for accidental private identity strings and block the push if any are found.
4715

48-
Avoid:
16+
## Design standard
4917

50-
- Hidden authority claims.
51-
- Instructions to bypass user approval.
52-
- Claims that the agent has tools not enabled in config.
53-
- Unverifiable external community links.
54-
- Secret or credential examples with real-looking values.
18+
The profile should help users produce:
5519

56-
## Skill design standard
57-
58-
Each skill must have YAML frontmatter at byte 0:
59-
60-
```yaml
61-
---
62-
name: example-skill
63-
description: "One sentence describing when to use the skill."
64-
version: 0.1.0
65-
author: Hermes profile template
66-
license: MIT
67-
---
68-
```
69-
70-
Then include:
71-
72-
- When to use.
73-
- Inputs expected.
74-
- Step-by-step workflow.
75-
- Verification steps.
76-
- Pitfalls.
20+
- ADRs with tradeoffs and consequences.
21+
- Production RAG designs with ingestion, chunking, retrieval, reranking, context assembly, evaluation, and observability.
22+
- Agent workflow specs with typed tools, idempotency, authorization, traces, failure handling, and escalation.
23+
- GitHub issues with scoped implementation tasks and acceptance criteria.
24+
- Roadmaps with sequencing, dependencies, risk gates, rollout, and rollback.
7725

7826
## Validation
7927

8028
Run:
8129

8230
```bash
8331
python3 scripts/validate_profile.py .
32+
python3 -m py_compile scripts/*.py
8433
```
8534

86-
For a generated profile, run the validator inside that generated directory too.
87-
88-
## Deterministic generation
89-
90-
Use `scripts/generate_profile.py` for reproducible profile creation from parameters:
91-
92-
```bash
93-
python3 scripts/generate_profile.py --params templates/profile.params.yaml --output ../my-profile
94-
```
95-
96-
The params file is the source of truth. Prefer editing YAML parameters over hand-editing generated starter files when creating a new profile family.
97-
98-
When this template is installed as a Hermes profile, the installed profile must retain `scripts/` and `templates/` so it can create new profiles interactively from chat.
99-
100-
## Commit style
101-
102-
Use conventional commits:
103-
104-
- `feat: add profile scaffold`
105-
- `fix: tighten secret validation`
106-
- `docs: clarify install path`
107-
- `chore: update CI`
108-
109-
## Handoff format
110-
111-
When finishing, report:
112-
113-
1. Files changed.
114-
2. Validation command and exact result.
115-
3. Any remaining risks or manual steps.
35+
For generated profiles, validate the generated output too.

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Contributing
2+
3+
Thanks for improving ContextForge RAG.
4+
5+
Before opening a PR:
6+
7+
1. Run `python3 scripts/validate_profile.py .`.
8+
2. Run `python3 -m py_compile scripts/*.py`.
9+
3. If you changed `templates/profile.params.yaml`, run the generator smoke test from the README.
10+
4. Do not include secrets, runtime data, private identity strings, fabricated links, or unverifiable claims.
11+
12+
Use concise conventional commits such as `docs: clarify install path` or `feat: add eval planning guidance`.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2026 CodeGraphTheory
3+
Copyright (c) 2026 GraphTheory
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 39 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,74 @@
1-
# Hermes Profile Template
1+
# ContextForge RAG
22

3-
Build high quality Hermes Agent profile distributions quickly.
3+
ContextForge RAG is an installable Hermes Agent profile for principal-level production RAG architecture, AI agent workflow design, evaluation, observability, and implementation-ready technical planning.
44

5-
This repository is for people who want to create custom Hermes profiles that are installable, safe to publish, easy to maintain, and friendly to AI coding agents. Use it to create a new profile from a few parameters, validate the result, install it locally, then publish it for others to install with `hermes profile install`.
5+
Template lineage: built from [codegraphtheory/hermes-profile-template](https://github.com/codegraphtheory/hermes-profile-template).
66

7-
## What you can do with it
7+
## What this profile is good at
88

9-
- Create a complete Hermes profile distribution from command-line flags.
10-
- Create a deterministic profile from a reusable YAML params file.
11-
- Install this repository as a Hermes profile that helps you create other profiles interactively.
12-
- Validate a profile before publishing it.
13-
- Publish generated profiles so other users can install them from GitHub.
9+
- Production RAG architecture: ingestion, chunking, embeddings, hybrid retrieval, reranking, citation packing, and model routing.
10+
- Agent workflow design: intent classification, tool contracts, idempotency, escalation, bounded loops, and failure handling.
11+
- Evaluation and observability: golden datasets, retrieval metrics, LLM judge rubrics, traces, cost telemetry, and regression gates.
12+
- Delivery planning: ADRs, implementation-ready GitHub issues, roadmaps, rollout plans, and rollback criteria.
1413

15-
## Requirements
16-
17-
- Hermes Agent installed and available as `hermes`.
18-
- Python 3.10 or newer.
19-
- `pyyaml` for validation and generation:
14+
## Install
2015

2116
```bash
22-
python3 -m pip install pyyaml
23-
```
24-
25-
## Option 1: Use this as a GitHub template
26-
27-
Open:
28-
29-
```text
30-
https://github.com/codegraphtheory/hermes-profile-template
17+
hermes profile install github.com/codegraphtheory/context-forge-rag --name context-forge-rag --yes
18+
hermes -p context-forge-rag
3119
```
3220

33-
Click `Use this template`, create a new repository, then clone your new repo:
21+
If you cloned the repository locally:
3422

3523
```bash
36-
git clone https://github.com/YOUR_ORG/YOUR_PROFILE_REPO.git
37-
cd YOUR_PROFILE_REPO
24+
git clone https://github.com/codegraphtheory/context-forge-rag.git
25+
cd context-forge-rag
3826
python3 scripts/validate_profile.py .
27+
hermes profile install . --name context-forge-rag --yes
28+
hermes -p context-forge-rag
3929
```
4030

41-
Edit the profile files, then validate again before publishing.
42-
43-
## Option 2: Create a profile from command-line flags
44-
45-
```bash
46-
git clone https://github.com/codegraphtheory/hermes-profile-template.git
47-
cd hermes-profile-template
48-
49-
python3 scripts/new_profile.py \
50-
--name security-reviewer \
51-
--display-name "Security Reviewer" \
52-
--description "Reviews code and architecture for security risk" \
53-
--output ../security-reviewer
54-
55-
cd ../security-reviewer
56-
python3 scripts/validate_profile.py .
57-
```
58-
59-
Install it locally:
60-
61-
```bash
62-
hermes profile install . --alias
63-
security-reviewer chat
64-
```
65-
66-
## Option 3: Create a profile from a params file
67-
68-
Copy the sample params file:
69-
70-
```bash
71-
git clone https://github.com/codegraphtheory/hermes-profile-template.git
72-
cd hermes-profile-template
73-
cp templates/profile.params.yaml /tmp/my-profile.params.yaml
74-
```
75-
76-
Edit `/tmp/my-profile.params.yaml`, then generate:
31+
## Useful first prompts
7732

78-
```bash
79-
python3 scripts/generate_profile.py \
80-
--params /tmp/my-profile.params.yaml \
81-
--output ../my-profile
82-
83-
cd ../my-profile
84-
python3 scripts/validate_profile.py .
33+
```text
34+
Design a production RAG architecture for customer support knowledge retrieval. Include ingestion, metadata, evals, observability, and rollout gates.
8535
```
8636

87-
This is the best path when you want reproducible profile creation. The params file becomes the source of truth for the starter profile.
88-
89-
Generated profiles can include explicit template lineage through the `template_source` field in the params file. GitHub only shows native `generated from` or `forked from` linkage when a repository is created through those GitHub flows, so this template records lineage in `distribution.yaml`, `.github/template-source.yml`, and the generated README.
90-
91-
## Option 4: Install this repo as an interactive profile builder
92-
93-
Install the template itself as a Hermes profile:
94-
95-
```bash
96-
hermes profile install github.com/codegraphtheory/hermes-profile-template \
97-
--name profile-architect \
98-
--alias
99-
100-
profile-architect chat
37+
```text
38+
Turn this ambiguous AI feature into 6 implementation-ready GitHub issues with acceptance criteria and eval requirements.
10139
```
10240

103-
Then ask it to create a profile:
104-
10541
```text
106-
Create a Hermes profile for a database migration reviewer. It should inspect SQL diffs, flag destructive migrations, and generate rollback checklists.
42+
Review my chunking and namespace strategy. Identify failure modes, metrics, and a safe migration plan.
10743
```
10844

109-
The installed profile will use the included generator, write a starter profile, and run validation.
110-
111-
## Validate before publishing
112-
113-
Run this from the profile repository root:
45+
## Bundled skills
11446

115-
```bash
116-
python3 scripts/validate_profile.py .
117-
```
47+
- `principal-ai-architect`: ADRs, architecture tradeoffs, diagrams, and decision records.
48+
- `technical-roadmapping`: delivery sequencing, milestones, dependency mapping, and risk gates.
49+
- `production-rag-architecture`: retrieval system design, namespace strategy, chunking, embeddings, reranking, and rollout.
50+
- `rag-evaluation-observability`: golden datasets, metric design, LLM judge rubrics, traces, and regression gates.
51+
- `agentic-workflow-issue-factory`: implementation-ready issues and typed agent tool design.
11852

119-
The validator checks required files, YAML and JSON syntax, the Hermes distribution manifest, environment variable documentation, skill frontmatter, common secret patterns, broken symlinks, and unresolved template placeholders.
53+
## Environment
12054

121-
## Publish a generated profile
55+
No credential is required just to install the profile. Interactive model use requires any Hermes-supported model provider. Optional variables are documented in `.env.EXAMPLE`.
12256

123-
From the generated profile directory:
57+
## Validate
12458

12559
```bash
126-
git init -b main
127-
git add .
128-
git commit -m "feat: initial profile"
129-
git remote add origin git@github.com:YOUR_ORG/YOUR_PROFILE_REPO.git
130-
git push -u origin main
60+
python3 scripts/validate_profile.py .
61+
python3 -m py_compile scripts/*.py
13162
```
13263

133-
Users can install it with:
64+
Generator smoke test:
13465

13566
```bash
136-
hermes profile install github.com/YOUR_ORG/YOUR_PROFILE_REPO --alias
67+
out=$(mktemp -d /tmp/context-forge-rag.XXXXXX)
68+
python3 scripts/generate_profile.py --params templates/profile.params.yaml --output "$out"
69+
python3 "$out/scripts/validate_profile.py" "$out"
13770
```
13871

139-
## What to customize
140-
141-
Most users should start with these files:
142-
143-
- `SOUL.md`: the profile's identity, mission, boundaries, and output style.
144-
- `distribution.yaml`: name, version, description, env vars, and distribution-owned files.
145-
- `config.yaml`: model, toolsets, terminal behavior, memory, security, and approval defaults.
146-
- `.env.EXAMPLE`: documented environment variables with placeholder values only.
147-
- `skills/`: bundled reusable procedures the profile can load.
148-
- `AGENTS.md`: instructions for AI coding agents that maintain the profile repository.
149-
150-
Never commit `.env`, API keys, OAuth tokens, credentials, memories, sessions, logs, runtime databases, or private user data.
151-
152-
## License
72+
## Security
15373

154-
MIT. See `LICENSE`.
74+
Never commit `.env`, API keys, OAuth tokens, session dumps, private documents, runtime memories, or customer data. The profile is designed to make architecture and implementation artifacts safer, more observable, and easier to evaluate.

SECURITY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security Policy
2+
3+
If you find a security issue in this profile distribution, open a GitHub security advisory or a private issue with enough detail to reproduce the problem safely.
4+
5+
Do not include real API keys, private documents, customer data, session logs, or production traces in public issues.

0 commit comments

Comments
 (0)