# @lssm-tech/app.action-pr

GitHub Action for ContractSpec PR checks

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `4.0.4`
- Package path: `packages/apps/action-pr`
- Manifest path: `packages/apps/action-pr/package.json`
- Manifest Git blob: `6d6ee20fe5ee1e8ac1d1cb85e8d84d4bc0e3a375`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/app.action-pr](https://lssm.co/docs/packages/app.action-pr/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/action-pr)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/action-pr/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/action-pr/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/app.action-pr.txt)

## Package metadata

```json
{
  "layer": "apps",
  "physicalArea": null,
  "primaryArea": "delivery-and-infrastructure",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "solutions",
    "catalogKind": "app",
    "catalogStatus": "active",
    "adoptionMode": "operator-only",
    "stability": "stable"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Delivery, infrastructure and runtime operations](https://lssm.co/docs/areas/delivery-and-infrastructure/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/apps/action-pr/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/action-pr/README.md",
  "blobSha": "79528abc88c6649195752648041e92046eaf4c18",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# @lssm-tech/action.pr

Website: https://contractspec.io

**GitHub Action that runs ContractSpec validation checks on pull requests. Posts drift reports, validation results, and product views as PR comments.**

## What It Does

- Uses `@lssm-tech/lib.contracts-spec` for contract definitions
- Uses `@lssm-tech/bundle.workspace` for workspace analysis
- Configured via `action.yml`; no `src/` — logic lives in workspace bundle

## Usage

```yaml
name: ContractSpec PR
on: pull_request
jobs:
  contractspec:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: read
      pull-requests: write
    steps:
      - uses: actions/checkout@v6
      - uses: lssm-tech/contractspec/packages/apps/action-pr@main
        with:
          github-packages-token: ${{ secrets.CONTRACTSPEC_PACKAGES_TOKEN }}
          generate-command: 'bun contractspec generate'
```


For affected private GitHub Packages dependencies, `github-packages-token` must be a GitHub token that can read the ContractSpec packages granted to the consuming repository, bot, or GitHub App.

## Inputs

- `package-manager` (default: `bun`) — Package manager to use (bun|npm|pnpm|yarn)
- `working-directory` (default: `.`) — Working directory for running commands
- `report-mode` (default: `summary`) — Report output mode (summary|comment|both|off)
- `enable-drift` (default: `true`) — Run drift detection after generate
- `fail-on` (default: `any`) — Fail on breaking, drift, any, or never
- `generate-command` (default: `bun contractspec generate`) — Command to regenerate artifacts (required when enable-drift=true)
- `validate-command` — Override validation command
- `contracts-dir` — Directory containing contract specs
- `contracts-glob` — Glob pattern for contract specs
- `token` (default: `${{ github.token }}`) — GitHub token for PR comments
- `github-packages-token` — Optional token used to configure private GitHub Packages auth before dependency installs

## Outputs

- `drift-detected` — Whether drift was detected
- `breaking-change-detected` — Whether breaking changes were detected
- `validation-failed` — Whether validation failed

## Key Files

- `action.yml` — GitHub Action definition
- `fixtures/` — Test report data and validation fixtures
- `.contractspec-ci/contracts.json` — CI contract configuration

## Local Commands

- `bun run test` — bun test

## Recent Updates

- Replace eslint+prettier by biomejs to optimize speed
- Stability
- Standardize tool naming to underscore notation

## Notes

- Do not change `action.yml` inputs/outputs without updating downstream workflow consumers
- Fixture files are used for CI testing — keep them valid


## Declared capabilities

This manifest does not declare a capability catalogue. Assess the package using its guide, import map and source.

## Catalogue metadata

```json
{
  "family": "solutions",
  "kind": "app",
  "status": "active",
  "adoptionMode": "operator-only",
  "stability": "stable",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    "."
  ],
  "examples": [],
  "replacements": [],
  "nonAdoptableRationale": "This app is published for execution by operators, not as a reusable library dependency."
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/app.action-pr` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/action-pr/src/index.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": null,
  "files": [
    "src",
    "action.yml",
    "README.md",
    "LICENSE",
    "!**/*.test.*",
    "!**/*.spec.*"
  ],
  "publishExports": null
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/bundle.workspace](https://lssm.co/docs/packages/bundle.workspace/): `workspace:^`
- [@lssm-tech/lib.contracts-spec](https://lssm.co/docs/packages/lib.contracts-spec/): `workspace:^`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `@types/bun`: `catalog:types`
- `@types/node`: `catalog:types`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "test": "bun test"
}
```

## Declared documentation links

- [App Action Pr documentation](https://www.npmjs.com/package/%40lssm-tech%2Fapp.action-pr) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Fapp.action-pr",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/app.action-pr.txt",
  "route": "/llms/app.action-pr",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/app.action-pr.txt",
  "blobSha": "79528abc88c6649195752648041e92046eaf4c18",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
