Skip to content

Repository files navigation

ContextSeed

Turn AI project discussions into structured, reusable developer context and documentation.

npm version License: MIT Node.js Version


What is ContextSeed?

ContextSeed is a developer-focused CLI and AI-context system designed to turn software planning discussions into structured, reusable project specifications. When planning projects with ChatGPT, Claude, Gemini, or other AI assistants, critical decisions and requirements often get scattered across dozens of chat messages. ContextSeed solves this by providing standardized, editable Markdown templates and prompts stored in a single AI_CONTEXT/ directory without requiring external AI API keys or cloud databases.


Quick Start

Generate a Product Requirements Document (PRD) directly in your project:

npx contextseed add prd

This creates AI_CONTEXT/PRD.md with instructions and structure ready to provide to your AI assistant.


Installation

No global installation is required. You can run ContextSeed on demand using npx:

npx contextseed <command>

If you prefer to install it globally on your machine, you can run:

npm install -g contextseed

Commands

ContextSeed provides a full suite of commands for managing project specifications and custom templates:

Command Description
npx contextseed Launch the visual, interactive prompt menu.
npx contextseed init Initialize ContextSeed configuration (.contextseed/config.json) and AI_CONTEXT/.
npx contextseed list List all available templates with origin badges ([builtin], [user], [override]).
npx contextseed add <template> Generate a single context document into AI_CONTEXT/.
npx contextseed edit [template] Open a template in your default $EDITOR (creates a project override if built-in).
npx contextseed custom [name] Scaffold a new custom template with YAML frontmatter.
npx contextseed remove <document> Remove a generated document from AI_CONTEXT/ (keeps source template intact).
npx contextseed update View instructions for updating ContextSeed and templates.
npx contextseed --help Display help information and available options.

Command Options

  • add Options:
    • -f, --force: Overwrite existing files without confirmation prompt.
    • -o, --output <file>: Specify custom destination filename.
    • -c, --context-dir <dir>: Target a custom context directory instead of AI_CONTEXT/.
  • init Options:
    • -f, --force: Overwrite existing configuration if present.
    • -c, --context-dir <dir>: Use a custom context directory.
  • list Options:
    • --json: Output the available templates as JSON.
  • edit Options:
    • -e, --editor <cmd>: Specify the editor executable.
    • -s, --scope <project|user>: Edit a project or user template.
  • custom Options:
    • -d, --description <desc>: Template description.
    • -o, --output <file>: Default output filename inside AI_CONTEXT/.
    • -s, --scope <project\|user>: Save location (project or user).
    • --no-editor: Skip opening the editor after scaffolding.
  • remove Options:
    • -f, --force: Skip the confirmation prompt.
    • -c, --context-dir <dir>: Use a custom context directory.

Built-in Template Commands

Run any of these commands from your project directory:

npx contextseed add prd
npx contextseed add trd
npx contextseed add ux
npx contextseed add aimemory
npx contextseed add architecture
npx contextseed add database
npx contextseed add api
npx contextseed add readme
npx contextseed add description
npx contextseed add gitignore

Useful variations:

# List templates
npx contextseed list
npx contextseed list --json

# Generate a template with a custom filename or directory
npx contextseed add prd --output PRODUCT_REQUIREMENTS.md
npx contextseed add api --context-dir docs/context
npx contextseed add trd --force

# Edit, remove, or create templates
npx contextseed edit prd
npx contextseed remove PRD.md
npx contextseed custom deployment --description "Deployment documentation" --no-editor

Templates

ContextSeed includes 10 built-in, production-grade templates located in templates/:

  • prd: Product Requirements Document (16-section standard + conversational extraction rules).
  • trd: Technical Requirements Document (architecture, tech stack, data models, security, testing).
  • ux: UX and Design System Specification (tokens, components, user journeys, accessibility).
  • aimemory: AI Memory, decision ledger, and context continuity log.
  • architecture: System Architecture and component design.
  • database: Database Schema, relations, ER diagrams, and indexes.
  • api: API Design, endpoints, request/response contracts, and error standards.
  • readme: Standardized Project README documentation template.
  • description: Project positioning, elevator pitch, and value proposition.
  • gitignore: Standard .gitignore rules generator.

Universal AI Prompt

ContextSeed provides CONTEXTSEED.md, a universal, zero-tooling system prompt and specification file designed to be shared directly with any AI chat model, including ChatGPT, Google Gemini, Claude, and Perplexity.

How to use CONTEXTSEED.md:

  1. Start a project planning session in your favorite AI chat interface.
  2. Provide CONTEXTSEED.md as the system prompt or paste it into your chat session.
  3. The AI model analyzes the conversation history, extracts confirmed technical decisions, and outputs the core trio:
    • PRD.md (Product Requirements Document)
    • TRD.md (Technical Requirements Document)
    • UIUX.md (UI/UX Design Specification)

The NPM/NPX CLI tool works alongside this universal prompt to manage modular templates, project overrides, and filesystem workflows.


Development

For developers contributing to or extending ContextSeed:

Prerequisites

  • Node.js >= 18.0.0
  • npm / pnpm / yarn

Setup & Build

# Clone the repository
git clone https://github.com/contextseed/contextseed.git
cd contextseed

# Install dependencies
npm install

# Run development mode (live TS execution)
npm run dev

# Compile TypeScript to dist/
npm run build

# Run automated tests (Vitest)
npm test

# Run tests in watch mode
npm run test:watch

Contributing

Contributions are welcome! If you would like to add new built-in templates, improve CLI commands, or enhance AI integrations:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/new-template).
  3. Ensure all tests pass (npm test).
  4. Commit your changes (git commit -m 'Add new template').
  5. Push to the branch (git push origin feature/new-template).
  6. Open a Pull Request.

License

MIT License © 2026 Kkantdev

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages