Skip to content

feat(context): stack detection fails for TypeScript monorepos — reports 'unknown' #160

@stackbilt-admin

Description

@stackbilt-admin

Problem

charter context on the charter repo (a TypeScript monorepo with 12 packages) reports:

## Identity
- **Stack**: unknown
- **Preset**: default

## Surface
0 routes across 0 frameworks · 0 D1 tables
_No routes or D1 tables detected._

## Hotspots
Hotspots: analysis unavailable

All three key fields (Stack, Surface, Hotspots) are blank/unavailable for a TypeScript-heavy monorepo.

Expected

  • Stack should detect TypeScript monorepo structure (presence of packages/*/package.json, root tsconfig.json, multiple index.ts entry points)
  • Hotspot analysis should fall back to git-frequency analysis when static route extraction isn't applicable (CLI tools have no HTTP routes)
  • Surface output should at minimum enumerate public package entry points / exported CLI commands for CLI-type repos

Why it matters

charter context is the primary AI-agent injection point — Claude Code reads it as a pre-digested repo brief. Returning "unknown" / "unavailable" means agents onboarding to charter itself get no structural signal from the tool.

Suggested detection additions

  • Monorepo indicator: root package.json workspaces field present → preset = monorepo
  • CLI indicator: bin field in package.json → surface = CLI commands (list them)
  • Hotspot fallback: when static analysis produces 0 results, run git log --numstat over the last 90 days and surface top-10 most-changed files

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions