tribunal-kit 4.2.0 → 4.3.1

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 (186) hide show
  1. package/.agent/ARCHITECTURE.md +21 -14
  2. package/.agent/agents/swarm-worker-contracts.md +5 -5
  3. package/.agent/agents/ui-ux-auditor.md +292 -0
  4. package/.agent/rules/GEMINI.md +8 -8
  5. package/.agent/scripts/__pycache__/_colors.cpython-311.pyc +0 -0
  6. package/.agent/scripts/__pycache__/_utils.cpython-311.pyc +0 -0
  7. package/.agent/scripts/__pycache__/case_law_manager.cpython-311.pyc +0 -0
  8. package/.agent/scripts/_colors.js +18 -0
  9. package/.agent/scripts/_utils.js +42 -0
  10. package/.agent/scripts/auto_preview.js +197 -0
  11. package/.agent/scripts/bundle_analyzer.js +290 -0
  12. package/.agent/scripts/case_law_manager.js +684 -0
  13. package/.agent/scripts/checklist.js +266 -0
  14. package/.agent/scripts/colors.js +17 -0
  15. package/.agent/scripts/compress_skills.js +141 -0
  16. package/.agent/scripts/consolidate_skills.js +149 -0
  17. package/.agent/scripts/context_broker.js +609 -0
  18. package/.agent/scripts/deep_compress.js +150 -0
  19. package/.agent/scripts/dependency_analyzer.js +272 -0
  20. package/.agent/scripts/graph_builder.js +199 -0
  21. package/.agent/scripts/graph_zoom.js +154 -0
  22. package/.agent/scripts/inner_loop_validator.js +465 -0
  23. package/.agent/scripts/lint_runner.js +187 -0
  24. package/.agent/scripts/minify_context.js +100 -0
  25. package/.agent/scripts/patch_skills_meta.js +156 -0
  26. package/.agent/scripts/patch_skills_output.js +244 -0
  27. package/.agent/scripts/schema_validator.js +297 -0
  28. package/.agent/scripts/security_scan.js +303 -0
  29. package/.agent/scripts/session_manager.js +276 -0
  30. package/.agent/scripts/skill_evolution.js +644 -0
  31. package/.agent/scripts/skill_integrator.js +313 -0
  32. package/.agent/scripts/strengthen_skills.js +193 -0
  33. package/.agent/scripts/strip_tribunal.js +47 -0
  34. package/.agent/scripts/swarm_dispatcher.js +360 -0
  35. package/.agent/scripts/test_runner.js +193 -0
  36. package/.agent/scripts/utils.js +32 -0
  37. package/.agent/scripts/verify_all.js +256 -0
  38. package/.agent/skills/agent-organizer/SKILL.md +12 -4
  39. package/.agent/skills/agentic-patterns/SKILL.md +12 -4
  40. package/.agent/skills/ai-prompt-injection-defense/SKILL.md +12 -4
  41. package/.agent/skills/api-patterns/SKILL.md +209 -201
  42. package/.agent/skills/api-security-auditor/SKILL.md +12 -4
  43. package/.agent/skills/app-builder/SKILL.md +12 -4
  44. package/.agent/skills/app-builder/templates/SKILL.md +76 -68
  45. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +1 -1
  46. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +1 -1
  47. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +1 -1
  48. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +1 -1
  49. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +1 -1
  50. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +1 -1
  51. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +1 -1
  52. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +1 -1
  53. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +1 -1
  54. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +1 -1
  55. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +1 -1
  56. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +1 -1
  57. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +1 -1
  58. package/.agent/skills/appflow-wireframe/SKILL.md +12 -4
  59. package/.agent/skills/architecture/SKILL.md +12 -4
  60. package/.agent/skills/authentication-best-practices/SKILL.md +12 -4
  61. package/.agent/skills/bash-linux/SKILL.md +12 -4
  62. package/.agent/skills/behavioral-modes/SKILL.md +12 -4
  63. package/.agent/skills/brainstorming/SKILL.md +12 -4
  64. package/.agent/skills/building-native-ui/SKILL.md +12 -4
  65. package/.agent/skills/clean-code/SKILL.md +12 -4
  66. package/.agent/skills/code-review-checklist/SKILL.md +12 -4
  67. package/.agent/skills/config-validator/SKILL.md +12 -4
  68. package/.agent/skills/csharp-developer/SKILL.md +12 -4
  69. package/.agent/skills/data-validation-schemas/SKILL.md +290 -282
  70. package/.agent/skills/database-design/SKILL.md +202 -194
  71. package/.agent/skills/deployment-procedures/SKILL.md +12 -4
  72. package/.agent/skills/devops-engineer/SKILL.md +12 -4
  73. package/.agent/skills/devops-incident-responder/SKILL.md +12 -4
  74. package/.agent/skills/doc.md +1 -1
  75. package/.agent/skills/documentation-templates/SKILL.md +12 -4
  76. package/.agent/skills/edge-computing/SKILL.md +12 -4
  77. package/.agent/skills/error-resilience/SKILL.md +390 -382
  78. package/.agent/skills/extract-design-system/SKILL.md +12 -4
  79. package/.agent/skills/framer-motion-expert/SKILL.md +206 -199
  80. package/.agent/skills/frontend-design/SKILL.md +163 -155
  81. package/.agent/skills/game-design-expert/SKILL.md +12 -4
  82. package/.agent/skills/game-engineering-expert/SKILL.md +12 -4
  83. package/.agent/skills/geo-fundamentals/SKILL.md +12 -4
  84. package/.agent/skills/github-operations/SKILL.md +12 -4
  85. package/.agent/skills/gsap-core/SKILL.md +54 -48
  86. package/.agent/skills/gsap-frameworks/SKILL.md +54 -48
  87. package/.agent/skills/gsap-performance/SKILL.md +54 -48
  88. package/.agent/skills/gsap-plugins/SKILL.md +54 -48
  89. package/.agent/skills/gsap-react/SKILL.md +54 -48
  90. package/.agent/skills/gsap-scrolltrigger/SKILL.md +54 -48
  91. package/.agent/skills/gsap-timeline/SKILL.md +54 -48
  92. package/.agent/skills/gsap-utils/SKILL.md +54 -48
  93. package/.agent/skills/i18n-localization/SKILL.md +12 -4
  94. package/.agent/skills/intelligent-routing/SKILL.md +41 -33
  95. package/.agent/skills/knowledge-graph/SKILL.md +36 -0
  96. package/.agent/skills/lint-and-validate/SKILL.md +12 -4
  97. package/.agent/skills/llm-engineering/SKILL.md +12 -4
  98. package/.agent/skills/local-first/SKILL.md +12 -4
  99. package/.agent/skills/mcp-builder/SKILL.md +12 -4
  100. package/.agent/skills/mobile-design/SKILL.md +225 -217
  101. package/.agent/skills/monorepo-management/SKILL.md +296 -288
  102. package/.agent/skills/motion-engineering/SKILL.md +195 -187
  103. package/.agent/skills/nextjs-react-expert/SKILL.md +196 -188
  104. package/.agent/skills/nodejs-best-practices/SKILL.md +12 -4
  105. package/.agent/skills/observability/SKILL.md +12 -4
  106. package/.agent/skills/parallel-agents/SKILL.md +12 -4
  107. package/.agent/skills/performance-profiling/SKILL.md +12 -4
  108. package/.agent/skills/plan-writing/SKILL.md +12 -4
  109. package/.agent/skills/platform-engineer/SKILL.md +12 -4
  110. package/.agent/skills/playwright-best-practices/SKILL.md +12 -4
  111. package/.agent/skills/powershell-windows/SKILL.md +12 -4
  112. package/.agent/skills/project-idioms/SKILL.md +12 -4
  113. package/.agent/skills/python-patterns/SKILL.md +12 -4
  114. package/.agent/skills/python-pro/SKILL.md +285 -277
  115. package/.agent/skills/react-specialist/SKILL.md +239 -231
  116. package/.agent/skills/readme-builder/SKILL.md +12 -4
  117. package/.agent/skills/realtime-patterns/SKILL.md +12 -4
  118. package/.agent/skills/red-team-tactics/SKILL.md +12 -4
  119. package/.agent/skills/rust-pro/SKILL.md +12 -4
  120. package/.agent/skills/seo-fundamentals/SKILL.md +12 -4
  121. package/.agent/skills/server-management/SKILL.md +12 -4
  122. package/.agent/skills/shadcn-ui-expert/SKILL.md +12 -4
  123. package/.agent/skills/skill-creator/SKILL.md +12 -4
  124. package/.agent/skills/sql-pro/SKILL.md +12 -4
  125. package/.agent/skills/supabase-postgres-best-practices/SKILL.md +12 -4
  126. package/.agent/skills/swiftui-expert/SKILL.md +12 -4
  127. package/.agent/skills/systematic-debugging/SKILL.md +12 -4
  128. package/.agent/skills/tailwind-patterns/SKILL.md +12 -4
  129. package/.agent/skills/tdd-workflow/SKILL.md +12 -4
  130. package/.agent/skills/test-result-analyzer/SKILL.md +12 -4
  131. package/.agent/skills/testing-patterns/SKILL.md +12 -4
  132. package/.agent/skills/trend-researcher/SKILL.md +12 -4
  133. package/.agent/skills/typescript-advanced/SKILL.md +297 -289
  134. package/.agent/skills/ui-ux-pro-max/SKILL.md +12 -4
  135. package/.agent/skills/ui-ux-researcher/SKILL.md +12 -4
  136. package/.agent/skills/vue-expert/SKILL.md +237 -229
  137. package/.agent/skills/vulnerability-scanner/SKILL.md +12 -4
  138. package/.agent/skills/web-accessibility-auditor/SKILL.md +12 -4
  139. package/.agent/skills/web-design-guidelines/SKILL.md +12 -4
  140. package/.agent/skills/webapp-testing/SKILL.md +12 -4
  141. package/.agent/skills/whimsy-injector/SKILL.md +12 -4
  142. package/.agent/skills/workflow-optimizer/SKILL.md +12 -4
  143. package/.agent/workflows/audit.md +6 -6
  144. package/.agent/workflows/deploy.md +1 -1
  145. package/.agent/workflows/generate.md +23 -6
  146. package/.agent/workflows/session.md +5 -5
  147. package/.agent/workflows/swarm.md +2 -2
  148. package/README.md +242 -186
  149. package/bin/tribunal-kit.js +297 -57
  150. package/package.json +81 -77
  151. package/scripts/changelog.js +167 -0
  152. package/scripts/sync-version.js +81 -0
  153. package/scripts/validate-payload.js +73 -0
  154. package/.agent/scripts/__pycache__/auto_preview.cpython-311.pyc +0 -0
  155. package/.agent/scripts/__pycache__/bundle_analyzer.cpython-311.pyc +0 -0
  156. package/.agent/scripts/__pycache__/checklist.cpython-311.pyc +0 -0
  157. package/.agent/scripts/__pycache__/dependency_analyzer.cpython-311.pyc +0 -0
  158. package/.agent/scripts/__pycache__/security_scan.cpython-311.pyc +0 -0
  159. package/.agent/scripts/__pycache__/session_manager.cpython-311.pyc +0 -0
  160. package/.agent/scripts/__pycache__/skill_integrator.cpython-311.pyc +0 -0
  161. package/.agent/scripts/__pycache__/swarm_dispatcher.cpython-311.pyc +0 -0
  162. package/.agent/scripts/__pycache__/test_runner.cpython-311.pyc +0 -0
  163. package/.agent/scripts/__pycache__/verify_all.cpython-311.pyc +0 -0
  164. package/.agent/scripts/auto_preview.py +0 -180
  165. package/.agent/scripts/bundle_analyzer.py +0 -259
  166. package/.agent/scripts/case_law_manager.py +0 -755
  167. package/.agent/scripts/checklist.py +0 -209
  168. package/.agent/scripts/compress_skills.py +0 -167
  169. package/.agent/scripts/consolidate_skills.py +0 -173
  170. package/.agent/scripts/deep_compress.py +0 -202
  171. package/.agent/scripts/dependency_analyzer.py +0 -247
  172. package/.agent/scripts/lint_runner.py +0 -188
  173. package/.agent/scripts/minify_context.py +0 -80
  174. package/.agent/scripts/patch_skills_meta.py +0 -177
  175. package/.agent/scripts/patch_skills_output.py +0 -285
  176. package/.agent/scripts/schema_validator.py +0 -279
  177. package/.agent/scripts/security_scan.py +0 -224
  178. package/.agent/scripts/session_manager.py +0 -261
  179. package/.agent/scripts/skill_evolution.py +0 -563
  180. package/.agent/scripts/skill_integrator.py +0 -234
  181. package/.agent/scripts/strengthen_skills.py +0 -220
  182. package/.agent/scripts/strip_tribunal.py +0 -41
  183. package/.agent/scripts/swarm_dispatcher.py +0 -350
  184. package/.agent/scripts/test_runner.py +0 -192
  185. package/.agent/scripts/test_swarm_dispatcher.py +0 -163
  186. package/.agent/scripts/verify_all.py +0 -195
