Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ce32663
chore: fix lint hooks and add commitlint
fraware Jul 18, 2026
e93ef22
chore: add shared typescript base config
fraware Jul 18, 2026
0780044
chore: update workspace scripts and lockfile
fraware Jul 18, 2026
8697c8f
chore: tighten gitignore for env and build artifacts
fraware Jul 18, 2026
e41f091
chore: add dependabot configuration
fraware Jul 18, 2026
b0e6f8e
chore: simplify eslint for monorepo commits
fraware Jul 18, 2026
0e20ba4
feat(shared-types): add ecosystem type model
fraware Jul 18, 2026
a2ef01e
feat(shared-config): add secrets loading helpers
fraware Jul 18, 2026
c44d52a
feat(shared-utils): add shared http kernel
fraware Jul 18, 2026
92a3651
ci: harden workflows and verification script
fraware Jul 18, 2026
2bbef41
chore: update codeql configuration
fraware Jul 18, 2026
8db56d6
feat(controller): add layered upgrade service
fraware Jul 18, 2026
88d3659
feat(ai-service): add layered patch service
fraware Jul 18, 2026
2aa93be
feat(github-app): add dependency domain model
fraware Jul 18, 2026
742da2c
feat(github-app): add webhook application layer
fraware Jul 18, 2026
cfe2108
chore: add staging and production compose files
fraware Jul 18, 2026
24dae7a
chore: add service and worker dockerfiles
fraware Jul 18, 2026
fc98168
chore: extend postgres initialization schema
fraware Jul 18, 2026
88ae2cf
chore: provision grafana dashboards and datasources
fraware Jul 18, 2026
635f71b
chore: add kind and kubernetes service manifests
fraware Jul 18, 2026
a8ab620
chore: add deploy and local k8s scripts
fraware Jul 18, 2026
89960c3
chore: add security audit script
fraware Jul 18, 2026
af4a75f
chore: update ai-patch helper script
fraware Jul 18, 2026
c0dcde0
chore: expand worker-failure chaos experiment
fraware Jul 18, 2026
ddccf1b
chore: add worker resilience chaos workflow
fraware Jul 18, 2026
60e3737
docs: document chaos experiments
fraware Jul 18, 2026
041296a
docs: add deployment guide
fraware Jul 18, 2026
bba966b
docs: add environment configuration guide
fraware Jul 18, 2026
f7488ad
docs: add architecture overview
fraware Jul 18, 2026
74c91f8
docs: add engineering kpi notes
fraware Jul 18, 2026
7a45e9b
docs: add shared http kernel rfc
fraware Jul 18, 2026
2ebaec3
docs: refresh ci validation guide
fraware Jul 18, 2026
2730ae8
docs: clarify terraform observability status
fraware Jul 18, 2026
70b3a54
test: relocate upgrade suites under apps
fraware Jul 18, 2026
814f1c7
chore: pass rust edition to rustfmt in lint-staged
fraware Jul 18, 2026
5dab25d
feat(rust-worker): harden worker http surface
fraware Jul 18, 2026
5f7c5d7
chore: add environment example templates
fraware Jul 18, 2026
6a126d4
docs: update readme and contributing guide
fraware Jul 18, 2026
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
65 changes: 65 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# SpecCursor environment template
# Copy to .env (local), .env.staging, or .env.production — never commit real secrets.
#
# APP_ENV selects the deploy profile used by fail-closed secret checks:
# development | staging | production
# NODE_ENV remains Node semantics (development | test | production).

APP_ENV=development
NODE_ENV=development
LOG_LEVEL=info

# --- Ports (local process defaults; compose overrides per service) ---
# controller: 3001, ai-service: 3002, github-app: 3000
PORT=3000

# --- Postgres ---
# Local docker-compose default (development only). Staging/production MUST NOT
# use the speccursor_dev password — startup asserts reject it.
DATABASE_URL=postgresql://speccursor:speccursor_dev@localhost:5432/speccursor
# DB_HOST=localhost
# DB_PORT=5432
# DB_NAME=speccursor
# DB_USER=speccursor
# DB_PASSWORD=
# DB_SSL=true
# DB_SSL_REJECT_UNAUTHORIZED=true

# --- Redis ---
REDIS_URL=redis://localhost:6379
# REDIS_HOST=localhost
# REDIS_PORT=6379
# REDIS_PASSWORD=

# --- Anthropic / Claude (ai-service, scripts/ai-patch.ts) ---
# Required in staging/production. Local: empty boots, requests fail closed.
ANTHROPIC_API_KEY=
# Deprecated alias (still accepted if ANTHROPIC_API_KEY unset):
# CLAUDE_API_KEY=
CLAUDE_MODEL=claude-sonnet-4-20250514
CLAUDE_MAX_TOKENS=4096
CLAUDE_TEMPERATURE=0.1
CLAUDE_TIMEOUT=30000

