> ## Documentation Index
> Fetch the complete documentation index at: https://gump.top/sdlc-harness-docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment checks and session close

> Configure project-level commands and produce a trustworthy handoff at the end of each Agent session.

Feature verification checks the behavior of a specific feature. Environment commands check whether the project can be installed, built, run, or subjected to end-to-end checks. They serve different purposes.

## Configure project commands

Configure commands as needed in `harness.config.json`:

```json theme={null}
{
  "commands": {
    "bootstrap": "npm ci",
    "start": "npm run dev",
    "verify": "npm test && npm run build",
    "e2e": "npm run test:e2e",
    "health": "curl --fail http://localhost:3000/health",
    "cleanup": "npm run stop"
  }
}
```

Every key is optional. The current CLI runs configured commands in `bootstrap`, `verify`, `e2e`, and `health` order during `env check`, stopping at the first failure. `start` and `cleanup` document workflow and project runtime conventions; `env check` does not automatically orchestrate them as background processes.

## List and run checks

```bash theme={null}
npx @caesarlo/sdlc-harness env
npx @caesarlo/sdlc-harness env check
```

Options: [List environment commands](/sdlc-harness-docs/reference/command-environment#env) · [Run environment checks](/sdlc-harness-docs/reference/command-environment#env-check)

When no commands are configured, `env check` reports that there is nothing to check and exits successfully. Once configured, each item shows the actual command, PASS/FAIL result, and exit code.

## Close a session

```bash theme={null}
npx @caesarlo/sdlc-harness session close
```

[See the `session close` command →](/sdlc-harness-docs/reference/command-environment#session-close)

This command:

1. Runs repository-level `validate`.
2. Runs the configured environment checks.
3. Summarizes the current commit and the number of uncommitted files.
4. Reports feature status and suggested next steps.

Validation or environment-check failures produce a nonzero exit code. Uncommitted changes are reported explicitly but are not failures by themselves, because a session may intentionally leave uncommitted work for handoff.

<Note>
  `session close` is a read-only report. It does not commit automatically, change feature state, release a claim, or delete a workspace. Perform those actions as appropriate based on the report.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.