# @lssm-tech/agentpack.contractspec

Canonical repository-local Claude, Codex, and agent guidance for ContractSpec consumers.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `2.0.4`
- Package path: `packages/tools/agentpack-contractspec`
- Manifest path: `packages/tools/agentpack-contractspec/package.json`
- Manifest Git blob: `43928ec4a74c65b60480b8376c74a65d483d15bc`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/agentpack.contractspec](https://lssm.co/docs/packages/agentpack.contractspec/)
- 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/tools/agentpack-contractspec)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/agentpack-contractspec/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/agentpack-contractspec/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/agentpack.contractspec.txt)

## Package metadata

```json
{
  "layer": "tools",
  "physicalArea": null,
  "primaryArea": "tooling-and-agent-delivery",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "contracts",
    "catalogKind": "agent-pack",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

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

Primary area: [CLI, authoring and agent tooling](https://lssm.co/docs/areas/tooling-and-agent-delivery/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/tools/agentpack-contractspec/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/agentpack-contractspec/README.md",
  "blobSha": "036f7e65572d4fcfdb50c7a845eb49dd2c109031",
  "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/agentpack.contractspec`

Canonical repository-local guidance for teams consuming ContractSpec packages.
It supplies marker-owned Claude Code, Codex, OpenCode, and Cursor rules, compact
catalog memory, adoption hooks, one adoption skill, and local MCP wiring.

`contractspec init` materializes this pack into the repository-local agentpacks
cache and invokes the existing agentpacks compiler. User-owned `AGENTS.md` and
`CLAUDE.md` content is preserved by agentpacks managed markers. The pack never
writes global Claude Desktop or Codex configuration.

Claude Code hooks use the Claude blocking protocol (`--host claudecode`), so an adoption denial actually blocks in Claude Code instead of surfacing as a non-blocking exit code, and an adoption review follows the session permission mode (no prompt in `bypassPermissions`/`dontAsk`, where the review is deferred and recorded; a prompt in `default`; a deny in `plan`). A workspace that has not enabled Connect (`connect.enabled`, off by default) is not prompted: the adoption hooks stay silent there. The shell hook matches both `Bash` and `PowerShell`, and `SessionStart` runs `contractspec can-help catalog status --host claudecode`, which adds one line of catalog context (version, source, freshness, content hash, counts, and the `can-help` discovery command) instead of raw JSON. These hooks need a ContractSpec CLI that supports `can-help catalog status --host` and `connect hook adoption ... --host`. The catalog memory rule loads only when package manifests or `.contractspec/**` files are read.

The adoption skill activates for capability selection, replacement, or a new public surface/dependency. It uses current catalog provenance and task-bound Connect decisions, then verifies affected consumers. Routine unrelated edits do not need an adoption ceremony.

Published rule/skill files and the materialized `contractSpecAgentPackFiles` map are one surface; `bun test src/index.test.ts` checks their parity.


## Declared capabilities

### Agentpack Contractspec

Capability ID: `package.lssm.tech.agentpack.contractspec`

Canonical repository-local Claude, Codex, and agent guidance for ContractSpec consumers.

Use cases:

- Adopt canonical repository-local claude, codex, and agent guidance for contractspec consumers

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/agentpack.contractspec package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "agentpack",
    "contractspec"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/agentpack.contractspec",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "contracts",
  "kind": "agent-pack",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    "."
  ],
  "examples": [],
  "replacements": []
}
```

## 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
[
  {
    "capabilityId": "package.lssm.tech.agentpack.contractspec",
    "from": "@lssm-tech/agentpack.contractspec",
    "symbols": []
  }
]
```

## 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/agentpack.contractspec` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/tools/agentpack-contractspec/src/index.ts); verified source file.

## Package publication metadata

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

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "package.json",
    "CHANGELOG.md",
    "README.md",
    "src",
    "tsconfig.json"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

No declarations in the inspected manifest.

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `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
{
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "lint:check": "node ../../../scripts/biome.cjs check .",
  "test": "bun test",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Agentpack Contractspec documentation](https://www.npmjs.com/package/%40lssm-tech%2Fagentpack.contractspec) — declared link; destination not verified.

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

## Existing agent-guide projection

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