Skip to content

Commit 563a0ca

Browse files
authored
Merge pull request #9 from QUSETIONS/master
Master
2 parents cedf823 + fb91325 commit 563a0ca

129 files changed

Lines changed: 3777 additions & 8068 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/minicode/SKILL.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# MiniCode — Cybernetic AI Coding Agent
2+
3+
Terminal-first AI coding assistant with closed-loop self-regulation via
4+
engineering cybernetics (15+ controllers: PID ×4, Kalman ×5).
5+
6+
## Quick Start
7+
8+
```bash
9+
python -m minicode.main
10+
```
11+
12+
Mock mode (no API key):
13+
```bash
14+
MINI_CODE_MODEL_MODE=mock python -m minicode.main
15+
```
16+
17+
## Core Capabilities
18+
19+
### Self-Regulating Agent
20+
MiniCode auto-regulates during coding tasks:
21+
- **Context overflow** → auto-compaction (PID-controlled, 4-phase progressive)
22+
- **Tool errors** → auto-healing (8 fault types with recovery strategies)
23+
- **Cost spikes** → budget PID tightens token allocation
24+
- **Agent oscillation** → feedback PID dampens, reduces concurrency
25+
- **Task stalling** → progress controller suggests strategy changes
26+
- **Degraded performance** → signals model upgrade, boosts token budget
27+
28+
### Memory That Learns
29+
- Cross-session memory with 3-layer retrieval pipeline
30+
- Domain-aware search (auto-detects frontend/backend/database/devops)
31+
- LLM-curated memory injection (top-15 → curated top-3 + conflict detection)
32+
- Background curator agent consolidates, validates, and links memories
33+
- Multi-tier storage: WORKING → SHORT_TERM → LONG_TERM → ARCHIVAL
34+
35+
### Terminal Experience
36+
- TUI with real-time transcript, diff coloring, permission prompts
37+
- 30 built-in tools (file ops, code search, git, web, testing, batch)
38+
- 26 discoverable skills
39+
- MCP server integration
40+
- Session persistence with autosave
41+
42+
## Slash Commands
43+
44+
| Command | Description |
45+
|---------|-------------|
46+
| `/help` | Show all commands |
47+
| `/memory` | Memory system status (tiers, domains, insights) |
48+
| `/context` | Context window usage |
49+
| `/cybernetics` | Controller health dashboard |
50+
| `/skills` | List discoverable skills |
51+
| `/config-paths` | Show config file locations |
52+
| `/permissions` | Show permission store location |
53+
| `/mcp` | List MCP servers and tools |
54+
| `/exit` | Save session and exit |
55+
56+
## Configuration
57+
58+
`~/.mini-code/settings.json`:
59+
```json
60+
{
61+
"model": "claude-sonnet-4-20250514",
62+
"env": {
63+
"ANTHROPIC_AUTH_TOKEN": "your-token"
64+
}
65+
}
66+
```
67+
68+
Environment variables:
69+
- `MINICODE_MODEL_TIMEOUT` — API timeout in seconds (default: 60)
70+
- `MINICODE_TOOL_TIMEOUT` — Tool execution timeout (default: 120)
71+
- `MINI_CODE_MODEL_MODE=mock` — Run without API key
72+
73+
## Architecture
74+
75+
```
76+
User Input → Intent Parser → Task Object → Pipeline Plan → Agent Loop
77+
78+
┌───────────────────────────────────────────────┤
79+
│ │
80+
Sense (sensors) → Control (PID×4, Kalman×5) → Act (tools, budget)
81+
│ │
82+
└─────────── Feedback (dual-PID) ←──────────────┘
83+
```
84+
85+
## Memory Pipeline
86+
87+
```
88+
Task + Files → DomainClassifier → BM25 + SparseVector(RRF) → Value(rel×fresh×util)
89+
→ LLM Reranker (top-15 → top-3 + summary) → Spreading Activation → Inject
90+
```
91+
92+
Ablation: P@3 0.35→0.72, Noise 65%→7% (80 memories × 20 queries)
93+
94+
## Testing
95+
96+
```bash
97+
pytest # 737 passed, 2 skipped
98+
```

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
- name: Compile sources
3131
run: python -m compileall -q minicode tests
3232

33+
- name: Lint (ruff)
34+
run: |
35+
python -m pip install ruff
36+
python -m ruff check minicode/ --select=E,F --ignore=E501
37+
3338
- name: Run packaging smoke tests
3439
run: python -m pytest tests/test_packaging.py -q
3540

-104 KB
Binary file not shown.
-80.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)