|
1 | 1 | # resolvekit-backend |
2 | 2 |
|
3 | | -> Multi-agent orchestration framework for agentic coding |
| 3 | +This file is the **table of contents** for coding agents. Keep it short, stable, and current. |
4 | 4 |
|
5 | | -## Project Overview |
| 5 | +## Working Contract |
6 | 6 |
|
7 | | -A Claude Flow powered project |
| 7 | +- Humans define intent and constraints. |
| 8 | +- Agents implement code, tests, docs, and CI changes. |
| 9 | +- Repository-local docs are the system of record. |
| 10 | +- If docs and code diverge, fix docs in the same change. |
8 | 11 |
|
9 | | -**Tech Stack**: TypeScript, Node.js |
10 | | -**Architecture**: Domain-Driven Design with bounded contexts |
| 12 | +## First Read |
11 | 13 |
|
12 | | -## Quick Start |
| 14 | +1. `README.md` for product and self-host setup. |
| 15 | +2. `docs/INDEX.md` for architecture, API, and operations maps. |
| 16 | +3. `docs/agent-first/README.md` for agent operating principles. |
13 | 17 |
|
14 | | -### Installation |
15 | | -```bash |
16 | | -npm install |
17 | | -``` |
18 | | - |
19 | | -### Build |
20 | | -```bash |
21 | | -npm run build |
22 | | -``` |
| 18 | +## Commands |
23 | 19 |
|
24 | | -### Test |
25 | 20 | ```bash |
26 | | -npm test |
| 21 | +uv sync --extra dev |
| 22 | +uv run python -m pytest -q |
| 23 | +npm --prefix dashboard ci |
| 24 | +npm --prefix dashboard test |
27 | 25 | ``` |
28 | 26 |
|
29 | | -### Development |
30 | | -```bash |
31 | | -npm run dev |
32 | | -``` |
33 | | - |
34 | | -## Agent Coordination |
35 | | - |
36 | | -### Swarm Configuration |
37 | | - |
38 | | -This project uses hierarchical swarm coordination for complex tasks: |
39 | | - |
40 | | -| Setting | Value | Purpose | |
41 | | -|---------|-------|---------| |
42 | | -| Topology | `hierarchical` | Queen-led coordination (anti-drift) | |
43 | | -| Max Agents | 8 | Optimal team size | |
44 | | -| Strategy | `specialized` | Clear role boundaries | |
45 | | -| Consensus | `raft` | Leader-based consistency | |
46 | | - |
47 | | -### When to Use Swarms |
48 | | - |
49 | | -**Invoke swarm for:** |
50 | | -- Multi-file changes (3+ files) |
51 | | -- New feature implementation |
52 | | -- Cross-module refactoring |
53 | | -- API changes with tests |
54 | | -- Security-related changes |
55 | | -- Performance optimization |
56 | | - |
57 | | -**Skip swarm for:** |
58 | | -- Single file edits |
59 | | -- Simple bug fixes (1-2 lines) |
60 | | -- Documentation updates |
61 | | -- Configuration changes |
62 | | - |
63 | | -### Available Skills |
64 | | - |
65 | | -Use `$skill-name` syntax to invoke: |
66 | | - |
67 | | -| Skill | Use Case | |
68 | | -|-------|----------| |
69 | | -| `$swarm-orchestration` | Multi-agent task coordination | |
70 | | -| `$memory-management` | Pattern storage and retrieval | |
71 | | -| `$sparc-methodology` | Structured development workflow | |
72 | | -| `$security-audit` | Security scanning and CVE detection | |
73 | | - |
74 | | -### Agent Types |
75 | | - |
76 | | -| Type | Role | Use Case | |
77 | | -|------|------|----------| |
78 | | -| `researcher` | Requirements analysis | Understanding scope | |
79 | | -| `architect` | System design | Planning structure | |
80 | | -| `coder` | Implementation | Writing code | |
81 | | -| `tester` | Test creation | Quality assurance | |
82 | | -| `reviewer` | Code review | Security and quality | |
| 27 | +## Source of Truth Layout |
83 | 28 |
|
84 | | -## Code Standards |
85 | | - |
86 | | -### File Organization |
87 | | -- **NEVER** save to root folder |
88 | | -- `/src` - Source code files |
89 | | -- `/tests` - Test files |
90 | | -- `/docs` - Documentation |
91 | | -- `/config` - Configuration files |
92 | | - |
93 | | -### Quality Rules |
94 | | -- Files under 500 lines |
95 | | -- No hardcoded secrets |
96 | | -- Input validation at boundaries |
97 | | -- Typed interfaces for public APIs |
98 | | -- TDD London School (mock-first) preferred |
99 | | - |
100 | | -### Commit Messages |
101 | | -``` |
102 | | -<type>(<scope>): <description> |
103 | | -
|
104 | | -[optional body] |
105 | | -
|
106 | | -Co-Authored-By: claude-flow <ruv@ruv.net> |
107 | | -``` |
108 | | - |
109 | | -Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore` |
110 | | - |
111 | | -## Security |
112 | | - |
113 | | -### Critical Rules |
114 | | -- NEVER commit secrets, credentials, or .env files |
115 | | -- NEVER hardcode API keys |
116 | | -- Always validate user input |
117 | | -- Use parameterized queries for SQL |
118 | | -- Sanitize output to prevent XSS |
119 | | - |
120 | | -### Path Security |
121 | | -- Validate all file paths |
122 | | -- Prevent directory traversal (../) |
123 | | -- Use absolute paths internally |
124 | | - |
125 | | -## Memory System |
126 | | - |
127 | | -### Storing Patterns |
128 | | -```bash |
129 | | -npx @claude-flow/cli memory store \ |
130 | | - --key "pattern-name" \ |
131 | | - --value "pattern description" \ |
132 | | - --namespace patterns |
133 | | -``` |
134 | | - |
135 | | -### Searching Memory |
136 | | -```bash |
137 | | -npx @claude-flow/cli memory search \ |
138 | | - --query "search terms" \ |
139 | | - --namespace patterns |
140 | | -``` |
| 29 | +- `agent/` backend runtime and API handlers. |
| 30 | +- `dashboard/` Next.js admin and API surfaces. |
| 31 | +- `knowledge_bases/` KB service runtime. |
| 32 | +- `docs/INDEX.md` documentation index. |
| 33 | +- `docs/exec-plans/` active/completed execution plans and tech debt. |
| 34 | +- `docs/generated/openapi/` generated API snapshots. |
141 | 35 |
|
142 | | -## Links |
| 36 | +## Guardrails |
143 | 37 |
|
144 | | -- Documentation: https://github.com/ruvnet/claude-flow |
145 | | -- Issues: https://github.com/ruvnet/claude-flow/issues |
| 38 | +- Never commit secrets or private `.env` values. |
| 39 | +- Keep API contract and behavior docs synchronized. |
| 40 | +- Prefer incremental PRs with passing checks over large refactors. |
| 41 | +- Run `bash scripts/check_agent_docs.sh` before opening PRs that touch docs/architecture. |
0 commit comments