Skip to content

[issues/650] Build /tcs-definition skill and tc-implement agent#655

Merged
couimet merged 2 commits into
mainfrom
issues/650
Jun 16, 2026
Merged

[issues/650] Build /tcs-definition skill and tc-implement agent#655
couimet merged 2 commits into
mainfrom
issues/650

Conversation

@couimet

@couimet couimet commented Jun 15, 2026

Copy link
Copy Markdown
Owner

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 Build custom agent for integration tests? #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

  • 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

Summary by CodeRabbit

  • Documentation
    • Updated testing and quality assurance process documentation to improve development workflows and test consistency standards.
    • Added new guidance for automated integration test implementation and test case definition workflows.

## 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
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Repository owner deleted a comment from coderabbitai Bot Jun 16, 2026
@couimet

couimet commented Jun 16, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 68084a5 and a1d7aea.

📒 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.md
  • CLAUDE.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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the target-path.sh helper script exists and is callable.
find . -name "target-path.sh" -type f

Repository: 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 -20

Repository: couimet/rangeLink

Length of output: 477


🏁 Script executed:

find ./.claude -name "README*" -o -name "*.md" | head -20

Repository: couimet/rangeLink

Length of output: 355


🏁 Script executed:

cat ./.claude/skills/tcs-definition/SKILL.md | grep -i "dependency\|require\|issue-context" -B 2 -A 2

Repository: 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)
@github-actions

Copy link
Copy Markdown

✅ CI / Integration Tests (with overrides) — run summary

Duration: 0m 54s

QA TC IDs: 2 exercised across 0 features

Report: View run & artifacts

Reproduce locally: ./scripts/run-integration-tests.sh --label needs-override --exclude-label cursor --exclude-assisted

Feature breakdown
Feature TCs IDs

@github-actions

Copy link
Copy Markdown

✅ CI / Integration Tests (automated) — run summary

Duration: 11m 14s

QA TC IDs: 163 exercised across 0 features

Report: View run & artifacts

Reproduce locally: ./scripts/run-integration-tests.sh --exclude-label requires-extensions --exclude-label cursor --automated

Feature breakdown
Feature TCs IDs

@github-actions

Copy link
Copy Markdown

✅ CI / Integration Tests (with extensions) — run summary

Duration: 12m 52s

Unit tests: Ran in separate Test & Validate job

QA TC IDs: 195 exercised across 0 features

Report: View run & artifacts

Reproduce locally: ./scripts/run-integration-tests.sh --exclude-label cursor --exclude-label needs-override --exclude-assisted

Feature breakdown
Feature TCs IDs

Repository owner deleted a comment from coderabbitai Bot Jun 16, 2026
@couimet couimet merged commit 51f3e3e into main Jun 16, 2026
7 checks passed
@couimet couimet deleted the issues/650 branch June 16, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build custom agent for integration tests?

1 participant