1 pointby chose1663 hours ago1 comment
  • chose1663 hours ago
    Hi HN,

    I built CasperAI - an MCP server that creates a unified semantic context layer across dev tools (Slack, GitHub, Jira, Notion) and links them to your source code. All data stays local in SQLite.

    THE PROBLEM: When someone mentions authenticateUser() in Slack, there's no way to programmatically find where it's defined (src/auth/handler.ts:127), the GitHub PR that introduced it, or the Jira ticket that requested it. Engineering knowledge is fragmented.

    HOW IT WORKS: Uses regex-based pattern matching to extract code references from natural language, then resolves them via filesystem traversal. When you search "authenticateUser", you get the Slack thread + file location + PR discussion in one result.

    Quick start: npx casperai init

    TECHNICAL DEEP DIVE - Code Mapping: I chose regex over AST parsing as a pragmatic trade-off: + Works across 15+ languages without language-specific parsers + Fast - no need to parse entire files + Handles informal mentions ("check the auth function") - False positives possible - Can't distinguish definition vs call site

    Future plan: tree-sitter for precise AST-based resolution.

    CONFESSION - Built with Claude Code: Full transparency: ~80% of the TypeScript was generated using Claude Code (Anthropic's CLI). I handled architecture, debugging, and docs. Claude Code wrote the MCP server, PII redaction, regex patterns, and SQLite schema.

    This will be polarizing for HN, but I think AI coding tools are force multipliers. I couldn't have shipped this speed alone, but I still had to understand the architecture, make trade-offs, and test edge cases.

    QUESTIONS FOR HN: - Is regex-based code mapping good enough, or should I prioritize tree-sitter? - What other platforms should I integrate? - Thoughts on AI-generated code in production?

    Stack: TypeScript, Node.js, SQLite, MCP SDK License: MIT

    Happy to answer questions about the implementation or the AI-assisted workflow.