smriti/cli/pyproject.toml
Himanshu Dongre ec0139f707 Add Smriti agent skill pack source and renderer
The skill pack is an instruction file installed into an agent host's
project directory so Smriti's workflow lives in the agent's system
context instead of documentation nobody reads. A single versioned
template.md renders for both Claude Code (MCP-primary) and Codex
(CLI-primary) via a pure-function substituter, keeping content in
sync mechanically across targets.

template.md contains 15 sections. The load-bearing one is Section 5,
When NOT to checkpoint, with equal weight to Section 4. Agents are
told explicitly not to checkpoint after every small step, not to
produce end-of-session blobs, not to treat commits as a save button,
not to stack commits on inconsistent state, not to restate existing
state, and not to checkpoint just because the user asked when there
is no real inflection point. A frequency target (2-4 checkpoints per
4-hour session) and a three-question signal test give agents concrete
criteria for every call.

Other sections cover the read-state-first reflex, when to fork, when
to review, when to compare, when to restore, drift detection,
explicit anti-patterns (HANDOFF.md, silent state reads, inconsistent
author_agent, /chat/send), and the phrases the agent should say out
loud so the human watching has an audit trail.

Renderer API (all pure functions): load_template, get_version, render,
install. install is version-aware: refuses to overwrite a destination
whose installed version is >= the template version unless force=True.
Dry-run mode returns the rendered content without writing.

Content-integrity tests parametrized over both targets assert that
every anti-pattern rule, the signal test, the frequency target, and
the drift-detection guidance appear in the rendered output. If a
future template edit drops any of them, tests fail loudly.

22 skill pack tests, all green.
2026-04-12 02:07:47 +05:30

41 lines
1,000 B
TOML

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "smriti-cli"
version = "0.1.0"
description = "Command-line interface for Smriti, the reasoning-state backend for coding agents."
requires-python = ">=3.11"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Himanshu Dongre" },
]
dependencies = [
"requests>=2.31.0",
"mcp>=1.27.0,<2.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
]
[project.scripts]
smriti = "smriti_cli.main:main"
smriti-mcp = "smriti_cli.mcp_server:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["smriti_cli*"]
[tool.setuptools.package-data]
# Ship the skill pack source-of-truth template with the installed
# package so `smriti skills install` and `smriti_install_skill` can
# find it via __file__-relative path resolution.
smriti_cli = ["skill_pack/template.md"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra --strict-markers"