JSPM

  • Created
  • Published
  • Downloads 1051
  • Score
    100M100P100Q123247F
  • License MIT

TLC - Test Led Coding for Claude Code

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tlc-claude-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    TLC

    npm version npm downloads License: MIT

    Test Led Coding for Claude Code. Tests before code. Automatically.

    npx tlc-claude-code   # or just: tlc (after global install)

    TLC


    Why TLC?

    You tell Claude to build something. It builds it. You test it manually. It's broken. You debug. Repeat.

    That's backwards.

    TLC writes tests before code exists. Every feature has a spec. Every spec is executable. When the code works, you know — because the tests pass.

    You describe → Tests written → Code implemented → Tests pass → Done

    No manual testing. No "does this work?" No vibes.


    Quick Start

    New Project

    /tlc:new-project

    Existing Project

    /tlc:init

    Then Just Run

    /tlc

    TLC knows where you are and what's next.


    Features

    For Solo Developers

    • Test-first by default — Claude writes tests before code
    • Smart dashboard — See progress, run actions
    • Coverage gaps — Find and fix untested code
    • Auto-fix — Automatically repair failing tests

    For Teams

    • Task claiming — Prevent duplicate work across engineers
    • Bug tracking — QA submits bugs, engineers fix them
    • Dev server — Mini-Replit with live preview and logs
    • Issue sync — GitHub, Jira, Linear integration

    📄 Team Workflow Guide — How 3 engineers + PO + QA collaborate with TLC

    For Enterprise

    • CI/CD pipelines — GitHub Actions, GitLab, Azure, CircleCI
    • VPS deployment — Branch previews with auth & Slack webhooks
    • Multi-tool export — Works with Cursor, Copilot, Continue, Cody

    Commands

    Command What It Does
    /tlc Smart entry point — knows what's next
    /tlc:new-project Start new project with roadmap
    /tlc:init Add TLC to existing codebase
    /tlc:build Write tests → implement → verify
    /tlc:coverage Find and fix untested code
    /tlc:quality Test quality scoring
    /tlc:autofix Auto-repair failing tests

    Team Commands

    Command What It Does
    /tlc:claim Reserve a task
    /tlc:who See who's working on what
    /tlc:bug Log a bug
    tlc init Add Docker dev launcher to project

    Integration Commands

    Command What It Does
    /tlc:ci Generate CI/CD pipeline
    /tlc:issues Sync with GitHub/Jira/Linear
    /tlc:export Export for Cursor/Copilot/etc
    /tlc:deploy VPS deployment

    See all commands →


    Team Collaboration

    TLC supports distributed teams with git-based coordination.

    ### Task 1: Create schema [x@alice]     ← completed by alice
    ### Task 2: Add validation [>@bob]      ← bob is working
    ### Task 3: Write tests [ ]             ← available
    /tlc:claim 2                  # Reserve task 2
    /tlc:who                      # See team status
    tlc init      # Add dev server launcher
    # Then double-click tlc-start.bat

    📄 Full Team Workflow Guide →


    Dev Server

    Launch a mini-Replit for your team with Docker:

    # Add launcher to your project (one-time)
    tlc init
    
    # Then double-click tlc-start.bat (Windows)

    What you get:

    URL Service
    http://localhost:3147 Dashboard — Live preview, logs, tasks
    http://localhost:5000 App — Your running application
    http://localhost:8080 DB Admin — Database GUI (Adminer)
    localhost:5433 Database — PostgreSQL

    Features:

    • Live preview — Your app embedded in dashboard
    • Real-time logs — App, tests, git activity
    • Bug submission — Web form for QA
    • Task board — Who's working on what
    • Multi-project — Containers named tlc-{project}-* for simultaneous projects
    • Hot reload — Code changes apply instantly (no restart needed)

    Rebuild when needed:

    tlc rebuild      # After package.json changes or to get a clean slate

    Requirements: Docker Desktop


    Test Quality

    Quality Scoring

    /tlc:quality
    • Coverage (lines, branches, functions)
    • Edge case detection
    • Mutation testing score

    Edge Case Generation

    /tlc:edge-cases src/auth/login.ts

    AI-generated tests for null, boundaries, unicode, security.

    Auto-Fix

    /tlc:autofix

    Automatically repair failing tests with retry loop.


    Test Framework

    TLC defaults to mocha + chai + sinon + proxyquire.

    Configure in .tlc.json:

    {
      "testFrameworks": {
        "primary": "mocha",
        "installed": ["mocha", "chai", "sinon", "proxyquire"],
        "run": ["mocha"]
      }
    }

    Also supports Jest, Vitest, and others via /tlc:config.


    Architecture

    PROJECT.md                    Project overview
    .planning/
      ROADMAP.md                  Phases and progress
      BUGS.md                     Bug tracker
      phases/
        1-PLAN.md                 Phase 1 tasks
        2-PLAN.md                 Phase 2 tasks
    .tlc.json                     Configuration
    tlc-start.bat                 Docker dev launcher (Windows, gitignored)

    TLC Installation Files

    C:\Code\TLC\                  (or your install location)
      start-dev.ps1               PowerShell launcher
      docker-compose.dev.yml      Container orchestration
      server/                     Dashboard server

    Works With

    Tool Support
    Claude Code Native (slash commands)
    Cursor Via /tlc:export.cursorrules
    GitHub Copilot Via /tlc:export.github/copilot-instructions.md
    Continue Via /tlc:export.continue/config.json
    Cody Via /tlc:export.cody/instructions.md
    Aider Via /tlc:export.aider.conf.yml

    Install

    # Install globally (recommended)
    npm install -g tlc-claude-code
    
    # Then use anywhere:
    tlc              # Install slash commands to Claude Code
    tlc init         # Add Docker launcher to project (creates tlc-start.bat)
    tlc rebuild      # Full Docker rebuild (after package.json changes)
    tlc --help       # See all options

    Or use without installing:

    npx tlc-claude-code            # Interactive install
    npx tlc-claude-code --global   # Global install
    npx tlc-claude-code --local    # Local install only

    Commands install to .claude/commands/tlc/


    Documentation


    Philosophy

    Tests define behavior. Code makes tests pass.

    • Tests written BEFORE code
    • Untested code gets flagged
    • Coverage gaps get prioritized
    • Human verification still happens

    License

    MIT


    Built for Claude Code