@torus-engineering/tas-kit 1.6.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.
- package/.claude/commands/tas-adr.md +33 -29
- package/.claude/commands/tas-api-test.md +95 -0
- package/.claude/commands/tas-bug.md +113 -109
- package/.claude/commands/tas-design.md +37 -33
- package/.claude/commands/tas-dev.md +128 -115
- package/.claude/commands/tas-e2e-mobile.md +155 -0
- package/.claude/commands/tas-e2e-web.md +163 -0
- package/.claude/commands/tas-e2e.md +102 -0
- package/.claude/commands/tas-epic.md +35 -31
- package/.claude/commands/tas-feature.md +47 -43
- package/.claude/commands/tas-fix.md +51 -47
- package/.claude/commands/tas-functest-mobile.md +144 -0
- package/.claude/commands/tas-functest-web.md +192 -0
- package/.claude/commands/tas-functest.md +76 -0
- package/.claude/commands/tas-plan.md +200 -184
- package/.claude/commands/tas-prd.md +37 -33
- package/.claude/commands/tas-review.md +111 -104
- package/.claude/commands/tas-sad.md +43 -39
- package/.claude/commands/tas-security.md +81 -80
- package/.claude/commands/tas-story.md +91 -87
- package/.claude/commands/tas-verify.md +51 -41
- package/.claude/rules/common/post-review-agent.md +49 -39
- package/.claude/rules/common/testing.md +24 -0
- package/.claude/rules/common/token-logging.md +27 -0
- package/.claude/rules/csharp/api-testing.md +171 -0
- package/.claude/rules/csharp/patterns.md +10 -0
- package/.claude/rules/python/patterns.md +10 -0
- package/.claude/rules/typescript/patterns.md +10 -0
- package/.claude/rules/web/performance.md +9 -0
- package/.claude/skills/api-design/SKILL.md +3 -1
- package/.claude/skills/{backend-patterns → js-backend-patterns}/SKILL.md +2 -1
- package/.claude/skills/tas-implementation-complete/SKILL.md +99 -97
- package/.claude/skills/tas-tdd/SKILL.md +123 -82
- package/.claude/skills/token-logger/SKILL.md +19 -0
- package/.tas/templates/E2E-Execution-Report.md +198 -0
- package/.tas/templates/E2E-Mobile-Spec.md +130 -0
- package/.tas/templates/E2E-Report.md +174 -0
- package/.tas/templates/E2E-Scenario.md +180 -0
- package/.tas/templates/E2E-Web-Spec.md +164 -0
- package/.tas/templates/Feature.md +55 -55
- package/.tas/templates/Func-Test-Script.md +254 -0
- package/.tas/templates/Func-Test-Spec.md +187 -0
- package/.tas/templates/SAD.md +274 -64
- package/.tas/templates/Story.md +90 -88
- package/bin/cli.js +56 -49
- package/lib/deleted-files.json +33 -0
- package/lib/install.js +213 -114
- package/package.json +34 -34
- package/.claude/agents/README.md +0 -83
- package/.claude/agents/ado-agent.md +0 -39
- package/.claude/agents/code-architect.md +0 -62
- package/.claude/agents/code-simplifier.md +0 -53
- package/.claude/agents/comment-analyzer.md +0 -59
- package/.claude/agents/conversation-analyzer.md +0 -57
- package/.claude/agents/docs-lookup.md +0 -55
- package/.claude/agents/harness-optimizer.md +0 -62
- package/.claude/agents/loop-operator.md +0 -56
- package/.claude/agents/performance-optimizer.md +0 -78
- package/.claude/agents/pr-test-analyzer.md +0 -68
- package/.claude/agents/pytorch-build-resolver.md +0 -76
- package/.claude/agents/refactor-cleaner.md +0 -70
- package/.claude/agents/seo-specialist.md +0 -75
- package/.claude/agents/silent-failure-hunter.md +0 -69
- package/.claude/agents/type-design-analyzer.md +0 -75
- package/.claude/rules/common/agents.md +0 -65
- package/.claude/rules/common/coding-style.md +0 -90
- package/.claude/rules/common/development-workflow.md +0 -44
- package/.claude/rules/common/git-workflow.md +0 -24
- package/.claude/rules/common/performance.md +0 -55
- package/.claude/skills/agent-harness-construction/SKILL.md +0 -77
- package/.claude/skills/agent-introspection-debugging/SKILL.md +0 -157
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Development Workflow
|
|
2
|
-
|
|
3
|
-
> This file extends [common/git-workflow.md](./git-workflow.md) with the full feature development process that happens before git operations.
|
|
4
|
-
|
|
5
|
-
The Feature Implementation Workflow describes the development pipeline: research, planning, TDD, code review, and then committing to git.
|
|
6
|
-
|
|
7
|
-
## Feature Implementation Workflow
|
|
8
|
-
|
|
9
|
-
0. **Research & Reuse** _(mandatory before any new implementation)_
|
|
10
|
-
- **GitHub code search first:** Run `gh search repos` and `gh search code` to find existing implementations, templates, and patterns before writing anything new.
|
|
11
|
-
- **Library docs second:** Use Context7 or primary vendor docs to confirm API behavior, package usage, and version-specific details before implementing.
|
|
12
|
-
- **Exa only when the first two are insufficient:** Use Exa for broader web research or discovery after GitHub search and primary docs.
|
|
13
|
-
- **Check package registries:** Search npm, PyPI, crates.io, and other registries before writing utility code. Prefer battle-tested libraries over hand-rolled solutions.
|
|
14
|
-
- **Search for adaptable implementations:** Look for open-source projects that solve 80%+ of the problem and can be forked, ported, or wrapped.
|
|
15
|
-
- Prefer adopting or porting a proven approach over writing net-new code when it meets the requirement.
|
|
16
|
-
|
|
17
|
-
1. **Plan First**
|
|
18
|
-
- Use **planner** agent to create implementation plan
|
|
19
|
-
- Generate planning docs before coding: PRD, architecture, system_design, tech_doc, task_list
|
|
20
|
-
- Identify dependencies and risks
|
|
21
|
-
- Break down into phases
|
|
22
|
-
|
|
23
|
-
2. **TDD Approach**
|
|
24
|
-
- Use **tdd-guide** agent
|
|
25
|
-
- Write tests first (RED)
|
|
26
|
-
- Implement to pass tests (GREEN)
|
|
27
|
-
- Refactor (IMPROVE)
|
|
28
|
-
- Verify 80%+ coverage
|
|
29
|
-
|
|
30
|
-
3. **Code Review**
|
|
31
|
-
- Use **code-reviewer** agent immediately after writing code
|
|
32
|
-
- Address CRITICAL and HIGH issues
|
|
33
|
-
- Fix MEDIUM issues when possible
|
|
34
|
-
|
|
35
|
-
4. **Commit & Push**
|
|
36
|
-
- Detailed commit messages
|
|
37
|
-
- Follow conventional commits format
|
|
38
|
-
- See [git-workflow.md](./git-workflow.md) for commit message format and PR process
|
|
39
|
-
|
|
40
|
-
5. **Pre-Review Checks**
|
|
41
|
-
- Verify all automated checks (CI/CD) are passing
|
|
42
|
-
- Resolve any merge conflicts
|
|
43
|
-
- Ensure branch is up to date with target branch
|
|
44
|
-
- Only request review after these checks pass
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Git Workflow
|
|
2
|
-
|
|
3
|
-
## Commit Message Format
|
|
4
|
-
```
|
|
5
|
-
<type>: <description>
|
|
6
|
-
|
|
7
|
-
<optional body>
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Types: feat, fix, refactor, docs, test, chore, perf, ci
|
|
11
|
-
|
|
12
|
-
Note: Attribution disabled globally via ~/.claude/settings.json.
|
|
13
|
-
|
|
14
|
-
## Pull Request Workflow
|
|
15
|
-
|
|
16
|
-
When creating PRs:
|
|
17
|
-
1. Analyze full commit history (not just latest commit)
|
|
18
|
-
2. Use `git diff [base-branch]...HEAD` to see all changes
|
|
19
|
-
3. Draft comprehensive PR summary
|
|
20
|
-
4. Include test plan with TODOs
|
|
21
|
-
5. Push with `-u` flag if new branch
|
|
22
|
-
|
|
23
|
-
> For the full development process (planning, TDD, code review) before git operations,
|
|
24
|
-
> see [development-workflow.md](./development-workflow.md).
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Performance Optimization
|
|
2
|
-
|
|
3
|
-
## Model Selection Strategy
|
|
4
|
-
|
|
5
|
-
**Haiku 4.5** (90% of Sonnet capability, 3x cost savings):
|
|
6
|
-
- Lightweight agents with frequent invocation
|
|
7
|
-
- Pair programming and code generation
|
|
8
|
-
- Worker agents in multi-agent systems
|
|
9
|
-
|
|
10
|
-
**Sonnet 4.6** (Best coding model):
|
|
11
|
-
- Main development work
|
|
12
|
-
- Orchestrating multi-agent workflows
|
|
13
|
-
- Complex coding tasks
|
|
14
|
-
|
|
15
|
-
**Opus 4.5** (Deepest reasoning):
|
|
16
|
-
- Complex architectural decisions
|
|
17
|
-
- Maximum reasoning requirements
|
|
18
|
-
- Research and analysis tasks
|
|
19
|
-
|
|
20
|
-
## Context Window Management
|
|
21
|
-
|
|
22
|
-
Avoid last 20% of context window for:
|
|
23
|
-
- Large-scale refactoring
|
|
24
|
-
- Feature implementation spanning multiple files
|
|
25
|
-
- Debugging complex interactions
|
|
26
|
-
|
|
27
|
-
Lower context sensitivity tasks:
|
|
28
|
-
- Single-file edits
|
|
29
|
-
- Independent utility creation
|
|
30
|
-
- Documentation updates
|
|
31
|
-
- Simple bug fixes
|
|
32
|
-
|
|
33
|
-
## Extended Thinking + Plan Mode
|
|
34
|
-
|
|
35
|
-
Extended thinking is enabled by default, reserving up to 31,999 tokens for internal reasoning.
|
|
36
|
-
|
|
37
|
-
Control extended thinking via:
|
|
38
|
-
- **Toggle**: Option+T (macOS) / Alt+T (Windows/Linux)
|
|
39
|
-
- **Config**: Set `alwaysThinkingEnabled` in `~/.claude/settings.json`
|
|
40
|
-
- **Budget cap**: `export MAX_THINKING_TOKENS=10000`
|
|
41
|
-
- **Verbose mode**: Ctrl+O to see thinking output
|
|
42
|
-
|
|
43
|
-
For complex tasks requiring deep reasoning:
|
|
44
|
-
1. Ensure extended thinking is enabled (on by default)
|
|
45
|
-
2. Enable **Plan Mode** for structured approach
|
|
46
|
-
3. Use multiple critique rounds for thorough analysis
|
|
47
|
-
4. Use split role sub-agents for diverse perspectives
|
|
48
|
-
|
|
49
|
-
## Build Troubleshooting
|
|
50
|
-
|
|
51
|
-
If build fails:
|
|
52
|
-
1. Use **build-error-resolver** agent
|
|
53
|
-
2. Analyze error messages
|
|
54
|
-
3. Fix incrementally
|
|
55
|
-
4. Verify after each fix
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: agent-harness-construction
|
|
3
|
-
description: |
|
|
4
|
-
Auto-invoke when designing or optimizing agent tool definitions, action spaces,
|
|
5
|
-
or observation formats. Also when an agent is looping on tools without progress,
|
|
6
|
-
failing to converge, or producing poor-quality completions due to harness design.
|
|
7
|
-
origin: ECC
|
|
8
|
-
allowed-tools: Read, Grep, Glob
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Agent Harness Construction
|
|
12
|
-
|
|
13
|
-
Use this skill when you are improving how an agent plans, calls tools, recovers from errors, and converges on completion.
|
|
14
|
-
|
|
15
|
-
## Core Model
|
|
16
|
-
|
|
17
|
-
Agent output quality is constrained by:
|
|
18
|
-
1. Action space quality
|
|
19
|
-
2. Observation quality
|
|
20
|
-
3. Recovery quality
|
|
21
|
-
4. Context budget quality
|
|
22
|
-
|
|
23
|
-
## Action Space Design
|
|
24
|
-
|
|
25
|
-
1. Use stable, explicit tool names.
|
|
26
|
-
2. Keep inputs schema-first and narrow.
|
|
27
|
-
3. Return deterministic output shapes.
|
|
28
|
-
4. Avoid catch-all tools unless isolation is impossible.
|
|
29
|
-
|
|
30
|
-
## Granularity Rules
|
|
31
|
-
|
|
32
|
-
- Use micro-tools for high-risk operations (deploy, migration, permissions).
|
|
33
|
-
- Use medium tools for common edit/read/search loops.
|
|
34
|
-
- Use macro-tools only when round-trip overhead is the dominant cost.
|
|
35
|
-
|
|
36
|
-
## Observation Design
|
|
37
|
-
|
|
38
|
-
Every tool response should include:
|
|
39
|
-
- `status`: success|warning|error
|
|
40
|
-
- `summary`: one-line result
|
|
41
|
-
- `next_actions`: actionable follow-ups
|
|
42
|
-
- `artifacts`: file paths / IDs
|
|
43
|
-
|
|
44
|
-
## Error Recovery Contract
|
|
45
|
-
|
|
46
|
-
For every error path, include:
|
|
47
|
-
- root cause hint
|
|
48
|
-
- safe retry instruction
|
|
49
|
-
- explicit stop condition
|
|
50
|
-
|
|
51
|
-
## Context Budgeting
|
|
52
|
-
|
|
53
|
-
1. Keep system prompt minimal and invariant.
|
|
54
|
-
2. Move large guidance into skills loaded on demand.
|
|
55
|
-
3. Prefer references to files over inlining long documents.
|
|
56
|
-
4. Compact at phase boundaries, not arbitrary token thresholds.
|
|
57
|
-
|
|
58
|
-
## Architecture Pattern Guidance
|
|
59
|
-
|
|
60
|
-
- ReAct: best for exploratory tasks with uncertain path.
|
|
61
|
-
- Function-calling: best for structured deterministic flows.
|
|
62
|
-
- Hybrid (recommended): ReAct planning + typed tool execution.
|
|
63
|
-
|
|
64
|
-
## Benchmarking
|
|
65
|
-
|
|
66
|
-
Track:
|
|
67
|
-
- completion rate
|
|
68
|
-
- retries per task
|
|
69
|
-
- pass@1 and pass@3
|
|
70
|
-
- cost per successful task
|
|
71
|
-
|
|
72
|
-
## Anti-Patterns
|
|
73
|
-
|
|
74
|
-
- Too many tools with overlapping semantics.
|
|
75
|
-
- Opaque tool output with no recovery hints.
|
|
76
|
-
- Error-only output without next steps.
|
|
77
|
-
- Context overloading with irrelevant references.
|
|
@@ -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
|