Skip to content

Commit 8d4e397

Browse files
authored
Merge pull request #92 from AxmeAI/fix/plugin-claudemd-alpha-20260408
fix: plugin CLAUDE.md full template + alpha indicators
2 parents 86ff498 + 09fffcc commit 8d4e397

4 files changed

Lines changed: 120 additions & 4 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "axme-code",
33
"version": "0.2.5",
4-
"description": "Persistent memory, architectural decisions, and safety guardrails for Claude Code. Your agent starts every session with full project context — stack, decisions, patterns, safety rules, and a handoff from the previous session.",
4+
"description": "(Alpha) Persistent memory, architectural decisions, and safety guardrails for Claude Code. Your agent starts every session with full project context — stack, decisions, patterns, safety rules, and a handoff from the previous session.",
55
"author": {
66
"name": "AXME AI",
77
"email": "hello@axme.ai",

build.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,6 @@ writeFileSync("dist/plugin/hooks/hooks.json", JSON.stringify({
138138

139139
// Copy LICENSE and README
140140
if (existsSync("LICENSE")) cpSync("LICENSE", "dist/plugin/LICENSE");
141+
cpSync("templates/plugin-README.md", "dist/plugin/README.md");
141142

142143
console.log("Build complete.");

src/cli.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,15 @@ function generateClaudeMd(projectPath: string, isWorkspace: boolean): void {
118118
if (existsSync(claudeMdPath)) {
119119
const content = readFileSync(claudeMdPath, "utf-8");
120120
if (content.includes("## AXME Code")) {
121-
return; // already has our section
121+
// Replace existing section (may be minimal from check-init) with full template
122+
const sectionStart = content.indexOf("## AXME Code");
123+
const before = content.slice(0, sectionStart).trimEnd();
124+
writeFileSync(claudeMdPath, before ? before + "\n\n" + section : section, "utf-8");
125+
console.log(" CLAUDE.md: updated AXME Code section");
126+
} else {
127+
appendFileSync(claudeMdPath, "\n\n" + section, "utf-8");
128+
console.log(" CLAUDE.md: appended AXME Code section");
122129
}
123-
appendFileSync(claudeMdPath, "\n\n" + section, "utf-8");
124-
console.log(" CLAUDE.md: appended AXME Code section");
125130
} else {
126131
writeFileSync(claudeMdPath, section, "utf-8");
127132
console.log(" CLAUDE.md: created");

templates/plugin-README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# AXME Code — Claude Code Plugin
2+
3+
> **Alpha** — This plugin is in active development. Expect breaking changes between versions. [Report issues](https://github.com/AxmeAI/axme-code/issues).
4+
5+
Persistent memory, architectural decisions, and safety guardrails for Claude Code. Your agent starts every session with full project context — stack, decisions, patterns, safety rules, and a handoff from the previous session.
6+
7+
[![Alpha](https://img.shields.io/badge/status-alpha-orange)]()
8+
[![Version](https://img.shields.io/badge/version-0.2.5-blue)]()
9+
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
10+
11+
**[Main Repository](https://github.com/AxmeAI/axme-code)** · **[Website](https://code.axme.ai)** · **[Issues](https://github.com/AxmeAI/axme-code/issues)**
12+
13+
---
14+
15+
## What It Does
16+
17+
Claude Code forgets your project every session. AXME Code fixes that.
18+
19+
- **Persistent Knowledge Base** — oracle (stack, structure, patterns, glossary), architectural decisions with enforcement levels, accumulated memories from past sessions
20+
- **Safety Guardrails** — hooks intercept dangerous commands *before* execution (not prompts — hard enforcement at the harness level). Blocks `git push --force`, `rm -rf /`, `npm publish`, direct commits to `main`, and more
21+
- **Session Continuity** — handoff system tells the next session exactly where work stopped, what's in progress, and what to do next
22+
- **Automatic Learning** — background auditor extracts memories, decisions, and safety rules from session transcripts when you close the window
23+
- **19 MCP Tools**`axme_context`, `axme_save_decision`, `axme_save_memory`, `axme_safety`, `axme_backlog`, and more
24+
25+
You keep using Claude Code exactly as before. AXME Code works transparently in the background.
26+
27+
## Install
28+
29+
### From Claude Code CLI
30+
31+
```bash
32+
/install axme-code
33+
```
34+
35+
### Manual
36+
37+
```bash
38+
/plugin add AxmeAI/axme-code-plugin
39+
```
40+
41+
## First Use
42+
43+
After installing the plugin, open any project in Claude Code. On the first session:
44+
45+
1. The plugin creates a `CLAUDE.md` section that instructs the agent to call `axme_context`
46+
2. The agent will say the project is not initialized and run `axme-code setup --plugin`
47+
3. Setup scans your project (uses an LLM to analyze your stack, extract decisions, detect safety patterns) and creates the `.axme-code/` knowledge base
48+
4. From the next session onward, the agent automatically loads the full knowledge base
49+
50+
**Setup requires a Claude subscription** (the LLM scan uses Claude Sonnet). If the scan fails, a deterministic fallback creates a minimal knowledge base from file system inspection.
51+
52+
## How It Works
53+
54+
### Hooks (automatic, transparent)
55+
56+
| Hook | When | What |
57+
|------|------|------|
58+
| **SessionStart** | Session opens | Installs SDK dependency, creates CLAUDE.md if missing |
59+
| **PreToolUse** | Before every tool call | Checks safety rules, blocks violations |
60+
| **PostToolUse** | After Edit/Write | Tracks which files changed |
61+
| **SessionEnd** | Session closes | Spawns background auditor to extract knowledge |
62+
63+
### MCP Server
64+
65+
Provides 19 tools for reading and writing the knowledge base. The agent calls these tools naturally during work — no manual intervention needed.
66+
67+
### Storage
68+
69+
All data lives in `.axme-code/` in your project root (gitignored automatically):
70+
71+
```
72+
.axme-code/
73+
oracle/ # stack.md, structure.md, patterns.md, glossary.md
74+
decisions/ # Architectural decisions with enforce levels
75+
memory/ # Learned mistakes (feedback/) and validated patterns (patterns/)
76+
safety/rules.yaml # git + bash + filesystem guardrails
77+
backlog/ # Persistent cross-session task tracking
78+
sessions/ # Session metadata
79+
plans/ # Handoff files for session continuity
80+
worklog.jsonl # Structured event log
81+
```
82+
83+
Human-readable markdown and YAML. No database, no external dependencies.
84+
85+
## Requirements
86+
87+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (CLI or VS Code extension)
88+
- Node.js >= 20
89+
- Claude subscription (for LLM-powered setup and session auditor)
90+
91+
## Alpha Status
92+
93+
This is alpha software (v0.x.y). What that means:
94+
95+
- **Breaking changes** may happen in minor version bumps (0.x.0 -> 0.x+1.0)
96+
- **Storage format** may change between versions (`.axme-code/` is local and gitignored, so upgrades won't affect your repo)
97+
- **Bug reports are welcome**[open an issue](https://github.com/AxmeAI/axme-code/issues)
98+
- **Feedback** — we're actively iterating based on user feedback. Tell us what works and what doesn't
99+
100+
## Auto-Sync
101+
102+
This repo is auto-synced from the main [axme-code](https://github.com/AxmeAI/axme-code) repository on each release. **Do not edit files here directly** — changes will be overwritten.
103+
104+
## License
105+
106+
[MIT](LICENSE)
107+
108+
---
109+
110+
[Website](https://code.axme.ai) · [Main Repo](https://github.com/AxmeAI/axme-code) · [Issues](https://github.com/AxmeAI/axme-code/issues) · hello@axme.ai

0 commit comments

Comments
 (0)