Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

jobs:
agent-docs:
name: Agent Docs
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v5

- name: Validate agent-facing docs map
run: bash scripts/check_agent_docs.sh

python-contracts:
name: Python Contracts
runs-on: ubuntu-latest
Expand Down
158 changes: 131 additions & 27 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,145 @@
# resolvekit-backend

This file is the **table of contents** for coding agents. Keep it short, stable, and current.
> Multi-agent orchestration framework for agentic coding

## Working Contract
## Project Overview

- Humans define intent and constraints.
- Agents implement code, tests, docs, and CI changes.
- Repository-local docs are the system of record.
- If docs and code diverge, fix docs in the same change.
A Claude Flow powered project

## First Read
**Tech Stack**: TypeScript, Node.js
**Architecture**: Domain-Driven Design with bounded contexts

1. `README.md` for product and self-host setup.
2. `docs/INDEX.md` for architecture, API, and operations maps.
3. `docs/agent-first/README.md` for agent operating principles.
## Quick Start

## Commands
### Installation
```bash
npm install
```

### Build
```bash
npm run build
```

### Test
```bash
uv sync --extra dev
uv run python -m pytest -q
npm --prefix dashboard ci
npm --prefix dashboard test
npm test
```

## Source of Truth Layout
### Development
```bash
npm run dev
```

## Agent Coordination

### Swarm Configuration

This project uses hierarchical swarm coordination for complex tasks:

| Setting | Value | Purpose |
|---------|-------|---------|
| Topology | `hierarchical` | Queen-led coordination (anti-drift) |
| Max Agents | 8 | Optimal team size |
| Strategy | `specialized` | Clear role boundaries |
| Consensus | `raft` | Leader-based consistency |

### When to Use Swarms

**Invoke swarm for:**
- Multi-file changes (3+ files)
- New feature implementation
- Cross-module refactoring
- API changes with tests
- Security-related changes
- Performance optimization

**Skip swarm for:**
- Single file edits
- Simple bug fixes (1-2 lines)
- Documentation updates
- Configuration changes

### Available Skills

Use `$skill-name` syntax to invoke:

| Skill | Use Case |
|-------|----------|
| `$swarm-orchestration` | Multi-agent task coordination |
| `$memory-management` | Pattern storage and retrieval |
| `$sparc-methodology` | Structured development workflow |
| `$security-audit` | Security scanning and CVE detection |

### Agent Types

| Type | Role | Use Case |
|------|------|----------|
| `researcher` | Requirements analysis | Understanding scope |
| `architect` | System design | Planning structure |
| `coder` | Implementation | Writing code |
| `tester` | Test creation | Quality assurance |
| `reviewer` | Code review | Security and quality |

- `agent/` backend runtime and API handlers.
- `dashboard/` Next.js admin and API surfaces.
- `knowledge_bases/` KB service runtime.
- `docs/INDEX.md` documentation index.
- `docs/exec-plans/` active/completed execution plans and tech debt.
- `docs/generated/openapi/` generated API snapshots.
## Code Standards

### File Organization
- **NEVER** save to root folder
- `/src` - Source code files
- `/tests` - Test files
- `/docs` - Documentation
- `/config` - Configuration files

### Quality Rules
- Files under 500 lines
- No hardcoded secrets
- Input validation at boundaries
- Typed interfaces for public APIs
- TDD London School (mock-first) preferred

### Commit Messages
```
<type>(<scope>): <description>

[optional body]

Co-Authored-By: claude-flow <ruv@ruv.net>
```

Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`

## Security

### Critical Rules
- NEVER commit secrets, credentials, or .env files
- NEVER hardcode API keys
- Always validate user input
- Use parameterized queries for SQL
- Sanitize output to prevent XSS

### Path Security
- Validate all file paths
- Prevent directory traversal (../)
- Use absolute paths internally

## Memory System

### Storing Patterns
```bash
npx @claude-flow/cli memory store \
--key "pattern-name" \
--value "pattern description" \
--namespace patterns
```

### Searching Memory
```bash
npx @claude-flow/cli memory search \
--query "search terms" \
--namespace patterns
```

## Guardrails
## Links

- Never commit secrets or private `.env` values.
- Keep API contract and behavior docs synchronized.
- Prefer incremental PRs with passing checks over large refactors.
- Run `bash scripts/check_agent_docs.sh` before opening PRs that touch docs/architecture.
- Documentation: https://github.com/ruvnet/claude-flow
- Issues: https://github.com/ruvnet/claude-flow/issues
11 changes: 0 additions & 11 deletions docs/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@

This index is optimized for both engineers and LLM-based coding agents.

## Agent Entry Points

- [Agent Map](../AGENTS.md)
- [Agent-First Harness Notes](agent-first/README.md)

## Architecture and Service Boundaries

- [Service Overview](backend/services-overview.md)
Expand All @@ -28,12 +23,6 @@ This index is optimized for both engineers and LLM-based coding agents.
- [Environment Reference](backend/config-env-reference.md)
- [Local Dev + Docker Runbook](backend/runbooks/local-dev-and-docker.md)

## Planning and Change History

- [Execution Plans](exec-plans/README.md)
- [Tech Debt Tracker](exec-plans/tech-debt-tracker.md)
- [Reports](reports/)

## Protocol References

- [SDK Integration Protocol](../SDK_INTEGRATION.md)
Expand Down
14 changes: 0 additions & 14 deletions docs/agent-first/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions docs/exec-plans/README.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/exec-plans/active/.gitkeep

This file was deleted.

1 change: 0 additions & 1 deletion docs/exec-plans/completed/.gitkeep

This file was deleted.

13 changes: 0 additions & 13 deletions docs/exec-plans/tech-debt-tracker.md

This file was deleted.

29 changes: 0 additions & 29 deletions scripts/check_agent_docs.sh

This file was deleted.