@tw93/waza 3.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +206 -0
- package/package.json +35 -0
- package/rules/anti-patterns.md +38 -0
- package/rules/chinese.md +18 -0
- package/rules/durable-context.md +27 -0
- package/rules/english.md +14 -0
- package/scripts/build_metadata.py +360 -0
- package/scripts/check_routing_drift.py +82 -0
- package/scripts/dispatcher-template.md +43 -0
- package/scripts/dispatcher.md +53 -0
- package/scripts/package-skill.sh +71 -0
- package/scripts/packaging_filter.py +55 -0
- package/scripts/setup-rule.sh +109 -0
- package/scripts/setup-statusline.sh +127 -0
- package/scripts/skill_checks.py +483 -0
- package/scripts/skill_frontmatter.py +110 -0
- package/scripts/statusline.sh +321 -0
- package/scripts/validate_package.py +66 -0
- package/scripts/verify_skills.py +100 -0
- package/skills/RESOLVER.md +91 -0
- package/skills/check/SKILL.md +338 -0
- package/skills/check/agents/reviewer-architecture.md +39 -0
- package/skills/check/agents/reviewer-security.md +39 -0
- package/skills/check/references/persona-catalog.md +56 -0
- package/skills/check/references/project-context.md +107 -0
- package/skills/check/references/public-reply.md +14 -0
- package/skills/check/scripts/audit_signals.py +485 -0
- package/skills/check/scripts/run-tests.sh +19 -0
- package/skills/design/SKILL.md +134 -0
- package/skills/design/references/design-aesthetic-quality.md +67 -0
- package/skills/design/references/design-data-viz.md +34 -0
- package/skills/design/references/design-reference.md +278 -0
- package/skills/design/references/design-tokens.md +53 -0
- package/skills/design/references/design-traps.md +43 -0
- package/skills/health/SKILL.md +231 -0
- package/skills/health/agents/inspector-context.md +119 -0
- package/skills/health/agents/inspector-control.md +84 -0
- package/skills/health/agents/inspector-maintainability.md +55 -0
- package/skills/health/scripts/check-agent-context.sh +5 -0
- package/skills/health/scripts/check-doc-refs.sh +8 -0
- package/skills/health/scripts/check-maintainability.sh +8 -0
- package/skills/health/scripts/check-verifier-output.sh +5 -0
- package/skills/health/scripts/check_agent_context.py +407 -0
- package/skills/health/scripts/check_doc_refs.py +110 -0
- package/skills/health/scripts/check_maintainability.py +629 -0
- package/skills/health/scripts/check_verifier_output.py +116 -0
- package/skills/health/scripts/collect-data.sh +760 -0
- package/skills/hunt/SKILL.md +197 -0
- package/skills/hunt/references/failure-patterns.md +75 -0
- package/skills/hunt/references/ime-unicode.md +58 -0
- package/skills/hunt/references/logging-techniques.md +72 -0
- package/skills/hunt/references/rendering-debug.md +34 -0
- package/skills/learn/SKILL.md +128 -0
- package/skills/read/SKILL.md +108 -0
- package/skills/read/references/read-methods.md +110 -0
- package/skills/read/references/save-paths.md +33 -0
- package/skills/read/scripts/fetch.sh +105 -0
- package/skills/read/scripts/fetch_feishu.py +246 -0
- package/skills/read/scripts/fetch_local.py +218 -0
- package/skills/read/scripts/fetch_weixin.py +107 -0
- package/skills/think/SKILL.md +155 -0
- package/skills/write/SKILL.md +129 -0
- package/skills/write/references/write-en.md +197 -0
- package/skills/write/references/write-zh-bilingual.md +60 -0
- package/skills/write/references/write-zh-prose.md +48 -0
- package/skills/write/references/write-zh-release-notes.md +38 -0
- package/skills/write/references/write-zh.md +645 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Scan a verifier log for stale external paths and suggest cache-clean commands.
|
|
3
|
+
|
|
4
|
+
Detects /tmp/ and /private/tmp/ file references that no longer exist; these are
|
|
5
|
+
the signature of stale worktrees pointed at by a verifier (golangci-lint cache,
|
|
6
|
+
go build cache, npm cache, etc.).
|
|
7
|
+
|
|
8
|
+
Run as: python3 check_verifier_output.py ROOT LOG_FILE
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import argparse
|
|
14
|
+
import re
|
|
15
|
+
import sys
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
TOKEN_RE = re.compile(
|
|
20
|
+
r"(?P<path>(?:/|\.\./)(?:[^\s:'\"(),]+/)*[^\s:'\"(),]+\.[A-Za-z0-9_+-]+)"
|
|
21
|
+
)
|
|
22
|
+
TMP_RE = re.compile(r"(^|/)(private/)?tmp/")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def main() -> int:
|
|
26
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
27
|
+
parser.add_argument("root", help="Repo root")
|
|
28
|
+
parser.add_argument("log_file", help="Verifier log to scan")
|
|
29
|
+
args = parser.parse_args()
|
|
30
|
+
|
|
31
|
+
root = Path(args.root).resolve()
|
|
32
|
+
log_file = Path(args.log_file).resolve()
|
|
33
|
+
if not root.is_dir():
|
|
34
|
+
print(f"Repo root not found: {root}", file=sys.stderr)
|
|
35
|
+
return 2
|
|
36
|
+
if not log_file.is_file():
|
|
37
|
+
print(f"Log file not found: {log_file}", file=sys.stderr)
|
|
38
|
+
return 2
|
|
39
|
+
|
|
40
|
+
text = log_file.read_text(encoding="utf-8", errors="replace")
|
|
41
|
+
|
|
42
|
+
def normalize(token: str) -> Path:
|
|
43
|
+
if token.startswith("/"):
|
|
44
|
+
return Path(token)
|
|
45
|
+
return (root / token).resolve()
|
|
46
|
+
|
|
47
|
+
paths: list[Path] = []
|
|
48
|
+
for match in TOKEN_RE.finditer(text):
|
|
49
|
+
token = match.group("path").rstrip(".")
|
|
50
|
+
if "/.git/" in token:
|
|
51
|
+
continue
|
|
52
|
+
path = normalize(token)
|
|
53
|
+
if TMP_RE.search(path.as_posix()):
|
|
54
|
+
paths.append(path)
|
|
55
|
+
|
|
56
|
+
unique_paths = []
|
|
57
|
+
seen = set()
|
|
58
|
+
for path in paths:
|
|
59
|
+
value = path.as_posix()
|
|
60
|
+
if value in seen:
|
|
61
|
+
continue
|
|
62
|
+
seen.add(value)
|
|
63
|
+
unique_paths.append(path)
|
|
64
|
+
|
|
65
|
+
stale_paths = [path for path in unique_paths if not path.exists()]
|
|
66
|
+
existing_paths = [path for path in unique_paths if path.exists()]
|
|
67
|
+
lower = text.lower()
|
|
68
|
+
|
|
69
|
+
actions: list[str] = []
|
|
70
|
+
if stale_paths:
|
|
71
|
+
if "golangci-lint" in lower or "errcheck" in lower:
|
|
72
|
+
actions.append("golangci-lint cache clean")
|
|
73
|
+
if re.search(r"\bgo (test|vet|build)\b", lower) or "go-build" in lower:
|
|
74
|
+
actions.append("go clean -cache -testcache")
|
|
75
|
+
if "npm" in lower or "node_modules" in lower:
|
|
76
|
+
actions.append("npm cache verify")
|
|
77
|
+
if not actions:
|
|
78
|
+
actions.append("rerun the verifier after removing stale temporary worktrees")
|
|
79
|
+
|
|
80
|
+
status = "WARN" if stale_paths else "PASS"
|
|
81
|
+
|
|
82
|
+
print("=== VERIFIER OUTPUT SURFACE ===")
|
|
83
|
+
print(f"verifier_output_status: {status}")
|
|
84
|
+
print(f"log_file: {log_file}")
|
|
85
|
+
print("stale_paths:")
|
|
86
|
+
if stale_paths:
|
|
87
|
+
for path in stale_paths[:20]:
|
|
88
|
+
print(f" {path}")
|
|
89
|
+
if len(stale_paths) > 20:
|
|
90
|
+
print(f" ... {len(stale_paths) - 20} more")
|
|
91
|
+
else:
|
|
92
|
+
print(" (none)")
|
|
93
|
+
print("existing_tmp_paths:")
|
|
94
|
+
if existing_paths:
|
|
95
|
+
for path in existing_paths[:10]:
|
|
96
|
+
print(f" {path}")
|
|
97
|
+
if len(existing_paths) > 10:
|
|
98
|
+
print(f" ... {len(existing_paths) - 10} more")
|
|
99
|
+
else:
|
|
100
|
+
print(" (none)")
|
|
101
|
+
print("recommended_actions:")
|
|
102
|
+
if actions:
|
|
103
|
+
for action in dict.fromkeys(actions):
|
|
104
|
+
print(f" {action}")
|
|
105
|
+
else:
|
|
106
|
+
print(" (none)")
|
|
107
|
+
print("verifier_findings:")
|
|
108
|
+
if stale_paths:
|
|
109
|
+
print(" stale external verifier paths detected")
|
|
110
|
+
else:
|
|
111
|
+
print(" (none)")
|
|
112
|
+
return 0
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
if __name__ == "__main__":
|
|
116
|
+
sys.exit(main())
|