Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-roses-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openendurance/core": patch
---

Finalize core agent guidance docs (AGENTS + Copilot instructions)
87 changes: 87 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# GitHub Copilot Instructions

## What this repo is

Shared foundational TypeScript libraries for Open Endurance Initiative (OEI)
products and platform services.

This repository is a pnpm + Turborepo monorepo with publishable npm packages
that serve as platform-layer building blocks (domain primitives, shared types,
and validation contracts). It is not a single deployable application.

**This repo has high blast radius relative to its size.** Changes to shared
packages can affect multiple OEI product repositories when dependency ranges
are updated.

## Package layout

| Package | Purpose |
| -------------------------------- | ------------------------------------------------------------- |
| `@openendurance/core` | Core domain primitives and shared types used across products. |
| `@openendurance/core-validation` | Validation package surface. |

Package source lives under `packages/<name>/src`.

Package build output lives under `packages/<name>/dist` and is generated.
Do not treat `dist` as source of truth.

## Documentation

The `docs/` tree is the durable knowledge base for this repository.

- `docs/README.md` explains documentation conventions
- `docs/TOC.md` is the canonical docs index
- `docs/adr/` stores immutable architecture decisions
- `docs/arch/` stores current-state architecture documentation
- `docs/ops/` stores operational runbooks and procedures
- `docs/generated/` is for generated artifacts only
- `docs/registry/` stores continuously maintained tracking registries
- `docs/wiki/` stores living notes and working references

## Branching and commits

- GitHub Flow: feature branches -> PR into `develop` -> `develop` -> `main`.
- Breaking changes never land directly on `main`.
- Every commit requires both a DCO sign-off and a cryptographic signature.
- If generating commits on someone's behalf, check signing config first:
`git config --get commit.gpgsign`.

## Tooling

- Package manager: `pnpm` only (`preinstall` enforces this).
- Monorepo task orchestration: `turbo`.
- Primary language: TypeScript.
- Linting and formatting are intentionally split by file type:
- JS/TS/JSON/JSONC: Biome
- Markdown/YAML: Prettier

Use repo scripts where possible:

- `pnpm lint`
- `pnpm build`
- `pnpm typecheck`
- `pnpm test`

CI lives in `.github/workflows/ci.yml` and should remain focused on repository
health checks (lint, build, typecheck, test), not deployment orchestration.

## Releases

- Changesets controls versioning and changelogs.
- Publishable packages should use npm provenance
(`publishConfig.provenance: true`) at the package level.
- Treat changes to package names, exports, publish metadata, and release
workflow behavior as sensitive.

## Editorial posture

- Prefer small, targeted edits over broad rewrites.
- Keep docs synchronized with package reality.
- If a change affects package behavior, exports, release flow, or ownership,
update docs and registries in the same work item.

## This is a public OSS repository

Apache-2.0 licensed. Contribution process, code of conduct, and security
reporting are managed at the OEI organization level and should not be
needlessly duplicated per repository.
89 changes: 88 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,90 @@
# AGENTS.md

This is the OEI Core project.
## What this repo is

Shared foundational TypeScript libraries for Open Endurance Initiative (OEI)
products and platform services.

This repository is a pnpm + Turborepo monorepo that contains publishable npm
packages used as platform-layer building blocks (domain primitives, shared
types, and validation contracts). It is not a single deployable application.

This repo has high blast radius relative to its size. Changes to shared
packages can propagate into multiple OEI product repositories the next time
they update dependency ranges.

## Package layout

| Package | Purpose |
| -------------------------------- | ------------------------------------------------------------- |
| `@openendurance/core` | Core domain primitives and shared types used across products. |
| `@openendurance/core-validation` | Validation package surface. |

Package source lives under `packages/<name>/src`.

Package build output lives under `packages/<name>/dist` and is generated.
Do not treat `dist` as source of truth.

## Documentation

The `docs/` tree is the durable project knowledge base.