@@ -1,261 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- session_manager.py — Agent session state tracking for multi-conversation work.
4
-
5
- Usage:
6
- python .agent/scripts/session_manager.py save "working on auth"
7
- python .agent/scripts/session_manager.py load
8
- python .agent/scripts/session_manager.py show
9
- python .agent/scripts/session_manager.py clear
10
- python .agent/scripts/session_manager.py status
11
- python .agent/scripts/session_manager.py tag <label>
12
- python .agent/scripts/session_manager.py list [--all]
13
- python .agent/scripts/session_manager.py export [--stdout]
14
- """
15
-
16
- import os
17
- import sys
18
- import json
19
- from pathlib import Path
20
- from datetime import datetime
21
-
22
- STATE_FILE = ".agent_session.json"
23
-
24
- GREEN = "\033[92m"
25
- YELLOW = "\033[93m"
26
- BLUE = "\033[94m"
27
- CYAN = "\033[96m"
28
- RED = "\033[91m"
29
- BOLD = "\033[1m"
30
- RESET = "\033[0m"
31
-
32
- VALID_COMMANDS = {"save", "load", "show", "clear", "status", "tag", "list", "export"}
33
- LIST_PAGE_SIZE = 10
34
-
35
-
36
- def load_state() -> dict:
37
- path = Path(STATE_FILE)
38
- if not path.exists():
39
- return {}
40
- try:
41
- with open(path) as f:
42
- return json.load(f)
43
- except (json.JSONDecodeError, IOError):
44
- return {}
45
-
46
-
47
- def save_state(state: dict) -> None:
48
- with open(STATE_FILE, "w") as f:
49
- json.dump(state, f, indent=2)
50
-
51
-
52
- def cmd_save(note: str) -> None:
53
- state = load_state()
54
- entry = {
55
- "timestamp": datetime.now().isoformat(),
56
- "note": note,
57
- "session": len(state.get("history", [])) + 1,
58
- "tags": [],
59
- }
60
- state.setdefault("history", []).append(entry)
61
- state["current"] = entry
62
- save_state(state)
63
- print(f"{GREEN}✅ Session saved:{RESET} {note}")
64
- print(f" Time: {entry['timestamp']}")
65
- print(f" Session: #{entry['session']}")
66
-
67
-
68
- def cmd_load() -> None:
69
- state = load_state()
70
- current = state.get("current")
71
- if not current:
72
- print(f"{YELLOW}No active session — use 'save' first.{RESET}")
73
- return
74
- tags_str = (", ".join(current.get("tags", []))) or "none"
75
- print(f"{BOLD}Current session:{RESET}")
76
- print(f" Session: #{current['session']}")
77
- print(f" Time: {current['timestamp']}")
78
- print(f" Note: {current['note']}")
79
- print(f" Tags: {tags_str}")
80
-
81
-
82
- def cmd_show() -> None:
83
- state = load_state()
84
- history = state.get("history", [])
85
- if not history:
86
- print(f"{YELLOW}No session history.{RESET}")
87
- return
88
- print(f"{BOLD}Session History ({len(history)} total):{RESET}")
89
- for entry in reversed(history[-10:]):
90
- tags_str = (", ".join(entry.get("tags", []))) or ""
91
- tags_display = f" [{tags_str}]" if tags_str else ""
92
- print(f"\n {BLUE}#{entry['session']}{RESET} — {entry['timestamp'][:16]}{tags_display}")
93
- print(f" {entry['note']}")
94
-
95
-
96
- def cmd_clear() -> None:
97
- path = Path(STATE_FILE)
98
- if path.exists():
99
- path.unlink()
100
- print(f"{GREEN}✅ Session state cleared.{RESET}")
101
- else:
102
- print(f"{YELLOW}No session file found — nothing to clear.{RESET}")
103
-
104
-
105
- def cmd_status() -> None:
106
- """Print a compact status summary of the last 3 sessions."""
107
- state = load_state()
108
- history = state.get("history", [])
109
- current = state.get("current")
110
-
111
- if not history:
112
- print(f"{YELLOW}No session history — use 'save' to start tracking.{RESET}")
113
- return
114
-
115
- total = len(history)
116
- recent = history[-3:]
117
-
118
- print(f"\n{BOLD}{CYAN}━━━ Session Status ━━━━━━━━━━━━━━━━━━━━━━━━{RESET}")
119
- print(f" Total sessions: {total}")
120
- if current:
121
- print(f" Active: #{current['session']} — {current['note'][:60]}")
122
- print(f"\n{BOLD} Last 3 sessions:{RESET}")
123
- for entry in reversed(recent):
124
- tags_str = (", ".join(entry.get("tags", []))) or ""
125
- tags_display = f" [{tags_str}]" if tags_str else ""
126
- ts = entry["timestamp"][:16]
127
- print(f" {BLUE}#{entry['session']}{RESET} {ts}{tags_display}")
128
- print(f" {entry['note'][:70]}")
129
- print(f"{CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{RESET}\n")
130
-
131
-
132
- def cmd_tag(label: str) -> None:
133
- """Add a tag label to the current session entry."""
134
- if not label:
135
- print(f"{RED}Error: provide a tag label. Example: session_manager.py tag v2-feature{RESET}")
136
- sys.exit(1)
137
-
138
- state = load_state()
139
- current = state.get("current")
140
- if not current:
141
- print(f"{YELLOW}No active session — use 'save' first before tagging.{RESET}")
142
- sys.exit(1)
143
-
144
- # Tag must be applied to the same entry in history
145
- current.setdefault("tags", [])
146
- if label in current["tags"]:
147
- print(f"{YELLOW}Tag '{label}' already exists on session #{current['session']}.{RESET}")
148
- return
149
-
150
- current["tags"].append(label)
151
- state["current"] = current
152
-
153
- # Also update the matching entry in history
154
- for entry in state.get("history", []):
155
- if entry.get("session") == current["session"]:
156
- entry.setdefault("tags", [])
157
- if label not in entry["tags"]:
158
- entry["tags"].append(label)
159
- break
160
-
161
- save_state(state)
162
- print(f"{GREEN}✅ Tagged session #{current['session']} with '{label}'.{RESET}")
163
-
164
-
165
- def cmd_list(show_all: bool = False) -> None:
166
- """Paginated list of all session history."""
167
- state = load_state()
168
- history = state.get("history", [])
169
- if not history:
170
- print(f"{YELLOW}No session history.{RESET}")
171
- return
172
-
173
- total = len(history)
174
- page_size = len(history) if show_all else LIST_PAGE_SIZE
175
- recent = list(reversed(history))[:page_size]
176
-
177
- print(f"\n{BOLD}{CYAN}━━━ Session List ({total} total, showing {len(recent)}) ━━━━━━━{RESET}")
178
- for entry in recent:
179
- tags_str = (", ".join(entry.get("tags", []))) or ""
180
- tags_display = f" [{YELLOW}{tags_str}{RESET}]" if tags_str else ""
181
- ts = entry["timestamp"][:16]
182
- print(f"\n {BOLD}{BLUE}#{entry['session']}{RESET} — {ts}{tags_display}")
183
- print(f" {entry['note']}")
184
-
185
- if not show_all and total > page_size:
186
- remaining = total - page_size
187
- print(f"\n {YELLOW}... {remaining} older session(s) not shown. Use 'list --all' to see all.{RESET}")
188
-
189
- print(f"{CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━{RESET}\n")
190
-
191
-
192
- def cmd_export(to_stdout: bool = False) -> None:
193
- """Export all session history to a Markdown file or stdout."""
194
- state = load_state()
195
- history = state.get("history", [])
196
- if not history:
197
- print(f"{YELLOW}No session history to export.{RESET}")
198
- return
199
-
200
- lines = ["# Session Export\n"]
201
- lines.append(f"Generated: {datetime.now().isoformat()[:16]}\n")
202
- lines.append(f"Total sessions: {len(history)}\n\n---\n")
203
-
204
- for entry in reversed(history):
205
- session_num = entry.get("session", "?")
206
- ts = entry.get("timestamp", "")[:16]
207
- note = entry.get("note", "")
208
- tags = entry.get("tags", [])
209
- tags_str = f"\n**Tags:** {', '.join(tags)}" if tags else ""
210
- lines.append(f"## Session #{session_num} — {ts}\n")
211
- lines.append(f"{note}{tags_str}\n\n---\n")
212
-
213
- content = "\n".join(lines)
214
-
215
- if to_stdout:
216
- print(content)
217
- else:
218
- export_path = Path("session_export.md")
219
- with open(export_path, "w", encoding="utf-8") as f:
220
- f.write(content)
221
- print(f"{GREEN}✅ Exported {len(history)} sessions to{RESET} {export_path}")
222
-
223
-
224
- def main() -> None:
225
- if len(sys.argv) < 2:
226
- print(f"Usage: session_manager.py [save <note>|load|show|clear|status|tag <label>|list [--all]|export [--stdout]]")
227
- sys.exit(1)
228
-
229
- cmd = sys.argv[1].lower()
230
-
231
- if cmd not in VALID_COMMANDS:
232
- print(f"{RED}Unknown command: '{cmd}'{RESET}")
233
- print(f"Valid commands: {', '.join(sorted(VALID_COMMANDS))}")
234
- sys.exit(1)
235
-
236
- if cmd == "save":
237
- note = " ".join(sys.argv[2:]).strip()
238
- if not note:
239
- note = f"session {datetime.now().strftime('%Y-%m-%d %H:%M')}"
240
- cmd_save(note)
241
- elif cmd == "load":
242
- cmd_load()
243
- elif cmd == "show":
244
- cmd_show()
245
- elif cmd == "clear":
246
- cmd_clear()
247
- elif cmd == "status":
248
- cmd_status()
249
- elif cmd == "tag":
250
- label = " ".join(sys.argv[2:]).strip()
251
- cmd_tag(label)
252
- elif cmd == "list":
253
- show_all = "--all" in sys.argv
254
- cmd_list(show_all)
255
- elif cmd == "export":
256
- to_stdout = "--stdout" in sys.argv
257
- cmd_export(to_stdout)
258
-
259
-
260
- if __name__ == "__main__":
261
- main()