[issues/650] Build /tcs-definition skill and tc-implement agent#655
Conversation
## Summary Two pieces of internal tooling that automate QA test case workflow end-to-end. `tcs-definition` (skill) drafts QA YAML entries during issue planning via a targeted interview loop. `tc-implement` (agent) writes integration tests one TC ID at a time during implementation, tracing the production code path, extending helpers, and auto-updating the YAML. Together they replace the ad-hoc manual workflow and the deleted `plan-integration-test` agent. ## Changes - New: `.claude/skills/tcs-definition/SKILL.md` — interview-driven skill with two-phase flow (draft into a note, then approve and auto-insert into `qa-test-cases.yaml` with stash-based rollback). Shared schema contract with CLAUDE.md QA rules. - New: `.claude/agents/tc-implement.md` — one TC per invocation. Traces production code, resolves target file by neighbor TC-ID lookup, extends `helpers/` rather than inlining, runs the matching `pnpm test:release:*` command, and gives one retry on failure. Encodes the two conventions from issue #650 thread (default-empty framework expectations, prefer end-to-end over middle-layer log-scraping). - Delete: `.claude/agents/plan-integration-test.md` — superseded by tc-implement; all trace tables, assertion shapes, and field references carried over. - Update: `.claude/agents/README.md` — swap plan-integration-test for tc-implement, add Related Skills section - Update: `CLAUDE.md` — release-test command reference moved to tc-implement.md (keeps quick-reference shortcut); T011/T016/T017 still live in CLAUDE.md with the agent file repeating them for self-containment ## Test Plan - [x] All existing tests pass (2060 tests, 118 suites, 98.28% coverage) - [ ] New tests: none needed (agent and skill are prompt files; reviewed as staged diff) - [ ] Manual testing: run `/tcs-definition` on an active issue branch to exercise the interview loop, then invoke `tc-implement` on a draft TC ID ## Related - Closes #650
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/skills/tcs-definition/SKILL.md:
- Line 123: The tcs-definition skill at line 123 references the issue-context
skill's target-path.sh script, but this dependency is missing from the
repository and undocumented. Choose one approach to fix this: either create the
missing issue-context skill in ./.claude/skills/ directory with the required
target-path.sh script, or add a clear section to the SKILL.md file documenting
issue-context as an external dependency with instructions for installation and
setup, or replace the external script call with an alternative mechanism
implemented directly within the tcs-definition skill itself that does not depend
on the missing issue-context resolver.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4d50d53f-b026-4725-92ef-12265f19d0d0
📒 Files selected for processing (5)
.claude/agents/README.md.claude/agents/plan-integration-test.md.claude/agents/tc-implement.md.claude/skills/tcs-definition/SKILL.mdCLAUDE.md
💤 Files with no reviewable changes (1)
- .claude/agents/plan-integration-test.md
| Use the issue-context resolver to compute the next available path: | ||
|
|
||
| ```bash | ||
| ~/.claude/skills/issue-context/target-path.sh --type notes --description "tcs-definition" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the target-path.sh helper script exists and is callable.
find . -name "target-path.sh" -type fRepository: couimet/rangeLink
Length of output: 43
🏁 Script executed:
find . -name "SKILL.md" -type f -path "*tcs-definition*"Repository: couimet/rangeLink
Length of output: 102
🏁 Script executed:
cat -n "./.claude/skills/tcs-definition/SKILL.md" | sed -n '110,135p'Repository: couimet/rangeLink
Length of output: 1134
🏁 Script executed:
find ./.claude/skills -type d -name "issue-context"Repository: couimet/rangeLink
Length of output: 43
🏁 Script executed:
ls -la ./.claude/skills/ 2>/dev/null | head -20Repository: couimet/rangeLink
Length of output: 477
🏁 Script executed:
find ./.claude -name "README*" -o -name "*.md" | head -20Repository: couimet/rangeLink
Length of output: 355
🏁 Script executed:
cat ./.claude/skills/tcs-definition/SKILL.md | grep -i "dependency\|require\|issue-context" -B 2 -A 2Repository: couimet/rangeLink
Length of output: 1066
Document or provide the issue-context resolver dependency.
The tcs-definition skill references ~/.claude/skills/issue-context/target-path.sh at line 123, but the issue-context skill does not exist in this repository and is not documented as an external dependency. Either add the missing issue-context skill to ./.claude/skills/, document it as an external requirement with setup instructions, or provide an alternative path resolution mechanism within the skill itself.
🧰 Tools
🪛 SkillSpector (2.1.1)
[warning] 116: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/skills/tcs-definition/SKILL.md at line 123, The tcs-definition skill
at line 123 references the issue-context skill's target-path.sh script, but this
dependency is missing from the repository and undocumented. Choose one approach
to fix this: either create the missing issue-context skill in ./.claude/skills/
directory with the required target-path.sh script, or add a clear section to the
SKILL.md file documenting issue-context as an external dependency with
instructions for installation and setup, or replace the external script call
with an alternative mechanism implemented directly within the tcs-definition
skill itself that does not depend on the missing issue-context resolver.
Replace wide-open `Bash` with the four specific patterns the skill actually invokes (git branch, gh issue view, git diff, issue-context resolver). Matches the convention used by sibling skills like `commit-msg`, `scratchpad`, and `start-issue`. Ignored Feedback: - CodeRabbit flagged `~/.claude/skills/issue-context/target-path.sh` at SKILL.md:123 as a missing dependency: the resolver is a user-global Claude skill that exists at the canonical path and is already referenced the same way by `/scratchpad`, `/question`, and `/commit-msg`. The scanner only walked the project-local `.claude/skills/` directory. Documenting a user-global skill inside one project skill would duplicate context that belongs in the global skill index. Ref: #655 (review)
✅ CI / Integration Tests (with overrides) — run summaryDuration: 0m 54s QA TC IDs: 2 exercised across 0 features Report: View run & artifacts Reproduce locally: Feature breakdown
|
✅ CI / Integration Tests (automated) — run summaryDuration: 11m 14s QA TC IDs: 163 exercised across 0 features Report: View run & artifacts Reproduce locally: Feature breakdown
|
✅ CI / Integration Tests (with extensions) — run summaryDuration: 12m 52s Unit tests: Ran in separate Test & Validate job QA TC IDs: 195 exercised across 0 features Report: View run & artifacts Reproduce locally: Feature breakdown
|
Summary
Two pieces of internal tooling that automate QA test case workflow end-to-end.
tcs-definition(skill) drafts QA YAML entries during issue planning via a targeted interview loop.tc-implement(agent) writes integration tests one TC ID at a time during implementation, tracing the production code path, extending helpers, and auto-updating the YAML. Together they replace the ad-hoc manual workflow and the deletedplan-integration-testagent.Changes
.claude/skills/tcs-definition/SKILL.md— interview-driven skill with two-phase flow (draft into a note, then approve and auto-insert intoqa-test-cases.yamlwith stash-based rollback). Shared schema contract with CLAUDE.md QA rules..claude/agents/tc-implement.md— one TC per invocation. Traces production code, resolves target file by neighbor TC-ID lookup, extendshelpers/rather than inlining, runs the matchingpnpm test:release:*command, and gives one retry on failure. Encodes the two conventions from issue Build custom agent for integration tests? #650 thread (default-empty framework expectations, prefer end-to-end over middle-layer log-scraping)..claude/agents/plan-integration-test.md— superseded by tc-implement; all trace tables, assertion shapes, and field references carried over..claude/agents/README.md— swap plan-integration-test for tc-implement, add Related Skills sectionCLAUDE.md— release-test command reference moved to tc-implement.md (keeps quick-reference shortcut); T011/T016/T017 still live in CLAUDE.md with the agent file repeating them for self-containmentTest Plan
/tcs-definitionon an active issue branch to exercise the interview loop, then invoketc-implementon a draft TC IDRelated
Summary by CodeRabbit