# Nisaba Domain

Nisaba owns scholarly text analysis, manuscript workflows, ancient-language
processing, collation, annotation, critical-edition production, and
cross-tradition research tooling in the Oshun platform.

## Responsibilities

- Manuscript, witness, folio, and corpus management
- Text collation, variant classification, and critical apparatus generation
- Scholarly annotation, commentary, and edition workflows
- Canonical reference resolution and passage retrieval
- Ancient-language processing, translation comparison, and concept mapping
- Research workspace APIs, SDKs, and CI/CD validation for philology packages

## Primary References

| Document                                           | Purpose                                                                                                      |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [Developer Guide](nisaba-developer-guide.md)       | Architecture, package layering, extension points, and testing guidance                                       |
| [Scholar User Guide](nisaba-scholar-user-guide.md) | Researcher-facing workflow guide                                                                             |
| [OpenAPI Specification](nisaba-openapi-spec.yaml)  | REST contract for scholarly text analysis APIs                                                               |
| [CI/CD Pipeline](nisaba-ci-cd-pipeline.yaml)       | Documentation for `.github/workflows/nisaba-ci.yml` build, lint, test, TEI validation, and performance gates |

## Implementation Areas

- `libs/nisaba/` contains the domain libraries described by the developer guide.
- `docs/domains/nisaba/nisaba-openapi-spec.yaml` is the canonical domain API
  contract until it is promoted into the shared `@oshun/openapi` registry.

## Verification

Run the affected Nisaba build, lint, and test targets before changing domain
libraries:

```bash
pnpm nx affected --target=build --base=origin/main --head=HEAD
pnpm nx affected --target=lint --base=origin/main --head=HEAD
pnpm nx affected --target=test --base=origin/main --head=HEAD
```
