Claude Cursor GitHub Copilot Skill

resolving-stack-commands

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 h

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download sebastiendegodez-skraft-plugin-plugins_skraft-framework_skills_resolving-stack-commands-c6117c6.zip · 2 KB

Install

skills CLI npx skills add https://github.com/SebastienDegodez/skraft-plugin/tree/main/plugins/skraft-framework/skills/resolving-stack-commands
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install sebastiendegodez-skraft-plugin@llmmart
Git git clone https://github.com/SebastienDegodez/skraft-plugin.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole sebastiendegodez/skraft-plugin collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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.

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:

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.
<!-- 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} |
| 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.
Files (skraft-plugin)
  • SKILL.md 4.7 KB
    ---
    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.
    
    ## 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} |
    | 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.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.