Repository navigation
chore: clean repository root layout - #404
Conversation
Problem: the README ended with three overlapping navigation surfaces: a docs-map link, a contributor-guides table, and a Development paragraph repeating the same root files. The full docs map was also a flat table, so it duplicated the README without helping readers choose where to go next. What changed: keep the README docs block to a single curated public-facing table, remove the redundant Development and license tail, and render docs/README.md as a structured map grouped by orientation, user surfaces, verification, contributor workflow, and local state. Verification: devtools render-docs-surface --check; devtools render-all --check; ruff format --check devtools/render_docs_surface.py devtools/docs_surface.py; ruff check devtools/render_docs_surface.py devtools/docs_surface.py; git diff --check.
Problem: tracked editor settings, cache sentinels, local agent includes, and a one-off dateparser stub made the repository root look noisier than its actual source tree. The browser extension was also nested under a redundant package directory, and docs still linked to tracked cache/output README files.\n\nWhat changed: remove tracked dotdir/cache/local-state files, ignore those roots directly, flatten the browser extension to browser-extension/, replace the root dateparser stub with the normal types-dateparser dev dependency, and update generated documentation surfaces/tests to avoid the removed local-state docs.\n\nFollow-up: source and test module topology needs a deliberate import-aware refactor tracked in #403 rather than a casual rename pass.\n\nVerification: devtools render-all --check; pytest -q tests/unit/devtools/test_render_docs_surface.py; uv run --extra dev mypy polylogue/lib/dates.py --show-error-codes; devtools affected-obligations --path README.md --path docs/browser-capture.md --path docs/README.md --path pyproject.toml --path browser-extension/manifest.json; devtools verify --quick.\n\nRef #403\n\nCo-Authored-By: Codex <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR removes AI agent guidance files, VS Code and Claude IDE configurations, local documentation, and custom type stubs. It reorganizes the documentation structure and updates the docs surface generation logic to reflect new categorization. Type stubs are replaced with official packages via dependencies. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem: the README had one raw terminal recording that leaked setup commands, rendered prompt escapes, moved too quickly, and did not explain the actual workflows. The docs audit also needed durable source/test topology guidance rather than just a loose issue note.\n\nWhat changed: replace the single quickstart GIF with three slower VHS-backed README demos for query, products/publication, and verification routing. Add reproducible media scripts, keep captions inside the recordings, remove the obsolete quickstart tape/GIF, move the static-site screenshot to the publication section, and document the source/test ownership map with #403 as the import-aware cleanup target.\n\nVerification: bash docs/assets/readme/render-readme-media.sh; bash -n docs/assets/readme/readme-demo.sh docs/assets/readme/render-readme-media.sh docs/assets/readme/seed-demo-env.sh; vhs validate docs/assets/readme/polylogue-query.tape docs/assets/readme/polylogue-products.tape docs/assets/readme/polylogue-verification.tape; devtools render-all --check; pytest -q tests/unit/devtools/test_render_docs_surface.py; uv run --extra dev mypy polylogue/lib/dates.py --show-error-codes; git diff --check.\n\nRef #403\n\nCo-Authored-By: Codex <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 9
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
devtools/render_docs_surface.py (1)
44-54: 🧹 Nitpick | 🔵 TrivialMinor:
_render_named_tableduplicates_select_entrieslogic.
_select_entries(line 44) and the inline lookup inside_render_named_table(line 54) both build a title→entry tuple from a title list; only the input shape differs (entries tuple vs. precomputed dict). Consider unifying so callers either always go through_select_entries+_render_table, or have_select_entriesaccept a prebuilt mapping. Not a correctness issue.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@devtools/render_docs_surface.py` around lines 44 - 54, _refactor:_select_entries to accept either a tuple[DocsEntry,...] or a dict[str,DocsEntry] (or provide an overload) and centralize the title→entry selection logic there; then change _render_named_table to call _select_entries(by_title, titles) and pass the result to _render_table. This removes the duplicated lookup in _render_named_table while keeping function names _select_entries and _render_named_table and preserving the existing title-based selection behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.gitignore:
- Around line 23-26: The .gitignore mixes root-anchored entries (/.cache/,
/.local/) with unanchored patterns (.claude/, .vscode/); to make behavior
consistent anchor the editor/agent entries by changing .claude/ and .vscode/ to
/.claude/ and /.vscode/ so all four patterns are root-anchored, or explicitly
document/keep the current intent if you want caches anchored and editor dirs
matched at any depth.
In `@docs/assets/readme/polylogue-products.tape`:
- Around line 29-31: The Sleep 14s in the products demo is too short and
truncates the site build output; either increase the sleep to cover seeding +
build (e.g., change Sleep 14s to Sleep 40s) or shorten the scene by removing the
heavy step (remove the second run_scene that calls "polylogue --plain run site
-o .local/vhs-readme-products/site-preview" and only show the products listing).
Ensure the chosen wall time covers seed_env (which runs rm -rf + devtools
lab-corpus seed --count 8 --output-dir .local/vhs-readme-products), both
run_scene holds, and the static site build so polylogue-products.gif isn’t cut
off; align the final sleep with the trim offset used in render-readme-media.sh
(8.2s) so post-trim content remains visible.
In `@docs/assets/readme/polylogue-verification.tape`:
- Around line 22-23: The script contains a hardcoded absolute path command `cd
/realm/project/polylogue` which will fail for contributors; remove that `cd` (or
replace it with a no-op like `cd .`) in the recorded tape and instead rely on
the repo-root invocation from `render-readme-media.sh` or accept a working-dir
env var exported by the render script (e.g., read an env var and fallback to
`.`). Update the tape where `cd /realm/project/polylogue` appears and ensure
`vhs` is run from the repo root by `render-readme-media.sh` or pass a directory
via env so recordings are reproducible for others.
In `@docs/assets/readme/readme-demo.sh`:
- Around line 22-36: In run_scene(), the helper spawns a login shell via "bash
-lc \"$command\"" which re-sources user login profiles and can leak local
aliases/PATH; change the invocation to use "bash -c \"$command\"" (i.e., replace
bash -lc with bash -c) so the hermetic VHS shell is preserved and the output
remains reproducible—keep the existing quoting and use of
display_command/command/hold unchanged.
In `@docs/assets/readme/render-readme-media.sh`:
- Around line 7-22: The render_gif function leaves the intermediate palette file
(.local/${name}-palette.png) behind; update render_gif to remove the palette
variable (palette) after use—e.g., add a cleanup step (rm -f "$palette") or set
a trap inside render_gif to unlink "$palette" on exit/ERR—so the .local/
directory is not cluttered; reference the render_gif function and the palette
variable to locate where to add the cleanup.
- Around line 4-22: The script's render_gif function writes files into the
.local directory (variables palette and output) but never ensures that .local
exists, causing ffmpeg to fail on fresh clones; update the render_gif function
(and any caller if present) to create the directory before writing by invoking
mkdir -p .local (or mkdir -p "$(dirname "$palette")") right after computing
local variables (name, trim, input, palette, output) so palette and output can
be created safely.
In `@docs/assets/readme/seed-demo-env.sh`:
- Line 13: The command pipeline that runs devtools lab-corpus seed (the eval
"$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root"
--env-only 2>/dev/null | sed -n '/^export /p')") is currently discarding stderr,
which hides failures; update the pipeline so stderr from devtools lab-corpus
seed is not redirected to /dev/null (either remove "2>/dev/null" or redirect
stderr to a logfile and surface it), preserving the sed filtering of export
lines so that failures from devtools are visible and debuggable while still
producing the expected env exports.
- Around line 1-18: The file seed-demo-env.sh is an unused duplicate of the
seed_env() helper in readme-demo.sh; remove duplication by either deleting
seed-demo-env.sh or merging its logic into readme-demo.sh and updating callers.
If you delete the file, ensure no scripts reference seed-demo-env.sh; if you
merge, copy the readme_caption() function and the environment seeding block (the
eval "$(devtools lab-corpus seed ...)" logic and POLYLOGUE_FORCE_PLAIN/PS1
exports) into readme-demo.sh alongside the existing seed_env() or replace
seed_env() with this consolidated implementation, then remove seed-demo-env.sh
and run a quick repo-wide search for seed-demo-env.sh to confirm there are no
remaining references.
- Around line 9-14: The script ambiguously uses $1 both as a flag and as the
demo_root; modify the argument parsing to handle a real flag (e.g., --no-seed)
first using a while/getopts-style loop or case loop that consumes flags with
shift, set a boolean like no_seed, then after flags are shifted assign
demo_root="${1:-.local/vhs-readme-demo}" and count="${2:-8}"; update the
conditional that runs devtools lab-corpus seed to check the no_seed flag (not
the raw $1) and keep the existing eval "$(devtools lab-corpus seed ...)"
invocation unchanged so callers can pass --no-seed and still override
demo_root/count correctly.
---
Outside diff comments:
In `@devtools/render_docs_surface.py`:
- Around line 44-54: _refactor:_select_entries to accept either a
tuple[DocsEntry,...] or a dict[str,DocsEntry] (or provide an overload) and
centralize the title→entry selection logic there; then change
_render_named_table to call _select_entries(by_title, titles) and pass the
result to _render_table. This removes the duplicated lookup in
_render_named_table while keeping function names _select_entries and
_render_named_table and preserving the existing title-based selection behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6c8bd6ec-f044-4561-8801-e9d0bca1264b
⛔ Files ignored due to path filters (6)
.cache/README.mdis excluded by!**/.cache/**docs/assets/readme/polylogue-products.gifis excluded by!**/*.gifdocs/assets/readme/polylogue-query.gifis excluded by!**/*.gifdocs/assets/readme/polylogue-quickstart.gifis excluded by!**/*.gifdocs/assets/readme/polylogue-verification.gifis excluded by!**/*.gifuv.lockis excluded by!**/*.lock,!**/*.lock
📒 Files selected for processing (33)
.agent/includes/agent-memory.md.agent/includes/agent-workflow.md.claude/settings.json.gitignore.local/README.md.vscode/direnv-python.vscode/settings.jsonREADME.mdbrowser-extension/README.mdbrowser-extension/manifest.jsonbrowser-extension/src/background.jsbrowser-extension/src/common.jsbrowser-extension/src/content/chatgpt.jsbrowser-extension/src/content/claude.jsbrowser-extension/src/popup.htmlbrowser-extension/src/popup.jsdevtools/docs_surface.pydevtools/render_docs_surface.pydocs/README.mddocs/assets/readme/README.mddocs/assets/readme/polylogue-products.tapedocs/assets/readme/polylogue-query.tapedocs/assets/readme/polylogue-quickstart.tapedocs/assets/readme/polylogue-verification.tapedocs/assets/readme/readme-demo.shdocs/assets/readme/render-readme-media.shdocs/assets/readme/seed-demo-env.shdocs/browser-capture.mddocs/devtools.mddocs/internals.mdpyproject.tomlstubs/dateparser/__init__.pyitests/unit/devtools/test_render_docs_surface.py
💤 Files with no reviewable changes (8)
- .agent/includes/agent-memory.md
- .agent/includes/agent-workflow.md
- .vscode/direnv-python
- .vscode/settings.json
- .claude/settings.json
- stubs/dateparser/init.pyi
- docs/assets/readme/polylogue-quickstart.tape
- .local/README.md
| /.cache/ | ||
| /.local/ | ||
| .claude/ | ||
| .vscode/ |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Mixed anchoring is intentional but worth confirming.
/.cache/ and /.local/ are root-anchored while .claude/ and .vscode/ match at any depth. That's reasonable (caches only collect at the repo root, while editor/agent directories may appear in any subtree), but if you want consistent behavior you could anchor all four.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.gitignore around lines 23 - 26, The .gitignore mixes root-anchored entries
(/.cache/, /.local/) with unanchored patterns (.claude/, .vscode/); to make
behavior consistent anchor the editor/agent entries by changing .claude/ and
.vscode/ to /.claude/ and /.vscode/ so all four patterns are root-anchored, or
explicitly document/keep the current intent if you want caches anchored and
editor dirs matched at any depth.
| Type "bash docs/assets/readme/readme-demo.sh products" | ||
| Enter | ||
| Sleep 14s |
There was a problem hiding this comment.
Sleep 14s likely truncates the products demo.
The products scene in readme-demo.sh runs seed_env (which executes rm -rf + devtools lab-corpus seed --count 8 --output-dir .local/vhs-readme-products), then two run_scene invocations whose holds alone total 10s, the second of which is polylogue --plain run site -o .local/vhs-readme-products/site-preview (a full static site build). Realistic wall time is well over 14s, so VHS will stop recording before the site-preview output is shown and the resulting polylogue-products.gif will be cut off mid-command.
Either bump the hold (e.g. Sleep 40s) to cover seeding + site build + holds, or shorten the products scene in readme-demo.sh (e.g. drop run site and only show the products listing). Compare against the trim offset 8.2 used by render-readme-media.sh to pick a value that leaves enough post-trim content.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/assets/readme/polylogue-products.tape` around lines 29 - 31, The Sleep
14s in the products demo is too short and truncates the site build output;
either increase the sleep to cover seeding + build (e.g., change Sleep 14s to
Sleep 40s) or shorten the scene by removing the heavy step (remove the second
run_scene that calls "polylogue --plain run site -o
.local/vhs-readme-products/site-preview" and only show the products listing).
Ensure the chosen wall time covers seed_env (which runs rm -rf + devtools
lab-corpus seed --count 8 --output-dir .local/vhs-readme-products), both
run_scene holds, and the static site build so polylogue-products.gif isn’t cut
off; align the final sleep with the trim offset used in render-readme-media.sh
(8.2s) so post-trim content remains visible.
| run_scene() { | ||
| local note="$1" | ||
| local display_command="$2" | ||
| local command="${3:-$display_command}" | ||
| local hold="${4:-3}" | ||
| if [[ "$command" =~ ^[0-9]+$ ]]; then | ||
| hold="$command" | ||
| command="$display_command" | ||
| fi | ||
| clear | ||
| caption "$note" | ||
| printf '$ %s\n' "$display_command" | ||
| bash -lc "$command" | ||
| sleep "$hold" | ||
| } |
There was a problem hiding this comment.
bash -lc re-sources login profile inside the VHS shell.
The tape opens a hermetic shell with bash --noprofile --norc, but run_scene then spawns bash -lc "$command", which re-enables ~/.bash_profile / ~/.profile sourcing. On a contributor regenerating media locally, profile-set aliases or PATH overrides can leak into the captured output. Plain bash -c "$command" keeps the recording reproducible across machines.
🔧 Proposed fix
- bash -lc "$command"
+ bash -c "$command"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| run_scene() { | |
| local note="$1" | |
| local display_command="$2" | |
| local command="${3:-$display_command}" | |
| local hold="${4:-3}" | |
| if [[ "$command" =~ ^[0-9]+$ ]]; then | |
| hold="$command" | |
| command="$display_command" | |
| fi | |
| clear | |
| caption "$note" | |
| printf '$ %s\n' "$display_command" | |
| bash -lc "$command" | |
| sleep "$hold" | |
| } | |
| run_scene() { | |
| local note="$1" | |
| local display_command="$2" | |
| local command="${3:-$display_command}" | |
| local hold="${4:-3}" | |
| if [[ "$command" =~ ^[0-9]+$ ]]; then | |
| hold="$command" | |
| command="$display_command" | |
| fi | |
| clear | |
| caption "$note" | |
| printf '$ %s\n' "$display_command" | |
| bash -c "$command" | |
| sleep "$hold" | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/assets/readme/readme-demo.sh` around lines 22 - 36, In run_scene(), the
helper spawns a login shell via "bash -lc \"$command\"" which re-sources user
login profiles and can leak local aliases/PATH; change the invocation to use
"bash -c \"$command\"" (i.e., replace bash -lc with bash -c) so the hermetic VHS
shell is preserved and the output remains reproducible—keep the existing quoting
and use of display_command/command/hold unchanged.
| repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" | ||
| cd "$repo_root" | ||
|
|
||
| render_gif() { | ||
| local name="$1" | ||
| local trim="$2" | ||
| local input="docs/assets/readme/${name}.gif" | ||
| local palette=".local/${name}-palette.png" | ||
| local output=".local/${name}-trimmed.gif" | ||
|
|
||
| vhs "docs/assets/readme/${name}.tape" | ||
| ffmpeg -y -ss "$trim" -i "$input" \ | ||
| -vf "fps=12,scale=960:-1:flags=lanczos,palettegen=stats_mode=diff" \ | ||
| "$palette" >/dev/null 2>&1 | ||
| ffmpeg -y -ss "$trim" -i "$input" -i "$palette" \ | ||
| -lavfi "fps=12,scale=960:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=3" \ | ||
| -loop 0 "$output" >/dev/null 2>&1 | ||
| mv "$output" "$input" | ||
| } |
There was a problem hiding this comment.
Script will fail on fresh clones: .local/ is gitignored and never created.
render_gif writes .local/${name}-palette.png and .local/${name}-trimmed.gif, but .local/ is now in .gitignore (per this PR) and the script never creates it. With set -e, the first ffmpeg invocation aborts when the directory is missing. Add a mkdir -p before the renders.
🔧 Proposed fix
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
cd "$repo_root"
+mkdir -p .local📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" | |
| cd "$repo_root" | |
| render_gif() { | |
| local name="$1" | |
| local trim="$2" | |
| local input="docs/assets/readme/${name}.gif" | |
| local palette=".local/${name}-palette.png" | |
| local output=".local/${name}-trimmed.gif" | |
| vhs "docs/assets/readme/${name}.tape" | |
| ffmpeg -y -ss "$trim" -i "$input" \ | |
| -vf "fps=12,scale=960:-1:flags=lanczos,palettegen=stats_mode=diff" \ | |
| "$palette" >/dev/null 2>&1 | |
| ffmpeg -y -ss "$trim" -i "$input" -i "$palette" \ | |
| -lavfi "fps=12,scale=960:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=3" \ | |
| -loop 0 "$output" >/dev/null 2>&1 | |
| mv "$output" "$input" | |
| } | |
| repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" | |
| cd "$repo_root" | |
| mkdir -p .local | |
| render_gif() { | |
| local name="$1" | |
| local trim="$2" | |
| local input="docs/assets/readme/${name}.gif" | |
| local palette=".local/${name}-palette.png" | |
| local output=".local/${name}-trimmed.gif" | |
| vhs "docs/assets/readme/${name}.tape" | |
| ffmpeg -y -ss "$trim" -i "$input" \ | |
| -vf "fps=12,scale=960:-1:flags=lanczos,palettegen=stats_mode=diff" \ | |
| "$palette" >/dev/null 2>&1 | |
| ffmpeg -y -ss "$trim" -i "$input" -i "$palette" \ | |
| -lavfi "fps=12,scale=960:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=3" \ | |
| -loop 0 "$output" >/dev/null 2>&1 | |
| mv "$output" "$input" | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/assets/readme/render-readme-media.sh` around lines 4 - 22, The script's
render_gif function writes files into the .local directory (variables palette
and output) but never ensures that .local exists, causing ffmpeg to fail on
fresh clones; update the render_gif function (and any caller if present) to
create the directory before writing by invoking mkdir -p .local (or mkdir -p
"$(dirname "$palette")") right after computing local variables (name, trim,
input, palette, output) so palette and output can be created safely.
| render_gif() { | ||
| local name="$1" | ||
| local trim="$2" | ||
| local input="docs/assets/readme/${name}.gif" | ||
| local palette=".local/${name}-palette.png" | ||
| local output=".local/${name}-trimmed.gif" | ||
|
|
||
| vhs "docs/assets/readme/${name}.tape" | ||
| ffmpeg -y -ss "$trim" -i "$input" \ | ||
| -vf "fps=12,scale=960:-1:flags=lanczos,palettegen=stats_mode=diff" \ | ||
| "$palette" >/dev/null 2>&1 | ||
| ffmpeg -y -ss "$trim" -i "$input" -i "$palette" \ | ||
| -lavfi "fps=12,scale=960:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=3" \ | ||
| -loop 0 "$output" >/dev/null 2>&1 | ||
| mv "$output" "$input" | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Optional: clean up the intermediate palette file.
$palette (.local/${name}-palette.png) is left behind after each render. A rm -f "$palette" (or a trap) at the end of render_gif keeps .local/ tidy.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/assets/readme/render-readme-media.sh` around lines 7 - 22, The
render_gif function leaves the intermediate palette file
(.local/${name}-palette.png) behind; update render_gif to remove the palette
variable (palette) after use—e.g., add a cleanup step (rm -f "$palette") or set
a trap inside render_gif to unlink "$palette" on exit/ERR—so the .local/
directory is not cluttered; reference the render_gif function and the palette
variable to locate where to add the cleanup.
| if [[ "${1:-}" != "--no-seed" ]]; then | ||
| demo_root="${1:-.local/vhs-readme-demo}" | ||
| count="${2:-8}" | ||
| rm -rf "$demo_root" | ||
| eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only 2>/dev/null | sed -n '/^export /p')" | ||
| fi |
There was a problem hiding this comment.
Ambiguous $1 overload: same positional is checked as a flag and used as a path.
Line 9 inspects $1 for the literal --no-seed, but line 10 also reads $1 as demo_root. The result is that the seeding branch can only ever use the default demo root (or whatever non---no-seed token a caller passed, which is also being treated as a flag). Likewise, callers can't pass --no-seed and also override demo_root or count.
Use a real flag and shift positional args:
🔧 Proposed fix
-if [[ "${1:-}" != "--no-seed" ]]; then
- demo_root="${1:-.local/vhs-readme-demo}"
- count="${2:-8}"
- rm -rf "$demo_root"
- eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only 2>/dev/null | sed -n '/^export /p')"
-fi
+seed=1
+if [[ "${1:-}" == "--no-seed" ]]; then
+ seed=0
+ shift
+fi
+demo_root="${1:-.local/vhs-readme-demo}"
+count="${2:-8}"
+if (( seed )); then
+ rm -rf "$demo_root"
+ eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only | sed -n '/^export /p')"
+fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [[ "${1:-}" != "--no-seed" ]]; then | |
| demo_root="${1:-.local/vhs-readme-demo}" | |
| count="${2:-8}" | |
| rm -rf "$demo_root" | |
| eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only 2>/dev/null | sed -n '/^export /p')" | |
| fi | |
| seed=1 | |
| if [[ "${1:-}" == "--no-seed" ]]; then | |
| seed=0 | |
| shift | |
| fi | |
| demo_root="${1:-.local/vhs-readme-demo}" | |
| count="${2:-8}" | |
| if (( seed )); then | |
| rm -rf "$demo_root" | |
| eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only | sed -n '/^export /p')" | |
| fi |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/assets/readme/seed-demo-env.sh` around lines 9 - 14, The script
ambiguously uses $1 both as a flag and as the demo_root; modify the argument
parsing to handle a real flag (e.g., --no-seed) first using a
while/getopts-style loop or case loop that consumes flags with shift, set a
boolean like no_seed, then after flags are shifted assign
demo_root="${1:-.local/vhs-readme-demo}" and count="${2:-8}"; update the
conditional that runs devtools lab-corpus seed to check the no_seed flag (not
the raw $1) and keep the existing eval "$(devtools lab-corpus seed ...)"
invocation unchanged so callers can pass --no-seed and still override
demo_root/count correctly.
| demo_root="${1:-.local/vhs-readme-demo}" | ||
| count="${2:-8}" | ||
| rm -rf "$demo_root" | ||
| eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only 2>/dev/null | sed -n '/^export /p')" |
There was a problem hiding this comment.
Don't silently discard devtools lab-corpus seed stderr.
Redirecting 2>/dev/null and then piping to sed masks any failure from the seed command. With set -euo pipefail, if devtools exits non-zero the script will still abort, but the user sees no diagnostic and the eval block produces an empty string — turning a useful error into a confusing silent miss when the seed step fails (e.g., devtools missing, corpus error). Consider keeping stderr visible (or routing it to a log file) so failures are debuggable.
- eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only 2>/dev/null | sed -n '/^export /p')"
+ eval "$(devtools lab-corpus seed --count "$count" --output-dir "$demo_root" --env-only | sed -n '/^export /p')"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/assets/readme/seed-demo-env.sh` at line 13, The command pipeline that
runs devtools lab-corpus seed (the eval "$(devtools lab-corpus seed --count
"$count" --output-dir "$demo_root" --env-only 2>/dev/null | sed -n '/^export
/p')") is currently discarding stderr, which hides failures; update the pipeline
so stderr from devtools lab-corpus seed is not redirected to /dev/null (either
remove "2>/dev/null" or redirect stderr to a logfile and surface it), preserving
the sed filtering of export lines so that failures from devtools are visible and
debuggable while still producing the expected env exports.
This reverts commit 6cfa053.
|
Scope cleanup after structural audit: removed the parallel README/VHS media rebuild from this PR and updated the body accordingly. The branch now keeps to repo-root cleanup, browser-extension flattening, docs-map generation, and dateparser typing cleanup. README media/scenario-backed demos stay tracked under #410/#412. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary: Clean the repository root and documentation map without changing the README media system. This removes tracked local/editor/cache state, flattens the browser extension directory, replaces the local dateparser stub with the published stub dependency, and keeps generated docs surfaces focused on durable reader paths. Problem: The repository root mixed source artifacts with local working-state sentinels and editor/agent settings. The browser extension lived under a redundant nested directory, docs still advertised tracked `.cache`/`.local` README files, and `mypy_path = "stubs"` existed only to support a tiny dateparser stub. Solution: Remove tracked local-state dotdirs, ignore those roots directly, flatten `browser-extension/`, add `types-dateparser`, remove the local stub package, and update docs-surface rendering/tests. README/VHS/media redesign remains tracked separately in #410 and #412. Verification: - `pytest -q tests/unit/devtools/test_render_docs_surface.py` -> 2 passed. - `devtools render-all --check` -> sync OK. - Push hook `devtools verify --quick` -> all checks passed. - GitHub lint/typecheck/nix/showcase/CodeQL/GitGuardian/CodeRabbit checks passed; Python matrix jobs remained pending under the known CI quota/running constraint. Ref #403
Summary
Clean the repository root and documentation map without changing the README media system. This PR removes tracked local/editor/cache state, flattens the browser extension directory, replaces the bespoke dateparser type stub with the published stub dependency, and keeps the generated docs surface focused on durable reader paths.
Ref #403
Problem
The repository root mixed source artifacts with local working-state sentinels and editor/agent settings. The browser extension lived under a redundant nested directory, docs still advertised tracked
.cache/.localREADME files, andmypy_path = "stubs"existed only to support a tiny dateparser stub that is better handled as a dev dependency.The larger audit found deeper structural work in source/provider layout, scenarios/showcase, README media, and product ownership. Those belong in #403, #410, #412, #413, and #414 rather than being partly solved here.
Solution
.agent/includes,.cache/README.md,.local/README.md,.claude/settings.json,.vscode/*, and the localstubs/dateparserpackage..cache/,.local/,.claude/, and.vscode/directly.browser-extension/polylogue-browser-capture/tobrowser-extension/and update docs.types-dateparserto the dev dependencies and removemypy_path = "stubs".Verification
pytest -q tests/unit/devtools/test_render_docs_surface.py-> 2 passed.devtools render-all --check-> sync OK for AGENTS.md, CLI reference, devtools reference, quality reference, verification catalog, and docs surface.Summary by CodeRabbit
Documentation
Chores