@torus-engineering/tas-kit 1.7.0 → 1.8.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 (71) hide show
  1. package/.claude/commands/tas-adr.md +33 -29
  2. package/.claude/commands/tas-api-test.md +95 -0
  3. package/.claude/commands/tas-bug.md +113 -109
  4. package/.claude/commands/tas-design.md +37 -33
  5. package/.claude/commands/tas-dev.md +128 -115
  6. package/.claude/commands/tas-e2e-mobile.md +155 -0
  7. package/.claude/commands/tas-e2e-web.md +163 -0
  8. package/.claude/commands/tas-e2e.md +102 -0
  9. package/.claude/commands/tas-epic.md +35 -31
  10. package/.claude/commands/tas-feature.md +47 -43
  11. package/.claude/commands/tas-fix.md +51 -47
  12. package/.claude/commands/tas-functest-mobile.md +144 -0
  13. package/.claude/commands/tas-functest-web.md +192 -0
  14. package/.claude/commands/tas-functest.md +76 -0
  15. package/.claude/commands/tas-plan.md +200 -184
  16. package/.claude/commands/tas-prd.md +37 -33
  17. package/.claude/commands/tas-review.md +111 -104
  18. package/.claude/commands/tas-sad.md +43 -39
  19. package/.claude/commands/tas-security.md +81 -80
  20. package/.claude/commands/tas-story.md +91 -87
  21. package/.claude/commands/tas-verify.md +51 -41
  22. package/.claude/rules/common/post-review-agent.md +49 -39
  23. package/.claude/rules/common/testing.md +24 -0
  24. package/.claude/rules/common/token-logging.md +27 -0
  25. package/.claude/rules/csharp/api-testing.md +171 -0
  26. package/.claude/rules/csharp/patterns.md +10 -0
  27. package/.claude/rules/python/patterns.md +10 -0
  28. package/.claude/rules/typescript/patterns.md +10 -0
  29. package/.claude/rules/web/performance.md +9 -0
  30. package/.claude/skills/api-design/SKILL.md +3 -1
  31. package/.claude/skills/{backend-patterns → js-backend-patterns}/SKILL.md +2 -1
  32. package/.claude/skills/tas-implementation-complete/SKILL.md +99 -97
  33. package/.claude/skills/tas-tdd/SKILL.md +123 -82
  34. package/.claude/skills/token-logger/SKILL.md +19 -0
  35. package/.tas/templates/E2E-Execution-Report.md +198 -0
  36. package/.tas/templates/E2E-Mobile-Spec.md +130 -0
  37. package/.tas/templates/E2E-Report.md +174 -0
  38. package/.tas/templates/E2E-Scenario.md +180 -0
  39. package/.tas/templates/E2E-Web-Spec.md +164 -0
  40. package/.tas/templates/Feature.md +55 -55
  41. package/.tas/templates/Func-Test-Script.md +254 -0
  42. package/.tas/templates/Func-Test-Spec.md +187 -0
  43. package/.tas/templates/SAD.md +274 -274
  44. package/.tas/templates/Story.md +90 -88
  45. package/bin/cli.js +56 -56
  46. package/lib/deleted-files.json +33 -0
  47. package/lib/install.js +213 -176
  48. package/package.json +34 -34
  49. package/.claude/agents/README.md +0 -83
  50. package/.claude/agents/ado-agent.md +0 -39
  51. package/.claude/agents/code-architect.md +0 -62
  52. package/.claude/agents/code-simplifier.md +0 -53
  53. package/.claude/agents/comment-analyzer.md +0 -59
  54. package/.claude/agents/conversation-analyzer.md +0 -57
  55. package/.claude/agents/docs-lookup.md +0 -55
  56. package/.claude/agents/harness-optimizer.md +0 -62
  57. package/.claude/agents/loop-operator.md +0 -56
  58. package/.claude/agents/performance-optimizer.md +0 -78
  59. package/.claude/agents/pr-test-analyzer.md +0 -68
  60. package/.claude/agents/pytorch-build-resolver.md +0 -76
  61. package/.claude/agents/refactor-cleaner.md +0 -70
  62. package/.claude/agents/seo-specialist.md +0 -75
  63. package/.claude/agents/silent-failure-hunter.md +0 -69
  64. package/.claude/agents/type-design-analyzer.md +0 -75
  65. package/.claude/rules/common/agents.md +0 -65
  66. package/.claude/rules/common/coding-style.md +0 -90
  67. package/.claude/rules/common/development-workflow.md +0 -44
  68. package/.claude/rules/common/git-workflow.md +0 -24
  69. package/.claude/rules/common/performance.md +0 -55
  70. package/.claude/skills/agent-harness-construction/SKILL.md +0 -77
  71. package/.claude/skills/agent-introspection-debugging/SKILL.md +0 -157