- `docs/README.md` explains documentation conventions
- `docs/TOC.md` is the canonical documentation index
- `docs/adr/` stores immutable architecture decisions
- `docs/arch/` stores current-state architecture documentation
- `docs/ops/` stores operational runbooks and procedures
- `docs/generated/` is reserved for generated artifacts only
- `docs/registry/` stores continuously updated tracking registries
- `docs/wiki/` stores living notes and working references

## Branching and commits

- GitHub Flow: feature branches -> PR into `develop` -> `develop` -> `main`.
- Breaking changes do not land directly on `main`.
- Every commit requires both a DCO sign-off and a cryptographic signature.
- If generating commits on someone's behalf, verify signing config first:
`git config --get commit.gpgsign`.

## Tooling

- Package manager: `pnpm` only (`preinstall` enforces this).
- Monorepo orchestration: `turbo`.
- Primary language: TypeScript.
- Formatting/linting is intentionally split by file type:
- JS/TS/JSON/JSONC: Biome
- Markdown/YAML: Prettier
- Typical repo health commands:
- `pnpm lint`
- `pnpm build`
- `pnpm typecheck`
- `pnpm test`

CI is defined in `.github/workflows/ci.yml` and is scoped to repository health
checks (lint, build, typecheck, test). Keep CI focused and avoid coupling it
to deployment steps.

## Releases

- Changesets controls versioning and changelogs.
- Package publishing should use npm provenance (`publishConfig.provenance: true`)
at the package level for publishable packages.
- Changes to publishing metadata, release workflows, package names, exported
entrypoints, or packaged file lists should be treated as sensitive.

## This is a public OSS repository

Apache-2.0 licensed. Contribution process, code of conduct, and security
reporting are owned at the OEI organization level rather than duplicated in
each repository.

<!-- BEGIN:turborepo-agent-rules -->

# This is NOT the Turborepo you know

Turborepo configuration, task behavior, and CLI commands can vary between installed versions and may differ from your training data. Resolve the `turbo` package from this file's directory or relevant workspace; in monorepos, it may not be visible from the repository root. For example, run `node -p "require.resolve('turbo/package.json')"` from a workspace that depends on `turbo`.

Read `docs/README.md` inside that installed package first, then read the relevant pages from its `docs/` directory before changing Turborepo configuration or commands. Heed deprecation notices. These bundled docs match the installed package version and are available without network access.

This block is written and re-added by `turbo` before repository-scoped commands when an AI agent is detected. In the Turborepo source repository, its template is defined in `crates/turborepo-cli/src/cli/agent_guidance.rs`. Removing the managed block while updates are enabled means a later qualifying invocation will add it again. Set `"agentGuidance": false` in the root `turbo.json` or `turbo.jsonc` to opt out; this does not remove an existing block. Keep the block committed with your work to avoid an uncommitted change on the next agent invocation.
<!-- END:turborepo-agent-rules -->
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ Start with `TOC.md` for a navigable index of all documents.
- Update `TOC.md` whenever a document is added, removed, or renamed
- Add a `TOC.md` entry for every new registry or ADR; leave section headers present even when empty
- Each subdirectory has its own README with authorship and update guidance, including `wiki/`

1 change: 1 addition & 0 deletions docs/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Canonical entry point for OEI Core documentation. Update this file whenever a do
## Registry

- [Registry guide](./registry/README.md)
- [Core publish readiness registry](./registry/core-publish-readiness-registry.md)

## Wiki

Expand Down
6 changes: 3 additions & 3 deletions docs/ops/commit-signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ssh-keygen -t ed25519 -C "your-email@example.com" -f ~/.ssh/git_signing_key

```sh
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/git_signing_key.pub
git config --global user.signingkey ~/.ssh/git_signing_key
git config --global commit.gpgsign true
```

Expand Down Expand Up @@ -83,7 +83,7 @@ a whole branch.
commits that already have correct sign-off; this only touches signatures):

