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
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Bug report
description: Report a reproducible problem with Preceptor
title: "[Bug]: "
body:
- type: markdown
attributes:
value: Report security issues privately using SECURITY.md. Use synthetic data only.
- type: input
id: version
attributes:
label: Version or commit
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Minimal reproduction
description: Include Node.js version and relevant adapter configuration without secrets.
validations:
required: true
- type: textarea
id: behavior
attributes:
label: Expected and actual behavior
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security policy
url: https://github.com/0xbuffdev/preceptor/security/policy
about: Read the reporting instructions before disclosing a vulnerability.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Feature request
description: Propose an improvement to the public library
title: "[Proposal]: "
body:
- type: textarea
id: problem
attributes:
label: Problem and use case
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed behavior
description: Describe the interface, alternatives and host responsibilities.
validations:
required: true
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Purpose

Link the issue or proposal and describe the intended behavior.

## Changes

## Verification

Record the tested commit, commands, results and anything not run. Include relevant negative and security tests.

## Checklist

- [ ] No learner records, credentials or protected assessment material
- [ ] Public contracts, examples and documentation match implemented behavior
- [ ] Existing quality and offline package checks are preserved
- [ ] No unauthorized publication, tag, deployment or merge
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ jobs:
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- run: git diff --exit-code -- pnpm-lock.yaml
- name: Test release preflight with synthetic inputs
if: matrix.os == 'ubuntu-latest'
run: pnpm check:release-preflight
- run: pnpm check
env:
PRECEPTOR_CANDIDATE: "1"
PRECEPTOR_CANDIDATE_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/upload-artifact@v4
with:
name: preceptor-candidate-${{ matrix.os }}-${{ github.event.pull_request.head.sha || github.sha }}
name: preceptor-candidate-${{ matrix.os }}-${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
path: .candidate/
include-hidden-files: true
if-no-files-found: error
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Stage npm package

on:
workflow_dispatch:
inputs:
quality_run_id:
description: Successful main quality run ID
required: true
type: string

permissions: {}

concurrency:
group: preceptor-npm-stage
cancel-in-progress: false

jobs:
stage:
if: github.repository == '0xbuffdev/preceptor' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 10
environment: npm-stage
permissions:
contents: read
actions: read
id-token: write
steps:
- name: Check out exact staging commit
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
ref: ${{ github.sha }}
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24.22.3
package-manager-cache: false

- name: Verify and stage exact approved archive
env:
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ inputs.quality_run_id }}
APPROVED_RUN_ID: ${{ vars.PRECEPTOR_STAGE_RUN_ID }}
APPROVED_SHA: ${{ vars.PRECEPTOR_STAGE_COMMIT }}
APPROVED_DIGEST: ${{ vars.PRECEPTOR_STAGE_SHA256 }}
NPM_CONFIG_REGISTRY: https://registry.npmjs.org/
run: bash scripts/stage-release.sh
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Repository-wide instructions for working on Preceptor.

Preceptor is a portable instructional engine. It selects teaching strategies and coordinates optional model assistance, scoped tools and learner memory. Its outputs are advisory; formal academic authority belongs to the host.

