added
This commit is contained in:
1 parent
4eaec52904
commit
df7571392e
50 files changed
+3390
-258
No files matched your search
@@ -0,0 +1,7 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report a reproducible media structuring or validation failure
|
||||
title: ""
|
||||
---
|
||||
|
||||
Describe the input format, command, expected result, actual result, and relevant version. Use a minimal synthetic fixture. Do not attach private recordings, participant data, tokens, or unredacted logs.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Propose a useful media processing capability
|
||||
title: ""
|
||||
---
|
||||
|
||||
Describe the user problem, desired outcome, source formats, and a realistic example. Explain how this fits the existing intake → draft → approval workflow and whether publication or access controls are involved.
|
||||
@@ -0,0 +1,11 @@
|
||||
## Change
|
||||
|
||||
Describe the concrete problem and resulting behavior.
|
||||
|
||||
## Validation
|
||||
|
||||
List relevant tests, schema/link checks, and source preservation evidence. Identify unverified behavior.
|
||||
|
||||
## Boundaries
|
||||
|
||||
Confirm no real recordings, secrets, or private transcripts are included. Describe any contract, identity, version, or rights changes. A merged change does not imply media publication approval.
|
||||
@@ -1,9 +1,11 @@
|
||||
# Agent instructions
|
||||
|
||||
Read `README.md`, `repository.json`, `docs/workflow.md`, and relevant schemas. Default: original media + TXT + VTT in a user folder, metadata interview, local draft build, then human review. Use `skills/media-intake/SKILL.md`, followed by `skills/structure-media/SKILL.md`. Intake and structure-plan JSON are editable inputs; `structured/` is derived. The optional public exporter retains its separate contracts and approval requirements.
|
||||
Read `README.md`, `AUTHOR.md`, `repository-variables.json`, `repository.json`, `AGENTS.md`, and `skills.md`; use `content-index.json` to retrieve individual guides. Default: original media + TXT + VTT in a user folder, metadata interview, local draft build, then human review. Use `skills/media-intake/SKILL.md`, followed by `skills/structure-media/SKILL.md`. Intake and structure-plan JSON are editable inputs; `structured/` and approved final packages are derived. The public exporter retains separate contracts and publication requirements.
|
||||
|
||||
Preserve semantic IDs, unrelated work, all three originals, and prior output. Gather useful missing metadata upfront; accept partial answers and unknowns. Local drafts do not require public URLs or prior human content approval. Never invent timing, identities, consent, rights, or factual verification. Resolve sensitive exclusions before processing affected content. Public export requires clearance. Keep private sources and credentials outside this template repo.
|
||||
|
||||
Validate JSON contracts, source/timing/citation relationships, review fingerprints, output checksums, and representative retrieval behavior. Run `python -m unittest discover -s tests -v` and `git diff --check`. Keep README, schemas, script, examples, skill, interfaces, version, and changelog aligned when contracts change. Existing example review hashes depend on source bytes and builder version.
|
||||
|
||||
After explicit approval of a specific draft, use `folder_builder.py finalize`, then `verify` on the final package. Changed draft inputs require a new build/review. Preserve draft history. Keep identity, MIT, canonical URL, version, variables, manifest, citation, and document catalog aligned. Run the native repository checker and software-automation audit. `UPDATES.md` is proposed work, not authorization.
|
||||
|
||||
Build locally within the requested scope. Obtain authorization for publication, Git pushes, deployment, license selection, or external platform changes. Proposed work in `UPDATES.md` is not authorization. Do not advertise APIs, MCP services, semantic entailment verification, embeddings, or indexing until implemented and verified.
|
||||
@@ -1,7 +1,11 @@
|
||||
# Author and repository identity
|
||||
|
||||
Repository owner: Eddie Soehnel.
|
||||
Author, publisher, maintainer, and repository owner: **Eddie Soehnel**.
|
||||
|
||||
Canonical repository: https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN
|
||||
|
||||
Initial implementation prepared with AI assistance. Recording creators, speakers, transcription provenance, and publication rights belong in each media manifest and are separate from repository ownership. No template software/documentation license has been selected.
|
||||
Preferred attribution: **Structured Media Builder by Eddie Soehnel**, version 0.3.0, 2026. See [CITATION.cff](CITATION.cff).
|
||||
|
||||
Initial implementation prepared with AI assistance. Identity/canonical facts come from this repository and the owner's approval of the structure plan; MIT was explicitly selected by the owner on 2026-10-17. Code/docs are [MIT licensed](LICENSE). Recording creators, speakers, transcription provenance, and publication rights belong in each media manifest and are separate from repository ownership.
|
||||
|
||||
Derived repositories should replace identity and canonical URL when they no longer describe the project, keeping AUTHOR, repository variables, manifest, citation, and license aligned. Retain attribution required by the MIT license.
|
||||
+9
-2
@@ -1,6 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 0.2.0 — 2026-10-17
|
||||
## 0.3.0 — 2026-10-17
|
||||
|
||||
- Applied approved repository structure plan revision 1 using the software-automation profile; aligned upstream-compatible manifests, verified identity, MIT license, citation, document catalog, navigation, and Gitea contribution templates.
|
||||
- Promoted explicit final approval into the normal folder builder, preserving draft history and binding approval to unchanged source, intake, and semantic-plan fingerprints.
|
||||
- Extended verification and keyword retrieval to final approved packages; retained separate media licensing and publication decisions.
|
||||
- Added repository-contract and approval-lifecycle regressions while preserving the folder-first intake and reviewed content workflow.
|
||||
|
||||
## 0.2.0 — 2026-10-17
|
||||
|
||||
- Made the default process folder-first: original recording plus TXT/VTT, upfront metadata intake, in-folder draft build, then human review.
|
||||
- Added the media-intake skill and copyable human checklist; source pages and partial metadata can populate inputs without inventing missing facts.
|
||||
@@ -8,7 +15,7 @@
|
||||
- Retained the approved public exporter as a separate optional workflow. Missing hosted URLs, rights decisions, or prior human approval no longer block local review drafts.
|
||||
- Added regression coverage for unknown metadata, source preservation, exclusions, source changes, draft status, local retrieval, and ambiguous file sets.
|
||||
|
||||
## 0.1.0 — 2026-10-17
|
||||
## 0.1.0 — 2026-10-17
|
||||
|
||||
- Established a media-specific source, review, semantic, publication, and discovery workflow based on the AI Knowledge Structure and Structured Website Builder guides.
|
||||
- Added deterministic reviewed TXT/VTT ingestion, conceptual chunks, source-cited Q&A, chapter export, HTML/JSON-LD, collection discovery, local keyword search, and input/output integrity checks.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
cff-version: 1.2.0
|
||||
message: "If you use this builder, please cite it as described below."
|
||||
title: "Structured Media Builder"
|
||||
type: software
|
||||
version: 0.3.0
|
||||
date-released: 2026-10-17
|
||||
authors:
|
||||
- family-names: "Soehnel"
|
||||
given-names: "Eddie"
|
||||
repository-code: "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN"
|
||||
url: "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN"
|
||||
license: MIT
|
||||
keywords:
|
||||
- media structuring
|
||||
- audio and video
|
||||
- timed transcripts
|
||||
- source citations
|
||||
- AI retrieval
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
Use synthetic fixtures for tests. Preserve IDs and source/derivative boundaries. For a new input format, document what is preserved and what needs review; reject unsupported timing instead of silently changing it. Update schema, builder, workflow, examples, and tests together for contract changes.
|
||||
|
||||
Run the test suite and a local example build, verify checksums, inspect a representative retrieval result, and review `git diff --check`. Publishing and service integration require separate authorization. Discuss license selection with the owner; the initial repository has no selected license.
|
||||
Run the test suite and a local example build, verify checksums, inspect a representative retrieval result, and review `git diff --check`. Publishing and service integration require separate authorization. Builder code/docs use MIT; keep third-party media rights separate. Run the native repository checker and software-automation audit as well as relevant media tests.
|
||||
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Eddie Soehnel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
# License not yet selected
|
||||
# License and media rights
|
||||
|
||||
The repository owner has not selected a license for this new template's code or documentation. This file does not grant an open-source or content license. Select and add an explicit license before representing this repository as openly licensed for reuse.
|
||||
Builder code and documentation are licensed under [MIT](LICENSE), copyright 2026 Eddie Soehnel, as explicitly selected by the owner on 2026-10-17.
|
||||
|
||||
Do not inherit the related website builder's software or website-content licenses by assumption. Each recording, transcript, thumbnail, and semantic derivative also needs its own verified rights and attribution in the media manifest.
|
||||
This does not grant rights over third-party recordings, transcripts, slides, thumbnails, or underlying research. Verify their rights and attribution separately in each media manifest. Owner approval of structured content is not a substitute for a recording's license or consent.
|
||||
@@ -4,7 +4,7 @@ Building and reviewing locally is separate from publishing. This repository cont
|
||||
|
||||
1. Build the complete approved catalog into a fresh release directory. Run `verify`, search representative terms, inspect HTML and JSON-LD, and review the final export's full file list.
|
||||
2. Inspect TXT, VTT (including NOTE blocks), cue text, names, authorship, rights, synthesized answers, summaries, thumbnails, and outbound URLs. Check speaker/attendee permission and exclude internal discussion, chats, participant lists, credentials, confidential screen content, and unapproved third-party material.
|
||||
3. Obtain publication approval for the specific release and destination. Select an explicit repository license separately before representing this template as openly licensed. Recording and derivative rights are separate facts.
|
||||
3. Obtain publication approval for the specific release and destination. The builder code/docs use MIT. Recording and derivative rights require separate verification; the builder license does not cover them.
|
||||
4. Upload only the selected release directory's contents to the configured collection site root. Coordinate the external media host and companion-site release. Do not upload source folders, private inputs, tests, `.git`, environments, or the whole repository.
|
||||
5. Verify over HTTPS: collection index, each canonical recording page, media URL/player, caption track, real time seeking, artifact URLs, JSON-LD, sitemap, CORS, MIME types (`text/vtt`, `application/json`, `application/ld+json`), and intended crawler access. Test an initial and a later cue against the actual recording. Run search-engine tools for any claimed search feature. No local check proves indexing or citation by AI.
|
||||
6. Record the release checksum, approver, destination, verification results, and limitations in your operational records. A receipt's `deployment_verified: false` reflects the local builder's evidence; don't edit it to simulate remote verification.
|
||||
|
||||
@@ -4,7 +4,38 @@ Put an audio or video recording and its speech-to-text **TXT and VTT files in on
|
||||
|
||||
Use it for webinars, meetings, interviews, podcasts, lectures, demonstrations, and other recordings. No browser preview or local web server is required. Internet publication, API/MCP hosting, and embeddings are later options.
|
||||
|
||||
Version **0.2.0**, experimental. See [the detailed workflow](docs/workflow.md) and [capabilities](docs/architecture.md).
|
||||
Version **0.3.0**, experimental. By [Eddie Soehnel](AUTHOR.md), author, publisher, and maintainer. Builder code and documentation use the [MIT license](LICENSE); third-party media rights remain separate. See [the detailed workflow](docs/workflow.md) and [capabilities](docs/architecture.md).
|
||||
|
||||
# Re-usable Prompt To Run This Repo
|
||||
|
||||
Use C:\projects\indx\structured-media-builder-OPEN to structure the media in:
|
||||
|
||||
C:\PATH\TO\MY-MEDIA-FOLDER
|
||||
|
||||
This folder contains the original audio/video, TXT transcript, and VTT captions.
|
||||
|
||||
Follow the repository’s README.md, AGENTS.md, media-intake skill, and structure-media skill.
|
||||
|
||||
1. Inspect the files and any source pages I provide. Gather supported metadata before asking me to repeat it.
|
||||
2. Ask me a grouped set of questions for useful missing metadata or clarification before building. Accept partial answers and “unknown.” Once I answer, proceed with explicit unknowns unless a source ambiguity or sensitive-content restriction requires clarification.
|
||||
3. Read the complete transcript and create meaningful topic chunks, grounded Q&A with quoted evidence and timestamps, chapters, metadata, discovery files, and all other standard template assets.
|
||||
4. Preserve the original files and existing results. Save the intake and structure plan alongside the sources, and build a new draft output folder.
|
||||
5. Run the template’s validation, including source hashes, timing, coverage, citations, and output checksums.
|
||||
6. Return clickable links to the overview and review checklist. Summarize the results, unresolved metadata, suspected transcription errors, and anything needing my attention.
|
||||
|
||||
Keep the package in draft for my review. Finalize only after my explicit approval. Publication is a separate step.
|
||||
|
||||
Metadata I already know (leave blank items for intake):
|
||||
- Official title:
|
||||
- Recording date/timezone:
|
||||
- Organizer/publisher:
|
||||
- Hosts, speakers, and affiliations:
|
||||
- Published recording/session page:
|
||||
- Audience:
|
||||
- Priority topics or questions:
|
||||
- Slides, reports, and supporting links:
|
||||
- Credits, rights, sharing limits, or sensitive exclusions:
|
||||
- Known transcript errors or processing preferences:
|
||||
|
||||
## What you prepare
|
||||
|
||||
@@ -54,7 +85,7 @@ folder, leave unknowns explicit, then give me the result to review.
|
||||
3. Follow [structure-media](skills/structure-media/SKILL.md): read the whole transcript, author coherent topic chunks, useful Q&A with exact evidence, and navigation chapters. Save `structure-plan.json` beside the sources.
|
||||
4. Build a new `structured/` subfolder. Validate time ranges, cue coverage, IDs, evidence quotes, output checksums, and original source hashes.
|
||||
5. Return `structured/README.md` and `structured/review.md`. Everything remains **draft** until you review it. Flag missing metadata, suspected STT errors, and unverified figures or identities.
|
||||
6. Incorporate your corrections into a new output such as `structured-002/`, preserving originals and prior results. Publication is separate.
|
||||
6. Incorporate corrections into a new draft if needed. After your explicit approval, finalize into `structured-final/`, recording reviewer, evidence, input fingerprints, and retained limitations. Preserve originals and prior results. Publication is separate.
|
||||
|
||||
## Files you receive
|
||||
|
||||
@@ -99,6 +130,17 @@ python scripts/folder_builder.py search --output "C:\path\to\my-recording-folder
|
||||
|
||||
`seed` is a starter, not completed semantic analysis. The AI must structure the content before delivery. Existing intake, plans, and outputs are not overwritten. Supported MP3 duration is measured from MPEG frames; otherwise media duration stays unknown and VTT end time is reported separately.
|
||||
|
||||
## Record approval and finalize
|
||||
|
||||
Once you explicitly approve a specific draft, the AI runs `folder_builder.py finalize` with the source/output paths, intake, plan, reviewer, timezone-aware approval timestamp, and your approval evidence. It verifies that the inputs have not changed, writes `approval.json`, updates the source plan's review state, and produces `structured-final/`. A new draft is required if its inputs changed after the reviewed build.
|
||||
|
||||
```powershell
|
||||
python scripts/folder_builder.py finalize --source "<media-folder>\structured" --output "<media-folder>\structured-final" --intake "<media-folder>\media-intake.json" --plan "<media-folder>\structure-plan.json" --reviewer "<reviewer>" --approved-at "<ISO timestamp with timezone>" --evidence "<explicit approval>"
|
||||
python scripts/folder_builder.py verify --output "<media-folder>\structured-final"
|
||||
```
|
||||
|
||||
Final-package verification and keyword search support approved packages as well as drafts. Approval is workflow evidence, not an authenticated digital signature, independent source fact-check, third-party content license, or deployment approval.
|
||||
|
||||
## Later: publish or serve reviewed content
|
||||
|
||||
After review and collection of publication facts, the optional [approved public export](docs/public-export.md) can generate companion HTML, hosted URLs, and a collection sitemap. It retains stricter review/rights checks and is separate from local draft generation.
|
||||
@@ -107,8 +149,8 @@ Static JSON and local keyword search work now. [API/MCP contracts](docs/interfac
|
||||
|
||||
## Repository maintenance
|
||||
|
||||
- [Agent instructions](AGENTS.md), [manifest](repository.json), [identity](repository-variables.json), [author](AUTHOR.md), [changelog](CHANGELOG.md), [skills](skills.md).
|
||||
- [Schemas](schemas/README.md), [templates](templates/README.md), [synthetic tests](examples/README.md), [validation](docs/validation.md).
|
||||
- [Agent instructions](AGENTS.md), [manifest](repository.json), [identity](repository-variables.json), [author](AUTHOR.md), [citation](CITATION.cff), [changelog](CHANGELOG.md), [skills](skills.md).
|
||||
- [Documentation index](docs/README.md), [document catalog](content-index.json), [scripts](scripts/README.md), [schemas](schemas/README.md), [templates](templates/README.md), [synthetic tests](examples/README.md), [validation](docs/validation.md).
|
||||
- [Publication](PUBLICATION_WORKFLOW.md), [security](SECURITY.md), [contributing](CONTRIBUTING.md), [license](LICENSE.md), [proposals](UPDATES.md).
|
||||
|
||||
Run `python -m unittest discover -s tests -v` and `python scripts/check_repository.py` after changes. No repository code/documentation license has been selected; recording and derivative rights are separate facts.
|
||||
Run `python -m unittest discover -s tests -v`, `python scripts/check_repository.py`, and `python scripts/audit_repository.py . --profile software-automation --json` after changes. This implements the software/automation profile of the AI-Ready Repository Template while preserving the media skills and source workflow. No commit, push, or publication is part of these local commands.
|
||||
@@ -5,3 +5,5 @@ Use only publication-safe transcripts and metadata in public repositories. Ignor
|
||||
The builder makes no network requests, executes no transcript content, escapes HTML output, refuses source path traversal, and requires reviewed inputs for public exports. HTTPS URLs must not carry credentials or common signed-access parameters. These checks do not replace review of every published URL or third-party asset.
|
||||
|
||||
Input hashes and output checksums detect inconsistencies; they are not authenticated signatures. This static public profile supplies no authentication, revocation, PII detection, malware scanning, or private-corpus policy enforcement. Keep service credentials outside source control and generated output. Report sensitive issues privately to the repository owner rather than placing private media or secrets in an issue.
|
||||
|
||||
Owner-approved final content retains source caveats and does not establish third-party rights. MIT governs the builder code/docs, not private inputs or recorded third-party material. Repository metadata and examples must not include real meeting data.
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
These are options, not implemented features or authorization.
|
||||
|
||||
1. Pilot the workflow on one owner-approved recording and evaluate retrieval questions, timing, speaker accuracy, and review effort.
|
||||
2. Select the repository's code/documentation license and verify media derivative rights.
|
||||
1. Extend the completed first pilot to more recordings; evaluate audio/slide accuracy and retrieval behavior without treating prior structure approval as independent source verification.
|
||||
2. Verify recording and derivative rights for each publication; MIT selection for the builder is complete.
|
||||
3. Implement a read-only API and MCP adapter against the same reviewed exports; add access checks before supporting restricted content.
|
||||
4. Add reviewed slide/OCR/frame evidence with separate provenance and timestamps for information absent from speech.
|
||||
5. Add STT/platform adapters only for authorized exports; normalize overlapping/rolling captions while preserving evidence.
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
{
|
||||
"$schema": "./schemas/content-index.schema.json",
|
||||
"schema_version": "1.0",
|
||||
"collection_id": "structured-media-builder-docs",
|
||||
"title": "Structured Media Builder documentation",
|
||||
"description": "Authoritative source guides for the current local revision; draft status does not claim a public deployment.",
|
||||
"updated_at": "2026-10-17",
|
||||
"items": [
|
||||
{
|
||||
"content_id": "smb-doc-docs-readme",
|
||||
"title": "Documentation index",
|
||||
"description": "Routes to the maintained guide set.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/README.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-docs-workflow",
|
||||
"title": "Folder workflow",
|
||||
"description": "Intake, semantic authoring, local build, review, and final approval.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/workflow.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-docs-architecture",
|
||||
"title": "Architecture and contracts",
|
||||
"description": "Profiles, source boundaries, identity, rights, and capability limits.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/architecture.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-docs-research",
|
||||
"title": "Standards research",
|
||||
"description": "Verified source references and media-platform design decisions.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/research.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-docs-interfaces",
|
||||
"title": "API and MCP designs",
|
||||
"description": "Proposed read-only adapters and future retrieval integrations.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/interfaces.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-docs-public-export",
|
||||
"title": "Approved public export",
|
||||
"description": "Optional source manifests, content clearance, and static collection export.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/public-export.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-docs-validation",
|
||||
"title": "Validation record",
|
||||
"description": "Versioned local validation evidence and limitations.",
|
||||
"content_type": "guide",
|
||||
"path": "docs/validation.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-publication-workflow",
|
||||
"title": "Publication workflow",
|
||||
"description": "Separate publication approval and live checks.",
|
||||
"content_type": "guide",
|
||||
"path": "PUBLICATION_WORKFLOW.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-security",
|
||||
"title": "Security and privacy",
|
||||
"description": "Private sources, credentials, checksums, and URL boundaries.",
|
||||
"content_type": "guide",
|
||||
"path": "SECURITY.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-contributing",
|
||||
"title": "Contributing",
|
||||
"description": "Project-specific contributor and validation expectations.",
|
||||
"content_type": "guide",
|
||||
"path": "CONTRIBUTING.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
},
|
||||
{
|
||||
"content_id": "smb-doc-templates-media-intake",
|
||||
"title": "Metadata checklist",
|
||||
"description": "Copyable human input checklist for a recording folder.",
|
||||
"content_type": "guide",
|
||||
"path": "templates/media-intake.md",
|
||||
"status": "draft",
|
||||
"author": "Eddie Soehnel",
|
||||
"updated_at": "2026-10-17",
|
||||
"topics": [
|
||||
"structured-media"
|
||||
],
|
||||
"related_content_ids": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# Documentation
|
||||
|
||||
Start with [the main README](../README.md). The [document catalog](../content-index.json) indexes these source guides; it is distinct from generated media `ai-index.json` files.
|
||||
|
||||
| Guide | Use it for |
|
||||
| --- | --- |
|
||||
| [Folder workflow](workflow.md) | Intake, draft generation, human approval, and final packages |
|
||||
| [Architecture](architecture.md) | Sources, profiles, semantic contracts, and limitations |
|
||||
| [Research](research.md) | Standards and platform references informing the design |
|
||||
| [API/MCP designs](interfaces.md) | Proposed adapters; no hosted service is provided |
|
||||
| [Public export](public-export.md) | Optional cleared public companion site |
|
||||
| [Validation](validation.md) | Versioned local checks and their limits |
|
||||
| [Publication](../PUBLICATION_WORKFLOW.md) | Separate approval and hosted-state checks |
|
||||
|
||||
Executable commands are indexed in [scripts](../scripts/README.md); operational AI guidance is indexed in [skills](../skills.md).
|
||||
@@ -6,6 +6,8 @@ The primary workflow starts with three files, metadata intake, local generation,
|
||||
|
||||
The remaining sections describe the stricter optional public exporter retained from 0.1.0. Its catalog/manifest contracts and gates do not apply to ordinary local drafts. See [folder workflow](workflow.md) and [later public export](public-export.md).
|
||||
|
||||
Version 0.3.0 adds an explicit `approved` state within the local-review profile. Final approval is a separate action over a reviewed draft: source files, intake, semantic plan, output hashes, reviewer, and evidence are bound in an approval record. Verification and local search accept both states. Public readiness stays separate. Repository identity follows the software-automation profile with MIT code/docs, a source document catalog, and upstream-compatible manifest schemas.
|
||||
|
||||
## Sources and build direction
|
||||
|
||||
The original recording is the evidence for what happened. A reviewed VTT is the authoritative timed text representation. TXT mirrors its words. `media.json` owns recording facts, rights, publication clearance, and transcription provenance. `plan.json` owns semantic boundaries, stable identities, authored interpretations, citations, chapters, and review metadata. A collection catalog lists the intended release set.
|
||||
|
||||
+23
-1
@@ -1,4 +1,26 @@
|
||||
# Initial implementation validation
|
||||
# Validation records
|
||||
|
||||
## 0.3.0 — repository standard and final approval, 2026-10-17
|
||||
|
||||
- The approved software-automation repository plan was applied with standard-compatible identity/rights manifests, MIT, citation, version 0.3.0, an 11-document catalog, navigation, and relevant Gitea templates.
|
||||
- 51 tests passed: the original media behavior plus final-approval/input-integrity and repository-contract regressions.
|
||||
- The software-automation audit and native checker passed, including standard schemas, version/identity/license alignment, nullable entry points, document relations, links, and targeted credential-pattern checks. Both media skills passed validation in UTF-8 mode.
|
||||
- The two synthetic public-export examples built and passed checksum verification under the new version. Only synthetic fixture fingerprints were refreshed.
|
||||
- The previously approved real webinar package verified successfully using the normal folder-builder command, retaining its original approval/version evidence, 908 cues, 38 chunks, 22 Q&A entries, and 10 chapters. No real content, approval, or original source file was rewritten for the template version change.
|
||||
- Final verification and local keyword retrieval now accept approved artifacts. Skipping source checks reports those checks as skipped rather than claiming unchanged sources.
|
||||
- No service, embeddings, publication, external indexing, independent fact-check, or audio/slide verification was added. Commit/push/deployment remain separate actions.
|
||||
|
||||
## 0.2.0 — folder-first workflow, 2026-10-17
|
||||
|
||||
- 39 regression tests passed in the canonical template repository: the original public-export tests plus 12 folder-first tests.
|
||||
- Both repo-local skills passed the skill-creator validator with UTF-8 mode. Repository JSON, all nine schemas, links, declared paths, local schema references, source syntax/whitespace, and targeted credential-pattern checks passed.
|
||||
- A real supplied MP3/TXT/VTT set was processed locally: 908 timed cues, 38 conceptual chunks, 22 grounded Q&A entries, and 10 navigation chapters. The encoded MP3 duration was approximately 92 minutes; VTT end time was reported separately.
|
||||
- The source page supplied by the user populated published identity metadata with provenance; unknown publication/rights and transcript-review facts stayed explicit. The user's audience was recorded as paddling industry organizations.
|
||||
- All three original source hashes matched the preflight after delivery. Output checksums and source references verified. All 908 transcript anchors and 364 local document links checked.
|
||||
- Four representative keyword queries returned expected survey limitations, participation-versus-sales, instruction-next-step, and measurement-gap material in the top five. The test exposed ties caused by incidental transcript mentions; local ranking now weights questions/titles and summaries above body-only mentions.
|
||||
- Outputs remain draft, with no human content approval or publication readiness claimed. No full-recording listening, visual/slide verification, independent research fact-check, public deployment, or AI/search-engine indexing was performed. No Git commit or push was made.
|
||||
|
||||
## 0.1.0 — original public-export implementation
|
||||
|
||||
Validated 2026-10-17 in the canonical local repository. Version 0.1.0.
|
||||
|
||||
|
||||
@@ -33,3 +33,9 @@ Local keyword retrieval weights question/title and summary matches above inciden
|
||||
Return direct links to the output README and review checklist. The user reviews identities/numbers, metadata, chunks, summaries, answers, rights, and missing visual evidence. Apply corrections to intake/plan, preserve continuing IDs, and build a fresh directory such as `structured-002/`. Review does not imply publication or Git push authority.
|
||||
|
||||
The [public export workflow](public-export.md) is later and optional, requiring real publication metadata and content/rights clearance. Hosted APIs, MCP, embeddings, publication, and independent fact verification are separate integrations.
|
||||
|
||||
## Explicit final approval
|
||||
|
||||
Run `folder_builder.py finalize` only after the user approves the specific draft. Supply source/output paths, intake/plan, reviewer, timezone-aware approval-record timestamp, and explicit evidence. The command refuses changed inputs, preserves the draft, updates the source plan's review state, and writes the approved package and `approval.json` into a new sibling folder. Unknowns and source caveats remain visible.
|
||||
|
||||
`verify` and `search` accept final approved packages. Final verification checks output/source hashes, intake and semantic-plan fingerprints, and reviewer/time/input binding. These records support reproducibility and workflow review; they are not authenticated signatures. A materially edited intake or semantic plan invalidates final verification. Create a new reviewed draft instead of modifying a final package in place.
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
],
|
||||
"review": {
|
||||
"input_sha256": "f07febaba81d031d5818ddeabce1aa7042d2d0c7747e4083d11cae00a8c5d3c4",
|
||||
"input_sha256": "15be5682d44ae8c03fb005a08c87dfdf872476acf11312a679bfc8576a4ef7a8",
|
||||
"reviewed_at": "2026-10-17T12:00:00-06:00",
|
||||
"reviewer": "Synthetic fixture review",
|
||||
"status": "approved"
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
}
|
||||
],
|
||||
"review": {
|
||||
"input_sha256": "e063a8ec92a57e1c60daddc1e96a4662275d6526c194e2ffc9428d40eb4ac1dc",
|
||||
"input_sha256": "a4cd2ca189fc6d8c02a66e11c16bd794ef0e78b588c17b609f36c3f0ec560ba4",
|
||||
"reviewed_at": "2026-10-17T12:00:00-06:00",
|
||||
"reviewer": "Synthetic fixture review",
|
||||
"status": "approved"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "Structured Media Read API \u00e2\u20ac\u201d Proposed",
|
||||
"version": "0.2.0",
|
||||
"title": "Structured Media Read API — Proposed",
|
||||
"version": "0.3.0",
|
||||
"description": "Design contract only. No deployed API. Adapters serve complete validated public releases."
|
||||
},
|
||||
"x-implementation-status": "design-only",
|
||||
|
||||
+27
-16
@@ -1,27 +1,38 @@
|
||||
{
|
||||
"$schema": "./schemas/repository-variables.schema.json",
|
||||
"schema_version": "1.0",
|
||||
"purpose": "Verified identity, rights, and operating defaults for the reusable media structuring implementation.",
|
||||
"repository_profile": "software-automation",
|
||||
"identity": {
|
||||
"owner": {
|
||||
"authors": [
|
||||
{
|
||||
"name": "Eddie Soehnel"
|
||||
}
|
||||
],
|
||||
"publisher": {
|
||||
"name": "Eddie Soehnel"
|
||||
},
|
||||
"maintainer": {
|
||||
"name": "Eddie Soehnel"
|
||||
}
|
||||
},
|
||||
"publication": {
|
||||
"companion_site_url": null,
|
||||
"media_host": null,
|
||||
"status": "local-draft"
|
||||
},
|
||||
"repository": {
|
||||
"repository_id": "adminprojects-structured-media-builder-open",
|
||||
"name": "structured-media-builder-open",
|
||||
"title": "Structured Media Builder",
|
||||
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN",
|
||||
"name": "structured-media-builder-OPEN",
|
||||
"repository_id": "adminprojects-structured-media-builder-open"
|
||||
"organization": null
|
||||
},
|
||||
"repository_profile": "software-template-workflow",
|
||||
"rights": {
|
||||
"license": null,
|
||||
"license_status": "not-selected",
|
||||
"notice_file": "LICENSE.md"
|
||||
"license": "MIT",
|
||||
"license_file": "LICENSE"
|
||||
},
|
||||
"schema_version": "1.0",
|
||||
"updated_at": "2026-10-17",
|
||||
"verified_from": "User-specified target and guide repository identity; local target Git config.",
|
||||
"version": "0.2.0"
|
||||
"skill_defaults": {
|
||||
"task_id": "structure-ai-ready-repository",
|
||||
"require_plan_approval": true,
|
||||
"preserve_existing_content": true,
|
||||
"use_smallest_fitting_profile": true
|
||||
},
|
||||
"verified_by": "Existing target identity and canonical origin; explicit user MIT selection and approval of repository structure plan revision 1 on 2026-10-17.",
|
||||
"verified_at": "2026-10-17"
|
||||
}
|
||||
+286
-209
@@ -1,200 +1,26 @@
|
||||
{
|
||||
"$schema": "./schemas/repository.schema.json",
|
||||
"schema_version": "1.0",
|
||||
"repository_id": "adminprojects-structured-media-builder-open",
|
||||
"name": "structured-media-builder-open",
|
||||
"title": "Structured Media Builder",
|
||||
"description": "Folder-first media intake, semantic structuring, and in-folder draft assets for human review, with an optional approved public exporter.",
|
||||
"summary": "A reusable folder-first workflow and tested implementation for metadata intake, timed transcript structuring, source-cited Q&A, chapters, known-fact JSON-LD, owner-approved final packages, local retrieval, and optional reviewed public export. STT integration, hosted API/MCP, embeddings, platform synchronization, deployment, and independent fact/consent verification are not implemented.",
|
||||
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Eddie Soehnel"
|
||||
}
|
||||
],
|
||||
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN",
|
||||
"contents": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"title": "Overview and quick start",
|
||||
"type": "documentation"
|
||||
},
|
||||
{
|
||||
"path": "AGENTS.md",
|
||||
"title": "Repository operating instructions",
|
||||
"type": "agent-guidance"
|
||||
},
|
||||
{
|
||||
"path": "docs/workflow.md",
|
||||
"title": "Recording-to-discovery process",
|
||||
"type": "workflow"
|
||||
},
|
||||
{
|
||||
"path": "docs/architecture.md",
|
||||
"title": "Sources, contracts, and capability boundaries",
|
||||
"type": "documentation"
|
||||
},
|
||||
{
|
||||
"path": "docs/research.md",
|
||||
"title": "Standards and platform research",
|
||||
"type": "research"
|
||||
},
|
||||
{
|
||||
"path": "docs/interfaces.md",
|
||||
"title": "Proposed API and MCP adapters",
|
||||
"type": "design"
|
||||
},
|
||||
{
|
||||
"path": "PUBLICATION_WORKFLOW.md",
|
||||
"title": "Publication approval and verification",
|
||||
"type": "workflow"
|
||||
},
|
||||
{
|
||||
"path": "scripts/media_builder.py",
|
||||
"title": "Deterministic builder and retrieval CLI",
|
||||
"type": "software"
|
||||
},
|
||||
{
|
||||
"path": "schemas/",
|
||||
"title": "Source and export JSON schemas",
|
||||
"type": "schema-collection"
|
||||
},
|
||||
{
|
||||
"path": "templates/",
|
||||
"title": "Blocked-by-default starter inputs",
|
||||
"type": "template-collection"
|
||||
},
|
||||
{
|
||||
"path": "examples/",
|
||||
"title": "Synthetic audio and video fixtures",
|
||||
"type": "example-collection"
|
||||
},
|
||||
{
|
||||
"path": "skills.md",
|
||||
"title": "Repo-local skill index",
|
||||
"type": "skill-index"
|
||||
},
|
||||
{
|
||||
"path": "skills/structure-media/SKILL.md",
|
||||
"title": "Media structuring workflow",
|
||||
"type": "skill"
|
||||
},
|
||||
{
|
||||
"path": "tests/test_media_builder.py",
|
||||
"title": "Pipeline regression coverage",
|
||||
"type": "test"
|
||||
},
|
||||
{
|
||||
"path": "interfaces/openapi.json",
|
||||
"title": "Proposed read-only HTTP API",
|
||||
"type": "design-contract"
|
||||
},
|
||||
{
|
||||
"path": "interfaces/mcp-tools.json",
|
||||
"title": "Proposed read-only MCP tools",
|
||||
"type": "design-contract"
|
||||
},
|
||||
{
|
||||
"path": "requirements.txt",
|
||||
"title": "Python dependency range",
|
||||
"type": "configuration"
|
||||
},
|
||||
{
|
||||
"path": "LICENSE.md",
|
||||
"title": "License selection pending",
|
||||
"type": "rights-status"
|
||||
},
|
||||
{
|
||||
"path": "CHANGELOG.md",
|
||||
"title": "Completed versioned changes",
|
||||
"type": "changelog"
|
||||
},
|
||||
{
|
||||
"path": "UPDATES.md",
|
||||
"title": "Proposed additions",
|
||||
"type": "roadmap"
|
||||
},
|
||||
{
|
||||
"path": "skills/media-intake/SKILL.md",
|
||||
"title": "Upfront metadata interview",
|
||||
"type": "skill"
|
||||
},
|
||||
{
|
||||
"path": "scripts/folder_builder.py",
|
||||
"title": "Folder-first draft builder",
|
||||
"type": "software"
|
||||
},
|
||||
{
|
||||
"path": "templates/media-intake.md",
|
||||
"title": "Copyable human metadata checklist",
|
||||
"type": "template"
|
||||
},
|
||||
{
|
||||
"path": "docs/public-export.md",
|
||||
"title": "Later approved public exporter",
|
||||
"type": "workflow"
|
||||
},
|
||||
{
|
||||
"path": "tests/test_folder_builder.py",
|
||||
"title": "Folder-first regression coverage",
|
||||
"type": "test"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-10-17",
|
||||
"description": "Folder-first media intake, semantic structuring, and in-folder draft assets for human review, with an optional approved public exporter.",
|
||||
"entrypoints": {
|
||||
"ai": "AGENTS.md",
|
||||
"human": "README.md",
|
||||
"primary_script": "scripts/folder_builder.py",
|
||||
"primary_skill": "skills/media-intake/SKILL.md",
|
||||
"primary_template": "templates/media-intake.md"
|
||||
"publisher": {
|
||||
"name": "Eddie Soehnel"
|
||||
},
|
||||
"expected_outputs": [
|
||||
"In-folder draft overview and review checklist",
|
||||
"Static companion site",
|
||||
"Timed transcript JSON",
|
||||
"Chunks and Q&A JSON",
|
||||
"Chapter JSON",
|
||||
"Discovery files",
|
||||
"Build receipt"
|
||||
],
|
||||
"implemented_capabilities": [
|
||||
"Folder-based metadata intake and interview",
|
||||
"Local draft assets before human review",
|
||||
"Source-preserving transcript alignment and audit",
|
||||
"Timed semantic chunks and cited Q&A",
|
||||
"Chapter and known-fact JSON-LD export",
|
||||
"Local keyword retrieval",
|
||||
"Optional approved static public exporter"
|
||||
],
|
||||
"interfaces": {
|
||||
"mcp_tools": "interfaces/mcp-tools.json",
|
||||
"openapi": "interfaces/openapi.json",
|
||||
"status": "design-only"
|
||||
},
|
||||
"license": null,
|
||||
"license_status": "not-selected",
|
||||
"maturity": "experimental",
|
||||
"name": "structured-media-builder-OPEN",
|
||||
"not_implemented": [
|
||||
"STT integrations",
|
||||
"Hosted API",
|
||||
"MCP server",
|
||||
"Embeddings",
|
||||
"Platform sync",
|
||||
"Deployment",
|
||||
"Independent fact or consent verification"
|
||||
],
|
||||
"publication_status": "local-draft",
|
||||
"related_repositories": [
|
||||
{
|
||||
"relationship": "conceptual-guidance",
|
||||
"url": "https://projects.eddiesoehnel.com/adminprojects/ai-knowledge-structure-OPEN"
|
||||
},
|
||||
{
|
||||
"relationship": "implementation-pattern",
|
||||
"url": "https://projects.eddiesoehnel.com/adminprojects/structured-website-builder-OPEN"
|
||||
}
|
||||
],
|
||||
"repository_id": "adminprojects-structured-media-builder-open",
|
||||
"repository_status": "active",
|
||||
"required_inputs": [
|
||||
"Original audio/video plus TXT and VTT in a folder",
|
||||
"Partial metadata or source-page links",
|
||||
"AI-authored draft intake and semantic plan"
|
||||
],
|
||||
"visibility": "public",
|
||||
"maturity": "experimental",
|
||||
"version": "0.3.0",
|
||||
"created_at": "2026-10-17",
|
||||
"updated_at": "2026-10-17",
|
||||
"resource_types": [
|
||||
"software",
|
||||
"template",
|
||||
@@ -202,27 +28,278 @@
|
||||
"skill",
|
||||
"documentation"
|
||||
],
|
||||
"runtime": {
|
||||
"dependencies": "requirements.txt",
|
||||
"network_calls": false,
|
||||
"python": ">=3.11"
|
||||
"topics": {
|
||||
"technology": [
|
||||
"python",
|
||||
"speech-to-text",
|
||||
"structured-data"
|
||||
],
|
||||
"business_function": [
|
||||
"content-operations",
|
||||
"knowledge-management"
|
||||
],
|
||||
"industry_context": [
|
||||
"cross-industry"
|
||||
],
|
||||
"artifact_type": [
|
||||
"software",
|
||||
"template",
|
||||
"workflow",
|
||||
"skill"
|
||||
],
|
||||
"concepts": [
|
||||
"media-discovery",
|
||||
"timed-transcripts",
|
||||
"source-citations",
|
||||
"ai-retrieval"
|
||||
]
|
||||
},
|
||||
"schema_version": "1.0",
|
||||
"title": "Structured Media Builder",
|
||||
"topics": [
|
||||
"media-discovery",
|
||||
"audio",
|
||||
"video",
|
||||
"transcripts",
|
||||
"structured-data",
|
||||
"ai-retrieval"
|
||||
"audiences": [
|
||||
"Media publishers",
|
||||
"Content and knowledge teams",
|
||||
"Organizations publishing recorded sessions",
|
||||
"AI agents processing supplied audio/video folders"
|
||||
],
|
||||
"updated_at": "2026-10-17",
|
||||
"validation": {
|
||||
"example_build": "python scripts/media_builder.py build --catalog examples/catalog.json --output build/demo",
|
||||
"folder_inspect": "python scripts/folder_builder.py inspect --folder <media-folder>",
|
||||
"tests": "python -m unittest discover -s tests -v",
|
||||
"verify": "python scripts/media_builder.py verify --root build/demo"
|
||||
"problems_solved": [
|
||||
"Recordings are difficult to search and cite without portable timed semantic content.",
|
||||
"Missing metadata needs an interview and explicit unknowns rather than invented publication facts.",
|
||||
"Draft structure, human approval, and public deployment need distinct verifiable states."
|
||||
],
|
||||
"capabilities": [
|
||||
"Folder-based metadata intake and interview",
|
||||
"Local draft assets before human review",
|
||||
"Source-preserving transcript alignment and audit",
|
||||
"Timed semantic chunks and cited Q&A",
|
||||
"Chapter and known-fact JSON-LD export",
|
||||
"Local keyword retrieval",
|
||||
"Optional approved static public exporter",
|
||||
"Explicit final content approval with bound input fingerprints and retained draft history"
|
||||
],
|
||||
"use_cases": [
|
||||
"Structure a webinar, meeting, interview, podcast, lecture, or demonstration after STT.",
|
||||
"Prepare reusable static JSON for AI retrieval before adding embeddings.",
|
||||
"Generate a cleared companion publication as a separate later step."
|
||||
],
|
||||
"required_inputs": [
|
||||
{
|
||||
"name": "Original audio/video plus TXT and VTT",
|
||||
"description": "The source set stays in its user-designated folder.",
|
||||
"required": true,
|
||||
"sensitivity": "Potentially private; use only within authorized processing scope"
|
||||
},
|
||||
{
|
||||
"name": "Partial metadata and/or source page",
|
||||
"description": "Known facts, target audience, and restrictions; intake resolves useful gaps and preserves unknowns.",
|
||||
"required": false,
|
||||
"sensitivity": "Context-dependent"
|
||||
},
|
||||
{
|
||||
"name": "Python runtime",
|
||||
"description": "Python 3.11+ and requirements.txt dependencies; local deterministic builders make no network calls.",
|
||||
"required": true,
|
||||
"sensitivity": "Non-sensitive"
|
||||
}
|
||||
],
|
||||
"expected_outputs": [
|
||||
{
|
||||
"name": "In-folder structured assets",
|
||||
"description": "Overview, review notes, timed cues, chunks, Q&A, chapters, metadata, routing, JSON-LD, and checksums.",
|
||||
"format": "Markdown and JSON"
|
||||
},
|
||||
{
|
||||
"name": "Approved final package",
|
||||
"description": "Explicit reviewer/evidence, input binding, preserved draft history, and verified originals.",
|
||||
"format": "Markdown and JSON"
|
||||
},
|
||||
{
|
||||
"name": "Optional public export",
|
||||
"description": "Reviewed companion HTML and collection discovery after publication facts and rights clearance.",
|
||||
"format": "Static HTML, JSON, TXT, VTT, and XML"
|
||||
}
|
||||
],
|
||||
"entrypoints": {
|
||||
"ai": "AGENTS.md",
|
||||
"human": "README.md",
|
||||
"primary_script": "scripts/folder_builder.py",
|
||||
"primary_skill": "skills/media-intake/SKILL.md",
|
||||
"primary_template": "templates/media-intake.md",
|
||||
"primary_agent": null
|
||||
},
|
||||
"version": "0.2.0"
|
||||
"contents": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"type": "documentation",
|
||||
"title": "Folder-first overview and usage",
|
||||
"description": "Human workflow, metadata checklist, local processing, approval, and publication boundaries.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "AUTHOR.md",
|
||||
"type": "identity",
|
||||
"title": "Author and attribution",
|
||||
"description": "Canonical author, publisher, maintainer, URL, and attribution.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "content-index.json",
|
||||
"type": "content-index",
|
||||
"title": "Documentation catalog",
|
||||
"description": "Compact guide-level retrieval catalog, separate from media AI indexes.",
|
||||
"required_for_use": false
|
||||
},
|
||||
{
|
||||
"path": "skills.md",
|
||||
"type": "skill-index",
|
||||
"title": "Repo-local skills",
|
||||
"description": "Routes to intake and media structuring skills.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "skills/",
|
||||
"type": "skill-collection",
|
||||
"title": "Media intake and structuring",
|
||||
"description": "Collect metadata, author semantic structure, and guide local build/review.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "scripts/",
|
||||
"type": "software-collection",
|
||||
"title": "Builders and validators",
|
||||
"description": "Folder processing/final approval, optional public export, keyword retrieval, and repository checks.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "schemas/",
|
||||
"type": "schema-collection",
|
||||
"title": "JSON contracts",
|
||||
"description": "Media source/export contracts and the upstream repository standard schemas.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "templates/",
|
||||
"type": "template-collection",
|
||||
"title": "Intake and publication templates",
|
||||
"description": "Human metadata checklist and optional approved-public-export inputs.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "examples/",
|
||||
"type": "example-collection",
|
||||
"title": "Synthetic recordings",
|
||||
"description": "Portable audio/video transcript fixtures with no real media or attendees.",
|
||||
"required_for_use": false
|
||||
},
|
||||
{
|
||||
"path": "docs/",
|
||||
"type": "documentation-collection",
|
||||
"title": "Workflow and architecture guides",
|
||||
"description": "Source/review model, research, limits, and publication process.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "interfaces/",
|
||||
"type": "design-collection",
|
||||
"title": "Proposed API/MCP contracts",
|
||||
"description": "Design-only read interfaces; no hosted service is claimed.",
|
||||
"required_for_use": false
|
||||
},
|
||||
{
|
||||
"path": "tests/",
|
||||
"type": "test-collection",
|
||||
"title": "Behavior and repository tests",
|
||||
"description": "Media integrity, approval semantics, and repository consistency regressions.",
|
||||
"required_for_use": false
|
||||
},
|
||||
{
|
||||
"path": "PUBLICATION_WORKFLOW.md",
|
||||
"type": "workflow",
|
||||
"title": "Publication workflow",
|
||||
"description": "Separate approval and hosted-state verification before publication.",
|
||||
"required_for_use": false
|
||||
},
|
||||
{
|
||||
"path": "LICENSE",
|
||||
"type": "license",
|
||||
"title": "MIT license",
|
||||
"description": "Reuse terms for builder code/docs; third-party media rights remain separate.",
|
||||
"required_for_use": true
|
||||
},
|
||||
{
|
||||
"path": "CITATION.cff",
|
||||
"type": "citation",
|
||||
"title": "Citation metadata",
|
||||
"description": "Versioned author/title/canonical URL for attribution.",
|
||||
"required_for_use": false
|
||||
}
|
||||
],
|
||||
"relationships": {
|
||||
"part_of": [],
|
||||
"supports": [
|
||||
"https://projects.eddiesoehnel.com/adminprojects/ai-knowledge-structure-OPEN"
|
||||
],
|
||||
"depends_on": [],
|
||||
"related_resources": [
|
||||
"https://projects.eddiesoehnel.com/adminprojects/ai-knowledge-structure-OPEN",
|
||||
"https://projects.eddiesoehnel.com/adminprojects/structured-website-builder-OPEN",
|
||||
"https://projects.eddiesoehnel.com/adminprojects/repo-template"
|
||||
],
|
||||
"supersedes": [],
|
||||
"superseded_by": []
|
||||
},
|
||||
"access": {
|
||||
"public": true,
|
||||
"authentication_required": false,
|
||||
"payment_required": false,
|
||||
"registration_required": false
|
||||
},
|
||||
"rights": {
|
||||
"license": "MIT",
|
||||
"license_file": "LICENSE",
|
||||
"usage_guidance": "LICENSE.md"
|
||||
},
|
||||
"provenance": {
|
||||
"origin_type": "new-implementation",
|
||||
"creation_method": "owner-directed-and-ai-assisted",
|
||||
"contributors": [
|
||||
"Eddie Soehnel"
|
||||
],
|
||||
"source_references": [
|
||||
"https://projects.eddiesoehnel.com/adminprojects/ai-knowledge-structure-OPEN",
|
||||
"https://projects.eddiesoehnel.com/adminprojects/structured-website-builder-OPEN",
|
||||
"https://projects.eddiesoehnel.com/adminprojects/repo-template"
|
||||
]
|
||||
},
|
||||
"maintenance": {
|
||||
"maintainer": "Eddie Soehnel",
|
||||
"review_frequency": "as-needed when processing contracts change",
|
||||
"last_reviewed_at": "2026-10-17",
|
||||
"deprecated": false,
|
||||
"archived": false
|
||||
},
|
||||
"ai_retrieval": {
|
||||
"read_first": [
|
||||
"README.md",
|
||||
"AUTHOR.md",
|
||||
"repository-variables.json",
|
||||
"repository.json",
|
||||
"AGENTS.md",
|
||||
"skills.md"
|
||||
],
|
||||
"retrieve_as_needed": [
|
||||
"content-index.json",
|
||||
"docs/README.md",
|
||||
"skills/media-intake/SKILL.md",
|
||||
"skills/structure-media/SKILL.md",
|
||||
"scripts/README.md",
|
||||
"schemas/README.md",
|
||||
"docs/interfaces.md"
|
||||
],
|
||||
"exclude_by_default": [
|
||||
"build/",
|
||||
".test-work/",
|
||||
"tasks/",
|
||||
"tests/"
|
||||
],
|
||||
"instructions": "Preserve the folder-first intake → draft → human approval workflow. Unknowns are valid in local work. Source files and semantic IDs remain stable. API/MCP files are design contracts, not deployed services. Read implementation details only as needed; publication and media licensing are separate decisions."
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,9 @@ JSON Schema Draft 2020-12. The builder uses `jsonschema` with format checks and
|
||||
|
||||
| Schema | Validates |
|
||||
| --- | --- |
|
||||
| [repository](repository.schema.json) | Standard repository identity, discovery, rights, and retrieval manifest |
|
||||
| [repository variables](repository-variables.schema.json) | Verified reusable identity, rights, profile, and workflow defaults |
|
||||
| [content index](content-index.schema.json) | File-level documentation catalog, separate from generated media indexes |
|
||||
| [intake](intake.schema.json) | Folder interview, selected sources, provenance, unknowns |
|
||||
| [folder-export](folder-export.schema.json) | Local draft transcript, chunks, Q&A, and routing |
|
||||
| [media](media.schema.json) | Source recording manifest |
|
||||
@@ -14,4 +17,6 @@ JSON Schema Draft 2020-12. The builder uses `jsonschema` with format checks and
|
||||
| [qa](qa.schema.json) | Grounded Q&A export |
|
||||
| [ai-index](ai-index.schema.json) | Collection discovery catalog |
|
||||
|
||||
The local-export schema accepts `draft` and `approved`; the approval verifier enforces the associated evidence and input bindings. State strings alone do not prove approval. The repository schemas are copied from the MIT AI-Ready Repository Template, retaining upstream identifiers.
|
||||
|
||||
`chapters.json` follows the external Podcast Namespace chapter format; `schema.jsonld` follows Schema.org. They are not covered by proprietary lookalike schemas here. External rich-result eligibility and public playback require separate published-site validation.
|
||||
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://projects.eddiesoehnel.com/adminprojects/repo-template/schemas/content-index.schema.json",
|
||||
"title": "Repository Content Index",
|
||||
"description": "Compact machine-readable catalog of individual documents in a content-heavy repository.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema_version",
|
||||
"collection_id",
|
||||
"title",
|
||||
"description",
|
||||
"updated_at",
|
||||
"items"
|
||||
],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+$"
|
||||
},
|
||||
"collection_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/contentItem"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"$defs": {
|
||||
"stringArray": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"contentItem": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"content_id",
|
||||
"title",
|
||||
"description",
|
||||
"content_type",
|
||||
"path",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"content_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"content_type": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"path": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"published_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"draft",
|
||||
"published",
|
||||
"deprecated",
|
||||
"archived",
|
||||
"superseded"
|
||||
]
|
||||
},
|
||||
"author": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"topics": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"related_content_ids": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,10 @@
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"const": "draft"
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
@@ -112,7 +115,10 @@
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"const": "draft"
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
@@ -323,7 +329,10 @@
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"const": "draft"
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
@@ -471,7 +480,10 @@
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"const": "draft"
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://projects.eddiesoehnel.com/adminprojects/repo-template/schemas/repository-variables.schema.json",
|
||||
"title": "Repository Structure Skill Variables",
|
||||
"description": "Verified stable identity, repository, rights, profile, and workflow inputs reused by repository-structure skills.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema_version",
|
||||
"purpose",
|
||||
"repository_profile",
|
||||
"identity",
|
||||
"repository",
|
||||
"rights",
|
||||
"skill_defaults",
|
||||
"verified_by",
|
||||
"verified_at"
|
||||
],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+$"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"repository_profile": {
|
||||
"enum": [
|
||||
"documentation-guide",
|
||||
"skill-workflow",
|
||||
"software-automation",
|
||||
"dataset",
|
||||
"custom"
|
||||
]
|
||||
},
|
||||
"identity": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"authors",
|
||||
"publisher",
|
||||
"maintainer"
|
||||
],
|
||||
"properties": {
|
||||
"authors": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
}
|
||||
},
|
||||
"publisher": {
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
},
|
||||
"maintainer": {
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"repository": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"repository_id",
|
||||
"name",
|
||||
"title",
|
||||
"canonical_url"
|
||||
],
|
||||
"properties": {
|
||||
"repository_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "uri"
|
||||
},
|
||||
"organization": {
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"rights": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"license",
|
||||
"license_file"
|
||||
],
|
||||
"properties": {
|
||||
"license": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"license_file": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"skill_defaults": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"task_id",
|
||||
"require_plan_approval",
|
||||
"preserve_existing_content",
|
||||
"use_smallest_fitting_profile"
|
||||
],
|
||||
"properties": {
|
||||
"task_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"require_plan_approval": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"preserve_existing_content": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"use_smallest_fitting_profile": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"verified_by": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"verified_at": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"namedEntity": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,397 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://projects.eddiesoehnel.com/adminprojects/repo-template/schemas/repository.schema.json",
|
||||
"title": "AI-Ready Repository Manifest",
|
||||
"description": "Machine-readable identity, discovery, rights, provenance, maintenance, and AI retrieval metadata for an AI-ready repository.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema_version",
|
||||
"repository_id",
|
||||
"name",
|
||||
"title",
|
||||
"description",
|
||||
"authors",
|
||||
"publisher",
|
||||
"repository_status",
|
||||
"visibility",
|
||||
"maturity",
|
||||
"version",
|
||||
"resource_types",
|
||||
"entrypoints",
|
||||
"rights",
|
||||
"maintenance",
|
||||
"ai_retrieval"
|
||||
],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema_version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+$"
|
||||
},
|
||||
"repository_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "uri"
|
||||
},
|
||||
"organization": {
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
},
|
||||
"authors": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
}
|
||||
},
|
||||
"publisher": {
|
||||
"$ref": "#/$defs/namedEntity"
|
||||
},
|
||||
"repository_status": {
|
||||
"enum": [
|
||||
"draft",
|
||||
"active",
|
||||
"deprecated",
|
||||
"archived",
|
||||
"superseded"
|
||||
]
|
||||
},
|
||||
"visibility": {
|
||||
"enum": [
|
||||
"public",
|
||||
"restricted",
|
||||
"private"
|
||||
]
|
||||
},
|
||||
"maturity": {
|
||||
"enum": [
|
||||
"concept",
|
||||
"experimental",
|
||||
"prototype",
|
||||
"beta",
|
||||
"stable",
|
||||
"production"
|
||||
]
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][0-9A-Za-z.-]+)?$"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date"
|
||||
},
|
||||
"resource_types": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"topics": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueItems": true
|
||||
}
|
||||
},
|
||||
"audiences": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"problems_solved": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"capabilities": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"use_cases": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"required_inputs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"description",
|
||||
"required",
|
||||
"sensitivity"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sensitivity": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"expected_outputs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"description",
|
||||
"format"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"format": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"entrypoints": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"human",
|
||||
"ai"
|
||||
],
|
||||
"properties": {
|
||||
"human": {
|
||||
"type": "string"
|
||||
},
|
||||
"ai": {
|
||||
"type": "string"
|
||||
},
|
||||
"primary_skill": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"primary_agent": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"primary_script": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"primary_template": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"contents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path",
|
||||
"type",
|
||||
"title",
|
||||
"description",
|
||||
"required_for_use"
|
||||
],
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"required_for_use": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"relationships": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
}
|
||||
},
|
||||
"access": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"rights": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"license",
|
||||
"license_file"
|
||||
],
|
||||
"properties": {
|
||||
"license": {
|
||||
"type": "string"
|
||||
},
|
||||
"license_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"usage_guidance": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"provenance": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"origin_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"creation_method": {
|
||||
"type": "string"
|
||||
},
|
||||
"contributors": {
|
||||
"type": "array"
|
||||
},
|
||||
"source_references": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"maintenance": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"maintainer",
|
||||
"review_frequency",
|
||||
"deprecated",
|
||||
"archived"
|
||||
],
|
||||
"properties": {
|
||||
"maintainer": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"review_frequency": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_reviewed_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date"
|
||||
},
|
||||
"deprecated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"archived": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ai_retrieval": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"read_first",
|
||||
"retrieve_as_needed",
|
||||
"exclude_by_default",
|
||||
"instructions"
|
||||
],
|
||||
"properties": {
|
||||
"read_first": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"retrieve_as_needed": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"exclude_by_default": {
|
||||
"$ref": "#/$defs/stringArray"
|
||||
},
|
||||
"instructions": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"stringArray": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"uniqueItems": true
|
||||
},
|
||||
"namedEntity": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Scripts
|
||||
|
||||
Run commands from the repository root with Python 3.11+ and `requirements.txt` dependencies.
|
||||
|
||||
| Script | Purpose |
|
||||
| --- | --- |
|
||||
| [folder_builder.py](folder_builder.py) | Inspect/prepare source folders; seed plans; build drafts; finalize explicitly approved content; verify and search drafts/finals |
|
||||
| [media_approval.py](media_approval.py) | Final approval input binding and integrity checks, called by folder_builder |
|
||||
| [media_builder.py](media_builder.py) | Optional reviewed public-export pipeline and collection search |
|
||||
| [check_repository.py](check_repository.py) | Native schemas, identity/version/rights, catalog, links, paths, syntax, whitespace, and targeted credential-pattern checks |
|
||||
| [audit_repository.py](audit_repository.py) | Read-only software-automation profile audit adapted from the MIT AI-Ready Repository Template |
|
||||
|
||||
Use `python scripts/folder_builder.py --help` for commands and [the main README](../README.md) for the processing sequence. Finalize only on explicit approval of the specific reviewed draft, with `--reviewer`, `--approved-at`, and `--evidence`. Never invent those values to unblock a build.
|
||||
|
||||
Repository checks:
|
||||
|
||||
```text
|
||||
python scripts/audit_repository.py . --profile software-automation --json
|
||||
python scripts/check_repository.py
|
||||
python -m unittest discover -s tests -v
|
||||
```
|
||||
|
||||
Hashes detect inconsistent source/output, not malicious replacement of files plus receipts. No deterministic builder calls STT providers, inference services, public APIs, or hosting platforms.
|
||||
@@ -0,0 +1,370 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Read-only structural audit for an AI-ready repository."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
PROFILES = {
|
||||
"documentation-guide": {
|
||||
"README.md",
|
||||
"AUTHOR.md",
|
||||
"repository-variables.json",
|
||||
"repository.json",
|
||||
"LICENSE",
|
||||
"CHANGELOG.md",
|
||||
"UPDATES.md",
|
||||
"VERSION",
|
||||
"CITATION.cff",
|
||||
"docs",
|
||||
},
|
||||
"skill-workflow": {
|
||||
"README.md",
|
||||
"AUTHOR.md",
|
||||
"repository-variables.json",
|
||||
"repository.json",
|
||||
"LICENSE",
|
||||
"CHANGELOG.md",
|
||||
"UPDATES.md",
|
||||
"VERSION",
|
||||
"AGENTS.md",
|
||||
"skills.md",
|
||||
"skills",
|
||||
"templates",
|
||||
"examples",
|
||||
},
|
||||
"software-automation": {
|
||||
"README.md",
|
||||
"AUTHOR.md",
|
||||
"repository-variables.json",
|
||||
"repository.json",
|
||||
"LICENSE",
|
||||
"CHANGELOG.md",
|
||||
"UPDATES.md",
|
||||
"VERSION",
|
||||
"CONTRIBUTING.md",
|
||||
"SECURITY.md",
|
||||
"AGENTS.md",
|
||||
"docs",
|
||||
"scripts",
|
||||
"tests",
|
||||
},
|
||||
"dataset": {
|
||||
"README.md",
|
||||
"AUTHOR.md",
|
||||
"repository-variables.json",
|
||||
"repository.json",
|
||||
"LICENSE",
|
||||
"CHANGELOG.md",
|
||||
"UPDATES.md",
|
||||
"VERSION",
|
||||
"CITATION.cff",
|
||||
"data",
|
||||
"schemas",
|
||||
"docs",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("repository", type=Path, help="Repository root to inspect")
|
||||
parser.add_argument(
|
||||
"--profile",
|
||||
choices=sorted(PROFILES),
|
||||
required=True,
|
||||
help="Approved repository profile",
|
||||
)
|
||||
parser.add_argument("--json", action="store_true", help="Emit JSON")
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def read_version_from_citation(path: Path) -> str | None:
|
||||
if not path.is_file():
|
||||
return None
|
||||
match = re.search(
|
||||
r"(?m)^version:\s*[\"']?([^\"'\s#]+)",
|
||||
path.read_text(encoding="utf-8-sig"),
|
||||
)
|
||||
return match.group(1) if match else None
|
||||
|
||||
|
||||
def audit_content_index(root: Path, findings: list[dict[str, str]]) -> None:
|
||||
path = root / "content-index.json"
|
||||
if not path.is_file():
|
||||
return
|
||||
try:
|
||||
index = json.loads(path.read_text(encoding="utf-8-sig"))
|
||||
except (OSError, UnicodeError, json.JSONDecodeError) as exc:
|
||||
findings.append({"level": "error", "message": f"content-index.json is invalid: {exc}"})
|
||||
return
|
||||
|
||||
items = index.get("items")
|
||||
if not isinstance(items, list):
|
||||
findings.append(
|
||||
{"level": "error", "message": "content-index.json items must be an array"}
|
||||
)
|
||||
return
|
||||
|
||||
content_ids: set[str] = set()
|
||||
paths: set[str] = set()
|
||||
for position, item in enumerate(items):
|
||||
if not isinstance(item, dict):
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"content-index.json item {position + 1} must be an object",
|
||||
}
|
||||
)
|
||||
continue
|
||||
content_id = item.get("content_id")
|
||||
declared = item.get("path")
|
||||
if not content_id:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"content-index.json item {position + 1} lacks content_id",
|
||||
}
|
||||
)
|
||||
elif content_id in content_ids:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"Duplicate content_id in content-index.json: {content_id}",
|
||||
}
|
||||
)
|
||||
else:
|
||||
content_ids.add(content_id)
|
||||
if not declared:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"content-index.json item {position + 1} lacks path",
|
||||
}
|
||||
)
|
||||
elif declared in paths:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"Duplicate path in content-index.json: {declared}",
|
||||
}
|
||||
)
|
||||
else:
|
||||
paths.add(declared)
|
||||
declared_path = Path(declared)
|
||||
if (
|
||||
declared_path.is_absolute()
|
||||
or ".." in declared_path.parts
|
||||
or not (root / declared_path).is_file()
|
||||
):
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"Indexed content path does not exist or is unsafe: {declared}",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
def audit(root: Path, profile: str) -> dict:
|
||||
findings: list[dict[str, str]] = []
|
||||
if not root.is_dir():
|
||||
return {
|
||||
"repository": str(root),
|
||||
"profile": profile,
|
||||
"passed": False,
|
||||
"findings": [{"level": "error", "message": "Repository path is not a directory"}],
|
||||
}
|
||||
|
||||
for relative in sorted(PROFILES[profile]):
|
||||
if not (root / relative).exists():
|
||||
findings.append({"level": "error", "message": f"Missing required path: {relative}"})
|
||||
|
||||
manifest_path = root / "repository.json"
|
||||
manifest = None
|
||||
if manifest_path.is_file():
|
||||
try:
|
||||
manifest = json.loads(manifest_path.read_text(encoding="utf-8-sig"))
|
||||
except (OSError, UnicodeError, json.JSONDecodeError) as exc:
|
||||
findings.append({"level": "error", "message": f"repository.json is invalid: {exc}"})
|
||||
else:
|
||||
for key in ("schema_version", "repository_id", "title", "description", "version", "entrypoints"):
|
||||
if key not in manifest:
|
||||
findings.append({"level": "error", "message": f"repository.json lacks key: {key}"})
|
||||
entrypoints = manifest.get("entrypoints", {})
|
||||
if isinstance(entrypoints, dict):
|
||||
for audience in ("human", "ai"):
|
||||
declared = entrypoints.get(audience)
|
||||
if not declared:
|
||||
findings.append(
|
||||
{"level": "error", "message": f"Missing {audience} entrypoint declaration"}
|
||||
)
|
||||
elif not (root / declared).exists():
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"Declared {audience} entrypoint does not exist: {declared}",
|
||||
}
|
||||
)
|
||||
else:
|
||||
findings.append({"level": "error", "message": "entrypoints must be an object"})
|
||||
|
||||
variables_path = root / "repository-variables.json"
|
||||
variables = None
|
||||
if variables_path.is_file():
|
||||
try:
|
||||
variables = json.loads(variables_path.read_text(encoding="utf-8-sig"))
|
||||
except (OSError, UnicodeError, json.JSONDecodeError) as exc:
|
||||
findings.append(
|
||||
{"level": "error", "message": f"repository-variables.json is invalid: {exc}"}
|
||||
)
|
||||
else:
|
||||
for key in (
|
||||
"schema_version",
|
||||
"repository_profile",
|
||||
"identity",
|
||||
"repository",
|
||||
"rights",
|
||||
"skill_defaults",
|
||||
"verified_by",
|
||||
"verified_at",
|
||||
):
|
||||
if key not in variables:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"repository-variables.json lacks key: {key}",
|
||||
}
|
||||
)
|
||||
|
||||
if manifest and variables:
|
||||
identity = variables.get("identity", {})
|
||||
variable_authors = [
|
||||
item.get("name")
|
||||
for item in identity.get("authors", [])
|
||||
if isinstance(item, dict)
|
||||
]
|
||||
manifest_authors = [
|
||||
item.get("name")
|
||||
for item in manifest.get("authors", [])
|
||||
if isinstance(item, dict)
|
||||
]
|
||||
comparisons = (
|
||||
("authors", variable_authors, manifest_authors),
|
||||
(
|
||||
"publisher",
|
||||
identity.get("publisher", {}).get("name"),
|
||||
manifest.get("publisher", {}).get("name"),
|
||||
),
|
||||
(
|
||||
"maintainer",
|
||||
identity.get("maintainer", {}).get("name"),
|
||||
manifest.get("maintenance", {}).get("maintainer"),
|
||||
),
|
||||
(
|
||||
"repository",
|
||||
variables.get("repository"),
|
||||
{
|
||||
key: manifest.get(key)
|
||||
for key in (
|
||||
"repository_id",
|
||||
"name",
|
||||
"title",
|
||||
"canonical_url",
|
||||
"organization",
|
||||
)
|
||||
},
|
||||
),
|
||||
(
|
||||
"rights",
|
||||
variables.get("rights"),
|
||||
{
|
||||
key: manifest.get("rights", {}).get(key)
|
||||
for key in ("license", "license_file")
|
||||
},
|
||||
),
|
||||
)
|
||||
for label, variable_value, manifest_value in comparisons:
|
||||
if variable_value != manifest_value:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": (
|
||||
f"{label} differs between repository-variables.json "
|
||||
"and repository.json"
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
if variables and variables.get("repository_profile") != profile:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": (
|
||||
"repository_profile differs between repository-variables.json "
|
||||
f"({variables.get('repository_profile')}) and requested audit ({profile})"
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
audit_content_index(root, findings)
|
||||
|
||||
version_path = root / "VERSION"
|
||||
version = version_path.read_text(encoding="utf-8-sig").strip() if version_path.is_file() else None
|
||||
if version and manifest and manifest.get("version") != version:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"VERSION ({version}) differs from repository.json ({manifest.get('version')})",
|
||||
}
|
||||
)
|
||||
|
||||
citation_version = read_version_from_citation(root / "CITATION.cff")
|
||||
if version and citation_version and citation_version != version:
|
||||
findings.append(
|
||||
{
|
||||
"level": "error",
|
||||
"message": f"VERSION ({version}) differs from CITATION.cff ({citation_version})",
|
||||
}
|
||||
)
|
||||
|
||||
readme = root / "README.md"
|
||||
if readme.is_file() and not readme.read_text(encoding="utf-8-sig").strip():
|
||||
findings.append({"level": "error", "message": "README.md is empty"})
|
||||
|
||||
return {
|
||||
"repository": str(root.resolve()),
|
||||
"profile": profile,
|
||||
"passed": not any(item["level"] == "error" for item in findings),
|
||||
"findings": findings,
|
||||
}
|
||||
|
||||
|
||||
def emit_markdown(result: dict) -> None:
|
||||
print(f"# Repository Audit\n\n- Repository: `{result['repository']}`")
|
||||
print(f"- Profile: `{result['profile']}`")
|
||||
print(f"- Result: `{'PASS' if result['passed'] else 'FAIL'}`")
|
||||
print("\n## Findings")
|
||||
if not result["findings"]:
|
||||
print("\n- No structural errors found.")
|
||||
else:
|
||||
for finding in result["findings"]:
|
||||
print(f"\n- {finding['level'].upper()}: {finding['message']}")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
args = parse_args()
|
||||
result = audit(args.repository, args.profile)
|
||||
if args.json:
|
||||
print(json.dumps(result, indent=2))
|
||||
else:
|
||||
emit_markdown(result)
|
||||
return 0 if result["passed"] else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -5,12 +5,47 @@ import re
|
||||
from pathlib import Path
|
||||
from urllib.parse import unquote
|
||||
|
||||
from jsonschema import Draft202012Validator
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SKIP = {'build', '.git', '__pycache__', '.test-work', '.venv'}
|
||||
|
||||
|
||||
def validate_contracts(root=ROOT):
|
||||
def load(name):
|
||||
return json.loads((root/name).read_text(encoding='utf-8-sig'))
|
||||
for document,schema in [('repository.json','repository'),('repository-variables.json','repository-variables'),('content-index.json','content-index')]:
|
||||
Draft202012Validator(load('schemas/'+schema+'.schema.json'), format_checker=FormatChecker()).validate(load(document))
|
||||
manifest,variables,index=load('repository.json'),load('repository-variables.json'),load('content-index.json')
|
||||
assert variables['identity']['authors']==manifest['authors'], 'Author mismatch'
|
||||
assert variables['identity']['publisher']==manifest['publisher'], 'Publisher mismatch'
|
||||
assert variables['identity']['maintainer']['name']==manifest['maintenance']['maintainer'], 'Maintainer mismatch'
|
||||
for key,value in variables['repository'].items():
|
||||
assert manifest.get(key)==value, 'Repository identity mismatch: '+key
|
||||
for key,value in variables['rights'].items():
|
||||
assert manifest['rights'][key]==value, 'Rights mismatch: '+key
|
||||
version=(root/'VERSION').read_text(encoding='utf-8-sig').strip()
|
||||
assert manifest['version']==version, 'Manifest/version mismatch'
|
||||
citation=(root/'CITATION.cff').read_text(encoding='utf-8')
|
||||
assert re.search(r'(?m)^version:\s*[\"\x27]?'+re.escape(version)+r'[\"\x27]?\s*$',citation), 'Citation version mismatch'
|
||||
assert 'license: MIT' in citation and manifest['rights']['license']=='MIT', 'Citation/license mismatch'
|
||||
assert manifest['canonical_url'] in citation, 'Citation URL mismatch'
|
||||
for record in manifest['authors']:
|
||||
assert record['name'] in (root/'AUTHOR.md').read_text(encoding='utf-8'), 'Author notice mismatch'
|
||||
assert 'Copyright (c) 2026 Eddie Soehnel' in (root/manifest['rights']['license_file']).read_text(encoding='utf-8'), 'License attribution mismatch'
|
||||
ids=[item['content_id'] for item in index['items']]
|
||||
paths=[item['path'] for item in index['items']]
|
||||
assert len(ids)==len(set(ids)) and len(paths)==len(set(paths)), 'Duplicate content identity/path'
|
||||
for item in index['items']:
|
||||
target=(root/item['path']).resolve()
|
||||
assert target.is_relative_to(root.resolve()) and target.is_file(), 'Missing/unsafe indexed path'
|
||||
assert set(item.get('related_content_ids',[])) <= set(ids), 'Unresolved content relation'
|
||||
for declared in [v for v in manifest['entrypoints'].values() if v] + [c['path'] for c in manifest['contents']] + manifest['ai_retrieval']['read_first'] + manifest['ai_retrieval']['retrieve_as_needed']:
|
||||
target=(root/declared).resolve()
|
||||
assert target.is_relative_to(root.resolve()) and target.exists(), 'Missing/unsafe declared path: '+declared
|
||||
return {'version':version,'license':manifest['rights']['license'],'indexed_documents':len(ids)}
|
||||
|
||||
|
||||
def check():
|
||||
files = [p for p in ROOT.rglob('*') if p.is_file() and not (set(p.relative_to(ROOT).parts) & SKIP)]
|
||||
count = {'json': 0, 'markdown_links': 0, 'schema_refs': 0, 'python': 0}
|
||||
@@ -59,12 +94,12 @@ def check():
|
||||
except Exception as error:
|
||||
errors.append(f'{path.relative_to(ROOT)}: {error}')
|
||||
manifest = json.loads((ROOT/'repository.json').read_text(encoding='utf-8'))
|
||||
for name in list(manifest['entrypoints'].values()) + [v['path'] for v in manifest['contents']]:
|
||||
for name in [v for v in manifest['entrypoints'].values() if v] + [v['path'] for v in manifest['contents']]:
|
||||
if not (ROOT/name).exists():
|
||||
errors.append('Missing manifest path: ' + name)
|
||||
if errors:
|
||||
raise ValueError('\n'.join(errors))
|
||||
print(json.dumps({'valid': True, **count}, indent=2))
|
||||
print(json.dumps({'valid': True, **count, **validate_contracts(ROOT)}, indent=2))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -322,6 +322,10 @@ def build(folder, intake_path, plan_path, output):
|
||||
def verify(output, check_sources=True):
|
||||
output = Path(output).resolve()
|
||||
receipt = core.load(output/'build-receipt.json')
|
||||
if receipt.get('status') == 'approved':
|
||||
from media_approval import verify as verify_approved
|
||||
return verify_approved(output, check_sources=check_sources)
|
||||
core.require(receipt.get('status') == 'draft' and not receipt.get('human_approval'), 'Invalid draft state')
|
||||
actual = {p.relative_to(output).as_posix():sha_file(p) for p in output.rglob('*')
|
||||
if p.is_file() and p != output/'build-receipt.json'}
|
||||
core.require(actual == receipt['files'], 'Draft output differs from receipt')
|
||||
@@ -340,6 +344,7 @@ def search(output, query, limit=5):
|
||||
terms = set(re.findall(r'\w+', query.casefold()))
|
||||
core.require(terms, 'Empty query')
|
||||
results = []
|
||||
status = core.load(Path(output)/'build-receipt.json')['status']
|
||||
for kind in ('chunks','qa'):
|
||||
for r in core.load(Path(output)/(kind+'.json'))[kind]:
|
||||
text = (r['title']+' '+r['summary']+' '+r['content']) if kind=='chunks' else r['question']+' '+r['answer']
|
||||
@@ -350,7 +355,7 @@ def search(output, query, limit=5):
|
||||
+ 2 * len(terms & set(re.findall(r'\w+',abstract.casefold()))))
|
||||
if score:
|
||||
results.append({'id':r.get('chunk_id',r.get('qa_id')),'type':kind,'score':score,
|
||||
'text':text,'citations':r.get('citations',r.get('evidence')),'status':'draft'})
|
||||
'text':text,'citations':r.get('citations',r.get('evidence')),'status':status})
|
||||
return sorted(results,key=lambda r:(-r['score'],r['id']))[:limit]
|
||||
|
||||
|
||||
@@ -372,12 +377,20 @@ def main():
|
||||
if command=='search':
|
||||
cmd.add_argument('--query',required=True)
|
||||
cmd.add_argument('--limit',type=int,default=5)
|
||||
cmd = sub.add_parser('finalize')
|
||||
for name in ('source','output','intake','plan'):
|
||||
cmd.add_argument('--'+name, type=Path, required=True)
|
||||
for name in ('reviewer','approved-at','evidence'):
|
||||
cmd.add_argument('--'+name, required=True)
|
||||
a = p.parse_args()
|
||||
try:
|
||||
if a.command=='inspect': result=inspect(a.folder)[0]
|
||||
elif a.command=='prepare': result=prepare(a.folder,a.output)
|
||||
elif a.command=='seed': result=seed(a.folder,a.intake,a.output)
|
||||
elif a.command=='build': result=build(a.folder,a.intake,a.plan,a.output)
|
||||
elif a.command=='finalize':
|
||||
from media_approval import finalize
|
||||
result=finalize(a.source,a.output,a.intake,a.plan,a.reviewer,a.approved_at,a.evidence)
|
||||
elif a.command=='verify': result=verify(a.output)
|
||||
else: result=search(a.output,a.query,a.limit)
|
||||
print(core.encoded(result).decode('utf-8'),end='')
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
"""Explicit local content approval, final-package integrity, and draft preservation.
|
||||
|
||||
This is workflow evidence, not authenticated signatures, source fact-checking,
|
||||
third-party media licensing, or publication authority.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import copy
|
||||
import shutil
|
||||
import tempfile
|
||||
from datetime import datetime
|
||||
|
||||
import media_builder as core
|
||||
import folder_builder
|
||||
|
||||
|
||||
def semantic_plan(plan):
|
||||
return {key:value for key,value in plan.items() if key != 'review'}
|
||||
|
||||
|
||||
def verify(output, check_sources=True):
|
||||
output=Path(output).resolve()
|
||||
receipt=core.load(output/'build-receipt.json')
|
||||
approval=core.load(output/'approval.json')
|
||||
core.require(receipt['status']=='approved' and receipt['lifecycle']=='final', 'Not a final approved package')
|
||||
core.require(approval['status']=='approved' and approval['reviewer'].strip() and approval['approval_evidence'].strip(), 'Explicit approval record missing')
|
||||
core.require(approval['input_sha256']==receipt['input_sha256'], 'Approval/receipt fingerprint mismatch')
|
||||
actual={p.relative_to(output).as_posix():folder_builder.sha_file(p) for p in output.rglob('*')
|
||||
if p.is_file() and p != output/'build-receipt.json'}
|
||||
core.require(actual==receipt['files'], 'Final output differs from receipt')
|
||||
for name in ('transcript.json','chunks.json','qa.json','ai-index.json'):
|
||||
value=core.load(output/name)
|
||||
core.validate(value, 'folder-export')
|
||||
core.require(value['status']=='approved','Artifact not approved')
|
||||
if check_sources:
|
||||
for record in receipt['source_files'].values():
|
||||
path=core.relative_file(output.parent,record['path'])
|
||||
core.require(folder_builder.sha_file(path)==record['sha256'],'Original source changed')
|
||||
intake=core.relative_file(output.parent,approval['inputs']['intake'])
|
||||
plan=core.relative_file(output.parent,approval['inputs']['plan'])
|
||||
core.require(folder_builder.sha_file(intake)==approval['intake_sha256'],'Intake changed since approval')
|
||||
plan_value=core.load(plan)
|
||||
core.require(core.digest(core.encoded(semantic_plan(plan_value)))==approval['plan_content_sha256'],
|
||||
'Plan content changed since approval')
|
||||
core.require(plan_value['review']['status']=='approved','Source plan not approved')
|
||||
core.require(plan_value['review']['reviewer']==approval['reviewer'] and plan_value['review']['reviewed_at']==approval['approved_at'], 'Approval identity/time differs from source plan')
|
||||
core.require(plan_value['review']['input_sha256']==receipt['input_sha256'],'Plan approval fingerprint mismatch')
|
||||
media=core.load(output/'media.json')
|
||||
core.require(media['human_approval'] and not media['publication_ready'], 'Approval scope mismatch')
|
||||
return {'valid':True,'status':'approved','lifecycle':'final','source_files_checked':check_sources,
|
||||
'source_files_unchanged':True if check_sources else None,
|
||||
'reviewer':approval['reviewer'],**receipt['counts']}
|
||||
|
||||
|
||||
def finalize(source,output,intake_path,plan_path,reviewer,approved_at,evidence):
|
||||
source,output=Path(source).resolve(),Path(output).resolve()
|
||||
intake_path,plan_path=Path(intake_path).resolve(),Path(plan_path).resolve()
|
||||
core.require(source.parent==output.parent and output!=source,'Final must be a sibling of the reviewed draft')
|
||||
core.require(not output.exists(),'Final output exists; do not overwrite it')
|
||||
core.require(intake_path.parent==source.parent and plan_path.parent==source.parent,'Inputs must be beside the media sources')
|
||||
core.require(reviewer.strip() and evidence.strip(),'Explicit reviewer and approval evidence required')
|
||||
moment=datetime.fromisoformat(approved_at.replace('Z','+00:00'))
|
||||
core.require(moment.tzinfo is not None,'Approval timestamp must include a timezone')
|
||||
folder_builder.verify(source)
|
||||
draft_receipt=core.load(source/'build-receipt.json')
|
||||
plan=core.load(plan_path)
|
||||
core.require(plan['review']['status']=='draft','Expected the reviewed draft source plan')
|
||||
expected=core.digest(core.encoded({'builder_version':draft_receipt['builder_version'], 'intake':core.load(intake_path), 'plan':plan, 'source_files':draft_receipt['source_files']}))
|
||||
core.require(expected==draft_receipt['input_sha256'], 'Draft inputs changed since build; rebuild and review before approval')
|
||||
old_review=copy.deepcopy(plan['review'])
|
||||
approval={
|
||||
'schema_version':'1.0','status':'approved','lifecycle':'final',
|
||||
'reviewer':reviewer,'approved_at':approved_at,'approval_evidence':evidence,
|
||||
'scope':'Owner approval of the generated structured content and metadata as final, with documented limitations retained.',
|
||||
'publication_ready':False,'input_sha256':draft_receipt['input_sha256'],
|
||||
'inputs':{'intake':intake_path.name,'plan':plan_path.name},
|
||||
'intake_sha256':folder_builder.sha_file(intake_path),
|
||||
'plan_content_sha256':core.digest(core.encoded(semantic_plan(plan))),
|
||||
'reviewed_draft_directory':source.name,'reviewed_draft_receipt':draft_receipt,
|
||||
'notes':['The original reviewed draft remains available as history.',
|
||||
'The approval timestamp records when this run recorded the user approval.',
|
||||
'Approval does not claim independent fact-checking, audio/slide verification, a recording license, or deployment.',
|
||||
'Unknown metadata and original source wording are retained.']}
|
||||
pending=Path(tempfile.mkdtemp(prefix='.final-media-',dir=output.parent))
|
||||
plan_updated=False
|
||||
try:
|
||||
for path in source.iterdir():
|
||||
core.require(path.is_file(),'Unexpected draft subdirectory')
|
||||
shutil.copyfile(path,pending/path.name)
|
||||
for path in pending.glob('*.json'):
|
||||
if path.name=='build-receipt.json':continue
|
||||
value=core.load(path)
|
||||
if value.get('profile')=='local-review':value['status']='approved'
|
||||
if path.name=='media.json':
|
||||
value['human_approval']=True
|
||||
if value['metadata']['description']:
|
||||
value['metadata']['description']=value['metadata']['description'].replace(
|
||||
'This local draft preserves','This approved structured package preserves')
|
||||
core.write(path,value)
|
||||
page=(pending/'README.md').read_text(encoding='utf-8')
|
||||
page=page.replace('**Draft for human review.** Built from the supplied recording, TXT, and VTT.',
|
||||
f'**Final — approved by {reviewer} on {moment.date().isoformat()}.** '
|
||||
'Built from the supplied recording, TXT, and VTT; documented limitations remain in the review record.')
|
||||
page=page.replace('This local draft preserves','This approved structured package preserves')
|
||||
page=page.replace('Draft credit','Approved credit')
|
||||
core.write(pending/'README.md',page)
|
||||
review=(pending/'review.md').read_text(encoding='utf-8')
|
||||
review=review.replace('Status: **draft — not human approved or publication ready**.',
|
||||
f'Status: **final and approved**. Approved by {reviewer} on {moment.date().isoformat()}.\n\n'
|
||||
f'Approval evidence: “{evidence}”\n\n'
|
||||
'This records approval of the generated structure with its stated limitations. '
|
||||
'Publication prerequisites and source-verification notes below remain informational follow-up items.')
|
||||
review=review.replace('## Please review','## Follow-up checks retained after approval')
|
||||
review=review.replace('not factual accuracy or human approval.','not independent factual accuracy. Human approval is recorded separately in approval.json.')
|
||||
core.write(pending/'review.md',review)
|
||||
guide=(pending/'llms.txt').read_text(encoding='utf-8').replace(
|
||||
'> Local draft for review; publication details may be unknown.',
|
||||
'> Final, owner-approved structured content; publication details may remain unknown.')
|
||||
core.write(pending/'llms.txt',guide)
|
||||
core.write(pending/'approval.json',approval)
|
||||
receipt={**draft_receipt,'status':'approved','lifecycle':'final','human_approval':True,
|
||||
'publication_ready':False,'approval_record':'approval.json',
|
||||
'files':{p.name:folder_builder.sha_file(p) for p in sorted(pending.iterdir())
|
||||
if p.is_file() and p.name!='build-receipt.json'}}
|
||||
core.write(pending/'build-receipt.json',receipt)
|
||||
plan['review']={'status':'approved','reviewer':reviewer,'reviewed_at':approved_at,
|
||||
'input_sha256':draft_receipt['input_sha256']}
|
||||
core.validate(plan,'plan')
|
||||
core.write(plan_path,plan)
|
||||
plan_updated=True
|
||||
# Validate all content/state and original hashes before exposing the final path.
|
||||
verify(pending)
|
||||
pending.rename(output)
|
||||
return verify(output)
|
||||
except Exception:
|
||||
if plan_updated and not output.exists():
|
||||
plan['review']=old_review
|
||||
core.write(plan_path,plan)
|
||||
raise
|
||||
finally:
|
||||
if pending.exists():shutil.rmtree(pending)
|
||||
|
||||
@@ -16,7 +16,7 @@ from xml.etree import ElementTree as ET
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
VERSION = "0.2.0"
|
||||
VERSION = "0.3.0"
|
||||
|
||||
|
||||
def require(condition, message):
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
- [media-intake](skills/media-intake/SKILL.md): inspect the sources, extract metadata from supplied pages, and interview the owner about missing useful facts. Start here.
|
||||
- [structure-media](skills/structure-media/SKILL.md): use the intake to author chunks, grounded Q&A, and chapters; build inside the supplied folder, then return for human review.
|
||||
|
||||
After explicit user approval, the structuring skill uses `folder_builder.py finalize` to record approval and produce a verified final package. Draft generation never manufactures human approval or publication permission.
|
||||
|
||||
Both skills are repository-local. Primary executable: [folder_builder.py](scripts/folder_builder.py). [media_builder.py](scripts/media_builder.py) is the later optional approved public exporter. Neither installs transcription, publication, API, or MCP services.
|
||||
@@ -15,4 +15,8 @@ Chapters describe navigation, not necessarily every semantic chunk. Choose order
|
||||
|
||||
Build with `folder_builder.py build --folder <folder> --intake <folder>/media-intake.json --plan <folder>/structure-plan.json --output <folder>/structured`. Keep review status draft. Supply an accurate overview, grounded Q&A, useful topic tags, chapters, and a concise review checklist calling out unconfirmed identities, numbers, source artifacts, and missing metadata. A local draft must not be blocked by missing hosted URLs or publication approval. Never invent human review or rights clearance to satisfy a schema.
|
||||
|
||||
Run folder-export verification, cue coverage, exact quote checks, source-hash readback, and representative retrieval checks. Return direct links to `structured/README.md` and `structured/review.md`. Leave existing outputs intact; use `structured-002/` or another new directory for revisions. Record unknowns and unfinished checks plainly. Human review follows the build. For a later public export, follow `PUBLICATION_WORKFLOW.md` and the approved-release commands in `docs/public-export.md`; this skill does not authorize Git pushes or deployment.
|
||||
Run folder-export verification, cue coverage, exact quote checks, source-hash readback, and representative retrieval checks. Return direct links to `structured/README.md` and `structured/review.md`. Leave existing outputs intact; use `structured-002/` for revisions. Record unknowns and unfinished checks plainly. Human review follows the build.
|
||||
|
||||
After the user explicitly approves a specific draft, use `folder_builder.py finalize` with the source/output, intake, plan, reviewer, timezone-aware timestamp recording approval, and exact approval evidence. Verify the final package and return its README and approval record. If the draft inputs changed, rebuild and obtain review of the changed content. Do not infer approval from silence or a timestamp. Retain documented limitations and draft history. Approval does not establish recording rights or authorize publication. The finalization workflow uses checksums and recorded evidence, not an authenticated signature.
|
||||
|
||||
For a later public export, follow `PUBLICATION_WORKFLOW.md` and `docs/public-export.md`; this skill does not authorize Git pushes or deployment.
|
||||
@@ -0,0 +1,65 @@
|
||||
# LOD Media Parser: baseline reset, settings and experiment record
|
||||
|
||||
Date: 2026-10-18. Implemented application: C:\projects\lod\lod-media-parser,
|
||||
version 0.0.7. This is an aggregate cross-project task record at the owner's request;
|
||||
it changes no Structured Media Builder runtime or publication contract. Private media,
|
||||
prompts, transcripts, dog identities and source paths are omitted.
|
||||
|
||||
## Decisions and observed results
|
||||
|
||||
| Test | Changes/selection | Observed results | Interpretation |
|
||||
| --- | --- | --- | --- |
|
||||
| Original successful reference | Full instructions; coarse 2 sec/max 960 px; dense 0.25 sec/max 960 px; full sampled timeline | 50 model calls, 1,415,475 reported tokens, 1,253.82 active seconds; 1 owner-valued clip | Best available reference, not proof of recall or exact cue timing. |
|
||||
| 0.0.5 Efficient, comparison run 002 | Same source/substantive prompt; compact instructions, coarse max 640 px; static thinning available | 43 calls, 928,425 tokens, 850.92 seconds; 0 clips; 43 coarse windows; no static frames removed | Fewer tokens but did not reproduce the useful clip. Prompt newline representation differed. Not accepted as a quality improvement. |
|
||||
| 0.0.6 uncertain routing, run 003 | Plausible coarse rejections routed to dense verification | 22 uncertain candidates, 43 dense calls, 86 total calls; 2,240,830 tokens, 1,427.85 seconds; 0 clips | Routing worked but increased usage without a useful result. All sampled windows completed. Cached transcript and 634 coarse frames reused; 868 frames extracted. |
|
||||
| 0.0.7 baseline reset | Original restored as new-job default; optional presets/per-job controls | 53 regression tests and synthetic FFmpeg/Whisper/correction/approval smoke passed; no owner-video run | Real output and resource comparison pending owner test. |
|
||||
|
||||
Counts are provider-reported tokens, including cached input within input, not an
|
||||
incremental dollar bill. Runtime/model conditions may vary. These are sequential
|
||||
operational comparisons, not a controlled scientific evaluation.
|
||||
|
||||
## What we learned and tried
|
||||
|
||||
The efficient scan discarded the previously useful candidate before dense review.
|
||||
Routing uncertainty fixed that path, but dense reviews still rejected the sequence.
|
||||
Retained logs show ambiguous transcription and cue timing, plus sequences split into
|
||||
6-second dense windows. A wait/hold can be useful even without a new movement after
|
||||
the cue; earlier reasoning may have been too restrictive. These are diagnostic
|
||||
findings from retained model evidence, not independently verified audio judgments.
|
||||
Overlapping windows, hold-specific criteria and targeted retranscription were proposed
|
||||
but are deferred. Owner chose to restore the working baseline and expose tuning.
|
||||
|
||||
## Implemented 0.0.7 controls
|
||||
|
||||
- Original/Baseline default: original full instructions, 2-second coarse interval,
|
||||
max 960-pixel coarse/dense images, 0.25-second dense interval, 6-second dense windows;
|
||||
speech filtering, static thinning and uncertain-rejection routing all off.
|
||||
- Efficient preset: compact instructions, max 640-pixel coarse frames, static thinning.
|
||||
Speech-guided preset adds cue-selected windows plus audits. Both are optional.
|
||||
- Advanced controls: coarse/dense intervals, image sizes, dense window length,
|
||||
instruction style and independent experimental toggles. Restore original defaults
|
||||
resets controls. No AI-generated frames. Invalid/unbounded settings rejected.
|
||||
- Frozen per-job settings, preset/custom flag and instruction hash saved to jobs,
|
||||
summaries, reports, receipts and ResourceUsage.processing_settings in each companion
|
||||
JSON. Existing jobs/previous outputs remain unchanged. Retry retains job settings;
|
||||
create a new job to change them. Older checkpoints require Retry.
|
||||
- Shared source preprocessing remains available; no shared AI inference or API fallback.
|
||||
|
||||
## Next owner test
|
||||
|
||||
1. Refresh dashboard. Create a new job from the same video and exact prompt/output.
|
||||
2. Keep Original/Baseline selected; leave Advanced settings unchanged.
|
||||
3. Review resulting clips for actual usefulness, cue/response, padding and false
|
||||
positives. No clips is not proof that no qualifying behavior exists.
|
||||
4. Record model calls/tokens, active time, accepted/rejected clips and known misses.
|
||||
Compare against all earlier runs; note warm caches and model/environment changes.
|
||||
5. After a useful baseline, change one parameter at a time on new jobs. Do not weaken
|
||||
acceptance merely to produce a clip. Record preset/custom settings with each result.
|
||||
|
||||
No new media run, model training, publication, Git push or original-media change was
|
||||
performed for this update. Human behavioral acceptance remains pending.
|
||||
|
||||
## Activation verification
|
||||
|
||||
0.0.7 is active. All 53 tests passed again in the installed repository. Browser checks confirmed Original is selected by default, Efficient changes image size/instructions/thinning, and Restore original defaults resets those controls. Both task-summary copies matched by SHA256. Existing job states and manually reviewed feedback were retained; no owner job was dispatched.
|
||||
|
||||
@@ -0,0 +1,579 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Local review folder exports",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"profile": {
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"input_sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"artifact_type": {
|
||||
"const": "transcript"
|
||||
},
|
||||
"cues": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cue_id": {
|
||||
"type": "string",
|
||||
"pattern": "^cue-[0-9]{6}$"
|
||||
},
|
||||
"source_cue_id": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"start_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"end_seconds": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
},
|
||||
"speaker": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cue_id",
|
||||
"source_cue_id",
|
||||
"start_seconds",
|
||||
"end_seconds",
|
||||
"speaker",
|
||||
"text"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"excluded_cue_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^cue-[0-9]{6}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"profile",
|
||||
"status",
|
||||
"media_id",
|
||||
"title",
|
||||
"input_sha256",
|
||||
"canonical_url",
|
||||
"artifact_type",
|
||||
"cues",
|
||||
"excluded_cue_ids"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"profile": {
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"input_sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"artifact_type": {
|
||||
"const": "chunks"
|
||||
},
|
||||
"chunks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chunk_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
},
|
||||
"knowledge_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
},
|
||||
"version": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"supersedes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
},
|
||||
"minItems": 0
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"heading_path": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"minItems": 1
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"minItems": 0
|
||||
},
|
||||
"cue_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^cue-[0-9]{6}$"
|
||||
},
|
||||
"minItems": 1,
|
||||
"uniqueItems": true
|
||||
},
|
||||
"order": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"content_sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"start_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"end_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"speakers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"citations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"cue_id": {
|
||||
"type": "string",
|
||||
"pattern": "^cue-[0-9]{6}$"
|
||||
},
|
||||
"start_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"end_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"transcript_ref": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"transcript_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"source_media": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"playback_url": {
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"media_id",
|
||||
"cue_id",
|
||||
"start_seconds",
|
||||
"end_seconds",
|
||||
"transcript_ref",
|
||||
"transcript_url",
|
||||
"source_media",
|
||||
"playback_url"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"chunk_id",
|
||||
"knowledge_id",
|
||||
"version",
|
||||
"supersedes",
|
||||
"title",
|
||||
"heading_path",
|
||||
"summary",
|
||||
"tags",
|
||||
"cue_ids",
|
||||
"order",
|
||||
"media_id",
|
||||
"content",
|
||||
"content_sha256",
|
||||
"start_seconds",
|
||||
"end_seconds",
|
||||
"speakers",
|
||||
"citations"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"profile",
|
||||
"status",
|
||||
"media_id",
|
||||
"title",
|
||||
"input_sha256",
|
||||
"canonical_url",
|
||||
"artifact_type",
|
||||
"chunks"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"profile": {
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"input_sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"artifact_type": {
|
||||
"const": "qa"
|
||||
},
|
||||
"qa": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"qa_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"answer_type": {
|
||||
"enum": [
|
||||
"extractive",
|
||||
"synthesis"
|
||||
]
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chunk_id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9:._-]*$"
|
||||
},
|
||||
"cue_id": {
|
||||
"type": "string",
|
||||
"pattern": "^cue-[0-9]{6}$"
|
||||
},
|
||||
"quote": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"start_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"end_seconds": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"transcript_ref": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"transcript_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"source_media": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"playback_url": {
|
||||
"type": "null"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"chunk_id",
|
||||
"cue_id",
|
||||
"quote",
|
||||
"media_id",
|
||||
"start_seconds",
|
||||
"end_seconds",
|
||||
"transcript_ref",
|
||||
"transcript_url",
|
||||
"source_media",
|
||||
"playback_url"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"qa_id",
|
||||
"question",
|
||||
"answer",
|
||||
"answer_type",
|
||||
"evidence",
|
||||
"media_id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"profile",
|
||||
"status",
|
||||
"media_id",
|
||||
"title",
|
||||
"input_sha256",
|
||||
"canonical_url",
|
||||
"artifact_type",
|
||||
"qa"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"profile": {
|
||||
"const": "local-review"
|
||||
},
|
||||
"status": {
|
||||
"enum": [
|
||||
"draft",
|
||||
"approved"
|
||||
]
|
||||
},
|
||||
"media_id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"input_sha256": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-f0-9]{64}$"
|
||||
},
|
||||
"canonical_url": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"artifact_type": {
|
||||
"const": "index"
|
||||
},
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"artifacts": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"media.json": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"transcript.json": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"chunks.json": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"qa.json": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"chapters.json": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"schema.jsonld": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"README.md": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"review.md": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"media.json",
|
||||
"transcript.json",
|
||||
"chunks.json",
|
||||
"qa.json",
|
||||
"chapters.json",
|
||||
"schema.jsonld",
|
||||
"README.md",
|
||||
"review.md"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"profile",
|
||||
"status",
|
||||
"media_id",
|
||||
"title",
|
||||
"input_sha256",
|
||||
"canonical_url",
|
||||
"artifact_type",
|
||||
"description",
|
||||
"artifacts"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"repository": "C:\\projects\\indx\\structured-media-builder-OPEN",
|
||||
"profile": "software-automation",
|
||||
"passed": false,
|
||||
"findings": [
|
||||
{
|
||||
"level": "error",
|
||||
"message": "Missing required path: LICENSE"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "repository-variables.json lacks key: skill_defaults"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "repository-variables.json lacks key: verified_by"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "repository-variables.json lacks key: verified_at"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "authors differs between repository-variables.json and repository.json"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "repository differs between repository-variables.json and repository.json"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "rights differs between repository-variables.json and repository.json"
|
||||
},
|
||||
{
|
||||
"level": "error",
|
||||
"message": "repository_profile differs between repository-variables.json (software-template-workflow) and requested audit (software-automation)"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
"""Task-scoped finalization for an explicitly approved local media package.
|
||||
|
||||
This does not deploy, license recordings, or independently verify their claims.
|
||||
Until the repository structure plan is approved, the approved-state schema and
|
||||
validator remain task-scoped rather than changing the main builder contracts.
|
||||
"""
|
||||
from pathlib import Path
|
||||
import argparse
|
||||
import copy
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
from datetime import datetime
|
||||
|
||||
from jsonschema import Draft202012Validator, FormatChecker
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
REPO = Path(os.environ.get('SMB_REPOSITORY', str(HERE.parent.parent))).resolve()
|
||||
sys.dont_write_bytecode = True
|
||||
sys.path.insert(0, str(REPO/'scripts'))
|
||||
import media_builder as core
|
||||
import folder_builder as folder_builder
|
||||
|
||||
|
||||
def semantic_plan(plan):
|
||||
return {key:value for key,value in plan.items() if key != 'review'}
|
||||
|
||||
|
||||
def verify(output):
|
||||
output=Path(output).resolve()
|
||||
receipt=core.load(output/'build-receipt.json')
|
||||
approval=core.load(output/'approval.json')
|
||||
core.require(receipt['status']=='approved' and receipt['lifecycle']=='final', 'Not a final approved package')
|
||||
actual={p.relative_to(output).as_posix():folder_builder.sha_file(p) for p in output.rglob('*')
|
||||
if p.is_file() and p != output/'build-receipt.json'}
|
||||
core.require(actual==receipt['files'], 'Final output differs from receipt')
|
||||
schema=core.load(HERE/'approved-folder-export.schema.json')
|
||||
validator=Draft202012Validator(schema,format_checker=FormatChecker())
|
||||
for name in ('transcript.json','chunks.json','qa.json','ai-index.json'):
|
||||
value=core.load(output/name)
|
||||
validator.validate(value)
|
||||
core.require(value['status']=='approved','Artifact not approved')
|
||||
for record in receipt['source_files'].values():
|
||||
path=core.relative_file(output.parent,record['path'])
|
||||
core.require(folder_builder.sha_file(path)==record['sha256'],'Original source changed')
|
||||
intake=core.relative_file(output.parent,approval['inputs']['intake'])
|
||||
plan=core.relative_file(output.parent,approval['inputs']['plan'])
|
||||
core.require(folder_builder.sha_file(intake)==approval['intake_sha256'],'Intake changed since approval')
|
||||
plan_value=core.load(plan)
|
||||
core.require(core.digest(core.encoded(semantic_plan(plan_value)))==approval['plan_content_sha256'],
|
||||
'Plan content changed since approval')
|
||||
core.require(plan_value['review']['status']=='approved','Source plan not approved')
|
||||
core.require(plan_value['review']['input_sha256']==receipt['input_sha256'],'Plan approval fingerprint mismatch')
|
||||
media=core.load(output/'media.json')
|
||||
core.require(media['human_approval'] and not media['publication_ready'], 'Approval scope mismatch')
|
||||
return {'valid':True,'status':'approved','lifecycle':'final','source_files_unchanged':True,
|
||||
'reviewer':approval['reviewer'],**receipt['counts']}
|
||||
|
||||
|
||||
def finalize(source,output,intake_path,plan_path,reviewer,approved_at,evidence):
|
||||
source,output=Path(source).resolve(),Path(output).resolve()
|
||||
intake_path,plan_path=Path(intake_path).resolve(),Path(plan_path).resolve()
|
||||
core.require(source.parent==output.parent and output!=source,'Final must be a sibling of the reviewed draft')
|
||||
core.require(not output.exists(),'Final output exists; do not overwrite it')
|
||||
core.require(intake_path.parent==source.parent and plan_path.parent==source.parent,'Inputs must be beside the media sources')
|
||||
core.require(reviewer.strip() and evidence.strip(),'Explicit reviewer and approval evidence required')
|
||||
moment=datetime.fromisoformat(approved_at.replace('Z','+00:00'))
|
||||
core.require(moment.tzinfo is not None,'Approval timestamp must include a timezone')
|
||||
folder_builder.verify(source)
|
||||
draft_receipt=core.load(source/'build-receipt.json')
|
||||
plan=core.load(plan_path)
|
||||
core.require(plan['review']['status']=='draft','Expected the reviewed draft source plan')
|
||||
old_review=copy.deepcopy(plan['review'])
|
||||
approval={
|
||||
'schema_version':'1.0','status':'approved','lifecycle':'final',
|
||||
'reviewer':reviewer,'approved_at':approved_at,'approval_evidence':evidence,
|
||||
'scope':'Owner approval of the generated structured content and metadata as final, with documented limitations retained.',
|
||||
'publication_ready':False,'input_sha256':draft_receipt['input_sha256'],
|
||||
'inputs':{'intake':intake_path.name,'plan':plan_path.name},
|
||||
'intake_sha256':folder_builder.sha_file(intake_path),
|
||||
'plan_content_sha256':core.digest(core.encoded(semantic_plan(plan))),
|
||||
'reviewed_draft_directory':source.name,'reviewed_draft_receipt':draft_receipt,
|
||||
'notes':['The original reviewed draft remains available as history.',
|
||||
'The approval timestamp records when this run recorded the user approval.',
|
||||
'Approval does not claim independent fact-checking, audio/slide verification, a recording license, or deployment.',
|
||||
'Unknown metadata and original source wording are retained.']}
|
||||
pending=Path(tempfile.mkdtemp(prefix='.final-media-',dir=output.parent))
|
||||
plan_updated=False
|
||||
try:
|
||||
for path in source.iterdir():
|
||||
core.require(path.is_file(),'Unexpected draft subdirectory')
|
||||
shutil.copyfile(path,pending/path.name)
|
||||
for path in pending.glob('*.json'):
|
||||
if path.name=='build-receipt.json':continue
|
||||
value=core.load(path)
|
||||
if value.get('profile')=='local-review':value['status']='approved'
|
||||
if path.name=='media.json':
|
||||
value['human_approval']=True
|
||||
if value['metadata']['description']:
|
||||
value['metadata']['description']=value['metadata']['description'].replace(
|
||||
'This local draft preserves','This approved structured package preserves')
|
||||
core.write(path,value)
|
||||
page=(pending/'README.md').read_text(encoding='utf-8')
|
||||
page=page.replace('**Draft for human review.** Built from the supplied recording, TXT, and VTT.',
|
||||
f'**Final — approved by {reviewer} on {moment.date().isoformat()}.** '
|
||||
'Built from the supplied recording, TXT, and VTT; documented limitations remain in the review record.')
|
||||
page=page.replace('This local draft preserves','This approved structured package preserves')
|
||||
page=page.replace('Draft credit','Approved credit')
|
||||
core.write(pending/'README.md',page)
|
||||
review=(pending/'review.md').read_text(encoding='utf-8')
|
||||
review=review.replace('Status: **draft — not human approved or publication ready**.',
|
||||
f'Status: **final and approved**. Approved by {reviewer} on {moment.date().isoformat()}.\n\n'
|
||||
f'Approval evidence: “{evidence}”\n\n'
|
||||
'This records approval of the generated structure with its stated limitations. '
|
||||
'Publication prerequisites and source-verification notes below remain informational follow-up items.')
|
||||
review=review.replace('## Please review','## Follow-up checks retained after approval')
|
||||
review=review.replace('not factual accuracy or human approval.','not independent factual accuracy. Human approval is recorded separately in approval.json.')
|
||||
core.write(pending/'review.md',review)
|
||||
guide=(pending/'llms.txt').read_text(encoding='utf-8').replace(
|
||||
'> Local draft for review; publication details may be unknown.',
|
||||
'> Final, owner-approved structured content; publication details may remain unknown.')
|
||||
core.write(pending/'llms.txt',guide)
|
||||
core.write(pending/'approval.json',approval)
|
||||
receipt={**draft_receipt,'status':'approved','lifecycle':'final','human_approval':True,
|
||||
'publication_ready':False,'approval_record':'approval.json',
|
||||
'files':{p.name:folder_builder.sha_file(p) for p in sorted(pending.iterdir())
|
||||
if p.is_file() and p.name!='build-receipt.json'}}
|
||||
core.write(pending/'build-receipt.json',receipt)
|
||||
plan['review']={'status':'approved','reviewer':reviewer,'reviewed_at':approved_at,
|
||||
'input_sha256':draft_receipt['input_sha256']}
|
||||
core.validate(plan,'plan')
|
||||
core.write(plan_path,plan)
|
||||
plan_updated=True
|
||||
# Validate all content/state and original hashes before exposing the final path.
|
||||
verify(pending)
|
||||
pending.rename(output)
|
||||
return verify(output)
|
||||
except Exception:
|
||||
if plan_updated and not output.exists():
|
||||
plan['review']=old_review
|
||||
core.write(plan_path,plan)
|
||||
raise
|
||||
finally:
|
||||
if pending.exists():shutil.rmtree(pending)
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser(description=__doc__)
|
||||
sub=p.add_subparsers(dest='command',required=True)
|
||||
cmd=sub.add_parser('finalize')
|
||||
for name in ('source','output','intake','plan'):cmd.add_argument('--'+name,type=Path,required=True)
|
||||
for name in ('reviewer','approved-at','evidence'):cmd.add_argument('--'+name,required=True)
|
||||
cmd=sub.add_parser('verify');cmd.add_argument('--output',type=Path,required=True)
|
||||
a=p.parse_args()
|
||||
if a.command=='verify':result=verify(a.output)
|
||||
else:result=finalize(a.source,a.output,a.intake,a.plan,a.reviewer,a.approved_at,a.evidence)
|
||||
print(json.dumps(result,indent=2))
|
||||
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,14 @@
|
||||
# Implementation receipt
|
||||
|
||||
- Approved plan: revision 1, explicitly approved by the owner on 2026-10-17.
|
||||
- Implemented profile: software-automation, version 0.3.0.
|
||||
- Identity: Eddie Soehnel, author/publisher/maintainer; original canonical URL and stable repository ID retained.
|
||||
- Rights: owner-selected MIT for code/docs; third-party media rights and publication approval remain separate.
|
||||
- Applied the approved file-action plan: aligned standard manifests and variables, source document catalog, MIT/citation, navigation, repository validation, approval support, focused regression tests, and Gitea contribution templates.
|
||||
- Preserved the folder-first workflow, source/semantic IDs, original recordings, prior drafts/finals, remote configuration, and the pre-existing local validation-document change. Prior custom metadata is retained in the task's `prior-repository*.json` evidence.
|
||||
- Final approval now uses the normal folder builder. The task-scoped utility remains historical evidence; it is not required by the primary workflow.
|
||||
- Minor file-placement refinement: approval logic and its tests are in focused `scripts/media_approval.py` and `tests/test_media_approval.py` modules rather than expanding the existing files excessively. This implements the approved capability and boundaries without a material scope change.
|
||||
- The companion AI Knowledge Structure repository received a reference-only media model, implementation/tool links, manifest routing, and aligned version/citation metadata. No executable builder assets or real media were copied into that guide.
|
||||
- Validation is recorded in [validation-results.md](validation-results.md).
|
||||
- Rollback: review the per-file diff and saved prior metadata; reverse only this task's changes. Do not reset user work, rewrite history, or alter finalized media to match a new template version.
|
||||
- No commit, push, Git tag/release, remote/hosting setting change, or deployment was performed by this run.
|
||||
@@ -0,0 +1,24 @@
|
||||
# Webinar finalization receipt
|
||||
|
||||
Recorded 2026-10-17. This is the completed media-approval task, not a receipt claiming the repository standardization plan is implemented.
|
||||
|
||||
- Authority: user stated “this looks good and is approved” and authorized moving the documents to final/approved.
|
||||
- Final disposition: `structured-final/` beside the original media, with a root `FINAL.md` entry point. The prior reviewed `structured/` output remains unchanged as history.
|
||||
- Human review: Eddie Soehnel; approval recorded at 2026-10-17T22:38:28Z. The timestamp records this processing run, not a claim about the precise message-send time.
|
||||
- Final state: `approved`, lifecycle `final`, human approval true. Publication readiness remains false because it is separate from approving the generated local content.
|
||||
- Source plan: review block updated to approved and bound to the reviewed input fingerprint. Semantic chunk IDs, knowledge IDs, source text, Q&A content, and chapter ranges were preserved.
|
||||
- Counts: 908 cues, 38 chunks, 22 Q&A entries, 10 chapters.
|
||||
- Verification: final output checksums, approved-state schema, intake fingerprint, semantic-plan fingerprint, plan approval binding, and all three original file hashes passed.
|
||||
- Synthetic forward check: finalization, prior-draft preservation, semantic payload preservation, approval binding, source hashes, and refusal to overwrite an existing final package passed.
|
||||
- Repository native file check and `git diff --check` passed. Existing `docs/validation.md` change was preserved. No root repository structure/identity/license files were changed by this task.
|
||||
- No commit, push, deployment, remote setting change, recording license grant, independent fact-check, or audio/slide verification was performed.
|
||||
|
||||
Until the repository plan is approved and final-state support is promoted into the normal builder, verify final packages using the task-scoped helper:
|
||||
|
||||
```text
|
||||
python tasks/structure-ai-ready-repository/finalize_approved_media.py verify --output <media-folder>/structured-final
|
||||
```
|
||||
|
||||
The MIT license decision for the builder is confirmed and recorded in [the structure plan](repository-structure-plan.md). That plan remains awaiting approval.
|
||||
|
||||
Historical note, 2026-10-17: repository plan revision 1 was subsequently approved and implemented. Normal `scripts/folder_builder.py verify` and `search` now support this approved package; the task helper is retained as original execution evidence.
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"identity": {
|
||||
"owner": {
|
||||
"name": "Eddie Soehnel"
|
||||
}
|
||||
},
|
||||
"publication": {
|
||||
"companion_site_url": null,
|
||||
"media_host": null,
|
||||
"status": "local-draft"
|
||||
},
|
||||
"repository": {
|
||||
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN",
|
||||
"name": "structured-media-builder-OPEN",
|
||||
"repository_id": "adminprojects-structured-media-builder-open"
|
||||
},
|
||||
"repository_profile": "software-template-workflow",
|
||||
"rights": {
|
||||
"license": null,
|
||||
"license_status": "not-selected",
|
||||
"notice_file": "LICENSE.md"
|
||||
},
|
||||
"schema_version": "1.0",
|
||||
"updated_at": "2026-10-17",
|
||||
"verified_from": "User-specified target and guide repository identity; local target Git config.",
|
||||
"version": "0.2.0"
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
{
|
||||
"authors": [
|
||||
{
|
||||
"name": "Eddie Soehnel"
|
||||
}
|
||||
],
|
||||
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN",
|
||||
"contents": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"title": "Overview and quick start",
|
||||
"type": "documentation"
|
||||
},
|
||||
{
|
||||
"path": "AGENTS.md",
|
||||
"title": "Repository operating instructions",
|
||||
"type": "agent-guidance"
|
||||
},
|
||||
{
|
||||
"path": "docs/workflow.md",
|
||||
"title": "Recording-to-discovery process",
|
||||
"type": "workflow"
|
||||
},
|
||||
{
|
||||
"path": "docs/architecture.md",
|
||||
"title": "Sources, contracts, and capability boundaries",
|
||||
"type": "documentation"
|
||||
},
|
||||
{
|
||||
"path": "docs/research.md",
|
||||
"title": "Standards and platform research",
|
||||
"type": "research"
|
||||
},
|
||||
{
|
||||
"path": "docs/interfaces.md",
|
||||
"title": "Proposed API and MCP adapters",
|
||||
"type": "design"
|
||||
},
|
||||
{
|
||||
"path": "PUBLICATION_WORKFLOW.md",
|
||||
"title": "Publication approval and verification",
|
||||
"type": "workflow"
|
||||
},
|
||||
{
|
||||
"path": "scripts/media_builder.py",
|
||||
"title": "Deterministic builder and retrieval CLI",
|
||||
"type": "software"
|
||||
},
|
||||
{
|
||||
"path": "schemas/",
|
||||
"title": "Source and export JSON schemas",
|
||||
"type": "schema-collection"
|
||||
},
|
||||
{
|
||||
"path": "templates/",
|
||||
"title": "Blocked-by-default starter inputs",
|
||||
"type": "template-collection"
|
||||
},
|
||||
{
|
||||
"path": "examples/",
|
||||
"title": "Synthetic audio and video fixtures",
|
||||
"type": "example-collection"
|
||||
},
|
||||
{
|
||||
"path": "skills.md",
|
||||
"title": "Repo-local skill index",
|
||||
"type": "skill-index"
|
||||
},
|
||||
{
|
||||
"path": "skills/structure-media/SKILL.md",
|
||||
"title": "Media structuring workflow",
|
||||
"type": "skill"
|
||||
},
|
||||
{
|
||||
"path": "tests/test_media_builder.py",
|
||||
"title": "Pipeline regression coverage",
|
||||
"type": "test"
|
||||
},
|
||||
{
|
||||
"path": "interfaces/openapi.json",
|
||||
"title": "Proposed read-only HTTP API",
|
||||
"type": "design-contract"
|
||||
},
|
||||
{
|
||||
"path": "interfaces/mcp-tools.json",
|
||||
"title": "Proposed read-only MCP tools",
|
||||
"type": "design-contract"
|
||||
},
|
||||
{
|
||||
"path": "requirements.txt",
|
||||
"title": "Python dependency range",
|
||||
"type": "configuration"
|
||||
},
|
||||
{
|
||||
"path": "LICENSE.md",
|
||||
"title": "License selection pending",
|
||||
"type": "rights-status"
|
||||
},
|
||||
{
|
||||
"path": "CHANGELOG.md",
|
||||
"title": "Completed versioned changes",
|
||||
"type": "changelog"
|
||||
},
|
||||
{
|
||||
"path": "UPDATES.md",
|
||||
"title": "Proposed additions",
|
||||
"type": "roadmap"
|
||||
},
|
||||
{
|
||||
"path": "skills/media-intake/SKILL.md",
|
||||
"title": "Upfront metadata interview",
|
||||
"type": "skill"
|
||||
},
|
||||
{
|
||||
"path": "scripts/folder_builder.py",
|
||||
"title": "Folder-first draft builder",
|
||||
"type": "software"
|
||||
},
|
||||
{
|
||||
"path": "templates/media-intake.md",
|
||||
"title": "Copyable human metadata checklist",
|
||||
"type": "template"
|
||||
},
|
||||
{
|
||||
"path": "docs/public-export.md",
|
||||
"title": "Later approved public exporter",
|
||||
"type": "workflow"
|
||||
},
|
||||
{
|
||||
"path": "tests/test_folder_builder.py",
|
||||
"title": "Folder-first regression coverage",
|
||||
"type": "test"
|
||||
}
|
||||
],
|
||||
"created_at": "2026-10-17",
|
||||
"description": "Folder-first media intake, semantic structuring, and in-folder draft assets for human review, with an optional approved public exporter.",
|
||||
"entrypoints": {
|
||||
"ai": "AGENTS.md",
|
||||
"human": "README.md",
|
||||
"primary_script": "scripts/folder_builder.py",
|
||||
"primary_skill": "skills/media-intake/SKILL.md",
|
||||
"primary_template": "templates/media-intake.md"
|
||||
},
|
||||
"expected_outputs": [
|
||||
"In-folder draft overview and review checklist",
|
||||
"Static companion site",
|
||||
"Timed transcript JSON",
|
||||
"Chunks and Q&A JSON",
|
||||
"Chapter JSON",
|
||||
"Discovery files",
|
||||
"Build receipt"
|
||||
],
|
||||
"implemented_capabilities": [
|
||||
"Folder-based metadata intake and interview",
|
||||
"Local draft assets before human review",
|
||||
"Source-preserving transcript alignment and audit",
|
||||
"Timed semantic chunks and cited Q&A",
|
||||
"Chapter and known-fact JSON-LD export",
|
||||
"Local keyword retrieval",
|
||||
"Optional approved static public exporter"
|
||||
],
|
||||
"interfaces": {
|
||||
"mcp_tools": "interfaces/mcp-tools.json",
|
||||
"openapi": "interfaces/openapi.json",
|
||||
"status": "design-only"
|
||||
},
|
||||
"license": null,
|
||||
"license_status": "not-selected",
|
||||
"maturity": "experimental",
|
||||
"name": "structured-media-builder-OPEN",
|
||||
"not_implemented": [
|
||||
"STT integrations",
|
||||
"Hosted API",
|
||||
"MCP server",
|
||||
"Embeddings",
|
||||
"Platform sync",
|
||||
"Deployment",
|
||||
"Independent fact or consent verification"
|
||||
],
|
||||
"publication_status": "local-draft",
|
||||
"related_repositories": [
|
||||
{
|
||||
"relationship": "conceptual-guidance",
|
||||
"url": "https://projects.eddiesoehnel.com/adminprojects/ai-knowledge-structure-OPEN"
|
||||
},
|
||||
{
|
||||
"relationship": "implementation-pattern",
|
||||
"url": "https://projects.eddiesoehnel.com/adminprojects/structured-website-builder-OPEN"
|
||||
}
|
||||
],
|
||||
"repository_id": "adminprojects-structured-media-builder-open",
|
||||
"repository_status": "active",
|
||||
"required_inputs": [
|
||||
"Original audio/video plus TXT and VTT in a folder",
|
||||
"Partial metadata or source-page links",
|
||||
"AI-authored draft intake and semantic plan"
|
||||
],
|
||||
"resource_types": [
|
||||
"software",
|
||||
"template",
|
||||
"workflow",
|
||||
"skill",
|
||||
"documentation"
|
||||
],
|
||||
"runtime": {
|
||||
"dependencies": "requirements.txt",
|
||||
"network_calls": false,
|
||||
"python": ">=3.11"
|
||||
},
|
||||
"schema_version": "1.0",
|
||||
"title": "Structured Media Builder",
|
||||
"topics": [
|
||||
"media-discovery",
|
||||
"audio",
|
||||
"video",
|
||||
"transcripts",
|
||||
"structured-data",
|
||||
"ai-retrieval"
|
||||
],
|
||||
"updated_at": "2026-10-17",
|
||||
"validation": {
|
||||
"example_build": "python scripts/media_builder.py build --catalog examples/catalog.json --output build/demo",
|
||||
"folder_inspect": "python scripts/folder_builder.py inspect --folder <media-folder>",
|
||||
"tests": "python -m unittest discover -s tests -v",
|
||||
"verify": "python scripts/media_builder.py verify --root build/demo"
|
||||
},
|
||||
"version": "0.2.0"
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
# Repository Structure Plan
|
||||
|
||||
## Plan Control
|
||||
|
||||
- Task ID: `structure-ai-ready-repository`
|
||||
- Target: `C:\projects\indx\structured-media-builder-OPEN`
|
||||
- Mode: existing repository
|
||||
- Profile: `software-automation`, retaining its working skills and templates
|
||||
- Revision: 1
|
||||
- Status: implemented
|
||||
- Created/updated: 2026-10-17
|
||||
- Structure approval evidence: user explicitly approved revision 1 on 2026-10-17 and requested the AI Knowledge Structure integration.
|
||||
- License decision: MIT, explicitly selected by the user on 2026-10-17.
|
||||
|
||||
## Outcome
|
||||
|
||||
Apply the actual conventions, manifest schemas, identity model, lifecycle files, and validation of `C:\projects\productivity\repo-template-OPEN` while preserving the folder-first intake → structuring → review workflow. Keep implemented behavior distinct from planned API/MCP/embedding capabilities.
|
||||
|
||||
This plan governs repository standardization. The separately authorized webinar finalization is handled by the task-local approval utility and does not authorize publication or repository restructuring.
|
||||
|
||||
## Identity and publication
|
||||
|
||||
- Author/owner: Eddie Soehnel, already recorded in the target AUTHOR and manifest.
|
||||
- Publisher/maintainer: Eddie Soehnel, proposed explicit roles matching the existing owner; no third-party identity will be inherited.
|
||||
- Canonical repository URL: `https://projects.eddiesoehnel.com/adminprojects/structured-media-builder-OPEN`, matching existing configuration.
|
||||
- License: MIT for builder code/docs; excludes any automatic license grant over third-party media, transcripts, slides, or source research.
|
||||
- Current variables: `repository-variables.json`; preserve stable repository ID and canonical URL. Normalize the machine name to `structured-media-builder-open` for the standard schema while preserving the actual remote name/URL.
|
||||
- Public visibility: supplied directly by the user. No Git-host setting changes are proposed.
|
||||
|
||||
## Current state and baseline
|
||||
|
||||
- Version 0.2.0; working media intake and structuring skills, two Python builders, nine media schemas, synthetic examples, interface designs, and 39 tests.
|
||||
- The folder-first README and real webinar outputs were reviewed and approved by the user.
|
||||
- Existing `docs/validation.md` has a local modification that must be preserved.
|
||||
- The main manifest and variables use custom field layouts; several fields do not conform to the template schemas.
|
||||
- Baseline software-automation audit fails with eight findings: missing LICENSE, missing skill_defaults/verified_by/verified_at, author/repository/rights alignment, and unsupported profile name. Full results: [baseline-audit.json](baseline-audit.json).
|
||||
- No existing source/data directories need relocation. Real recordings remain outside this public template repo.
|
||||
|
||||
## Profile and catalog decision
|
||||
|
||||
Use software-automation because executable, tested builders are central. Preserve `skills/`, `templates/`, and examples as useful existing extensions.
|
||||
|
||||
Add a compact `content-index.json` for the substantive guide documents. The current manifest lists numerous individual documents and implementation files; the standard manifest will retain major collections and entry points while the document index routes readers to individual guides. Do not create chunks or Q&A merely to index template documentation.
|
||||
|
||||
## Proposed structure
|
||||
|
||||
```text
|
||||
structured-media-builder-OPEN/
|
||||
README.md, AUTHOR.md, AGENTS.md, skills.md
|
||||
repository-variables.json, repository.json, content-index.json
|
||||
LICENSE, LICENSE.md, CITATION.cff, VERSION, CHANGELOG.md, UPDATES.md
|
||||
CONTRIBUTING.md, SECURITY.md, PUBLICATION_WORKFLOW.md
|
||||
docs/README.md and existing guides
|
||||
scripts/README.md, audit_repository.py, existing builders/checker
|
||||
schemas/ (existing media schemas plus repository/variables/content-index schemas)
|
||||
skills/, templates/, examples/, interfaces/, tests/
|
||||
.gitea/PULL_REQUEST_TEMPLATE.md
|
||||
.gitea/ISSUE_TEMPLATE/{bug-report.md,feature-request.md}
|
||||
tasks/structure-ai-ready-repository/ (this plan, baseline, receipts)
|
||||
```
|
||||
|
||||
## File actions
|
||||
|
||||
| Path | Action | Purpose and preservation |
|
||||
| --- | --- | --- |
|
||||
| `README.md` | modify | Preserve the approved folder-first instructions; add standardized identity, MIT, repository navigation, validation, and final-approval entry point. |
|
||||
| `AUTHOR.md` | modify | Explicit author/publisher/maintainer, attribution, canonical URL, derived-repo identity guidance. |
|
||||
| `AGENTS.md` | modify | Standard read order and source boundaries; preserve intake, unknowns, and approval/publication distinctions. |
|
||||
| `repository-variables.json` | modify | Standard verified identity, canonical facts, MIT rights, software-automation profile, and workflow defaults. |
|
||||
| `repository.json` | modify | Conform to the upstream manifest schema; preserve all useful capabilities, limitations, inputs/outputs, relations, and entry points in supported fields. |
|
||||
| `content-index.json` | create | Stable file-level catalog of authoritative guides with repository-relative paths and document relations. |
|
||||
| `LICENSE` | create | MIT terms with Eddie Soehnel copyright and 2026 year; user license selection is recorded above. |
|
||||
| `LICENSE.md` | modify | Replace the outdated unselected-license notice with a clear link to LICENSE and separate third-party media rights. Preserve the existing path. |
|
||||
| `CITATION.cff` | create | Repository-specific author, title, canonical URL, version, date, and MIT metadata. |
|
||||
| `VERSION`, `CHANGELOG.md` | modify | Record standardization as 0.3.0 and preserve earlier history. No Git tag/release is created. |
|
||||
| `UPDATES.md` | modify | Remove or mark the now-completed license decision; preserve remaining proposals as unapproved ideas. |
|
||||
| `CONTRIBUTING.md`, `SECURITY.md`, `PUBLICATION_WORKFLOW.md` | modify | Align MIT and validation references; preserve independent media rights and explicit publication authority. |
|
||||
| `docs/README.md` | create | Index the existing architecture, workflow, research, interfaces, public-export, and validation guides. |
|
||||
| `docs/workflow.md`, `docs/architecture.md`, `docs/validation.md` | modify | Document final approval semantics and validation while retaining approved workflow and current validation notes. |
|
||||
| `skills.md`, `skills/structure-media/SKILL.md` | modify | Include draft → owner-approved final lifecycle, with no inferred publication/rights clearance. Preserve the intake skill. |
|
||||
| `scripts/README.md` | create | Document inspect/build/finalize/verify/search and repository audits. |
|
||||
| `scripts/audit_repository.py` | create | Adapt the upstream read-only profile audit; retain source attribution and its MIT notice. |
|
||||
| `scripts/check_repository.py` | modify | Validate standard manifest/variables/content index, citation/version/rights alignment, nullable entry points, and local links. Keep existing media checks. |
|
||||
| `scripts/folder_builder.py` | modify | Promote the task-scoped explicit approval/finalization capability into the normal builder; verify approved packages and preserve draft history. |
|
||||
| `schemas/repository.schema.json`, `schemas/repository-variables.schema.json`, `schemas/content-index.schema.json` | create | Copy the actual upstream contracts, retaining identifiers and attribution. |
|
||||
| `schemas/folder-export.schema.json`, `schemas/README.md` | modify | Add explicit approved artifact state and document it; draft builds still cannot claim human approval. |
|
||||
| `tests/test_repository.py` | create | Meaningful standard-schema, identity/version/license, document-catalog, and declared-path checks. |
|
||||
| `tests/test_folder_builder.py` | modify | Final approval/state, source preservation, stale approval, and output integrity behavior. |
|
||||
| `scripts/media_builder.py`, `interfaces/openapi.json`, synthetic example plans | modify | Align runtime/design version and refresh synthetic-only fingerprints when the version changes; preserve behavior and IDs. |
|
||||
| `.gitea/PULL_REQUEST_TEMPLATE.md`, `.gitea/ISSUE_TEMPLATE/bug-report.md`, `.gitea/ISSUE_TEMPLATE/feature-request.md` | create | Small Gitea contribution templates relevant to this repo; no CI, credentials, or server settings. |
|
||||
| `tasks/structure-ai-ready-repository/implementation-receipt.md`, `validation-results.md` | create | Record approved revision, exact changes, tests, limitations, and rollback. |
|
||||
| Existing sources, examples, stable IDs, remote config, and real webinar originals | preserve | No relocation, deletion, fetch, push, commit, deployment, or media licensing changes. |
|
||||
| Empty assets/data/receipts folders, runtime agents, hosted API/MCP, embeddings | leave absent | No implemented need and no publication authority. |
|
||||
|
||||
## Entry points and host choices
|
||||
|
||||
Human: README. AI read order: README → AUTHOR → variables → manifest → document index as needed → AGENTS/skills → relevant workflow. `UPDATES.md` remains future notes, not authority. Gitea templates are proposed because the verified origin is the user's projects host; no Git-host setting changes are included.
|
||||
|
||||
## Validation and done criteria
|
||||
|
||||
- Upstream software-automation audit passes, and project-specific contract checks pass.
|
||||
- Repository, variables, and document catalog validate against the copied upstream schemas.
|
||||
- Identity, canonical URL, MIT, version 0.3.0, citation, changelog, declared paths, and local links agree.
|
||||
- All existing 39 tests plus justified new repository/approval tests pass.
|
||||
- Both media skills pass the skill validator in UTF-8 mode.
|
||||
- Synthetic public export remains reproducible; local approved-package verification and representative retrieval work.
|
||||
- Existing source hashes, semantic IDs, user edits, and real webinar originals remain unchanged.
|
||||
- Whitespace and targeted credential/private-data review pass. No unsupported service/indexing claims.
|
||||
|
||||
Planned commands:
|
||||
|
||||
```text
|
||||
python scripts/audit_repository.py . --profile software-automation --json
|
||||
python scripts/check_repository.py
|
||||
python -m unittest discover -s tests -v
|
||||
python -X utf8 <skill-creator>/scripts/quick_validate.py skills/media-intake
|
||||
python -X utf8 <skill-creator>/scripts/quick_validate.py skills/structure-media
|
||||
git diff --check
|
||||
```
|
||||
|
||||
## Risks, boundaries, and rollback
|
||||
|
||||
- Replacing the custom manifest requires careful field mapping, not loss of capabilities or limitations. Preserve its prior form in task evidence before editing.
|
||||
- Version changes invalidate synthetic fixture approval fingerprints; refresh only synthetic records. Do not reapprove a real artifact silently because template code changed.
|
||||
- A final approved local package remains distinct from public deployment and from third-party content licensing.
|
||||
- The task-local approved-state validator is the current verification entry point for the finalized webinar. Support has now been promoted into the main builder under this approved plan; the task-local utility remains historical evidence.
|
||||
- Preserve the current local validation-document change. Reinspect Git status/hashes before applying the plan.
|
||||
- Roll back only changes made by this task using reviewed file copies/diffs; do not reset unrelated work or rewrite history.
|
||||
|
||||
## Approval
|
||||
|
||||
Revision 1 was explicitly approved and implemented on 2026-10-17. MIT and Eddie Soehnel as author/publisher/maintainer are confirmed. See [implementation receipt](implementation-receipt.md) and [validation results](validation-results.md). No outstanding approval remains for the local implementation described here.
|
||||
|
||||
Required gate source: `C:\projects\productivity\repo-template-OPEN\skills\structure-ai-ready-repository\SKILL.md`. The user-provided local skill is authoritative for this run.
|
||||
@@ -0,0 +1,22 @@
|
||||
# Validation results
|
||||
|
||||
Validated 2026-10-17 for approved structure-plan revision 1.
|
||||
|
||||
| Check | Result |
|
||||
| --- | --- |
|
||||
| Repository software-automation audit | Pass; no findings |
|
||||
| Standard manifest/variables/document-catalog schemas | Pass |
|
||||
| Native metadata, identity, MIT, version, path, link, syntax, and targeted credential-pattern checks | Pass |
|
||||
| Regression tests | 51 passed |
|
||||
| Metadata-intake and structure-media skill validators | Pass with UTF-8 mode |
|
||||
| Synthetic public export and output checksums | Pass for both examples |
|
||||
| Existing approved real-package verification with standard builder | Pass; original sources remain unchanged |
|
||||
| Guide documentation profile audit | Pass |
|
||||
| Guide JSON contracts, version/author/citation, paths, and local links | Pass; 28 relative links resolve |
|
||||
| Guide scope preservation | No implementation code/schemas/skills/media copied; compact reference profile retained |
|
||||
|
||||
The guide's untouched CIS document has pre-existing trailing whitespace; its bytes were preserved. Whitespace checks apply to changed content, and existing content was not reformatted as unrelated cleanup.
|
||||
|
||||
No live playback, hosted response, external link availability, deployed API/MCP, embedding behavior, independent source fact-check, or search/AI indexing was tested. Public repository URLs in the reference guide route to their owning implementations; unpushed local changes are not represented as remotely published.
|
||||
|
||||
Final canonical readback: both repositories passed their profile audits; 51 builder tests passed in the target checkout; the native checker confirmed MIT, version 0.3.0, and 11 indexed source guides. The final real-media package passed the normal verifier with all source checks enabled. Delivery verified SHA-256 for all 54 created/modified files across both repositories.
|
||||
@@ -0,0 +1,69 @@
|
||||
import test_folder_builder as fixtures
|
||||
import media_approval
|
||||
import media_builder as core
|
||||
|
||||
|
||||
import unittest
|
||||
class ApprovalLifecycleTests(unittest.TestCase):
|
||||
setUp = fixtures.FolderBuilderTests.setUp
|
||||
tearDown = fixtures.FolderBuilderTests.tearDown
|
||||
edit = fixtures.FolderBuilderTests.edit
|
||||
build = fixtures.FolderBuilderTests.build
|
||||
|
||||
def finalize(self):
|
||||
return media_approval.finalize(self.output,self.folder/'structured-final',self.intake,self.plan,
|
||||
'Synthetic reviewer','2026-10-17T22:38:28Z','Explicit synthetic approval')
|
||||
|
||||
def test_final_package_and_draft_history(self):
|
||||
self.build()
|
||||
before=(self.output/'build-receipt.json').read_bytes()
|
||||
result=self.finalize()
|
||||
self.assertEqual(result['status'],'approved')
|
||||
self.assertEqual((self.output/'build-receipt.json').read_bytes(),before)
|
||||
final=self.folder/'structured-final'
|
||||
import folder_builder
|
||||
self.assertEqual(folder_builder.verify(final)['status'],'approved')
|
||||
matches=folder_builder.search(final,'transcript',5)
|
||||
self.assertTrue(matches)
|
||||
self.assertTrue(all(r['status']=='approved' for r in matches))
|
||||
for name,key in [('chunks.json','chunks'),('qa.json','qa'),('transcript.json','cues')]:
|
||||
self.assertEqual(core.load(self.output/name)[key],core.load(final/name)[key])
|
||||
|
||||
def test_changed_plan_requires_new_review(self):
|
||||
self.build()
|
||||
self.edit(self.plan,lambda p:p['chunks'][0].update(summary='Changed interpretation'))
|
||||
with self.assertRaisesRegex(ValueError,'Draft inputs changed'):
|
||||
self.finalize()
|
||||
self.assertFalse((self.folder/'structured-final').exists())
|
||||
self.assertEqual(core.load(self.plan)['review']['status'],'draft')
|
||||
|
||||
def test_changed_intake_requires_new_review(self):
|
||||
self.build()
|
||||
self.edit(self.intake,lambda i:i['metadata'].update(title='A different title'))
|
||||
with self.assertRaisesRegex(ValueError,'Draft inputs changed'):
|
||||
self.finalize()
|
||||
|
||||
def test_final_sources_and_plan_remain_bound(self):
|
||||
self.build();self.finalize()
|
||||
final=self.folder/'structured-final'
|
||||
self.edit(self.plan,lambda p:p['chunks'][0].update(summary='Post-approval change'))
|
||||
with self.assertRaisesRegex(ValueError,'Plan content changed'):
|
||||
media_approval.verify(final)
|
||||
|
||||
def test_missing_evidence_does_not_create_approval(self):
|
||||
self.build()
|
||||
with self.assertRaisesRegex(ValueError,'approval evidence required'):
|
||||
media_approval.finalize(self.output,self.folder/'structured-final',self.intake,self.plan,
|
||||
'Reviewer','2026-10-17T22:38:28Z','')
|
||||
|
||||
def test_existing_final_is_not_overwritten(self):
|
||||
self.build();self.finalize()
|
||||
with self.assertRaisesRegex(ValueError,'Final output exists'):
|
||||
self.finalize()
|
||||
|
||||
def test_skipped_source_check_is_not_reported_as_verified(self):
|
||||
self.build();self.finalize()
|
||||
(self.folder/'recording.mp3').write_bytes(b'changed after approval')
|
||||
result=media_approval.verify(self.folder/'structured-final',check_sources=False)
|
||||
self.assertFalse(result['source_files_checked'])
|
||||
self.assertIsNone(result['source_files_unchanged'])
|
||||
@@ -0,0 +1,47 @@
|
||||
import json
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
sys.path.insert(0,str(ROOT/'scripts'))
|
||||
import check_repository
|
||||
|
||||
|
||||
class RepositoryContractTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
(ROOT/'.test-work').mkdir(exist_ok=True)
|
||||
self.temp=tempfile.TemporaryDirectory(dir=ROOT/'.test-work')
|
||||
self.root=Path(self.temp.name)/'repo'
|
||||
shutil.copytree(ROOT,self.root,ignore=shutil.ignore_patterns('.git','.test-work','build','__pycache__','.venv'))
|
||||
|
||||
def tearDown(self):
|
||||
self.temp.cleanup()
|
||||
|
||||
def mutate(self,name,change):
|
||||
p=self.root/name;v=json.loads(p.read_text(encoding='utf-8'));change(v);p.write_text(json.dumps(v),encoding='utf-8')
|
||||
|
||||
def test_actual_contracts_align(self):
|
||||
self.assertEqual(check_repository.validate_contracts(ROOT)['version'],(ROOT/'VERSION').read_text().strip())
|
||||
|
||||
def test_wrong_publisher_is_rejected(self):
|
||||
self.mutate('repository.json',lambda m:m['publisher'].update(name='Different publisher'))
|
||||
with self.assertRaisesRegex(AssertionError,'Publisher mismatch'):
|
||||
check_repository.validate_contracts(self.root)
|
||||
|
||||
def test_duplicate_catalog_document_is_rejected(self):
|
||||
self.mutate('content-index.json',lambda c:c['items'].append(c['items'][0]))
|
||||
with self.assertRaisesRegex(AssertionError,'Duplicate content'):
|
||||
check_repository.validate_contracts(self.root)
|
||||
|
||||
def test_declared_path_escape_is_rejected(self):
|
||||
self.mutate('repository.json',lambda m:m['entrypoints'].update(primary_script='../outside.py'))
|
||||
with self.assertRaisesRegex(AssertionError,'Missing/unsafe declared'):
|
||||
check_repository.validate_contracts(self.root)
|
||||
|
||||
def test_version_drift_is_rejected(self):
|
||||
self.mutate('repository.json',lambda m:m.update(version='99.0.0'))
|
||||
with self.assertRaisesRegex(AssertionError,'Manifest/version mismatch'):
|
||||
check_repository.validate_contracts(self.root)
|
||||
Reference in new issue
Block a user