2 Commits
Author SHA1 Message Date
eddiesoehnel 1e52a733d1 added 2026-07-24 15:14:23 -06:00
eddiesoehnel 614d235bbe added 2026-07-23 14:19:12 -06:00
29 changed files with 884 additions and 145 deletions

No files matched your search

+11 -4
View File
@@ -6,9 +6,10 @@ Read, in order:
1. `README.md`
2. `AUTHOR.md`
3. `repository.json`
4. `skills.md`
5. The relevant skill or documentation for the task
3. `repository-variables.json`
4. `repository.json`
5. `skills.md`
6. The relevant skill or documentation for the task
## Repository Purpose
@@ -19,7 +20,11 @@ This repository defines and validates a platform-neutral structure for human- an
- Preserve accurate existing content and stable identifiers.
- Use the smallest repository profile that fits the target.
- Do not invent maintainers, publication URLs, licenses, security contacts, provenance, or credentials.
- Keep `AUTHOR.md`, `repository.json`, `CITATION.cff`, and `LICENSE` attribution aligned.
- Keep `repository-variables.json`, `AUTHOR.md`, `repository.json`,
`CITATION.cff`, and `LICENSE` attribution aligned.
- Treat verified values in `repository-variables.json` as defaults for
repository-structure work. Ask only about missing, conflicting, or explicitly
unverified values.
- Treat `UPDATES.md` as proposed future work, not authorization.
- Record completed versioned changes in `CHANGELOG.md`.
- Keep `VERSION`, `repository.json`, `CITATION.cff`, and release notes aligned.
@@ -46,6 +51,8 @@ Also validate any modified skill with the available Codex skill validator.
## File-Specific Guidance
- Update `schemas/repository.schema.json` when the manifest contract changes.
- Update `schemas/repository-variables.schema.json` when the reusable variables
contract changes.
- Update both the skill reference and root documentation when the repository standard changes.
- Update validator tests when requirements change.
- Keep Git-host files under the correct host-specific directory.
+2 -1
View File
@@ -31,7 +31,8 @@ https://projects.eddiesoehnel.com/adminprojects/repo-template
When using this repository as the basis for another repository:
1. replace the author, publisher, and maintainer values in this file;
2. update `repository.json`, `CITATION.cff`, and `LICENSE` to match;
2. update `repository-variables.json`, `repository.json`, `CITATION.cff`, and
`LICENSE` to match;
3. update the canonical repository URL;
4. verify the license is appropriate for the new repository;
5. run the repository validator.
+16
View File
@@ -14,6 +14,22 @@ All notable released changes to this repository are documented here.
### Security
## [0.2.0] - 2026-07-24
### Added
- Required `repository-variables.json` for verified stable identity,
publication, rights, profile, and repository-skill defaults.
- Reusable variables template and Draft 2020-12 JSON Schema.
- Variable alignment checks in the profile audit, root validator, and tests.
### Changed
- Repository-structure skill now reads verified variables before asking identity
questions and creates or updates the file for every supported profile.
- Documentation, agent retrieval order, and repository templates now treat the
variables file as a standard root entry point.
## [0.1.0] - 2026-07-23
### Added
+2 -2
View File
@@ -2,8 +2,8 @@ cff-version: 1.2.0
message: "If you use this repository template, please cite it using this metadata."
title: "AI-Ready Repository Template"
type: software
version: 0.1.0
date-released: 2026-07-23
version: 0.2.0
date-released: 2026-07-24
authors:
- family-names: "Soehnel"
given-names: "Eddie"
+193 -106
View File
@@ -1,160 +1,247 @@
# AI-Ready Repository Template
A platform-neutral repository standard and reusable AI skill for creating repositories that humans and AI agents can discover, understand, validate, and reuse.
A platform-neutral repository standard, interactive AI skill, and validation toolkit for building repositories that humans and AI agents can discover, understand, safely modify, and reuse.
## What This Is
Authored and published by [Eddie Soehnel](AUTHOR.md).
This repository contains:
## What This Repository Provides
- a practical repository structure standard;
- a reusable skill that plans and builds the structure in new or existing repositories;
- machine-readable metadata and schema;
- templates, examples, validation scripts, and tests;
- contribution, security, versioning, and future-update guidance.
This repository is a working reference implementation of its own standard. It combines three layers:
The standard supports documentation, AI skill/workflow, software/automation, and dataset repositories. It is intentionally modular: use the smallest profile that accurately represents the project.
1. **Repository standard** — defines recommended files, metadata, entry points, profiles, safety boundaries, and validation expectations.
2. **Interactive AI skill** — assesses a new or existing repository, proposes the right structure, waits for approval by default, then creates and validates the approved assets.
3. **Deterministic validation** — checks required paths, metadata, attribution, versions, entry points, declared contents, licenses, and relative links.
## Problem It Solves
It can be used as:
Repositories often make sense to their original author but leave future maintainers and AI agents guessing about purpose, authoritative files, setup, inputs, outputs, validation, licensing, and safe operating boundaries. This template makes those expectations explicit and machine-findable.
- a template for a new repository;
- a correction framework for an existing repository;
- a reusable skill given to an AI agent;
- a reference standard for repository consistency and AI findability.
## Why It Exists
Repositories often depend on knowledge held by their original author. A new maintainer—or an AI agent—may not know:
- what the repository is for;
- where to begin;
- which files are authoritative;
- what inputs and outputs are expected;
- what may be safely changed;
- how identity, licensing, and versioning should be handled;
- how to determine whether the repository is complete.
This template makes those answers explicit, structured, and testable.
## Who It Is For
- People starting a new repository.
- Maintainers correcting an inconsistent existing repository.
- Teams publishing reusable prompts, skills, agents, workflows, templates, data, or software.
- AI agents that need predictable entry points and approval boundaries.
- Maintainers cleaning up or standardizing an existing repository.
- Teams publishing AI skills, prompts, agents, workflows, templates, data, documentation, or software.
- AI agents that need predictable entry points, verified attribution, and clear approval boundaries.
## What It Helps You Do
## Quick Start
- Select an appropriate repository profile.
- Inventory and preserve useful existing content.
- Propose exact file actions before restructuring a live repository.
- Create human and AI entry points.
- Add machine-readable metadata.
- Validate required paths, versions, links, and entrypoints.
- Record future changes in `UPDATES.md` without confusing them with released changes.
### Use the AI skill
## Repository Contents
Give your AI agent access to:
| Path | Purpose |
| --- | --- |
| `repository.json` | Authoritative machine-readable repository manifest. |
| `AUTHOR.md` | Canonical author, publisher, maintainer, and attribution guidance. |
| `AGENTS.md` | Instructions for AI agents working in this repository. |
| `skills.md` | Index of reusable skills. |
| `skills/structure-ai-ready-repository/` | Skill that assesses, plans, builds, and validates repository structure. |
| `docs/` | Architecture, implementation guidance, and glossary. |
| `templates/` | Reusable repository metadata and update-note templates. |
| `examples/` | Synthetic examples showing completed artifacts. |
| `schemas/` | JSON Schema for `repository.json`. |
| `scripts/` | Deterministic repository validation. |
| `tests/` | Automated validation tests. |
| `UPDATES.md` | Notes and proposed changes to consider in future repository revisions. |
| `CHANGELOG.md` | Versioned record of changes already released. |
[`skills/structure-ai-ready-repository/SKILL.md`](skills/structure-ai-ready-repository/SKILL.md)
## How To Use It
Then ask:
### With an AI agent
```text
Use $structure-ai-ready-repository to build or correct this repository.
```
1. Give the agent access to `skills/structure-ai-ready-repository/SKILL.md`.
2. Ask it to apply `$structure-ai-ready-repository` to a new or existing repository.
3. By default, review the generated `tasks/<task-id>/repository-structure-plan.md`.
4. Amend or explicitly approve the current plan revision.
5. Let the skill implement and validate only the approved actions.
The skill will normally:
The plan gate may be bypassed only when the user explicitly directs the agent to implement immediately and the platform's safety and permission rules allow it.
1. read `repository-variables.json` when present;
2. confirm only missing or conflicting author, publisher, maintainer, canonical
URL, and license values;
3. inspect the target repository and preserve useful existing content;
4. select the smallest appropriate repository profile;
5. create `tasks/<task-id>/repository-structure-plan.md`;
6. wait for review, amendments, and explicit approval;
7. implement only the approved file actions;
8. validate the completed repository and report the results.
### Manually
The planning gate can be bypassed only when the user explicitly authorizes immediate implementation and applicable safety and permission rules allow it.
1. Read `docs/implementation.md`.
2. Confirm author, publisher, maintainer, canonical URL, and license.
3. Create `AUTHOR.md`.
4. Choose the smallest applicable repository profile.
5. Copy and adapt the relevant files.
6. Replace all visible placeholders with verified project facts.
7. Run:
### Apply the standard manually
1. Read the [implementation guide](docs/implementation.md).
2. Confirm repository identity and publication facts.
3. Create or adapt
[`repository-variables.json`](repository-variables.json).
4. Create or adapt [AUTHOR.md](AUTHOR.md).
5. Select the smallest applicable repository profile.
6. Start from the files in [`templates/`](templates/README.md).
7. Replace every visible placeholder with verified information.
8. Run the validator and tests:
```text
python scripts/validate_repository.py .
python -m unittest discover -s tests -p "test_*.py"
```
## Repository Profiles
## Supported Repository Profiles
| Profile | Best for |
| Profile | Use for |
| --- | --- |
| Documentation/guide | Written standards, guides, playbooks, and research. |
| Documentation/guide | Standards, guides, playbooks, research, and educational material. |
| Skill/workflow | AI skills, prompts, agents, workflows, and reusable templates. |
| Software/automation | Executable applications, services, scripts, and automations. |
| Dataset | Versioned public or controlled datasets with provenance and schemas. |
| Software/automation | Applications, services, scripts, integrations, and operational automation. |
| Dataset | Versioned data with provenance, field definitions, limitations, and schemas. |
This repository implements the skill/workflow profile.
This repository implements the **skill/workflow** profile.
## Inputs Required
Profiles are minimum useful structures, not commands to create every possible folder. Omit files and directories that have no real purpose.
Applying the template requires:
## Repository Map
- the target repository path;
- verified author, publisher, and maintainer identity;
- the repository's purpose and intended users;
- known publication, license, maintainer, and canonical URL details;
- existing files and conventions that must be preserved;
- the desired repository profile or enough context to infer one.
### Start here
| Path | Purpose |
| --- | --- |
| [`README.md`](README.md) | Primary human overview and usage guide. |
| [`AUTHOR.md`](AUTHOR.md) | Canonical author, publisher, maintainer, and attribution record. |
| [`repository-variables.json`](repository-variables.json) | Verified stable identity, publication, rights, profile, and skill defaults. |
| [`repository.json`](repository.json) | Authoritative machine-readable repository manifest. |
| [`AGENTS.md`](AGENTS.md) | Repository-scoped operating instructions for AI agents. |
| [`skills.md`](skills.md) | Skill index, triggers, inputs, outputs, and approval requirements. |
### Standard and skill
| Path | Purpose |
| --- | --- |
| [`skills/structure-ai-ready-repository/SKILL.md`](skills/structure-ai-ready-repository/SKILL.md) | Interactive repository assessment and implementation workflow. |
| [`skills/structure-ai-ready-repository/references/repository-structure-standard.md`](skills/structure-ai-ready-repository/references/repository-structure-standard.md) | Detailed repository structure standard. |
| [`skills/structure-ai-ready-repository/assets/repository-structure-plan-template.md`](skills/structure-ai-ready-repository/assets/repository-structure-plan-template.md) | Review and approval plan template. |
| [`skills/structure-ai-ready-repository/scripts/audit_repository.py`](skills/structure-ai-ready-repository/scripts/audit_repository.py) | Read-only profile audit for target repositories. |
### Supporting resources
| Path | Purpose |
| --- | --- |
| [`docs/`](docs/README.md) | Architecture, implementation guidance, and glossary. |
| [`templates/`](templates/README.md) | Reusable variables, manifest, author, and future-update templates. |
| [`examples/`](examples/README.md) | Synthetic completed examples. |
| [`schemas/`](schemas/README.md) | JSON Schema for the repository manifest. |
| [`scripts/`](scripts/README.md) | Dependency-free validation for this repository. |
| [`tests/`](tests/README.md) | Automated repository validation tests. |
| [`data/`](data/README.md) | Rules for public data when a repository needs it. |
| [`receipts/`](receipts/README.md) | Guidance for sanitized execution records. |
| [`tasks/`](tasks/README.md) | Planning and execution records created by workflows. |
| [`assets/`](assets/README.md) | Images, diagrams, screenshots, and downloads. |
| [`.gitea/`](.gitea/PULL_REQUEST_TEMPLATE.md) | Gitea issue and pull-request templates. |
### Governance and lifecycle
| Path | Purpose |
| --- | --- |
| [`UPDATES.md`](UPDATES.md) | Unapproved notes and proposed future repository improvements. |
| [`CHANGELOG.md`](CHANGELOG.md) | Completed, versioned repository changes. |
| [`VERSION`](VERSION) | Deterministic current version. |
| [`CONTRIBUTING.md`](CONTRIBUTING.md) | Contribution standards and review workflow. |
| [`SECURITY.md`](SECURITY.md) | Vulnerability, privacy, credential, and AI-safety guidance. |
| [`CITATION.cff`](CITATION.cff) | Machine-readable citation metadata. |
| [`LICENSE`](LICENSE) | MIT License and copyright terms. |
## Inputs The Skill Needs
- Target repository path.
- Repository purpose and intended users.
- Existing `repository-variables.json`, when present.
- Verified author or authors.
- Publisher and maintainer.
- Canonical repository URL.
- Intended license.
- Existing files and conventions that must be preserved.
- Constraints, risks, and actions requiring human approval.
If an existing `AUTHOR.md` is present, the skill reads and confirms it rather than silently inheriting identity.
## Expected Outputs
- a reviewed repository structure;
Depending on the selected profile, the skill produces:
- clear human and AI entry points;
- accurate `repository.json` metadata;
- profile-appropriate documentation and indexes;
- validation results and, when the normal plan flow is used, task receipts.
- a verified, reusable `repository-variables.json`;
- verified author and publication metadata;
- a machine-readable `repository.json`;
- profile-appropriate documentation, indexes, templates, examples, scripts, schemas, and tests;
- host-specific contribution files when relevant;
- validation results and, in the normal workflow, task plans and receipts.
## AI Usage Guidance
## AI Retrieval Order
Read files in this order:
An AI agent should read:
1. `README.md`
2. `AUTHOR.md`
3. `repository.json`
4. `AGENTS.md`
5. `skills.md`
6. `skills/structure-ai-ready-repository/SKILL.md`
7. Only the references, templates, scripts, or examples required for the current task
1. [`README.md`](README.md)
2. [`AUTHOR.md`](AUTHOR.md)
3. [`repository-variables.json`](repository-variables.json)
4. [`repository.json`](repository.json)
5. [`AGENTS.md`](AGENTS.md)
6. [`skills.md`](skills.md)
7. The relevant skill
8. Only the references and supporting files required for the current task
Treat `UPDATES.md` as unapproved future work unless a user explicitly asks to implement an item. Treat `CHANGELOG.md` as the record of completed versioned changes.
Treat `UPDATES.md` as planning context, not authorization. Treat `CHANGELOG.md` as the record of completed versioned work.
## How To Adapt It
## Validation
Keep the core entry-point and metadata concepts stable, but tailor profiles, directories, host configuration, tests, and documentation to the repository's real purpose. Do not create unused folders merely to resemble the example tree.
The included validator is read-only and uses only the Python standard library:
## Limitations
```text
python scripts/validate_repository.py .
```
- This template does not choose a license, maintainer, security contact, or publication URL for you.
- Structural validation cannot prove that documentation is accurate or complete.
- Git-host configuration varies by platform.
- The included skill does not create commits, remotes, releases, or hosting settings unless separately requested.
It checks:
- required files and directories;
- JSON parsing and core manifest and repository-variable fields;
- alignment between reusable variables and repository metadata;
- author, publisher, maintainer, citation, and license alignment;
- human, AI, skill, script, and template entry points;
- declared content and retrieval paths;
- version and license consistency;
- relative Markdown links.
Run the unit tests with:
```text
python -m unittest discover -s tests -p "test_*.py"
```
Structural validation cannot prove that documentation is accurate, that a license is legally appropriate, or that external URLs are available. Human review and project-native tests remain necessary.
## Adapting This Repository
When using this template for another repository:
1. replace the verified values in `repository-variables.json`;
2. replace the identity values in `AUTHOR.md`;
3. align `repository.json`, `CITATION.cff`, and `LICENSE`;
4. replace the canonical URL and hosting metadata;
5. choose the correct profile;
6. remove irrelevant example structure;
7. update tests and validation requirements;
8. run the complete validation workflow.
Do not leave Eddie Soehnel's identity on a derived repository unless that attribution remains accurate.
## Security And Privacy
Never add credentials, private keys, access tokens, customer information, regulated data, private logs, or production databases. Use placeholders in examples and external secret management for live systems. See `SECURITY.md`.
Never commit passwords, API keys, access tokens, private keys, customer information, regulated data, production logs, session cookies, or proprietary records. Use synthetic examples and external secret management.
## Version
See [SECURITY.md](SECURITY.md).
Current version: `0.1.0`. See `VERSION`, `CHANGELOG.md`, and `UPDATES.md`.
## Version, Author, And License
## Author And Publisher
- **Version:** `0.2.0`
- **Author, publisher, and maintainer:** Eddie Soehnel
- **License:** MIT
- **Canonical repository:** `https://projects.eddiesoehnel.com/adminprojects/repo-template`
Eddie Soehnel. See `AUTHOR.md` for canonical attribution and adaptation guidance.
## License
Licensed under the MIT License. See `LICENSE`.
## Contributing
See `CONTRIBUTING.md`.
## Canonical Repository
`https://projects.eddiesoehnel.com/adminprojects/repo-template`
See [AUTHOR.md](AUTHOR.md), [VERSION](VERSION), [CHANGELOG.md](CHANGELOG.md), [CITATION.cff](CITATION.cff), and [LICENSE](LICENSE).
+2
View File
@@ -27,5 +27,7 @@ Items here are not approved work, release commitments, or completed changes. Whe
## Completed Or Superseded
- 2026-07-24: Added required, schema-backed `repository-variables.json` support
across the standard, skill, templates, validation, and tests.
- 2026-07-23: Set Eddie Soehnel as author, publisher, and maintainer and added `AUTHOR.md`.
- 2026-07-23: Added `UPDATES.md` to the repository standard and implemented template.
+1 -1
View File
@@ -1 +1 @@
0.1.0
0.2.0
+9 -2
View File
@@ -8,7 +8,10 @@ The repository separates human guidance, machine-readable contracts, reusable AI
README.md + AGENTS.md
|
v
repository.json ----> schemas/repository.schema.json
repository-variables.json ---> schemas/repository-variables.schema.json
|
v
repository.json -------------> schemas/repository.schema.json
|
v
skills/structure-ai-ready-repository/
@@ -28,7 +31,11 @@ scripts/validate_repository.py + tests/
### Entry points
`README.md` is the human entry point. `AUTHOR.md` is the canonical attribution record. `AGENTS.md` is the AI operating entry point. `repository.json` provides authoritative structured metadata and retrieval order.
`README.md` is the human entry point. `AUTHOR.md` is the canonical attribution
record. `repository-variables.json` stores verified stable inputs for future
repository-structure work. `AGENTS.md` is the AI operating entry point.
`repository.json` provides authoritative structured metadata and retrieval
order.
### Standard
+14 -7
View File
@@ -15,11 +15,13 @@ Add profile-specific files only when they support real content or validation.
1. Choose a clear lowercase kebab-case repository name.
2. Create human and AI entry points.
3. Create `repository.json` using `templates/repository.json.template`.
4. Select and create profile-required documentation and folders.
5. Add a verified license, version, and change record.
6. Add host-specific contribution templates.
7. Validate the repository.
3. Create `repository-variables.json` using
`templates/repository-variables.json.template`.
4. Create `repository.json` using `templates/repository.json.template`.
5. Select and create profile-required documentation and folders.
6. Add a verified license, version, and change record.
7. Add host-specific contribution templates.
8. Validate the repository.
## Existing Repository Workflow
@@ -44,7 +46,9 @@ Declare these answers in `repository.json`.
## Identity And Publication
At the beginning of a repository build, confirm:
At the beginning of a repository build, read `repository-variables.json` when
present. Treat its verified values as defaults, then confirm only absent,
conflicting, or explicitly unverified values:
- author or authors;
- publisher;
@@ -52,7 +56,10 @@ At the beginning of a repository build, confirm:
- canonical repository URL;
- intended license.
Record the verified values in `AUTHOR.md` and keep `repository.json`, `CITATION.cff`, and `LICENSE` aligned. When adapting an existing template, never inherit its author automatically.
Record stable verified values in `repository-variables.json` and the canonical
human-readable identity in `AUTHOR.md`. Keep both files aligned with
`repository.json`, `CITATION.cff`, and `LICENSE`. When adapting an existing
template, never inherit its author automatically.
## Metadata Rules
+1
View File
@@ -4,6 +4,7 @@ All examples in this directory are synthetic and do not represent an actual orga
| File | Purpose |
| --- | --- |
| `example-repository-variables.json` | Completed stable repository-skill variables for a fictional repository. |
| `example-repository.json` | Completed documentation-profile manifest for a fictional repository. |
Use examples to understand expected shape. Do not copy fictional URLs, maintainers, or identifiers into a real repository.
@@ -0,0 +1,42 @@
{
"$schema": "../schemas/repository-variables.schema.json",
"schema_version": "1.0",
"purpose": "Synthetic verified inputs for the example documentation repository.",
"repository_profile": "documentation-guide",
"identity": {
"authors": [
{
"name": "Alex Example"
}
],
"publisher": {
"name": "Example Organization"
},
"maintainer": {
"name": "Example Maintainer"
}
},
"repository": {
"repository_id": "example-organization-field-guide",
"name": "field-guide",
"title": "Synthetic Field Guide",
"canonical_url": "https://code.example.org/example-organization/field-guide",
"organization": {
"id": "example-organization",
"name": "Example Organization",
"url": "https://code.example.org/example-organization"
}
},
"rights": {
"license": "CC-BY-4.0",
"license_file": "LICENSE"
},
"skill_defaults": {
"task_id": "structure-ai-ready-repository",
"require_plan_approval": true,
"preserve_existing_content": true,
"use_smallest_fitting_profile": true
},
"verified_by": "Synthetic example fixture",
"verified_at": "2026-01-01"
}
+8
View File
@@ -6,6 +6,11 @@
"description": "A synthetic example showing machine-readable metadata for a documentation repository.",
"summary": "Demonstrates the minimum identity, profile, entrypoint, rights, and AI retrieval fields without using real organizational data.",
"canonical_url": "https://code.example.org/example-organization/field-guide",
"organization": {
"id": "example-organization",
"name": "Example Organization",
"url": "https://code.example.org/example-organization"
},
"repository_status": "active",
"visibility": "public",
"maturity": "stable",
@@ -101,6 +106,9 @@
"ai_retrieval": {
"read_first": [
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"AGENTS.md"
],
"retrieve_as_needed": [
+42
View File
@@ -0,0 +1,42 @@
{
"$schema": "./schemas/repository-variables.schema.json",
"schema_version": "1.0",
"purpose": "Verified stable inputs for repository-structure skills and future repository maintenance.",
"repository_profile": "skill-workflow",
"identity": {
"authors": [
{
"name": "Eddie Soehnel"
}
],
"publisher": {
"name": "Eddie Soehnel"
},
"maintainer": {
"name": "Eddie Soehnel"
}
},
"repository": {
"repository_id": "adminprojects-repo-template",
"name": "repo-template",
"title": "AI-Ready Repository Template",
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/repo-template",
"organization": {
"id": "adminprojects",
"name": "adminprojects",
"url": "https://projects.eddiesoehnel.com/adminprojects"
}
},
"rights": {
"license": "MIT",
"license_file": "LICENSE"
},
"skill_defaults": {
"task_id": "structure-ai-ready-repository",
"require_plan_approval": true,
"preserve_existing_content": true,
"use_smallest_fitting_profile": true
},
"verified_by": "AUTHOR.md and repository maintainers",
"verified_at": "2026-07-24"
}
+11 -2
View File
@@ -23,9 +23,9 @@
"repository_status": "active",
"visibility": "public",
"maturity": "experimental",
"version": "0.1.0",
"version": "0.2.0",
"created_at": "2026-07-23",
"updated_at": "2026-07-23",
"updated_at": "2026-07-24",
"resource_types": [
"documentation",
"framework",
@@ -72,6 +72,7 @@
"Assess a new or existing repository.",
"Propose a profile-appropriate repository structure.",
"Create machine-readable repository metadata.",
"Persist verified stable repository-skill variables.",
"Validate required paths, entrypoints, versions, and links."
],
"use_cases": [
@@ -110,6 +111,13 @@
"description": "Canonical author, publisher, maintainer, and attribution guidance.",
"required_for_use": true
},
{
"path": "repository-variables.json",
"type": "configuration",
"title": "Repository Variables",
"description": "Verified stable identity, publication, rights, profile, and repository-skill defaults.",
"required_for_use": true
},
{
"path": "README.md",
"type": "documentation",
@@ -180,6 +188,7 @@
"read_first": [
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"AGENTS.md",
"skills.md"
+1
View File
@@ -3,5 +3,6 @@
| File | Purpose |
| --- | --- |
| `repository.schema.json` | JSON Schema contract for the repository manifest. |
| `repository-variables.schema.json` | JSON Schema contract for stable repository-skill inputs. |
The root validator performs dependency-free contract checks. Use a Draft 2020-12 compatible JSON Schema validator for complete schema validation.
+179
View File
@@ -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
}
+4 -1
View File
@@ -18,4 +18,7 @@ python scripts/validate_repository.py .
python scripts/validate_repository.py . --json
```
The validator checks required paths, JSON parsing, core manifest fields, author/publisher alignment, entrypoint paths, manifest contents paths, version alignment, license alignment, and relative Markdown links. It does not prove content accuracy or check external URLs.
The validator checks required paths, JSON parsing, repository-variable and
manifest alignment, author/publisher alignment, entrypoint paths, manifest
contents paths, version alignment, license alignment, and relative Markdown
links. It does not prove content accuracy or check external URLs.
+76
View File
@@ -32,14 +32,17 @@ REQUIRED_PATHS = (
"examples/README.md",
"receipts/README.md",
"repository.json",
"repository-variables.json",
"schemas/README.md",
"schemas/repository.schema.json",
"schemas/repository-variables.schema.json",
"scripts/README.md",
"skills.md",
"skills/README.md",
"skills/structure-ai-ready-repository/SKILL.md",
"tasks/README.md",
"templates/README.md",
"templates/repository-variables.json.template",
"tests/README.md",
)
@@ -160,6 +163,77 @@ def validate_manifest(root: Path, findings: list[dict[str, str]]) -> dict | None
return manifest
def validate_variables(
root: Path, manifest: dict | None, findings: list[dict[str, str]]
) -> dict | None:
path = root / "repository-variables.json"
try:
variables = json.loads(read_text(path))
except (OSError, UnicodeError, json.JSONDecodeError) as exc:
add(findings, "error", f"repository-variables.json is invalid: {exc}")
return None
required = (
"schema_version",
"purpose",
"repository_profile",
"identity",
"repository",
"rights",
"skill_defaults",
"verified_by",
"verified_at",
)
for key in required:
if key not in variables:
add(findings, "error", f"repository-variables.json lacks required key: {key}")
if not manifest:
return 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)
]
if variable_authors != manifest_authors:
add(findings, "error", "Authors differ between repository-variables.json and repository.json")
variable_publisher = identity.get("publisher", {}).get("name")
manifest_publisher = manifest.get("publisher", {}).get("name")
if variable_publisher != manifest_publisher:
add(findings, "error", "Publisher differs between repository-variables.json and repository.json")
variable_maintainer = identity.get("maintainer", {}).get("name")
manifest_maintainer = manifest.get("maintenance", {}).get("maintainer")
if variable_maintainer != manifest_maintainer:
add(findings, "error", "Maintainer differs between repository-variables.json and repository.json")
repository = variables.get("repository", {})
for key in ("repository_id", "name", "title", "canonical_url", "organization"):
if repository.get(key) != manifest.get(key):
add(
findings,
"error",
f"{key} differs between repository-variables.json and repository.json",
)
variable_rights = variables.get("rights", {})
manifest_rights = manifest.get("rights", {})
for key in ("license", "license_file"):
if variable_rights.get(key) != manifest_rights.get(key):
add(
findings,
"error",
f"{key} differs between repository-variables.json and repository.json",
)
return variables
def validate_versions(root: Path, manifest: dict | None, findings: list[dict[str, str]]) -> None:
version = read_text(root / "VERSION").strip()
if not re.fullmatch(r"\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?", version):
@@ -226,6 +300,8 @@ def validate(root: Path) -> dict:
missing_core = False
manifest = None if not (root / "repository.json").is_file() else validate_manifest(root, findings)
if (root / "repository-variables.json").is_file():
validate_variables(root, manifest, findings)
if not missing_core:
validate_versions(root, manifest, findings)
validate_markdown_links(root, findings)
+7 -2
View File
@@ -11,8 +11,13 @@ Read this file after `README.md`, `repository.json`, and `AGENTS.md` to determin
- **Path:** `skills/structure-ai-ready-repository/SKILL.md`
- **Purpose:** Assess, plan, create, correct, and validate a human- and AI-findable repository structure.
- **Use when:** Starting a repository, correcting inconsistent structure, adding repository metadata, or improving AI entry points.
- **Inputs:** Target repository, project purpose, existing contents, verified author/publisher/maintainer identity, canonical URL, license, and any constraints.
- **Outputs:** A profile-appropriate repository structure, metadata, documentation, validation, and normal-workflow task records.
- **Inputs:** Target repository, project purpose, existing contents,
`repository-variables.json` when present, verified
author/publisher/maintainer identity, canonical URL, license, and any
constraints.
- **Outputs:** A profile-appropriate repository structure,
`repository-variables.json`, metadata, documentation, validation, and
normal-workflow task records.
- **Human approval required:** Yes by default. The user may explicitly authorize immediate implementation.
- **Related scripts:** `skills/structure-ai-ready-repository/scripts/audit_repository.py` and `scripts/validate_repository.py`.
- **Reference standard:** `skills/structure-ai-ready-repository/references/repository-structure-standard.md`.
+28 -9
View File
@@ -18,16 +18,26 @@ Use `scripts/audit_repository.py` for a read-only baseline and final structural
## Phase 1: Inspect
1. Resolve the target repository and determine whether it is new or existing.
2. Begin with a short identity and publication round. Ask only for values the user has not already supplied:
2. If `repository-variables.json` exists, read it before the identity round.
Treat values with a verification source and date as defaults. Ask only about
missing, conflicting, explicitly unverified, or user-overridden values.
3. Begin with a short identity and publication round. Ask only for values the
user has not already supplied or verified:
- author or authors;
- publisher and maintainer;
- canonical repository URL;
- intended license.
3. If `AUTHOR.md` exists, read it first, present its values for confirmation, and ask only about missing or conflicting facts. Do not silently inherit identity from a template or source repository.
4. For an existing repository, inspect its files, Git status, documentation, manifests, tests, host configuration, and any `AGENTS.md` or equivalent instructions. Preserve unrelated user changes.
5. Infer the most suitable profile: documentation/guide, skill/workflow, software/automation, dataset, or a justified custom minimum.
6. Separate facts found in the repository from assumptions and recommendations.
7. Run the read-only audit when Python is available. Record failures as planning inputs, not as permission to change files.
4. If `AUTHOR.md` exists, read it and compare it with
`repository-variables.json`. Ask only about missing or conflicting facts. Do
not silently inherit identity from a template or source repository.
5. For an existing repository, inspect its files, Git status, documentation,
manifests, tests, host configuration, and any `AGENTS.md` or equivalent
instructions. Preserve unrelated user changes.
6. Infer the most suitable profile: documentation/guide, skill/workflow,
software/automation, dataset, or a justified custom minimum.
7. Separate facts found in the repository from assumptions and recommendations.
8. Run the read-only audit when Python is available. Record failures as
planning inputs, not as permission to change files.
## Phase 2: Write the review plan
@@ -84,14 +94,22 @@ If implementation requires a material departure from the approved plan, update t
- provide scoped agent instructions in the repository's established agent-instruction file;
- index skills, scripts, templates, schemas, data, and examples when they exist.
- create or update `UPDATES.md` for future notes and proposals, while keeping completed versioned changes in `CHANGELOG.md`.
- create `AUTHOR.md` as the canonical human-readable attribution file and keep it aligned with `repository.json`, `CITATION.cff`, and `LICENSE`.
- create `AUTHOR.md` as the canonical human-readable attribution file and
keep it aligned with `repository-variables.json`, `repository.json`,
`CITATION.cff`, and `LICENSE`.
- create or update `repository-variables.json` with verified stable identity,
repository, rights, profile, and workflow defaults; add it to agent read
order before `repository.json`. Omit optional unknown values or use `null`
where the schema permits; never invent an organization.
7. Use placeholders only when the user has not supplied a value and the placeholder is visibly marked. Never invent URLs, maintainers, licenses, security contacts, provenance, or credentials.
8. Do not create commits, branches, remotes, releases, or hosting-platform settings unless the user separately requested them.
## Phase 5: Validate and record
1. Run `scripts/audit_repository.py` with the approved profile.
2. Parse machine-readable files and check version alignment, internal paths, and declared entry points.
2. Parse machine-readable files and check
`repository-variables.json` alignment, version alignment, internal paths, and
declared entry points.
3. Run relevant repository-native tests, linters, schema checks, and link checks that can safely run.
4. Search created examples and receipts for secrets, personal data, and organization-specific residue.
5. Confirm that `UPDATES.md` contains future planning notes only and is not presented as approval or completed work.
@@ -108,7 +126,8 @@ Record the approved revision, actual actions, deviations, commands, results, unr
Report:
- the verified author, publisher, maintainer, canonical URL, and license;
- the verified author, publisher, maintainer, canonical URL, license, and
`repository-variables.json` source;
- the selected profile and resulting entry points;
- created, modified, preserved, moved, and intentionally omitted files;
- validation results and anything not tested;
@@ -23,7 +23,8 @@
- Maintainer: `[verified name]`
- Canonical repository URL: `[verified URL or explicitly unset]`
- License: `[verified license or decision required]`
- Identity source: `[user response | AUTHOR.md | other verified source]`
- Repository variables: `[path, values used, or not present]`
- Identity source: `[user response | repository-variables.json | AUTHOR.md | other verified source]`
## Current State
@@ -64,6 +65,7 @@ Allowed actions: `create`, `preserve`, `modify`, `move`, `deprecate`, `leave abs
- Human starts at: `[path]`
- AI agent starts at: `[path]`
- Authoritative manifest: `[path]`
- Verified repository variables: `[path]`
- Retrieve next: `[ordered paths]`
## Hosting Platform Choices
@@ -74,6 +76,8 @@ Allowed actions: `create`, `preserve`, `modify`, `move`, `deprecate`, `leave abs
- [ ] Required files contain project-specific, accurate content.
- [ ] Machine-readable files parse and agree with authoritative values.
- [ ] `repository-variables.json` contains verified stable inputs and agrees
with attribution, manifest, citation, and license files.
- [ ] Declared paths and internal links resolve.
- [ ] Version references align.
- [ ] Relevant project-native tests pass.
@@ -43,6 +43,7 @@ repository-name/
│
├── README.md
├── AUTHOR.md
├── repository-variables.json
├── repository.json
├── LICENSE
├── CHANGELOG.md
@@ -119,6 +120,7 @@ The following root files should normally exist in every public repository:
```text
README.md
AUTHOR.md
repository-variables.json
repository.json
LICENSE
CHANGELOG.md
@@ -261,7 +263,47 @@ It should state:
Confirm these values with the user at the beginning of repository creation or restructuring. If an existing `AUTHOR.md` is present, present its values for confirmation rather than silently inheriting them.
Keep `AUTHOR.md`, `repository.json`, `CITATION.cff`, and `LICENSE` aligned. Never leave a source-template author attached to a derived repository unless that attribution remains accurate.
Keep `repository-variables.json`, `AUTHOR.md`, `repository.json`,
`CITATION.cff`, and `LICENSE` aligned. Never leave a source-template author
attached to a derived repository unless that attribution remains accurate.
---
## `repository-variables.json`
### Purpose
Stores verified stable inputs that repository-structure skills and future
maintainers can reuse without repeatedly asking for the same facts.
Every supported repository profile should include this file. It should contain:
* Repository profile.
* Author or authors.
* Publisher and maintainer.
* Stable repository ID, name, title, canonical URL, and organization when
applicable.
* License and license-file path.
* Repository-skill defaults, including approval and preservation behavior.
* Verification source and date.
### Rules
Read this file before an identity and publication round. Treat its values as
defaults only when a verification source and date are present. Ask about values
that are missing, conflicting, explicitly unverified, or overridden by the
user.
Keep dynamic release values such as the current version out of this file; their
authoritative sources remain `VERSION`, `repository.json`, `CITATION.cff`, and
`CHANGELOG.md`.
When verified identity, repository, or rights values change, update
`repository-variables.json`, `AUTHOR.md`, `repository.json`, `CITATION.cff`, and
`LICENSE` together.
Use `templates/repository-variables.json.template` and validate against
`schemas/repository-variables.schema.json`.
---
@@ -449,7 +491,9 @@ Do not include comments, trailing commas, Markdown, or JSON5 syntax.
"ai_retrieval": {
"read_first": [
"README.md",
"AUTHOR.md"
"AUTHOR.md",
"repository-variables.json",
"repository.json"
],
"retrieve_as_needed": [],
"exclude_by_default": [
@@ -901,9 +945,11 @@ Markdown.
## Read Order
1. `README.md`
2. `repository.json`
3. Relevant files listed in `entrypoints`
4. Supporting documentation only as needed
2. `AUTHOR.md`
3. `repository-variables.json`
4. `repository.json`
5. Relevant files listed in `entrypoints`
6. Supporting documentation only as needed
## Task Routing
@@ -1640,6 +1686,7 @@ Required:
```text
README.md
AUTHOR.md
repository-variables.json
repository.json
LICENSE
CHANGELOG.md
@@ -1668,6 +1715,7 @@ Required:
```text
README.md
AUTHOR.md
repository-variables.json
repository.json
LICENSE
CHANGELOG.md
@@ -1700,6 +1748,7 @@ Required:
```text
README.md
AUTHOR.md
repository-variables.json
repository.json
LICENSE
CHANGELOG.md
@@ -1733,6 +1782,7 @@ Required:
```text
README.md
AUTHOR.md
repository-variables.json
repository.json
LICENSE
CHANGELOG.md
@@ -1912,6 +1962,8 @@ Before publishing a new repository:
[ ] Hosting-platform description is complete.
[ ] hosting-platform topics are assigned.
[ ] README explains the purpose, users, process, inputs, and outputs.
[ ] repository-variables.json contains verified identity, repository, rights,
profile, workflow defaults, and verification metadata.
[ ] AUTHOR.md contains verified author, publisher, maintainer, canonical URL, and adaptation guidance.
[ ] repository.json is complete and valid JSON.
[ ] repository_id is stable and unique.
@@ -1941,6 +1993,7 @@ For the first implementation, every repository should begin with:
```text
README.md
AUTHOR.md
repository-variables.json
repository.json
LICENSE
CHANGELOG.md
@@ -14,6 +14,7 @@ PROFILES = {
"documentation-guide": {
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"LICENSE",
"CHANGELOG.md",
@@ -25,6 +26,7 @@ PROFILES = {
"skill-workflow": {
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"LICENSE",
"CHANGELOG.md",
@@ -39,6 +41,7 @@ PROFILES = {
"software-automation": {
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"LICENSE",
"CHANGELOG.md",
@@ -54,6 +57,7 @@ PROFILES = {
"dataset": {
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"LICENSE",
"CHANGELOG.md",
@@ -133,6 +137,104 @@ def audit(root: Path, profile: str) -> dict:
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})"
),
}
)
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:
+3 -1
View File
@@ -26,4 +26,6 @@ Canonical repository:
## Adapting This Template
Replace these values in `AUTHOR.md`, `repository.json`, `CITATION.cff`, and `LICENSE`. Verify the license and canonical URL rather than inheriting them automatically.
Replace these values in `repository-variables.json`, `AUTHOR.md`,
`repository.json`, `CITATION.cff`, and `LICENSE`. Verify the license and
canonical URL rather than inheriting them automatically.
+1
View File
@@ -3,6 +3,7 @@
| File | Purpose |
| --- | --- |
| `repository.json.template` | Starting machine-readable repository manifest with visible placeholders. |
| `repository-variables.json.template` | Starting verified identity, publication, rights, profile, and repository-skill defaults. |
| `AUTHOR.md.template` | Starting canonical author, publisher, maintainer, and attribution file. |
| `UPDATES.md.template` | Starting notes file for future repository improvements. |
@@ -0,0 +1,42 @@
{
"$schema": "./schemas/repository-variables.schema.json",
"schema_version": "1.0",
"purpose": "Verified stable inputs for repository-structure skills and future repository maintenance.",
"repository_profile": "{{documentation-guide|skill-workflow|software-automation|dataset|custom}}",
"identity": {
"authors": [
{
"name": "{{AUTHOR_NAME}}"
}
],
"publisher": {
"name": "{{PUBLISHER_NAME}}"
},
"maintainer": {
"name": "{{MAINTAINER_NAME}}"
}
},
"repository": {
"repository_id": "{{STABLE_REPOSITORY_ID}}",
"name": "{{REPOSITORY_NAME}}",
"title": "{{REPOSITORY_TITLE}}",
"canonical_url": "{{CANONICAL_REPOSITORY_URL}}",
"organization": {
"id": "{{ORGANIZATION_ID}}",
"name": "{{ORGANIZATION_NAME}}",
"url": "{{ORGANIZATION_URL}}"
}
},
"rights": {
"license": "{{SPDX_LICENSE_ID}}",
"license_file": "LICENSE"
},
"skill_defaults": {
"task_id": "structure-ai-ready-repository",
"require_plan_approval": true,
"preserve_existing_content": true,
"use_smallest_fitting_profile": true
},
"verified_by": "{{VERIFICATION_SOURCE}}",
"verified_at": "{{YYYY-MM-DD}}"
}
+1
View File
@@ -82,6 +82,7 @@
"read_first": [
"README.md",
"AUTHOR.md",
"repository-variables.json",
"repository.json",
"AGENTS.md"
],
+3 -1
View File
@@ -6,4 +6,6 @@ Run the dependency-free unit tests with:
python -m unittest discover -s tests -p "test_*.py"
```
The tests validate the current repository and protect key failure cases in `scripts/validate_repository.py`.
The tests validate the current repository and protect key failure cases in
`scripts/validate_repository.py`, including mismatches between
`repository-variables.json` and `repository.json`.
+20
View File
@@ -1,7 +1,9 @@
from __future__ import annotations
import importlib.util
import json
from pathlib import Path
import shutil
import tempfile
import unittest
@@ -27,6 +29,24 @@ class RepositoryValidationTests(unittest.TestCase):
any("Missing required path" in item["message"] for item in result["findings"])
)
def test_variable_identity_mismatch_fails(self) -> None:
with tempfile.TemporaryDirectory() as directory:
copy = Path(directory) / "repository"
shutil.copytree(ROOT, copy, ignore=shutil.ignore_patterns(".git", "__pycache__"))
variables_path = copy / "repository-variables.json"
variables = json.loads(variables_path.read_text(encoding="utf-8"))
variables["identity"]["publisher"]["name"] = "Different Publisher"
variables_path.write_text(json.dumps(variables, indent=2) + "\n", encoding="utf-8")
result = VALIDATOR.validate(copy)
self.assertFalse(result["passed"])
self.assertTrue(
any(
"Publisher differs between repository-variables.json and repository.json"
in item["message"]
for item in result["findings"]
)
)
if __name__ == "__main__":
unittest.main()