Sprint 31 ceremony (extract): IL v1 package#5
Merged
Merged
Conversation
Implements buildExtractionPrompt() in both TypeScript and Python. - 17 capability prompt fragments (prompts/v1/*.txt) per locked spec - Shared preamble/postamble with Mustache-style template variables - 3 profile files (minimal/standard/full) as capability set shorthand - Capability dependency closure (e.g., relations auto-includes entity_ids) - Canonical composition order: primary objects, modifiers, cross-cutting - Capability-specific rules appended before the text block - Profile add/remove API for fine-grained customization - resolve_capabilities() exposed for introspection - 53 new Python tests, all 109 tests passing - TypeScript type-checks clean Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address Atlas review findings on extract#2: - Validate capability names upfront; unknown capabilities raise ValueError before any file IO (no more raw FileNotFoundError on bogus.txt) - Fix template double-escaping: caller-controlled values (categories, source_type) are no longer recursively expanded through the template engine. Values are treated as opaque strings. - Reject empty capability sets explicitly - Reject modifier-only capability sets (assertion_signals/evidence_anchoring without entities, goals, or facts) - Update PROMPTS_DIR to resolve from installed package path first, falling back to repo root for development Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: composable prompt system (recall#794)
- CI workflow: Python 3.10-3.13 test matrix + TypeScript type-check - npm publish workflow: triggered on GitHub release, provenance enabled - PyPI publish workflow: trusted publishing via gh-action-pypi-publish - package.json: publishConfig with public access and provenance - pyproject.toml: classifiers, schema URL, documentation URL - README: package overview, quick start (TS + Python), pipeline docs Trusted publishing setup (npm token, PyPI environment) is a manual step. Ref synapt-dev/recall#795 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review findings on extract#3: - Fix pyproject.toml readme path: create packages/python/README.md instead of referencing ../../README.md which breaks setuptools - Remove PEP 639-incompatible license classifier - Add prompt asset bundling: npm prepack copies prompts/ into package, Python pyproject.toml declares package-data for prompts/** - Add build-python CI job to catch build failures before publish - SHA-pin all GitHub Actions (actions/checkout, setup-node, setup-python, gh-action-pypi-publish) for supply-chain hardening - Add .gitignore entries for build-time prompt copies npm still uses NPM_TOKEN for auth; full OIDC trusted publishing requires linking the package on npmjs.com (Layne setup). PyPI uses OIDC via gh-action-pypi-publish (no secrets needed, already configured). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: publish prep for npm + PyPI (recall#795)
Canonical path is synapt.dev/schemas/extract/v1.json, not extraction/. Updated directory name, $id field, and all references in README, Python README, pyproject.toml, and test fixtures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: rename schemas/extraction/ to schemas/extract/ per locked spec
Remove NPM_TOKEN secret now that trusted publishing is configured on npmjs.com (synapt-dev/extract → publish-npm.yml). Subsequent releases authenticate via GitHub OIDC token exchange with Sigstore provenance attestations. No long-lived secrets needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. TS profile validation: loadProfile() now checks file existence before readFileSync, throwing clean "Unknown profile" error instead of raw ENOENT. Matches Python behavior. 2. produced_by schema tightening: JSON Schema now includes pattern constraint matching the URI format validators already enforce. Third-party JSON Schema validators will now agree with our package validators. 3. extracted_at date-time strictness: both validators now require full ISO 8601 date-time (with T component), rejecting date-only strings. Matches the schema's "format": "date-time" constraint. Closes the drift where third-party JSON Schema validators would give different verdicts than @synapt-dev/extract validators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Main schema (extract/v1.json): - extracted_at: add pattern alongside format (belt-and-suspenders) - kind: add namespaced pattern - summary: add minLength: 1 - themes items: add minLength: 1 - capabilities items: add enum with all 17 valid capabilities - extensions: add propertyNames pattern for namespacing - Entity name/type: add minLength: 1 - Goal text: add minLength: 1 - Fact text: add minLength: 1 - Relation target/type: add minLength: 1 Sub-schemas: - source-ref: add minProperties: 2 (reject version-only wrappers) - assertion-signals: add minProperties: 2 - embedding model: add URI pattern - embedding computed_at: add pattern alongside format - temporal-ref raw: add minLength: 1 These close the "schema too loose" class from Atlas's drift audit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both Python and TypeScript validators now enforce: 1. additionalProperties: false on all object types (root, entity, goal, fact, relation, source-ref, signals, temporal-ref, embedding) 2. Type checks on optional string fields (sentiment, source_id, source_type, user_id, entity state/context/date_hint, fact category, relation origin, temporal context, embedding space) 3. Source-ref offset constraints (offset_start, offset_end, sentence_index must be non-negative integers) 4. Goal entity_refs items must be strings 5. Embedding computed_at must be strict date-time 6. Boolean guard on isinstance checks (Python bool is int subclass) Adds 24 new tests: 9 additional-properties, 11 type-check, 4 offset. 198 total Python tests passing. Closes the "validators too loose" class from Atlas's drift audit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both validators now reject non-number items in embedding.vector arrays. Uses early-break to report the first bad element without flooding errors on large vectors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: switch npm publish to OIDC trusted publishing
fix: close schema↔validator parity gaps
test: add TypeScript parity suite for extract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sprint 31 Ceremony: SynaptExtraction IL v1 Package
Ships
@synapt-dev/extract(npm) andsynapt-extract(PyPI) as a tight beta.PRs included (7)
What ships
Stats
Premium boundary: OSS (schema, validation, prompt infrastructure).
Test plan
tsc --noEmitclean🤖 Generated with Claude Code