Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Context Packer Action

A lightweight, Git-native context packer for LLM workflows. It scans your repo and produces machine-readable artifacts:

  • repo-map.json — files, sizes, hashes, language, role
  • imports-graph.json — per-file import edges (TS/JS, Python, Dart)
  • symbol-index.json — top-level classes/functions/exports
  • test-map.json — heuristic links from tests to code
  • entrypoints.json — Next.js routes/API, CDK app/stacks, Flutter main/routes/platforms
  • meta.json — branch/commit, timestamps, packer version

Use it to power PR generators, AI lint, or analyzers. Artifacts can be published to a bot-only branch (e.g. bot/context) or uploaded as an artifact.

Usage (basic)

In any repository that wants context artifacts:

name: build-context
on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: write  # only if publishing to a branch

jobs:
  pack:
    runs-on: ubuntu-latest
    steps:
      - uses: ekinstitute/context-packer-action@v1
        with:
          publish: branch            # branch | artifact | none
          branch_name: bot/context   # target branch when publish=branch
          out_dir: .llm
          parse_size_cap: 524288     # per-file parse cap in bytes
          include: "apps/**,packages/**"  # optional extra globs

Inputs

input default description
out_dir .llm Output folder for generated artifacts
parse_size_cap 524288 Max file size (bytes) to parse for symbols/imports
include empty Comma-separated extra include globs
publish branch branch to force-push artifacts; artifact to upload; none to only generate
branch_name bot/context Target branch for artifacts when publish=branch
artifact_name llm-context Artifact name when publish=artifact
commit_message context: update from ${{ github.sha }} Commit message for branch publishing

Artifacts

Generated files live under out_dir (default .llm/):

repo-map.json
imports-graph.json
symbol-index.json
test-map.json
entrypoints.json
meta.json

Bot-only branch

If publish: branch, the action will create (or overwrite) a branch (default bot/context) using an orphan history and put only the artifact files there. Consumers (bots, other workflows) can fetch raw JSON via GitHub APIs.

License

MIT

Releases

Packages

Contributors

Languages