- Before changing behavior, read the [Preceptor specification](https://github.com/0xbuffdev/context/blob/main/repos/preceptor/specs/0001-instruction-engine.md), [ADR](https://github.com/0xbuffdev/context/blob/main/repos/preceptor/adr/0001-independent-instruction.md) and [implementation tickets](https://github.com/0xbuffdev/context/blob/main/repos/preceptor/tickets.md). Check acceptance status, dependencies and required tests.
- Before changing behavior, read the [Preceptor specification](https://github.com/0xbuffdev/context/blob/main/repos/preceptor/specs/0001-instruction-engine.md), [ADR](https://github.com/0xbuffdev/context/blob/main/repos/preceptor/adr/0001-independent-instruction.md) and [implementation tickets](https://github.com/0xbuffdev/context/blob/main/repos/preceptor/tickets.md). These maintainer planning documents may require organization access. Check acceptance status, dependencies and required tests; external contributors should use the public guides and discuss contract changes with maintainers.
- Accepted contracts govern intended behavior; source, tests and package exports establish implemented behavior. Report contradictions and missing approvals. Do not implement proposed amendments as though accepted.
- Keep the library independently useful without a model, network, account, database, framework, OEE curriculum, Assay, Retention or MemoFS. Inject optional providers. Do not import private application code or introduce mandatory provider SDKs, telemetry or host services.
- Keep public documentation about implemented behavior and reader tasks. Track ticket IDs and requirement coverage in the canonical tracker and PRs, not user-facing guides.
Expand Down
15 changes: 9 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Changelog

All notable changes to Preceptor will be documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Notable changes to Preceptor are recorded here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the package uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Standalone ESM package foundation, strict TypeScript configuration, Biome, Vitest and tsdown.
- Quality-only CI and independent offline packed-package checks.
- Apache-2.0 license and copyright notices.
- Deterministic model-free instruction planning, closed capability checks and assessment-lock guidance.
- Bounded session execution, optional injected model and lesson/practice ports, sequential tool dispatch, cancellation and provenance.
- Deterministic model-free instructional policy with five modes, fixed teaching prompts and default-deny capability filtering.
- Bounded advisory sessions with optional model, lesson and practice adapters, exact lesson revision checks, sequential typed tool dispatch and attributed results.
- Resource limits for UTF-8 input, context, responses and aggregate output, tool attempts and model requests. Cancellation and a monotonic deadline stop further dispatch and discard late results.
- Scoped narrative memory contracts for recall, creation, revision-bound updates and forget proposals, with host-owned consent, replay suppression and lifecycle interfaces.
- Pure projection of authorized committed academic-result summaries, including duplicate delivery, corrections, revocation, conflict withholding and read-only session context.
- Node.js 24+ ESM and TypeScript declarations, Apache-2.0 licensing, zero runtime dependencies, integration examples and independent offline packed-consumer checks.

The first release is planned as `0.0.1`. The release date and version heading will be recorded when the publication candidate is approved.
5 changes: 5 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Code of conduct

Discuss technical issues respectfully. Critique code and ideas, not people. Harassment, threats, abuse, disclosure of personal data and posting confidential learner or assessment material are not permitted.

Maintainers may moderate issues, comments and reviews that violate these expectations. Use GitHub's reporting features for platform abuse and the [security policy](SECURITY.md) for vulnerability reports.
14 changes: 10 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# Contributing

Preceptor is under development. Read [AGENTS.md](AGENTS.md) before making changes.
Preceptor welcomes reproducible bug reports, documentation corrections and technical proposals. Open an issue before changing a public contract or the architecture. Follow the [security policy](SECURITY.md) for confidential reports.

Use Node.js 24 or later, pnpm 11.2.2 and the versions locked in the repository. From the root:
## Development

Install Node.js 24+ and pnpm 11.2.2, then run:

```sh
corepack enable
pnpm install --frozen-lockfile
pnpm check
```

Use `pnpm test` for the full test suite, `pnpm format` to format files and `pnpm check:style` for non-mutating style checks. The full check also builds the package and installs its local archive in an independent offline consumer.
Use a focused branch and add positive and negative tests for changed behavior. The full check runs typechecking, Biome, Vitest, the build and offline installed-package tests. See the [development guide](docs/development.md) and [repository instructions](AGENTS.md).

## Pull requests

Explain the intended behavior, relevant issue, and the checks you ran. Record the tested commit and anything not run. Use synthetic learner data; preserve the independent, zero-runtime-dependency library and keep confidential material out of public changes. Public contract changes require maintainer approval.

Open focused pull requests with the approved scope, tests and any outstanding limitations. Use synthetic learner data in tests. Contributions must comply with [Apache-2.0](LICENSE). Do not transfer private code or contribute material without confirmed rights.
Contributions intentionally submitted for inclusion follow Section 5 of the [Apache License 2.0](LICENSE), unless explicitly stated otherwise or covered by a separate agreement. Do not submit material you lack permission to distribute.
Loading
Loading