Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpecLore - Product Context & Specs

An AI-agent-ready framework for generating, maintaining, and validating product documentation — from specs, designs, analytics, and implementation code.

It gives your team (and your agents) a consistent, hierarchical knowledge base that humans can read top-down and AI agents can navigate progressively, without burning context on the entire repo.

AI agents: start at setup.md. That file is the one-shot onboarding guide for configuring this framework into a target docs repository.

What You Get

1. Consistent, AI-Optimized Documentation Structure

Docs are organized Product Area → Product Section → Feature. Every product section follows the same hierarchy, for example: overview → definitions → access → data → features → widgets/actions, with templates in _templates/ enforcing the shape of each file. Each product area has its own area.json — machine-readable config listing its wired repos, Slack owners, and agent-diffing rules (see skeleton/product-area-starter/area.json).

The structure is designed for gradual reveal: an agent (or a person) reads the root overview.md first (product-area map), drills into an area's overview.md (product sections), then a section's overview.md, then the relevant feature — only loading detail files (tracking.md, apis.md, individual widget docs) when needed. This keeps agent context small and answers grounded.

See examples/product/taskflow/ for a fully documented fictional product area showing the structure end-to-end.

2. Daily Auto-Updates From Code

Optional CI in skeleton/optional/ci/ runs an agent on a schedule (GitHub Actions or GitLab CI) that:

  • Diffs recent commits across your wired repositories (frontend, backend, data).
  • Updates the affected docs in place using the docs-from-code skill.
  • Appends entries to each product section's CHANGELOG.md.
  • Posts a digest of changes to Slack via scripts/notify-slack-changelog.sh and surfaces open questions via notify-slack-issues.sh.
  • Optionally publishes a filtered public docs branch via publish-docs-branch.sh.

3. Bundled Skills For The Full Spec → Code Lifecycle

The framework ships agent skills (in skeleton/agents/cursor/.cursor/skills/, shared with Claude) covering the full loop:

Skill Use For
writing-stories Brainstorming features, drafting user stories and tickets, planning changes — grounded in the existing docs as context.
verifying-requirements Reviewing a story/spec/ticket for gaps, contradictions, missing info, and open questions before implementation.
updating-product-docs Adding or restructuring docs from any source — specs, UI, code, designs.
docs-from-code Generating or auditing docs by exploring code across multiple repos. Powers the daily CI updates.
acceptance-check Validating that a PR/branch implementation actually matches its spec or ticket.
writing-skills, writing-rules Authoring and validating new agent skills and rules in this repo.

Together these let an agent brainstorm a feature against the existing product context, harden the spec, write the code, and then verify the implementation against the spec — all using the same documentation source of truth.

Getting Started

For AI Agents

  1. Read setup.md.
  2. Ask the user the setup questions in Step 1.
  3. Copy and adapt files from skeleton/ per Steps 2–6.
  4. After setup, give the user an example prompt for documenting their first real feature (Step 10) — setup only scaffolds empty structure, not actual product content.

For Humans

  1. Fork or copy this repository.
  2. Open it in your AI agent and say: Read setup.md and walk me through the setup.
  3. Answer the questions; let the agent generate your configured docs repo.
  4. Commit the result as your documentation baseline.
  5. Use the agent's example prompt to start documenting real features one user-facing surface at a time — attach any design docs, specs, or slides you have for extra context.

Repository Structure

Path Purpose
setup.md One-shot onboarding guide for AI agents. Start here.
skeleton/base/ Files copied into every configured docs repo: README.md, root overview.md (product-area map), .docsignore, .gitignore, _templates/.
skeleton/agents/ Agent payloads for Cursor and Claude (rules + skills).
skeleton/optional/ Optional CI (including a GitLab CI/CD variables reference sheet), MCPs, and browser-verification modules.
skeleton/product-area-starter/ Starter product area (overview.md + area.json) copied for each product area during setup.
skeleton/product-section-starter/ Starter product section, copied inside a product area during setup.
skeleton/sample-templates/ Compact filled examples for every template type.
examples/product/taskflow/ Full fictional TaskFlow product area — a complete reference of what a filled-out docs tree looks like.

skeleton/ is operational (copied during setup). examples/ is educational (reference only).

Documentation Model

Each product section is a hierarchy rooted at an overview.md, with conventional files for definitions, access, data, features, widgets, and actions. The exact shape is configurable per project — see _templates/ for the canonical templates and examples/product/taskflow/ for a worked example.

Agent Principles

  • Read the relevant template before writing or updating a doc.
  • Keep product docs user-facing: behavior, access, metrics, limitations, APIs. Exclude private implementation details.
  • For docs-from-code work, verify behavior across multiple layers before changing docs.
  • Propagate changes up the hierarchy: feature → feature index → product overview → metrics, definitions, access, tracking, APIs, changelog.
  • Stop and ask when sources conflict or required repositories/tools are missing.

Optional Integrations

Credits

Created and maintained by Ronen Yacobi at Similarweb. See AUTHORS for the full list of contributors.

The writing-skills skill (and supporting files in skeleton/agents/cursor/.cursor/skills/writing-skills/) is derived from the writing-skills skill in obra/superpowers by Jesse Vincent, used under the MIT License and substantially modified. See LICENSE for the upstream copyright and permission notice.

License

MIT. See LICENSE.

About

SpecLore - Product Context & Specs

Resources

Contributing

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages