diff options
| author | main <main@swarm.moe> | 2026-04-06 20:46:54 -0400 |
|---|---|---|
| committer | main <main@swarm.moe> | 2026-04-06 20:46:54 -0400 |
| commit | 4336882f38e78f5b38e1c06b34edb4e2c1154352 (patch) | |
| tree | 7c7f9f8c4ad0adfb4e63b7e451012350e99e6461 /assemble-pro-review-package/scripts | |
| parent | e4c0aab4147b31013bc5d2ae4ccf9b7fd8091526 (diff) | |
| download | skills-4336882f38e78f5b38e1c06b34edb4e2c1154352.zip | |
Lock assemble-pro-review-package to inline-only mode
Diffstat (limited to 'assemble-pro-review-package/scripts')
| -rwxr-xr-x | assemble-pro-review-package/scripts/inline_section.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/assemble-pro-review-package/scripts/inline_section.py b/assemble-pro-review-package/scripts/inline_section.py index 2a8f4f3..23daaf0 100755 --- a/assemble-pro-review-package/scripts/inline_section.py +++ b/assemble-pro-review-package/scripts/inline_section.py @@ -48,12 +48,14 @@ LANGUAGE_BY_SUFFIX = { ".yml": "yaml", } +HARD_MAX_TOKENS = 100_000 + def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser( description=( "Append a labeled markdown section containing a file or excerpt to a " - "target document, while enforcing a hard total token budget." + "target document, while enforcing the skill's fixed 100k-token hard budget." ) ) parser.add_argument("source", type=Path, help="Source file to inline.") @@ -91,12 +93,6 @@ def parse_args() -> argparse.Namespace: "back to --encoding." ), ) - parser.add_argument( - "--max-tokens", - type=int, - default=100_000, - help="Hard maximum for the full target document after append. Defaults to 100000.", - ) return parser.parse_args() @@ -217,10 +213,10 @@ def main() -> None: section_tokens = len(encoding.encode(section)) existing_tokens = len(encoding.encode(existing)) - if total_tokens > args.max_tokens: + if total_tokens > HARD_MAX_TOKENS: fail( "refusing append because the projected document would exceed the hard budget: " - f"{total_tokens} > {args.max_tokens} ({encoding_label}; existing={existing_tokens}; " + f"{total_tokens} > {HARD_MAX_TOKENS} ({encoding_label}; existing={existing_tokens}; " f"section={section_tokens})" ) |