Best Practices

Best Practices

Opinionated guidance for getting the most out of LogicStamp Context with AI coding assistants.

Use the Right Context Files in Prompts

AI assistants do their best work when you give them a single, structured view of your project instead of raw source files.

💡 Best Practice: When prompting an AI assistant, explicitly tell it to use the per-folder context.json files and the root context_main.json to understand your project structure. This produces the most consistent and grounded results across all assistants.

Using src/app/docs/getting-started/context.json, explain how the Installation & Quick Start page is structured.

Keep Context Fresh After Refactors

Stale context is worse than no context. Regenerate bundles when you make structural changes so assistants don't reason about an outdated graph.

After big refactors

  • • Moving components between folders
  • • Renaming shared utilities or hooks
  • • Changing public props or exported APIs

Recommended workflow

stamp context compare

Choose the Right Code Inclusion Mode

Most teams never need full source code in every bundle. Start with headers, then selectively turn on full code for deep investigations.

ModeWhat it includesBest for
noneContracts onlyAPI docs, CI checks
header defaultJSDoc, signatures, and contractsEveryday AI chat and code review
fullComplete sourceTargeted deep dives on tricky areas
stamp context --compare-modes

Integrate LogicStamp Into Your Workflow

Treat context generation like tests or type-checking: something that runs regularly so your AI tools always see the latest structure.

Local development

  • • Run on demand before complex AI-assisted work
  • • Keep bundles in sync with your feature branches

CI / CD pipelines

# Generate fresh context stamp context # Validate before using or publishing stamp context validate