@@ -1,157 +0,0 @@
1
- ---
2
- name: agent-introspection-debugging
3
- description: |
4
- Auto-invoke when an agent run fails repeatedly, hits max tool call limits,
5
- loops on the same tools without forward progress, or drifts from its intended task.
6
- Use for structured self-debugging (capture → diagnose → recover) before escalating to human.
7
- origin: ECC
8
- allowed-tools: Read, Bash, Grep, Glob
9
- ---
10
-
11
- # Agent Introspection Debugging
12
-
13
- Use this skill when an agent run is failing repeatedly, consuming tokens without progress, looping on the same tools, or drifting away from the intended task.
14
-
15
- This is a workflow skill, not a hidden runtime. It teaches the agent to debug itself systematically before escalating to a human.
16
-
17
- ## When to Activate
18
-
19
- - Maximum tool call / loop-limit failures
20
- - Repeated retries with no forward progress
21
- - Context growth or prompt drift that starts degrading output quality
22
- - File-system or environment state mismatch between expectation and reality
23
- - Tool failures that are likely recoverable with diagnosis and a smaller corrective action
24
-
25
- ## Scope Boundaries
26
-
27
- Activate this skill for:
28
- - capturing failure state before retrying blindly
29
- - diagnosing common agent-specific failure patterns
30
- - applying contained recovery actions
31
- - producing a structured human-readable debug report
32
-
33
- Do not use this skill as the primary source for:
34
- - feature verification after code changes; use `/tas-verify` instead
35
- - framework-specific debugging when a narrower skill or agent already covers it
36
- - runtime promises the current harness cannot enforce automatically
37
-
38
- ## Four-Phase Loop
39
-
40
- ### Phase 1: Failure Capture
41
-
42
- Before trying to recover, record the failure precisely.
43
-
44
- Capture:
45
- - error type, message, and stack trace when available
46
- - last meaningful tool call sequence
47
- - what the agent was trying to do
48
- - current context pressure: repeated prompts, oversized pasted logs, duplicated plans, or runaway notes
49
- - current environment assumptions: cwd, branch, relevant service state, expected files
50
-
51
- Minimum capture template:
52
-
53
- ```markdown
54
- ## Failure Capture
55
- - Session / task:
56
- - Goal in progress:
57
- - Error:
58
- - Last successful step:
59
- - Last failed tool / command:
60
- - Repeated pattern seen:
61
- - Environment assumptions to verify:
62
- ```
63
-
64
- ### Phase 2: Root-Cause Diagnosis
65
-
66
- Match the failure to a known pattern before changing anything.
67
-
68
- | Pattern | Likely Cause | Check |
69
- | --- | --- | --- |
70
- | Maximum tool calls / repeated same command | loop or no-exit observer path | inspect the last N tool calls for repetition |
71
- | Context overflow / degraded reasoning | unbounded notes, repeated plans, oversized logs | inspect recent context for duplication and low-signal bulk |
72
- | `ECONNREFUSED` / timeout | service unavailable or wrong port | verify service health, URL, and port assumptions |
73
- | `429` / quota exhaustion | retry storm or missing backoff | count repeated calls and inspect retry spacing |
74
- | file missing after write / stale diff | race, wrong cwd, or branch drift | re-check path, cwd, git status, and actual file existence |
75
- | tests still failing after “fix” | wrong hypothesis | isolate the exact failing test and re-derive the bug |
76
-
77
- Diagnosis questions:
78
- - is this a logic failure, state failure, environment failure, or policy failure?
79
- - did the agent lose the real objective and start optimizing the wrong subtask?
80
- - is the failure deterministic or transient?
81
- - what is the smallest reversible action that would validate the diagnosis?
82
-
83
- ### Phase 3: Contained Recovery
84
-
85
- Recover with the smallest action that changes the diagnosis surface.
86
-
87
- Safe recovery actions:
88
- - stop repeated retries and restate the hypothesis
89
- - trim low-signal context and keep only the active goal, blockers, and evidence
90
- - re-check the actual filesystem / branch / process state
91
- - narrow the task to one failing command, one file, or one test
92
- - switch from speculative reasoning to direct observation
93
- - escalate to a human when the failure is high-risk or externally blocked
94
-
95
- Do not claim unsupported auto-healing actions like “reset agent state” or “update harness config” unless you are actually doing them through real tools in the current environment.
96
-
97
- Contained recovery checklist:
98
-
99
- ```markdown
100
- ## Recovery Action
101
- - Diagnosis chosen:
102
- - Smallest action taken:
103
- - Why this is safe:
104
- - What evidence would prove the fix worked:
105
- ```
106
-
107
- ### Phase 4: Introspection Report
108
-
109
- End with a report that makes the recovery legible to the next agent or human.
110
-
111
- ```markdown
112
- ## Agent Self-Debug Report
113
- - Session / task:
114
- - Failure:
115
- - Root cause:
116
- - Recovery action:
117
- - Result: success | partial | blocked
118
- - Token / time burn risk:
119
- - Follow-up needed:
120
- - Preventive change to encode later:
121
- ```
122
-
123
- ## Recovery Heuristics
124
-
125
- Prefer these interventions in order:
126
-
127
- 1. Restate the real objective in one sentence.
128
- 2. Verify the world state instead of trusting memory.
129
- 3. Shrink the failing scope.
130
- 4. Run one discriminating check.
131
- 5. Only then retry.
132
-
133
- Bad pattern:
134
- - retrying the same action three times with slightly different wording
135
-
136
- Good pattern:
137
- - capture failure
138
- - classify the pattern
139
- - run one direct check
140
- - change the plan only if the check supports it
141
-
142
- ## Integration with TAS Kit
143
-
144
- - Run `/tas-verify` after recovery if code was changed — confirms implementation meets acceptance criteria.
145
- - Use `/tas-bug` when the failure pattern reveals a reproducible bug worth tracking.
146
- - Escalate to human via `AskUserQuestion` when the issue is not technical failure but decision ambiguity.
147
- - Run `git status` + `git diff` if the failure came from conflicting local state or repo drift.
148
-
149
- ## Output Standard
150
-
151
- When this skill is active, do not end with “I fixed it” alone.
152
-
153
- Always provide:
154
- - the failure pattern
155
- - the root-cause hypothesis
156
- - the recovery action
157
- - the evidence that the situation is now better or still blocked