Skip to content

Commit cd709ac

Browse files
committed
fix: harden resolve script type hint + improve inject prompt wording
- Add type: ignore[arg-type] to merge_menu call (Pylance narrowing limitation) - Reword inject.before in workflows: "prepend to active instructions and follow it" - Reword inject.after in workflows: "append to active instructions and follow it" - Make additional_resources lazy: note list but don't eagerly load
1 parent 5543425 commit cd709ac

63 files changed

Lines changed: 119 additions & 119 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/agents/gds-agent-game-architect/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/agents/gds-agent-game-designer/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/agents/gds-agent-game-dev/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/agents/gds-agent-game-qa/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/agents/gds-agent-game-scrum-master/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/agents/gds-agent-game-solo-dev/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/agents/gds-agent-tech-writer/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/workflows/1-preproduction/gds-brainstorm-game/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Resolve `inject` and `additional_resources` from customization:
1313
Run: `python3 scripts/resolve-customization.py gds-brainstorm-game --key inject --key additional_resources`
1414
Use the JSON output as resolved values.
1515

16-
If `inject.before` is not empty, incorporate its content as high-priority context.
17-
If `additional_resources` is not empty, read each listed file and incorporate as reference context.
16+
1. **Inject before** -- If `inject.before` resolved to a non-empty value, prepend it to your active instructions and follow it.
17+
2. **Available resources** -- Note the `additional_resources` list. Do not read these files now; they are available for the injected prompt or workflow steps to reference when needed.
1818

1919
Follow the instructions in ./workflow.md.
2020

@@ -23,4 +23,4 @@ Follow the instructions in ./workflow.md.
2323
After the workflow completes, resolve `inject.after` from customization:
2424
Run: `python3 scripts/resolve-customization.py gds-brainstorm-game --key inject.after`
2525

26-
If resolved `inject.after` is not empty, incorporate its content as a final checklist or validation gate.
26+
If resolved `inject.after` is not empty, append it to your active instructions and follow it.

src/workflows/1-preproduction/gds-brainstorm-game/scripts/resolve-customization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def deep_merge(base: dict[str, Any], override: dict[str, Any]) -> dict[str, Any]
9191
if isinstance(over_val, dict) and isinstance(base_val, dict):
9292
merged[key] = deep_merge(base_val, over_val)
9393
elif _is_menu_array(over_val) and _is_menu_array(base_val):
94-
merged[key] = merge_menu(base_val, over_val)
94+
merged[key] = merge_menu(base_val, over_val) # type: ignore[arg-type]
9595
else:
9696
merged[key] = over_val
9797

src/workflows/1-preproduction/gds-create-game-brief/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Resolve `inject` and `additional_resources` from customization:
1313
Run: `python3 scripts/resolve-customization.py gds-create-game-brief --key inject --key additional_resources`
1414
Use the JSON output as resolved values.
1515

16-
If `inject.before` is not empty, incorporate its content as high-priority context.
17-
If `additional_resources` is not empty, read each listed file and incorporate as reference context.
16+
1. **Inject before** -- If `inject.before` resolved to a non-empty value, prepend it to your active instructions and follow it.
17+
2. **Available resources** -- Note the `additional_resources` list. Do not read these files now; they are available for the injected prompt or workflow steps to reference when needed.
1818

1919
Follow the instructions in ./workflow.md.
2020

@@ -23,4 +23,4 @@ Follow the instructions in ./workflow.md.
2323
After the workflow completes, resolve `inject.after` from customization:
2424
Run: `python3 scripts/resolve-customization.py gds-create-game-brief --key inject.after`
2525

26-
If resolved `inject.after` is not empty, incorporate its content as a final checklist or validation gate.
26+
If resolved `inject.after` is not empty, append it to your active instructions and follow it.

0 commit comments

Comments
 (0)