```sh
git rebase --root --exec "git commit --amend --no-edit -S"
git rebase --force-rebase --gpg-sign origin/develop
git push --force-with-lease origin <branch>
```

Expand All @@ -102,7 +102,7 @@ signed it.**
Check the raw commit object before trusting that message:

```sh
git cat-file commit HEAD | head -5
git cat-file commit HEAD | sed -n '1,/^$/p'
```

If you see a `gpgsig` line, the commit is signed. The "No signature" output
Expand Down
7 changes: 4 additions & 3 deletions docs/registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ Generated output belongs in `generated/`.

## Contents

| Document | Purpose |
| -------- | ------- |
| Document | Purpose |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [Core publish readiness registry](./core-publish-readiness-registry.md) | Tracks in-progress work to bring `core` to publish-ready parity with `config-dev` and `config-ort`. |

No registries are currently tracked here.
Additional registries may be added as new tracked concerns emerge.

## Authorship

Expand Down
45 changes: 45 additions & 0 deletions docs/registry/core-publish-readiness-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Core Publish Readiness Registry

Tracks publish-readiness work required to bring OEI Core to the same baseline used by `config-dev` and `config-ort`.

## Scope

- Repository: `core`
- Baseline references: `config-dev`, `config-ort`
- Initial source: user-provided checklist on 2026-10-20

## Status Legend

- `Not Audited`: listed but not yet verified in-repo
- `Needs Work`: verified and currently incomplete or incorrect
- `Looks Complete`: verified and appears complete (spot-check only)
- `Blocked`: cannot verify without external context or permissions

## Workstream Tracker

| ID | Workstream | Requested Check | Status | Evidence | Notes |
| ------ | -------------------------- | ---------------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| CR-001 | Governance docs | AGENTS.md completion | Looks Complete | `AGENTS.md` now contains full core-specific guidance for scope, tooling, branching, docs, and release expectations. | Spot-check complete; refine over time as repo conventions evolve. |
| CR-002 | Linting | Biome configuration correctness | Not Audited | `biome.json` enables VCS ignore-file support; `.gitignore` excludes `*.tsbuildinfo`, `coverage/`, and `dist/`. | Artifact exclusions are configured; verify remaining configuration against the `config-dev` baseline. |
| CR-003 | TypeScript | Root tsconfig correctness and npm-based shared config usage | Needs Work | `tsconfig.json` is fully local and does not extend `@openendurance/config-typescript/*`. | Refactor to extend published npm preset and keep only local overrides. |
| CR-004 | Formatting | Prettier and Jest shared config usage from npm packages | Needs Work | No `.prettierrc*` or `prettier.config.*`; no `jest.config.*`; no `@openendurance/config-prettier` / `@openendurance/config-jest` usage. | Add shared-config consumption and package dependencies where required. |
| CR-005 | Lint workflow | Split scanning between Biome and Prettier | Needs Work | Split exists (`lint:prettier` + Biome paths), but root lint wiring differs from `config-dev` canonical shape. | Standardize root lint commands and keep markdown/yaml under Prettier checks. |
| CR-006 | Packaging and release | npm publishing setup, provenance, packaged `/dist`, workflows | Needs Work | `.github/workflows/ci.yml` now exists, but no release workflow is present; `packages/core/package.json` is `private: true` and has no `publishConfig.provenance`. | Add release workflow, publishing metadata, and first-release bootstrap plan. |
| CR-007 | Dependency maintenance | Renovate configuration quality spot-check | Needs Work | `renovate.json` is close, but includes stale package match (`@types/lodash`) not present in repo. | Prune stale rules and validate grouping/automerge intent against current deps. |
| CR-008 | Task orchestration | Turbo configuration spot-check at root and package levels | Needs Work | Root `turbo.json` includes boundaries/tags not reflected in package tags; package tag is `core`. | Reconcile boundary taxonomy and task model to intended enforcement. |
| CR-009 | Package metadata | package.json completeness per package and root | Needs Work | `packages/core-validation` has no `package.json`; `packages/core/package.json` is not publish-ready (`private`, `UNLICENSED`, missing publish settings). | Finalize publishable metadata for each package and align root/package responsibilities. |
| CR-010 | Documentation | Root README and package README completeness | Needs Work | Root `README.md` includes incorrect badge/repo references (`openendurance/fkt`) and links to missing files; package READMEs are empty. | Correct root links/badges and add package-level install/usage documentation. |
| CR-011 | Agent guidance | Add `.github/copilot-instructions.md` synthesized from AGENTS guidance | Looks Complete | `.github/copilot-instructions.md` now exists with core-specific repo scope, tooling, branching, release, and editorial guidance aligned to `AGENTS.md`. | Keep synchronized with `AGENTS.md` as conventions evolve. |
| CR-012 | Ownership model | CODEOWNERS granularity using org groups | Needs Work | `CODEOWNERS` has only a single wildcard owner mapping. | Replace with layered, path-specific ownership model similar to `config-dev`. |
| CR-013 | License compliance CI | Track migration of license scanning workflow to ORT-based checks | Needs Work | `.github/workflows/ci.yml` is present but no ORT/license-compliance workflow is defined in `.github/workflows/`. | Add explicit ORT license-compliance workflow and policy source pinning strategy. |
| CR-014 | Publish artifact hardening | Ensure `dist` package contents are deterministic and source-aligned | Needs Work | `packages/core/dist/` contains files not present in `packages/core/src/` (e.g., `oeiEntityMetadata.*`), indicating stale build output risk. | Add clean/prepack guardrails and verify publish artifact contract before first release. |

