Usage Guide

Usage Guide

Learn how to use LogicStamp Context effectively in local development and CI workflows.

Local development
CI/CD workflows
Automation ready

Quick Start

# Install globally npm install -g logicstamp-context # Generate context for your project stamp context # Output: Multiple context.json files (one per folder) # plus context_main.json index

Command Syntax

stamp init [path] [options] stamp context [path] [options] stamp context validate [file] stamp context compare [options] stamp context clean [path] [options]

Use stamp init to set up your project (optional, stamp context will prompt on first run), stamp context to generate folder-organized context files, stamp context validate to verify them, stamp context compare to detect drift across all folders, and stamp context clean to remove context artifacts.

Common Options

--depth

Control how far dependency traversal should go (0 = entry only, 1 = direct dependencies).

--include-code

Choose between none, header, or full code snippets.

--profile

Apply preset settings like llm-chat, llm-safe, or ci-strict.

--dry-run & --stats

Ideal for CI dashboards and automation.

CI and Automation Tips

Use --dry-run to inspect bundle size and counts without producing files.

Use --stats to emit machine-readable summary lines and append them to logs or dashboards.

Use stamp context compare in CI to detect context drift across all folders. Use --approve for auto-updates (like Jest snapshots).

Combine stamp context and stamp context validate in pre-commit hooks or CI jobs to keep context files in sync with your codebase.

Use stamp context clean --all --yes to reset context files before regenerating or switching branches.