Skip to content

ELCODE Forge v0.5.0 — Ecosystem & Declarative Custom Rules Engine

Choose a tag to compare

@luksluki luksluki released this 21 Oct 01:06
· 84 commits to main since this release
2318ff3

ELCODE Forge (eforge) v0.5.0

Know your code. Ship with confidence.
"Software should feel like an instrument, not a compromise." — "Deterministic before generative."

We are proud to release ELCODE Forge v0.5.0, marking the complete delivery of Phase 5 (Ecosystem & Declarative Custom Rules Engine).

With v0.5.0, engineering teams can define custom architectural boundaries, enforce file naming and test companion policies, restrict dependencies, and catch anti-patterns declaratively in YAML without writing custom compiler plugins or recompiling binaries.


Highlights in v0.5.0 (Phase 5 Completed)

1. Declarative Custom Rule Schema & Deterministic Matchers (Epic #109)

  • Declarative Rule Engine (crates/forge-rules): Project-specific rules defined in .eforge/rules/*.yaml or inside eforge.config.yaml with schema validation and strict type safety.
  • 6 Deterministic Matchers:
    • forbidden_imports: Enforces architecture boundaries via BFS import-graph traversal (e.g. prevent direct DB access in UI layers).
    • required_companion: Guarantees companion files exist (e.g. ensure all services have matching .test.ts files).
    • file_naming: Enforces naming conventions (kebab-case, PascalCase, camelCase, snake_case) using glob patterns.
    • file_size: Maximum line count ceilings with strict file pattern filtering.
    • regex_pattern: Token and anti-pattern matching for banned APIs, deprecated decorators, or hardcoded strings.
    • dependency_restriction: Restricts prohibited third-party package dependencies across npm and Cargo manifests.
  • Hostile Input Boundary: Strict zero-panic guarantee, canonical path resolution preventing directory traversal, and safe regex evaluation.

2. Rule Packs Engine, CLI Rules Management & MCP Catalog (Epic #112)

  • Curated Rule Packs: Ships with 4 built-in packs (recommended, strict, security, clean-architecture) with deterministic inheritance via extends: [...].
  • CLI Subcommand eforge rules: Full rules inspection with eforge rules list, eforge rules check, and eforge rules init supporting terminal table, JSON, and Markdown formatters.
  • Scanner Integration: eforge scan and eforge doctor seamlessly evaluate declarative custom rules alongside built-in rules, deducting from the 8-dimension codebase health score deterministically.
  • Native MCP Tool eforge_get_rules: MCP catalog expanded from 6 to 7 tools, allowing AI coding assistants (Cursor, Claude Desktop, Antigravity) to query active repository rules protected within an untrusted data envelope with prompt-injection defense signal detection.

3. Dashboard Rules Catalog, Fixtures & Release Hardening (Epic #116)

  • ReportBundle Schema Evolution: RuleDescriptor list integrated into ReportBundle with zero schema drift against @elcode-forge/schema.
  • Interactive Rules Screen (/rules): Dedicated page in apps/dashboard with category filtering, rule pack inspection, active status toggles, and direct violation count links into /findings.
  • Curated Fixture fixtures/custom-rules-app: Multi-tiered test application exercising all 6 matchers with zero false positives on baseline code.
  • E2E Integration Test Suite: Comprehensive test harness in crates/forge-cli/tests/custom_rules_e2e.rs adhering strictly to zero-panic test guidelines.
  • Complete Living Guide: Published docs/RULES_GUIDE.md detailing rule syntax, pack inheritance, and best practices.
  • Monorepo Version Bump: Synchronized version across Cargo.toml, package.json, @elcode-forge/schema, @elcode-forge/ui, and @elcode-forge/dashboard to v0.5.0.

Verification & Self-Dogfooding

  • Test Suite: All automated unit and integration tests passing cleanly across the workspace.
  • Zero Linter Warnings: cargo fmt, cargo clippy --all-targets -- -D warnings, pnpm run check, pnpm run lint all exit code 0.
  • Self-Dogfooding Health Score: eforge doctor executes in <100ms with 0 warnings, and eforge scan passes with 100% compliance.