## Audit Log

| Date | Change | Author |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| 2026-10-20 | Initialized registry from user-provided readiness list. | Copilot |
| 2026-10-20 | Completed audit of listed checklist items; all items remain open and require follow-up work. | Copilot |
| 2026-10-20 | Added approved additional findings: ORT license-compliance workflow tracking and publish artifact hardening; excluded commit-history remediation tracking per operator direction. | Copilot |
| 2026-10-20 | Completed CR-001 by replacing placeholder `AGENTS.md` with a core-specific guidance document; marked CR-001 as `Looks Complete`. | Copilot |
| 2026-10-20 | Completed CR-011 by adding `.github/copilot-instructions.md` synthesized from `AGENTS.md`; marked CR-011 as `Looks Complete`. | Copilot |
1 change: 0 additions & 1 deletion docs/wiki/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ Do not reuse or renumber existing values.
## Update Contract

Add and maintain wiki content here as it is authored. Follow the naming above, and update `TOC.md` when new wiki pages are introduced.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"format:prettier": "pnpm exec prettier --write \"**/*.{md,yml,yaml}\"",
"lint": "pnpm run lint:root && pnpm run lint:prettier && pnpm turbo run lint",
"lint:prettier": "pnpm exec prettier --check \"**/*.{md,yml,yaml}\"",
"lint:root": "pnpm exec biome lint --files-ignore-unknown $(find . -maxdepth 1 -type f -print)",
"lint:root": "pnpm exec prettier --check package.json biome.json tsconfig.json turbo.json renovate.json lint-staged.config.mjs",
Comment thread
kcargile marked this conversation as resolved.
Resolved
"pre-commit": "lint-staged",
"preinstall": "npx only-allow pnpm",
"prepare": "husky",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:ci": "pnpm build",
"clean": "rm -rf .turbo coverage dist node_modules *.tsbuildinfo",
"lint": "pnpm exec biome lint",
"test": "NODE_NO_WARNINGS=1 jest",
"test": "NODE_NO_WARNINGS=1 jest --passWithNoTests",
"typecheck": "tsc --noEmit",
"watch": "tsc -w"
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
packages:
- "apps/*"
- "packages/*"
- "apps/*"
- "packages/*"
allowBuilds:
'@parcel/watcher': true
protobufjs: true
unrs-resolver: true
"@parcel/watcher": true
protobufjs: true
unrs-resolver: true
Loading