mirror of
https://github.com/alirezarezvani/claude-skills.git
synced 2026-08-28 04:24:58 +00:00
fix(deep-learning-book): make --include-intro actually do something
Sixth review on PR #994 noted that --include-intro appeared to have an observable
effect only on the complete lane. Checked it, and it was worse than reported: the
flag was inert on every lane, complete included.
Two reasons compounded. ch01 is not a prerequisite of any chapter, so it never
arrived through prerequisite closure; and the only lane that targets it, complete,
skipped the ch01 filter entirely. The filter therefore removed a chapter that was
never present, and the flag that controlled it could not change any output.
This also means my own verification of the parameter rename in c75500f was
inconclusive: it compared the complete lane with the flag against the vision lane
without it, and those differ for reasons unrelated to the flag. A test that cannot
fail proves nothing.
Inverted the logic so the flag adds ch01 rather than un-removing it, which gives it
a real effect on every lane while leaving complete unchanged (ch01 is already among
its targets). Help text now states what it does and that no lane pulls ch01 in on
its own.
Verified per lane: complete unchanged; vision, generative and foundations each gain
ch01 with the flag and are untouched without it; ch01 sorts first and never precedes
a chapter it would violate. Routing and both refusal paths are unchanged — sequence,
vision, generative and practitioner all route as before, out-of-scope still exits 3,
unroutable still exits 4.
Gates green: compileall, check_paths, check_frontmatter, check_dual_publish,
check_model_freshness, smoke_scripts (696 passed), derive_counters --check,
check_skill_names, check_plugin_json, book_skill_validator, and --help +
--sample --output json on all four tools.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BswsZp5zrJWFAGU6KWNA1s
This commit is contained in:
parent
8f833d22dd
commit
98019ac169
1 changed files with 9 additions and 4 deletions
|
|
@ -277,9 +277,12 @@ def plan(goal: str, background: str, hours_per_week: float,
|
|||
lane = LANES[lane_key]
|
||||
targets = lane["targets"]
|
||||
chapters = close_prerequisites(targets)
|
||||
if not include_intro and lane_key != "complete":
|
||||
# ch01 is context; keep it only when the reader asked for everything.
|
||||
chapters = [c for c in chapters if c != 1]
|
||||
if include_intro and 1 not in chapters:
|
||||
# ch01 is context, not a prerequisite of anything, so it never arrives via
|
||||
# closure — the flag is the only way to reach it outside the complete lane.
|
||||
# (An earlier form of this filtered ch01 *out*, which was inert: nothing
|
||||
# depends on ch01, and the one lane that targets it skipped the filter.)
|
||||
chapters.append(1)
|
||||
ordered = order_path(chapters)
|
||||
|
||||
multiplier, background_note = BACKGROUNDS[background]
|
||||
|
|
@ -373,7 +376,9 @@ def main(argv: list[str] | None = None) -> int:
|
|||
parser.add_argument("--hours-per-week", type=float, default=5.0,
|
||||
help="study hours available per week (default: 5)")
|
||||
parser.add_argument("--include-intro", action="store_true",
|
||||
help="keep ch01, which is context rather than content")
|
||||
help="add ch01 to the path; it is context rather than content, "
|
||||
"so no lane pulls it in on its own (the complete read "
|
||||
"already includes it)")
|
||||
parser.add_argument("--output", choices=("text", "json"), default="text")
|
||||
parser.add_argument("--sample", action="store_true",
|
||||
help="run against a built-in example goal")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue