fix: address PR review feedback
- Narrow except Exception to (tomllib.TOMLDecodeError, OSError) in resolve-customization.py and all copies - Re-add scripts/ exclusion to _config-driven.js IDE installer path - Update draft-and-review.md to reference "enabled lenses" not "all three"
This commit is contained in:
parent
64de77298e
commit
29f37255cf
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ Before showing the draft to the user, run it through multiple review lenses in p
|
||||||
### Graceful Degradation
|
### Graceful Degradation
|
||||||
|
|
||||||
If subagents are unavailable:
|
If subagents are unavailable:
|
||||||
- Perform all three review passes yourself, sequentially
|
- Perform all enabled review passes yourself, sequentially
|
||||||
- Apply each lens deliberately — don't blend them into one generic review
|
- Apply each lens deliberately — don't blend them into one generic review
|
||||||
- The quality of review matters more than the parallelism
|
- The quality of review matters more than the parallelism
|
||||||
|
|
||||||
|
|
@ -94,4 +94,4 @@ Present reviewer findings with brief rationale, then offer: "Want me to dig into
|
||||||
|
|
||||||
## Stage Complete
|
## Stage Complete
|
||||||
|
|
||||||
This stage is complete when: (a) the draft has been reviewed by all three lenses and improvements integrated, AND either (autonomous) save and route directly, or (guided/yolo) the user is satisfied. Route to `finalize.md`.
|
This stage is complete when: (a) the draft has been reviewed by all enabled lenses and improvements integrated, AND either (autonomous) save and route directly, or (guided/yolo) the user is satisfied. Route to `finalize.md`.
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def load_toml(path: Path) -> dict[str, Any]:
|
||||||
try:
|
try:
|
||||||
with open(path, "rb") as f:
|
with open(path, "rb") as f:
|
||||||
return tomllib.load(f)
|
return tomllib.load(f)
|
||||||
except Exception as exc:
|
except (tomllib.TOMLDecodeError, OSError) as exc:
|
||||||
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
print(f"warning: failed to parse {path}: {exc}", file=sys.stderr)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -172,10 +172,12 @@ class ConfigDrivenIdeSetup {
|
||||||
const skipSuffixes = ['~', '.swp', '.swo', '.bak'];
|
const skipSuffixes = ['~', '.swp', '.swo', '.bak'];
|
||||||
const filter = (src) => {
|
const filter = (src) => {
|
||||||
const name = path.basename(src);
|
const name = path.basename(src);
|
||||||
|
const rel = path.relative(sourceDir, src);
|
||||||
if (src === sourceDir) return true;
|
if (src === sourceDir) return true;
|
||||||
if (skipPatterns.has(name)) return false;
|
if (skipPatterns.has(name)) return false;
|
||||||
if (name.startsWith('.') && name !== '.gitkeep') return false;
|
if (name.startsWith('.') && name !== '.gitkeep') return false;
|
||||||
if (skipSuffixes.some((s) => name.endsWith(s))) return false;
|
if (skipSuffixes.some((s) => name.endsWith(s))) return false;
|
||||||
|
if (rel === 'scripts' || rel.startsWith('scripts/')) return false;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
await fs.copy(sourceDir, skillDir, { filter });
|
await fs.copy(sourceDir, skillDir, { filter });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue