لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI

Resolving Stack Commands (stack-agnostic)

آزاد تازه‌وارد تاییدشده امن

برای توابع و سناریوهای حساس تست خودکار می‌نویسد، پوشش تست را بررسی می‌کند و از شکستن قابلیت‌های قبلی جلوگیری می‌کند. (شامل ۱۰ گام عملی · سازگار با Claude Code و GitHub Copilot).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: resolving-stack-commands
description: Use whenever an agent must run a toolchain command (build, test) and needs the concrete invocation. Resolves build/test commands from the detected stack via the `quality-gates-<tech>` adapters; mutation is never resolved, the developer runs it through /skraft-mutation. No agent hardcodes `dotnet test`, `dotnet build`, or any toolchain command. Loaded by acceptance-designer and software-engineer.
---

# Resolving Stack Commands (stack-agnostic)

The single place that maps a repository's stack to its concrete toolchain
commands (build, test, lint). No agent and no workflow step may hardcode a
command (`dotnet test`, `dotnet build`, `mvn test`, `pytest`, ...). They resolve
it here instead.

## Why this exists

The pipeline must run with .NET today and other stacks tomorrow (Java planned,
not yet supported). If each agent embeds `dotnet test`, swapping or adding a
stack means editing every agent. Centralizing the mapping keeps agents
tech-agnostic: they say "build the solution" / "run the test suite", this skill
says how.

## Detection → adapter

Detect the stack from markers at the repo root, then resolve the concrete
commands from the matching `quality-gates-<tech>` adapter (the adapter owns the
build / test commands and their evidence mapping). Architecture, coverage and mutation commands
are never resolved here: the pipeline never runs them, the project's CI does, and the developer
gives the mutation command to `/skraft-mutation`.


| Stack | Detection markers | Adapter | Status |
|---|---|---|---|
| .NET | `*.sln`, `*.slnx`, `**/*.csproj`, `Directory.Packages.props` | `quality-gates-dotnet` (`dotnet build` / `dotnet test`) | supported |
| TypeScript tested with Vitest (React front end, Node package) | A `package.json` whose devDependencies hold `vitest` | `quality-gates-typescript` (`{bin:vitest} run` / `{bin:typescript:tsc} --noEmit` / `{bin:eslint} .`, run from the package's `node_modules`) | supported; uninstalled dependencies are a blocker |
| Node JavaScript | A `package.json` without `vitest` | `quality-gates-javascript`: checked-in package scripts and native Node tests | narrow support |
| TypeScript or browser code under another test runner | Jest, Mocha, Karma or Jasmine without Vitest | No matching supported adapter | NOT SUPPORTED |
| Python | `pyproject.toml` | `quality-gates-python` (`{python} -m pytest` / `{python} -m compileall`, run from `.venv`) | supported; no `.venv` and no `--python` is a blocker |
| Java | `pom.xml`, `build.gradle`, `build.gradle.kts` | _(quality-gates-java not yet provided)_ | NOT SUPPORTED |

Every `package.json` (outside `node_modules`), every `pyproject.toml` and every .NET solution in the repository is a stack to resolve; a front end in `web/` is a TypeScript stack beside the backend's. If multiple stacks coexist, run each adapter and aggregate results; an unsupported one blocks the whole delivery, even when another stack passes.

<!-- ‹guest · 2026-11-25› -->
## Unsupported stack → stop, never guess

If the detected stack has no `quality-gates-<tech>` adapter, STOP and emit a
structured blocker. Never invent a command:

```yaml
status: blocked
type: unsupported_stack
message: No quality-gates adapter for the detected stack
context:
  stack: java
  markers:
    - pom.xml
  needed: test
```

## Stack-commands file (resolve once per pipeline)

Inside a SKRAFT pipeline, resolved commands live in one file every later agent reads:
`.copilot-tracking/skraft-plans/{projectSlug}/details/{date}/stack-commands.md`.

- **Read before resolving.** When the handoff block lists the file, take the commands
  from it and do not run the detection above.
- **Resolve only when** the file is absent, a command in it fails to start or to build
  (a test that fails on its assertion is not a command failure), or the stack markers
  changed since the recorded revision.
- **Write:** the first agent that resolves writes the whole file; a later agent that
  re-resolves rewrites only the failing rows and the revision line.
- Never record credentials, tokens or environment-variable values in it.

```markdown
<!-- markdownlint-disable-file -->
# Stack commands
- Stack: {stack} — adapter `quality-gates-{tech}`
- Resolved at: {output of git rev-parse HEAD}

| Purpose | Command | Working directory |
|---|---|---|
| build | {command} | {dir} |
| test — full suite | {command} | {dir} |
<!-- ‹guest · 2026-11-25› -->
| test — one test (filter placeholder `{TestName}`) | {command} | {dir} |
```

## Contract for callers

- Resolve the command (build / test) from the matching `quality-gates-<tech>` adapter; do not embed it in workflow steps.
- Run it, then assert on its output (build succeeds, RED on a business assertion, GREEN gate, etc.).
- Adding a stack = add a `quality-gates-<tech>` adapter and a row here, with zero edits to agents.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
کیفیت کد و تست
✦ Pro

REA CI and tests audit

«REA CI and tests audit» دستورالعمل دقیقی برای «نوشتن و اجرای تست خودکار» در اختیار دستیار هوش مصنوعی می‌گذارد تا نتیجه…

⚡ /rea-ci-tests-audit SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۱/۱۰۰ ★ ۴۷۴,۰۸۴
کیفیت کد و تست
✦ Pro

Finishing a Development Branch

این مهارت با نام «Finishing a Development Branch» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی …

⚡ /finishing-a-development-branch SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Code Review Reception

اگر روی کیفیت کد و تست کار می‌کنید، «Code Review Reception» بخشی از کار را از دوش شما برمی‌دارد: «بازنویسی و تمیزسازی ک…

⚡ /receiving-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Requesting Code Review

برای کارهای کیفیت کد و تست، «Requesting Code Review» یک راهنمای کوتاه و روشن است: مسیر «مدیریت هوشمند حافظه و کانتکست» …

⚡ /requesting-code-review SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Test-Driven Development (TDD)

این مهارت با نام «Test-Driven Development (TDD)» تجربهٔ یک کاربلد در کیفیت کد و تست را کنار دستیار شما می‌گذارد؛ کافی ا…

⚡ /test-driven-development SKILL.md
Claude / Claude Code
۹۴/۱۰۰ ★ ۳۲۴,۲۹۰
کیفیت کد و تست
✦ Pro

Skill Creator

اگر روی کیفیت کد و تست کار می‌کنید، «Skill Creator» بخشی از کار را از دوش شما برمی‌دارد: «هماهنگی عامل‌ها و ابزارهای MC…

⚡ /skill-creator SKILL.md
Claude / Claude Code
۹۲/۱۰۰ ★ ۱۹۸,۷۹۴