OpenSpec-practise CLAUDE.md

A repository instruction file for OpenSpec Practise, a learning project about Spec-Driven Development, where written requirements are created before code.

In plain words
What is it for?
Use it when working on the project’s Node.js or Python e-commerce examples, specifications, documentation, or OpenSpec commands.
Why use it?
It explains the project structure, architecture, and common commands so contributors and coding agents can follow the repository’s process consistently.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/forceinjection/openspec-practise/claude-md
Clone the repo
git clone --depth 1 https://github.com/ForceInjection/OpenSpec-practise
Per session 1,512 This file is loaded in full into every session.
When invoked 1,512 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01512 $0.01512
Opus 5 $0.00756 $0.00756
Sonnet 5 $0.00302 $0.00302
Haiku 4.5 $0.00151 $0.00151

Measured yesterday against content hash d88f7fe0c924, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

OpenSpec-practise CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is OpenSpec Practise — a learning and demonstration repository for Spec-Driven Development (SDD) using the OpenSpec framework (v1.5.0). It contains a minimal e-commerce system implemented in both Node.js and Python, all driven by OpenSpec specifications. The core idea: define specifications first (proposal → design → specs → tasks), then write code, ensuring humans and AI share the same understanding of requirements.

Repository Architecture

docs/                          # Chinese documentation (manuals, guides, analysis)
docs-en/                       # English documentation (same content, translated)
openspec/                      # Root OpenSpec configuration for this project
  config.yaml                  #   Project context, rules, schema definition
.claude/                       # Claude Code native AI commands and skills (v1.5.0)
  commands/opsx/               #   /opsx:propose, /opsx:apply, /opsx:archive, /opsx:explore, /opsx:sync
  skills/                      #   Corresponding skill definitions (SKILL.md)
examples/
  ecommerce-mini/              # Node.js implementation (v20+, zero npm deps, native http)
    src/domain/                #   Entity type definitions (JSDoc) + pure domain logic
    src/services/              #   Use-case orchestration (CartService, CatalogService, OrderService)
    src/http/                  #   HTTP layer — server.js (dev), server.prod.js (prod with JWT + file persistence)
    src/repo/                  #   In-memory Map-based repositories
    src/persist/               #   File-based JSON persistence (FileStore)
    __tests__/                 #   unit.spec.js (service-level), integration.spec.js (E2E), performance.spec.js
    data/                      #   Seed data: products.json, carts.json, orders.json
  ecommerce-mini-python/       # Python implementation (FastAPI + Pydantic)
    src/domain/models.py       #   Pydantic models (Product, Cart, Order, CartItem, OrderItem)
    src/services/              #   Business logic (cart.py, catalog.py, order.py)
    src/api/server.py          #   FastAPI app with all endpoints
    src/repo/memory.py         #   Generic MemoryRepo[T]
    tests/test_smoke.py        #   Pytest smoke/integration tests via TestClient
  openspec/                    # Root: specifications driving both implementations
    config.yaml                #   Project context, rules, store/references support (v1.5.0)
    specs/                     #   Master specs: cart/catalog/order/payment/domain-model/error-handling
    changes/                   #   Active changes
    changes/archive/           #   Archived: 2025-01-27-v1-mvp (proposal/design/specs/tasks)

Read the full file on GitHub · 101 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 101 lines · 1,512 tokens per session scan A d88f7fe0c924

Subscribe to this mod's changes

OpenSpec-practise CLAUDE.md is an instructions file published in the GitHub repository ForceInjection/OpenSpec-practise (597 stars, last pushed 13d ago), licensed Apache-2.0. It adds 1,512 tokens to every session, about $0.0076 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.