Prompt Manual Refresh Implementation Plan
For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
Goal: Bring over the newer prompt/manual doctrine while preserving the local-first Python product contract.
Architecture: Prompts and manuals stay packaged resources under src/codealmanac/prompts/ and src/codealmanac/manual/. The renderer still composes named sections; lifecycle workflows pass runtime context as they do today. No compatibility aliases are added for retired prompt section names.
Tech Stack: Python package resources via importlib.resources, Pydantic request/value models, pytest contract tests.
Task 1: Replace The Base Prompt With A Local-First Kernel#
Files:
- Create:
src/codealmanac/prompts/base/kernel.md - Modify:
src/codealmanac/prompts/models.py - Modify:
src/codealmanac/workflows/ingest/service.py - Modify:
src/codealmanac/workflows/garden/service.py - Delete:
src/codealmanac/prompts/base/purpose.md - Delete:
src/codealmanac/prompts/base/notability.md - Delete:
src/codealmanac/prompts/base/syntax.md - Test:
tests/test_prompts.py
Steps:
- Update prompt tests to expect
PromptName.BASE_KERNEL. - Add
base/kernel.mdfrom the newer prompt work, rewritten for:- CLI name
codealmanac - only
almanac/ - nested Markdown page tree
- path-first page ids
- normal Markdown page links
sources:only- no
pages/ - no
[[...]] - packaged manual resources, not repo-local
almanac/manual/
- CLI name
- Update ingest/garden prompt section tuples to use the kernel plus the operation prompt.
- Remove retired base prompt files and enum values.
- Run
uv run pytest tests/test_prompts.py.
Task 2: Refresh Operation Prompts#
Files:
- Modify:
src/codealmanac/prompts/operations/ingest.md - Modify:
src/codealmanac/prompts/operations/garden.md - Test:
tests/test_prompts.py
Steps:
- Bring over the stronger algorithmic shape from
dev. - Rewrite local product details:
- read bundled manual concepts from the prompt context/product rules, not
manual/under the wiki - write only under
almanac/ - use Markdown links and
sources: - run
codealmanac validate
- read bundled manual concepts from the prompt context/product rules, not
- Keep the prompt concise enough for lifecycle runs.
- Add tests that reject
[[,pages/,.almanac/, anddocs/almanac/in packaged prompts.
Task 3: Refresh The Bundled Manual#
Files:
- Modify:
src/codealmanac/manual/models.py - Modify:
src/codealmanac/manual/README.md - Modify:
src/codealmanac/manual/evidence.md - Modify:
src/codealmanac/manual/sources.md - Modify:
src/codealmanac/manual/ingest.md - Modify:
src/codealmanac/manual/garden.md - Create:
src/codealmanac/manual/concepts.md - Create:
src/codealmanac/manual/architecture.md - Create:
src/codealmanac/manual/how-to-guides.md - Create:
src/codealmanac/manual/decisions.md - Create:
src/codealmanac/manual/reference.md - Create:
src/codealmanac/manual/how-to-write.md - Create:
src/codealmanac/manual/links.md - Create:
src/codealmanac/manual/topics.md - Delete:
src/codealmanac/manual/pages.md - Delete:
src/codealmanac/manual/style.md - Delete:
src/codealmanac/manual/build.md - Test:
tests/test_manual.py
Steps:
- Update
ManualDocumentNameandMANUAL_DOCUMENTSto the new document set. - Rewrite the imported manual pages for the current tree:
- folder examples use
almanac/concepts/,almanac/architecture/,almanac/guides/,almanac/decisions/, andalmanac/reference/ - no
pages/ - no configured alternate root
- no repo-local
manual/ - no double-bracket links
- folder examples use
- Update tests to expect the new document inventory and local-first text.
- Run
uv run pytest tests/test_manual.py.
Task 4: Verify Public Contract And Package Resource Hygiene#
Files:
- Modify as needed:
src/codealmanac/services/setup/agent-guide.md - Modify as needed: docs that reference old prompt/manual names
- Test:
tests/test_public_contract.py - Test:
tests/test_cli.py
Steps:
- Scan prompt/manual/setup resources for retired strings.
- Run
uv run pytest tests/test_public_contract.py tests/test_prompts.py tests/test_manual.py. - Run
uv run ruff check .. - Run
uv run pytest. - Run
uv run codealmanac validate. - Commit as
feat(ticket-7): refresh prompts and manual.