# --- GitHub App (github-app) ---
# Required in staging/production. Local webhook verification still needs
# GITHUB_WEBHOOK_SECRET; Octokit calls fail closed without app credentials.
GITHUB_APP_ID=
GITHUB_PRIVATE_KEY=
GITHUB_WEBHOOK_SECRET=
# Legacy alias for webhook secret (prefer GITHUB_WEBHOOK_SECRET):
# WEBHOOK_SECRET=

# --- Auth ---
# Required for github-app in staging/production. Never use your-secret-key.
JWT_SECRET=

# --- Optional observability ---
# METRICS_ENABLED=true
# TRACING_ENABLED=true
# JAEGER_ENDPOINT=http://localhost:14268/api/traces
# ALLOWED_ORIGINS=https://example.com

# --- CI-only (GitHub Actions repository secrets; not used by local compose) ---
# SNYK_TOKEN= # optional; qualify.yml skips Snyk when unset
# CODECOV_TOKEN= # unused by primary CI
23 changes: 23 additions & 0 deletions .env.production.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Production secrets — copy to .env.production and fill real values. Never commit .env.production.

APP_ENV=production
NODE_ENV=production
LOG_LEVEL=warn
IMAGE_TAG=prod

POSTGRES_USER=speccursor
POSTGRES_DB=speccursor
POSTGRES_PASSWORD=
REDIS_PASSWORD=

ANTHROPIC_API_KEY=

GITHUB_APP_ID=
GITHUB_PRIVATE_KEY=
GITHUB_WEBHOOK_SECRET=
JWT_SECRET=

CONTROLLER_PORT=3001
AI_SERVICE_PORT=3002
GITHUB_APP_PORT=3080
DB_SSL=false
27 changes: 27 additions & 0 deletions .env.staging.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Staging secrets — copy to .env.staging and fill real values. Never commit .env.staging.

APP_ENV=staging
NODE_ENV=production
LOG_LEVEL=info
IMAGE_TAG=staging

# Infra (compose injects DATABASE_URL / REDIS_URL into app containers)
POSTGRES_USER=speccursor
POSTGRES_DB=speccursor
POSTGRES_PASSWORD=
REDIS_PASSWORD=

# Anthropic
ANTHROPIC_API_KEY=

# GitHub App
GITHUB_APP_ID=
GITHUB_PRIVATE_KEY=
GITHUB_WEBHOOK_SECRET=
JWT_SECRET=

# Optional publish ports
CONTROLLER_PORT=3001
AI_SERVICE_PORT=3002
GITHUB_APP_PORT=3080
DB_SSL=false
119 changes: 15 additions & 104 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,128 +6,39 @@ module.exports = {
},
extends: [
'eslint:recommended',
'@typescript-eslint/recommended',
'@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:node/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: [
'./tsconfig.json',
'./apps/*/tsconfig.json',
'./packages/*/tsconfig.json',
],
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'import', 'node'],
plugins: ['@typescript-eslint'],
rules: {
// TypeScript specific rules
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/prefer-const': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/consistent-type-imports': 'error',

// Import rules
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'import/no-unresolved': 'error',
'import/no-cycle': 'error',

// Node.js rules
'node/no-unsupported-features/es-syntax': 'off',
'node/no-missing-import': 'off',

// General rules
'no-console': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-require-imports': 'off',
'no-console': 'off',
'no-debugger': 'error',
'prefer-const': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-template': 'error',
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json',
},
},
},
overrides: [
{
files: ['**/*.test.ts', '**/*.spec.ts'],
env: {
jest: true,
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-console': 'off',
},
},
{
files: ['**/scripts/**/*.ts'],
rules: {
'no-console': 'off',
},
files: ['**/*.test.ts', '**/*.spec.ts', '**/__tests__/**/*.ts'],
env: { jest: true },
},
{
files: ['*.js', '**/*.config.js', '*rc.js', '**/*rc.js'],
env: {
node: true,
commonjs: true,
},
parserOptions: {
ecmaVersion: 2022,
sourceType: 'script',
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-undef': 'off',
},
},
{
files: ['load/**/*.js'],
env: {
es6: true,
},
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
globals: {
__ENV: 'readonly',
__VU: 'readonly',
console: 'readonly',
textSummary: 'readonly',
},
rules: {
'no-console': 'off',
'no-undef': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
env: { node: true, commonjs: true },
parserOptions: { ecmaVersion: 2022, sourceType: 'script' },
rules: { 'no-undef': 'off' },
},
],
};
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Dependabot — weekly dependency and Actions updates
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 10
groups:
production-deps:
dependency-type: production
dev-deps:
dependency-type: development

- package-ecosystem: cargo
directory: /workers/rust-worker
schedule:
interval: weekly
open-pull-requests-limit: 5

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
open-pull-requests-limit: 5

- package-ecosystem: docker
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 5
# Only when Dockerfiles exist at scanned paths
Loading
Loading