@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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +206 -0
  3. package/package.json +35 -0
  4. package/rules/anti-patterns.md +38 -0
  5. package/rules/chinese.md +18 -0
  6. package/rules/durable-context.md +27 -0
  7. package/rules/english.md +14 -0
  8. package/scripts/build_metadata.py +360 -0
  9. package/scripts/check_routing_drift.py +82 -0
  10. package/scripts/dispatcher-template.md +43 -0
  11. package/scripts/dispatcher.md +53 -0
  12. package/scripts/package-skill.sh +71 -0
  13. package/scripts/packaging_filter.py +55 -0
  14. package/scripts/setup-rule.sh +109 -0
  15. package/scripts/setup-statusline.sh +127 -0
  16. package/scripts/skill_checks.py +483 -0
  17. package/scripts/skill_frontmatter.py +110 -0
  18. package/scripts/statusline.sh +321 -0
  19. package/scripts/validate_package.py +66 -0
  20. package/scripts/verify_skills.py +100 -0
  21. package/skills/RESOLVER.md +91 -0
  22. package/skills/check/SKILL.md +338 -0
  23. package/skills/check/agents/reviewer-architecture.md +39 -0
  24. package/skills/check/agents/reviewer-security.md +39 -0
  25. package/skills/check/references/persona-catalog.md +56 -0
  26. package/skills/check/references/project-context.md +107 -0
  27. package/skills/check/references/public-reply.md +14 -0
  28. package/skills/check/scripts/audit_signals.py +485 -0
  29. package/skills/check/scripts/run-tests.sh +19 -0
  30. package/skills/design/SKILL.md +134 -0
  31. package/skills/design/references/design-aesthetic-quality.md +67 -0
  32. package/skills/design/references/design-data-viz.md +34 -0
  33. package/skills/design/references/design-reference.md +278 -0
  34. package/skills/design/references/design-tokens.md +53 -0
  35. package/skills/design/references/design-traps.md +43 -0
  36. package/skills/health/SKILL.md +231 -0
  37. package/skills/health/agents/inspector-context.md +119 -0
  38. package/skills/health/agents/inspector-control.md +84 -0
  39. package/skills/health/agents/inspector-maintainability.md +55 -0
  40. package/skills/health/scripts/check-agent-context.sh +5 -0
  41. package/skills/health/scripts/check-doc-refs.sh +8 -0
  42. package/skills/health/scripts/check-maintainability.sh +8 -0
  43. package/skills/health/scripts/check-verifier-output.sh +5 -0
  44. package/skills/health/scripts/check_agent_context.py +407 -0
  45. package/skills/health/scripts/check_doc_refs.py +110 -0
  46. package/skills/health/scripts/check_maintainability.py +629 -0
  47. package/skills/health/scripts/check_verifier_output.py +116 -0
  48. package/skills/health/scripts/collect-data.sh +760 -0
  49. package/skills/hunt/SKILL.md +197 -0
  50. package/skills/hunt/references/failure-patterns.md +75 -0
  51. package/skills/hunt/references/ime-unicode.md +58 -0
  52. package/skills/hunt/references/logging-techniques.md +72 -0
  53. package/skills/hunt/references/rendering-debug.md +34 -0
  54. package/skills/learn/SKILL.md +128 -0
  55. package/skills/read/SKILL.md +108 -0
  56. package/skills/read/references/read-methods.md +110 -0
  57. package/skills/read/references/save-paths.md +33 -0
  58. package/skills/read/scripts/fetch.sh +105 -0
  59. package/skills/read/scripts/fetch_feishu.py +246 -0
  60. package/skills/read/scripts/fetch_local.py +218 -0
  61. package/skills/read/scripts/fetch_weixin.py +107 -0
  62. package/skills/think/SKILL.md +155 -0
  63. package/skills/write/SKILL.md +129 -0
  64. package/skills/write/references/write-en.md +197 -0
  65. package/skills/write/references/write-zh-bilingual.md +60 -0
  66. package/skills/write/references/write-zh-prose.md +48 -0
  67. package/skills/write/references/write-zh-release-notes.md +38 -0
  68. 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())