Deployed CodeAlmanac Acceptance Plan
Goal: test the installed codealmanac as a real user would, with real machine
state, real launchd automation, real temp repositories, real provider choices,
and explicit notes for expectation gaps.
This is not a unit-test checklist. It is a product acceptance pass. The order is deliberate: highest-risk, highest-trust flows first.
Ground Rules#
- Use
/Users/rohan/.local/bin/codealmanac, notuv run, unless a test says it is comparing deployed behavior to source behavior. - Record every bug and quirk in an operation note.
- Use throwaway repositories for writer tests.
- Do not run Garden or Ingest on an important repo until the same path has passed in a throwaway repo.
- Stop after any serious bug, write the actual/expected gap, and decide whether the bug blocks further testing.
Current Deployed Surface#
Observed deployed version: codealmanac 0.3.1.
Observed public commands:
init [path]ingest inputs...gardensync statuslistsearch,show,topics,health,validate,reindex,servetag,untagconfig list|get|setsetupuninstalldoctorupdate --checkjobs show|logs|attach|cancelautomation install|uninstall|status
Important expectation gap to watch: earlier manual output showed bare
codealmanac jobs listing jobs, but deployed help says a jobs subcommand is
required. Treat this as a product surface test.
What We Record For Every Test#
- command
- current directory
- relevant config before and after
- relevant files created or changed
- job ID if any
codealmanac jobsorjobs showevidence- database evidence when needed
- launchd evidence when needed
- expected behavior
- actual behavior
- severity: blocker, important, polish, or environment quirk
Priority 0: Do Not Corrupt The Machine#
These come before real operation runs.
P0.1 Installed Binary Identity#
Question: are we testing the deployed product?
Procedure:
which codealmanaccodealmanac --versioncodealmanac doctor- Confirm no command is accidentally invoking the repo checkout.
Expected:
- Binary is
/Users/rohan/.local/bin/codealmanac. - Version is deployed version.
- Doctor reads
~/.codealmanac/codealmanac.db.
P0.2 Baseline State Snapshot#
Question: what global state already exists before testing?
Procedure:
codealmanac list --jsoncodealmanac config listcodealmanac automation statuscodealmanac jobsandcodealmanac jobs --jsonsqlite3 ~/.codealmanac/codealmanac.dbinspect repositories, runs, locks.launchctl list | rg codealmanac
Expected:
- We know registered repositories, stale entries, config, active jobs, and launchd state before changing anything.
P0.3 Backup Global State#
Question: can we restore if setup/uninstall/config tests mutate user state?
Procedure:
- Copy
~/.codealmanac/codealmanac.db. - Copy
~/.codealmanac/config.toml. - Copy the three codealmanac launchd plists.
- Record instruction files that setup owns.
Expected:
- We can restore the pre-test machine state manually.
Priority 1: Trust And Installation#
These decide whether a user can trust setup.
P1.1 Doctor On Real Machine#
Question: does doctor tell the truth?
Procedure:
- Run
codealmanac doctorinside this repo root. - Run it from an unrelated folder.
- Run it with
--json.
Expected:
- In repo: shows install and wiki health.
- Outside repo: install is still visible, wiki selection is explicit.
- JSON contains the same facts as human output.
P1.2 Setup Default#
Question: does first setup create the right global state?
Procedure:
- Run
codealmanac setup --yeson the real installed CLI. - Inspect config.
- Inspect instruction files for Codex and Claude.
- Inspect automation status.
- Inspect launchd plists and logs directory.
Expected:
- Config is valid.
- Instructions are installed.
- Sync, Garden, and update automation are installed unless explicitly disabled.
- Output tells the user what changed.
P1.3 Setup Variants#
Question: do setup flags map cleanly to product choices?
Cases:
setup --yes --target codexsetup --yes --target claudesetup --yes --target allsetup --yes --skip-instructionssetup --yes --no-auto-commitsetup --yes --sync-offsetup --yes --garden-offsetup --yes --no-auto-updatesetup --yes --sync-every 1h --garden-every 2h
Expected:
- Each flag changes only its promised surface.
- Re-running setup is idempotent.
- Disabled automation is actually absent from launchd.
- Config remains valid after every variant.
P1.4 Uninstall#
Question: does uninstall remove only setup-owned local artifacts?
Procedure:
- Run
codealmanac uninstall. - Inspect automation status.
- Inspect launchd list.
- Inspect instruction files.
- Confirm repositories and wiki files are not destroyed.
- Re-run setup after uninstall.
Expected:
- Automation is unloaded and plists removed.
- Setup-owned instructions are removed.
- User wiki content and database are not recklessly destroyed.
Priority 2: Config And Provider Choice#
These affect every agent run.
P2.1 Config Read/Write Round Trip#
Procedure:
config listconfig get auto_commitconfig set auto_commit falseconfig set auto_commit trueconfig get harness.defaultconfig get harness.model
Expected:
- Values persist in
~/.codealmanac/config.toml. - Human output and JSON output agree.
P2.2 Provider Switching#
Procedure:
config set harness.default codex- Confirm model becomes Codex default.
- Set a valid Codex model.
config set harness.default claude- Confirm model becomes Claude default.
- Set a valid Claude model.
- Switch back to Codex.
Expected:
- Provider and model never become inconsistent.
- Errors mention allowed values.
P2.3 Invalid Config#
Cases:
config set auto_commit maybe- invalid provider
- invalid model name
- Claude model while provider is Codex
- Codex model while provider is Claude
- malformed TOML manually written to config file
Expected:
- Command fails cleanly.
- Existing valid config is not silently corrupted.
- Doctor surfaces invalid config if relevant.
Priority 3: Repository Registration And Root Semantics#
This is central to the no-root-hopping product stance.
P3.1 Fresh Repo Init#
Procedure:
- Create a throwaway git repo.
- Add a small source file and commit.
- Run
codealmanac init /path/to/repo. - Inspect
almanac/README.md,almanac/topics.yaml, and git status. - Run
codealmanac list. - Run
doctorfrom the repo root.
Expected:
almanac/exists.- Repository is registered.
- Doctor recognizes the repo.
P3.2 Duplicate Init#
Procedure:
- Run
codealmanac init /path/to/repoagain.
Expected:
- It stops.
- It does not overwrite existing
almanac/. - Error is simple and clear.
P3.3 Exact Directory Behavior#
Procedure:
- From exact repo root: run
search,health,topics,garden. - From a nested subfolder: run the same commands.
- From unrelated folder: run the same commands.
- Repeat with
--wiki <name>where supported.
Expected:
- Exact root works.
--wikiworks from anywhere.- Nested folder behavior must match the current product decision. If it still root-hops, record it as a decision gap.
P3.4 Stale Repository#
Procedure:
- Create/register a throwaway repo.
- Delete the repo folder.
- Run
list,doctor,sync, and scheduled Garden.
Expected:
- Missing repo is visible as unavailable.
- Scheduled Garden should not queue writing jobs for missing repos.
Priority 4: Jobs And Queue Behavior#
This is the user’s mental model for operations.
P4.1 Jobs List Surface#
Procedure:
- Run bare
codealmanac jobs. - Run
codealmanac jobs --json. - Compare with help text.
Expected:
- If bare jobs lists jobs, help should say so.
- If bare jobs is invalid, product UX may need reconsideration.
P4.2 Job Detail Surfaces#
Procedure:
- Pick a failed job.
jobs show <id>jobs logs <id>jobs attach <id>on a completed job.jobs cancel <id>on completed, failed, queued, and running jobs.
Expected:
- Show gives enough context.
- Logs are useful.
- Attach exits cleanly for terminal jobs.
- Cancel handles each state clearly.
P4.3 Queue Mechanics#
Procedure:
- Queue multiple operations.
- Inspect DB run order.
- Start worker path naturally through a command.
- Observe whether one job runs at a time.
- Cancel running job.
- Confirm locks/processes clear.
Expected:
- Queue order is understandable.
- Failed jobs do not block later jobs.
- Cancellation is visible and cleans up.
Priority 5: Writer Operations#
These are the heart of the product and should run on throwaway repos first.
P5.1 Init As Build#
Question: does init scaffold and then run the first agent write correctly?
Procedure:
- Create throwaway repo with meaningful code.
- Run
init --using codex. - Inspect queued/running job.
- Inspect terminal output.
- Inspect resulting wiki.
- Repeat with
--using claude.
Expected:
- Scaffold exists before writing.
- Agent job is visible.
- Resulting wiki is useful.
- Git diff stays under
almanac/.
P5.2 Ingest One File#
Procedure:
- Create
note.md. - Run
ingest note.md --using codex. - Observe jobs, logs, output, changed files.
- Repeat with Claude.
Expected:
- One ingest job.
- Agent can read the file.
- Wiki diff is local and useful.
- Provider failures are surfaced clearly.
P5.3 Ingest Multiple Inputs#
Cases:
- two files
- folder input
- missing file
- file outside repo
- empty file
- very large file
- binary file
Expected:
- Valid inputs are summarized.
- Invalid inputs fail without half-queued nonsense.
- Large/binary behavior is explicit.
P5.4 Garden#
Procedure:
- Run Garden in throwaway repo after ingest.
- Run Garden with
--wikifrom outside repo. - Run Garden from unrelated folder without
--wiki. - Run Garden when no changes are needed.
Expected:
- Garden targets the intended wiki.
- It does not need root hopping.
- No-change output is not scary.
- Changes stay under
almanac/.
P5.5 Auto Commit#
Procedure:
- Set
auto_commit true. - Run writer operation.
- Inspect git log and git status.
- Set
auto_commit false. - Run writer operation.
- Inspect git log and git status.
Expected:
- True creates commit when there are wiki changes.
- False leaves working tree diff.
- Terminal output says what happened.
Priority 6: Sync And Transcript Eligibility#
Sync is subtle because it depends on real agent transcripts.
P6.1 Sync Status#
Procedure:
- Run
codealmanac sync status. - Run JSON status.
- Check Codex and Claude transcript directories if surfaced.
Expected:
- Status says what sources are available.
- Missing source app is not a scary failure.
P6.2 Sync Scan#
Procedure:
- Create a recent Codex transcript by running a tiny Codex session in a throwaway repo.
- Create a recent Claude transcript if Claude is available.
- Run
codealmanac sync. - Inspect queued ingest jobs.
Expected:
- Recent active transcripts map to exact registered repositories.
- Nonmatching CWDs are ignored.
- Sync itself is not a job.
P6.3 Sync Filters#
Cases:
--wiki <name>--from codex--from claude- no recent transcripts
- stale transcript older than last sync
- transcript with missing CWD
- transcript from deleted repo
Expected:
- Filters do exactly what they say.
- No transcript creates a quiet no-op.
- Bad transcript metadata is skipped with useful diagnostics if surfaced.
Priority 7: Automation And Auto Update#
This is where “installed product” matters most.
P7.1 Automation Status Truth#
Procedure:
- Run
automation status. - Inspect plists.
- Inspect
launchctl print. - Compare intervals and commands.
Expected:
- CLI status agrees with launchd.
- Plists point at deployed Python, not repo Python.
P7.2 Automation Install/Uninstall#
Procedure:
automation uninstall- Confirm plists removed and launchd unloaded.
automation install- Confirm plists restored and loaded.
Expected:
- No ghost launchd jobs.
- No stale plist left behind.
P7.3 Kick Update#
Procedure:
- Snapshot update logs.
launchctl kickstart -k gui/$(id -u)/com.codealmanac.update- Inspect new logs.
- Inspect exit code through
launchctl print.
Expected:
- Update runs noninteractively.
- It exits zero when already current.
- It reports what it would upgrade.
P7.4 Kick Sync#
Procedure:
- Snapshot sync logs and jobs.
- Kick launchd sync.
- Inspect logs, jobs, DB.
Expected:
- Sync runs.
- It either queues ingest jobs or cleanly no-ops.
- It does not require terminal CWD.
P7.5 Kick Garden#
Procedure:
- Ensure only safe throwaway repos are registered or stale behavior is known.
- Snapshot garden logs and jobs.
- Kick launchd garden.
- Inspect which repositories get jobs.
Expected:
- Garden queues only available repositories.
- Duplicate queued/running Garden behavior is sensible.
- Failures are isolated per repository.
Priority 8: Query And Organization Commands#
These prove the wiki remains usable after writes.
P8.1 Search/Show/Topics#
Procedure:
- Search for content created by init/ingest.
- Show the page.
- Inspect topics.
- Run JSON variants.
Expected:
- Search finds new content.
- Show output is readable.
- JSON is scriptable.
P8.2 Health/Validate/Reindex#
Procedure:
- Run
health. - Run
validate. - Run
reindex. - Break a link/source in a throwaway repo and rerun.
Expected:
- Healthy repo is quiet and clear.
- Broken repo gets actionable diagnostics.
- Reindex does not corrupt state.
P8.3 Tag/Untag#
Procedure:
- Add topic to a page.
- Remove topic.
- Try missing page.
- Try missing topic.
Expected:
- Deterministic metadata edit only.
- Body content is preserved.
- Errors are clear.
Priority 9: Terminal UX#
This is not polish-only. Terminal output is behavior.
Review every command for:
- Does it say what happened?
- Does it say where files changed?
- Does it show job ID when a job is created?
- Does it tell me what to run next?
- Are errors short, concrete, and non-jargony?
- Does JSON mode stay clean?
- Are colors okay when piped or
NO_COLORis set?
High-risk commands:
setupinitingestgardensyncjobsautomation statusdoctorupdate
Priority 10: UrbanBKH Real-Life Cases#
These are messy-world cases. They matter after the core flow works.
U1 Repo Shape Cases#
- brand-new empty git repo
- repo with no commit
- repo with dirty working tree
- repo with existing
almanac/ - repo with nested package folders
- repo with spaces in path
- repo in
/tmp - repo deleted after registration
- repo moved after registration
- repo with huge files
- repo with binary files
- repo with symlinks
U2 Machine State Cases#
- no Codex auth
- no Claude auth
- both providers available
- only Codex available
- only Claude available
- PATH missing provider binary under launchd
- launchd job loaded but plist deleted
- plist exists but job not loaded
- DB exists but config missing
- config exists but malformed
- old stale launchd job from previous version
U3 Command Usage Cases#
- command from exact root
- command from subfolder
- command from unrelated folder
- command with
--wiki - command with invalid
--wiki - command with
--json - command with piped output
NO_COLOR=1- invalid arguments
- interrupted command
U4 Operation Failure Cases#
- provider refuses auth
- provider times out
- provider edits outside
almanac/ - provider writes nothing
- provider writes invalid markdown/frontmatter
- git commit fails
- worker process dies
- user cancels running job
- duplicate scheduled jobs
- stale queued jobs
Suggested Execution Order#
- P0 baseline and backup.
- P1 doctor/setup default.
- P2 config round trip.
- P7 update automation kick.
- P3 fresh temp repo init.
- P4 jobs list/show/logs using existing failed jobs.
- P5 ingest one file with Codex in throwaway repo.
- P5 Garden in throwaway repo.
- P7 sync kick.
- P7 garden kick only after stale repo behavior is understood.
- P5 repeat provider run with Claude.
- P6 sync transcript eligibility.
- P8 query/org commands after writes.
- P1 setup variants and uninstall/reinstall.
- P10 UrbanBKH messy cases.
- P9 terminal UX pass across all observed outputs.
This order gives us product confidence early and pushes destructive or confusing cases later.