Skip to content

Commit 0a37314

Browse files
committed
Initial public release
0 parents  commit 0a37314

1,815 files changed

Lines changed: 285916 additions & 0 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.

.bun-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.2.17

.crignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.agents/**
2+
**/*.test.ts
3+
**/*.test.js
4+
**/tests/**
5+
**/fixtures/**
6+
**/components/ui/**
7+
**/node_modules/**
8+
**/dist/**
9+
**/build/**
10+
**/coverage/**
11+
package-lock.json
12+
yarn.lock
13+
pnpm-lock.yaml
14+
Makefile
15+
*.log
16+
*.tmp
17+
*.bak
18+
.env*
19+
.npmrc
20+
.nvmrc
21+
scripts/**
22+
tsup.config.ts
23+
vitest.config.ts
24+
docker-compose*

.env.example

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# CodeRadius environment overrides (all optional).
2+
#
3+
# `cr init` writes the primary configuration to ~/.coderadius (settings.json
4+
# and credentials.json). Every variable below overrides that configuration or
5+
# a built-in default; uncomment only what you need.
6+
7+
# ── Graph database ───────────────────────────────────────────────────────────
8+
9+
# Bolt endpoint of Memgraph (docker-compose exposes 7687 on localhost).
10+
#MEMGRAPH_URI=bolt://localhost:7687
11+
# Credentials; match the MEMGRAPH_USER/MEMGRAPH_PASSWORD of docker-compose.yml.
12+
#MEMGRAPH_USER=coderadius
13+
#MEMGRAPH_PASSWORD=coderadius
14+
# Set to 1 to force TLS on plain bolt:// URIs (bolt+s:// implies it).
15+
#MEMGRAPH_ENCRYPTED=1
16+
# Read-only credentials for the policy runner sandbox (fall back to the above).
17+
#MEMGRAPH_POLICY_USER=
18+
#MEMGRAPH_POLICY_PASSWORD=
19+
20+
# ── LLM providers ────────────────────────────────────────────────────────────
21+
# Configure the block matching the provider you selected in `cr init`.
22+
23+
# Google Vertex AI
24+
# GCP project that hosts the Vertex AI API.
25+
#GOOGLE_VERTEX_PROJECT=my-gcp-project
26+
# Vertex location/region.
27+
#GOOGLE_VERTEX_LOCATION=global
28+
# Service-account JSON key; omit to use Application Default Credentials.
29+
#GOOGLE_APPLICATION_CREDENTIALS=~/.coderadius/config/gcp-service-account.json
30+
# Pre-issued OAuth access token; skips ADC and gcloud (useful in CI).
31+
#GOOGLE_VERTEX_TOKEN=
32+
33+
# Google AI Studio (plain API key, simplest)
34+
#GOOGLE_GENERATIVE_AI_API_KEY=
35+
36+
# OpenAI
37+
#OPENAI_API_KEY=
38+
# OpenAI-compatible endpoint override (proxies, gateways, local servers).
39+
#OPENAI_BASE_URL=https://api.openai.com/v1
40+
41+
# Anthropic
42+
#ANTHROPIC_API_KEY=
43+
44+
# AWS Bedrock (uses the standard AWS credential chain)
45+
#AWS_REGION=us-east-1
46+
# Named profile from ~/.aws/credentials.
47+
#AWS_PROFILE=default
48+
# Static credentials, if not using a profile or an instance role.
49+
#AWS_ACCESS_KEY_ID=
50+
#AWS_SECRET_ACCESS_KEY=
51+
52+
# Ollama (local, no API key)
53+
#OLLAMA_BASE_URL=http://localhost:11434
54+
#OLLAMA_COMPLETION_MODEL=qwen3.5:9b
55+
#OLLAMA_EMBEDDING_MODEL=qwen2.5-coder:7b
56+
57+
# ── Model selection ──────────────────────────────────────────────────────────
58+
59+
# Override the provider from ~/.coderadius/config/settings.json.
60+
#MODEL_PROVIDER=google-genai
61+
# Override the model id for the selected provider.
62+
#MODEL_NAME=gemini-2.5-flash
63+
# Embedding model in provider/model format.
64+
#EMBEDDING_MODEL=google-genai/gemini-embedding-001
65+
# Explicit embedding vector size; otherwise derived from the model.
66+
#EMBEDDING_DIMENSION=768
67+
# Fallback model (provider/model) when the primary structured output fails.
68+
#INGEST_FALLBACK_MODEL=google-genai/gemini-2.5-flash
69+
70+
# ── Tuning ───────────────────────────────────────────────────────────────────
71+
72+
# Max concurrent LLM calls.
73+
#LLM_CONCURRENCY=3
74+
# Requests-per-minute ceiling for LLM calls; 0 disables the rate limiter,
75+
# unset means adaptive discovery (slow-start up to LLM_RATE_MAX).
76+
#LLM_RATE_RPM=60
77+
# Adaptive rate-limiter knobs (values shown are the defaults).
78+
#LLM_RATE_INITIAL=60
79+
#LLM_RATE_MIN=6
80+
#LLM_RATE_MAX=6000
81+
#LLM_RATE_INCREASE_RPM=12
82+
#LLM_RATE_SUCCESS_STREAK=10
83+
#LLM_RATE_COOLDOWN_MS=5000
84+
#LLM_RATE_BURST_SECONDS=5
85+
#LLM_RATE_DECREASE_FACTOR=0.5
86+
# Max files processed in parallel by the ingestion pipeline.
87+
#FILE_CONCURRENCY=500
88+
# Parse worker pool size; defaults to CPU cores minus one.
89+
#PARSE_CONCURRENCY=4
90+
# Max concurrent Memgraph write transactions.
91+
#MEMGRAPH_CONCURRENCY=10
92+
93+
# ── Debug ────────────────────────────────────────────────────────────────────
94+
95+
# Set to 'true' to record LLM traces (viewable in Mastra Studio).
96+
#RADIUS_TRACE=true
97+
# Log verbosity; set to 'debug' for verbose pipeline logs.
98+
#LOG_LEVEL=debug
99+
# Timeout for git network operations, in milliseconds.
100+
#RADIUS_GIT_TIMEOUT_MS=15000

.envrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# direnv config for coderadius worktrees.
2+
#
3+
# Loads the `.env` of the *main* repo (the one you cloned, where
4+
# `.git/objects` lives) so every worktree shares a single source of truth
5+
# for credentials and LLM provider config — no symlinks, no copies.
6+
#
7+
# Activation (one-time, per worktree):
8+
# direnv allow
9+
#
10+
# Requires direnv: `brew install direnv` and a hook in your shell rc:
11+
# eval "$(direnv hook zsh)" # or `bash` / `fish`
12+
#
13+
# Why `--git-common-dir`: in a worktree, `--git-dir` returns the worktree's
14+
# private gitdir (`<main>/.git/worktrees/<name>`). `--git-common-dir` always
15+
# resolves to the shared `.git` of the main repo, regardless of which
16+
# worktree you `cd` into.
17+
18+
main_root="$(git rev-parse --git-common-dir 2>/dev/null)/.."
19+
if [ -d "$main_root" ]; then
20+
main_root="$(cd "$main_root" && pwd)"
21+
[ -f "$main_root/.env" ] && dotenv "$main_root/.env"
22+
[ -f "$main_root/.env.local" ] && dotenv "$main_root/.env.local"
23+
fi
24+
25+
# Worktree-private overrides (gitignored). Useful for per-feature LLM keys
26+
# or temporary toggles without touching the main `.env`.
27+
[ -f .env.worktree ] && dotenv .env.worktree

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default owners for everything in the repository.
2+
* @emnlmn
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Bug report
2+
description: Report a defect in CodeRadius
3+
title: "[bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to report a bug. The more precise the report, the faster we can reproduce and fix it.
10+
11+
**Never paste proprietary source code.** If the bug involves a private codebase, reduce it to a minimal synthetic reproduction using generic e-commerce vocabulary (`acme`, `orders`, `payment`, `inventory`, `shipping`, `notification`).
12+
- type: input
13+
id: version
14+
attributes:
15+
label: CodeRadius version
16+
description: Output of `cr --version`
17+
placeholder: "0.13.0"
18+
validations:
19+
required: true
20+
- type: input
21+
id: target-stack
22+
attributes:
23+
label: Language / framework of the analyzed repository
24+
description: What is CodeRadius analyzing when the bug occurs?
25+
placeholder: "PHP 8.3 / Symfony 7, or TypeScript / NestJS 10"
26+
validations:
27+
required: true
28+
- type: dropdown
29+
id: depth
30+
attributes:
31+
label: Analysis depth mode
32+
description: The `--depth` value passed to `cr analyze code` (if applicable)
33+
options:
34+
- structure
35+
- semantic
36+
- contracts
37+
- not applicable / other command
38+
validations:
39+
required: true
40+
- type: textarea
41+
id: expected
42+
attributes:
43+
label: Expected behavior
44+
description: What did you expect to happen?
45+
validations:
46+
required: true
47+
- type: textarea
48+
id: actual
49+
attributes:
50+
label: Actual behavior
51+
description: What happened instead? Include the exact command you ran and a minimal reproduction if possible.
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: logs
56+
attributes:
57+
label: Logs / output
58+
description: Relevant CLI output, stack traces, or error messages. Redact API keys, credentials, and any proprietary identifiers before pasting.
59+
render: shell
60+
validations:
61+
required: false
62+
- type: textarea
63+
id: environment
64+
attributes:
65+
label: Environment
66+
description: OS, Bun version, graph database (Memgraph/Neo4j) and version, LLM provider/model if relevant.
67+
placeholder: |
68+
OS: macOS 15.1
69+
Bun: 1.2.x
70+
Graph DB: Memgraph 2.x (docker compose)
71+
LLM provider: none / anthropic / openai / gemini / ollama
72+
validations:
73+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions & discussions
4+
url: https://github.com/coderadius-ai/coderadius/discussions
5+
about: Ask questions, share ideas, or discuss usage — anything that isn't a concrete bug or feature request.
6+
- name: Security vulnerabilities
7+
url: https://github.com/coderadius-ai/coderadius/security
8+
about: Please report security issues privately via "Report a vulnerability" — never as a public issue.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Feature request
2+
description: Propose a new capability or improvement for CodeRadius
3+
title: "[feature]: "
4+
labels: ["enhancement", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for the idea! For open-ended questions or early-stage brainstorming, please use [GitHub Discussions](https://github.com/coderadius-ai/coderadius/discussions) instead.
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Problem
14+
description: What are you trying to do that CodeRadius doesn't support today? Describe the underlying need, not only the solution you have in mind.
15+
placeholder: "When analyzing a repository that uses <framework/pattern>, CodeRadius misses ..."
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: proposal
20+
attributes:
21+
label: Proposed solution
22+
description: How would you like this to work? CLI flags, graph model changes, new extractors — sketch whatever level of detail you have.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: alternatives
27+
attributes:
28+
label: Alternatives considered
29+
description: Workarounds you use today, or other approaches you evaluated and why they fall short.
30+
validations:
31+
required: false
32+
- type: dropdown
33+
id: area
34+
attributes:
35+
label: Affected area
36+
options:
37+
- Code ingestion / language support
38+
- Graph model / persistence
39+
- Blast radius / impact analysis
40+
- Governance policies
41+
- Catalog drift
42+
- MCP server / IDE integration
43+
- Dashboard UI
44+
- CLI / developer experience
45+
- Other
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: context
50+
attributes:
51+
label: Additional context
52+
description: Links, examples (synthetic only — no proprietary code), or anything else that helps us understand the request.
53+
validations:
54+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Summary
2+
3+
<!-- What does this PR change, and why? One or two sentences. -->
4+
5+
## Linked issue
6+
7+
<!-- e.g. "Closes #123", or "n/a" for small standalone changes. -->
8+
9+
## Test tier
10+
11+
<!-- See CONTRIBUTING.md — "Which test tier covers my change?" -->
12+
13+
- [ ] **Unit** (`tests/unit/`) — sanitizer, schemas, regex/heuristic guards, in-memory logic
14+
- [ ] **Integration** (`tests/integration/`) — graph mutations, welder, persistence ordering
15+
- [ ] **Eval — agents** (`tests/eval/agents/`) — prompt / LLM output schema changes (replay cache updated)
16+
- [ ] **Eval — patterns** (`tests/eval/patterns/`) — multi-file taint / import / plugin / framework-signal changes (mandatory for these subsystems)
17+
18+
Command(s) run and passing:
19+
20+
```bash
21+
# e.g. bun run test:unit
22+
```
23+
24+
## Checklist
25+
26+
- [ ] `bun run build` passes (typecheck)
27+
- [ ] Test written first (red), then the change (green) — the fix and its test land together
28+
- [ ] Any new or modified fixtures are **fully synthetic** and use the `acme` e-commerce vocabulary (no code, identifiers, paths, or domain terms from private codebases)
29+
- [ ] Language/framework-specific logic lives in a plugin, not in the language-agnostic core
30+
- [ ] Commit messages follow Conventional Commits (`feat(scope): ...`)

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 5
8+
groups:
9+
minor-and-patch:
10+
update-types:
11+
- minor
12+
- patch
13+
commit-message:
14+
prefix: "chore(deps)"
15+
- package-ecosystem: github-actions
16+
directory: "/"
17+
schedule:
18+
interval: weekly
19+
open-pull-requests-limit: 5
20+
commit-message:
21+
prefix: "chore(ci)"

0 commit comments

Comments
 (0)