This commit is contained in:
eddiesoehnel committed 2026-07-23 14:13:45 -06:00
1 parent 92ef20cee0
commit 7af769f85e
46 files changed
+4417 -2

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
---
name: Bug Report
about: Report a reproducible problem
title: "[BUG] "
labels: bug
---
## What Happened
## What You Expected
## Steps To Reproduce
## Repository Version
## Relevant Files
## Validation Output
## Additional Context
Do not include credentials, private information, or confidential records.
@@ -0,0 +1,16 @@
---
name: Documentation Correction
about: Correct inaccurate, unclear, or outdated guidance
title: "[DOCS] "
labels: documentation
---
## File And Section
## Current Problem
## Proposed Correction
## Supporting Evidence
## Related Files That Must Stay Aligned
+20
View File
@@ -0,0 +1,20 @@
---
name: Feature Request
about: Propose a new capability or repository profile improvement
title: "[FEATURE] "
labels: enhancement
---
## Problem Or Opportunity
## Proposed Outcome
## Who Benefits
## Files Or Contracts Affected
## Alternatives Considered
## Validation Ideas
## Additional Context
@@ -0,0 +1,20 @@
---
name: Resource Submission
about: Propose a reusable template, example, schema, or skill resource
title: "[RESOURCE] "
labels: contribution
---
## Resource
## Purpose
## Intended Users
## Source And Rights
## Anonymization
## Validation
## Human Review Required
+29
View File
@@ -0,0 +1,29 @@
# Change Summary
Describe the change and why it is needed.
## Type Of Change
- [ ] Documentation
- [ ] Skill
- [ ] Template
- [ ] Script
- [ ] Schema
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
## Validation
- [ ] `README.md`, `repository.json`, and `AGENTS.md` remain accurate.
- [ ] `VERSION`, `repository.json`, `CITATION.cff`, and `CHANGELOG.md` align.
- [ ] `UPDATES.md` was updated when future notes changed.
- [ ] Relative links resolve.
- [ ] Examples are anonymized or synthetic.
- [ ] No credentials or private information were added.
- [ ] `python scripts/validate_repository.py .` passes.
- [ ] Relevant tests pass.
## Human Review Required
Describe decisions or actions requiring explicit approval.
+15
View File
@@ -0,0 +1,15 @@
.env
.venv/
__pycache__/
*.pyc
*.pyo
.pytest_cache/
.mypy_cache/
coverage.xml
.coverage
dist/
build/
temp/
logs/
.DS_Store
Thumbs.db
+51
View File
@@ -0,0 +1,51 @@
# AI Agent Instructions
## Start Here
Read, in order:
1. `README.md`
2. `AUTHOR.md`
3. `repository.json`
4. `skills.md`
5. The relevant skill or documentation for the task
## Repository Purpose
This repository defines and validates a platform-neutral structure for human- and AI-findable repositories. Keep guidance generic unless a file is explicitly scoped to a Git host or runtime.
## Operating Rules
- 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.
- 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.
- Use synthetic or anonymized examples.
- Do not commit generated caches, secrets, private data, or transient task material.
## Applying The Skill
Use `skills/structure-ai-ready-repository/SKILL.md`.
Its normal workflow requires a plan in `tasks/<task-id>/` and explicit approval before structural changes. Skip that gate only when the user explicitly authorizes immediate implementation and higher-priority safety and permission rules allow it.
## Validation
Run:
```text
python scripts/validate_repository.py .
python -m unittest discover -s tests -p "test_*.py"
```
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 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.
+39
View File
@@ -0,0 +1,39 @@
# Author And Publisher
## Primary Author
**Eddie Soehnel**
## Publisher
**Eddie Soehnel**
## Maintainer
**Eddie Soehnel**
## Attribution
Use the following attribution when referring to this repository:
```text
AI-Ready Repository Template by Eddie Soehnel
```
The canonical repository is:
```text
https://projects.eddiesoehnel.com/adminprojects/repo-template
```
## Adapting This 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;
3. update the canonical repository URL;
4. verify the license is appropriate for the new repository;
5. run the repository validator.
Do not leave Eddie Soehnel's identity on a derived repository unless he remains an author, publisher, or maintainer of that repository.
+32
View File
@@ -0,0 +1,32 @@
# Changelog
All notable released changes to this repository are documented here.
## [Unreleased]
### Added
### Changed
### Fixed
### Removed
### Security
## [0.1.0] - 2026-07-23
### Added
- Platform-neutral AI-ready repository structure standard.
- `structure-ai-ready-repository` skill with a review and approval workflow.
- `UPDATES.md` for future repository notes and proposed improvements.
- Machine-readable repository manifest and schema.
- Documentation, templates, examples, validation script, and tests.
- Contribution, security, citation, and Git-host workflow files.
- `AUTHOR.md` with canonical attribution and downstream adaptation guidance.
### Changed
- Set Eddie Soehnel as author, publisher, maintainer, citation author, and license copyright holder.
- Added upfront identity and publication questions to the repository-structure skill.
+18
View File
@@ -0,0 +1,18 @@
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
authors:
- family-names: "Soehnel"
given-names: "Eddie"
repository-code: "https://projects.eddiesoehnel.com/adminprojects/repo-template"
url: "https://projects.eddiesoehnel.com/adminprojects/repo-template"
license: MIT
keywords:
- artificial intelligence
- repository template
- AI agents
- skills
- machine-readable metadata
+49
View File
@@ -0,0 +1,49 @@
# Contributing
## Who May Contribute
Contributions are welcome from people improving the repository standard, skill, templates, schemas, examples, validation, or documentation.
## Types Of Contributions
- Correct inaccurate or unclear guidance.
- Improve AI findability and agent entry points.
- Add profile-specific examples or validation checks.
- Fix defects in the skill or scripts.
- Propose future work in `UPDATES.md`.
## Before You Submit
1. Read `README.md`, `AGENTS.md`, and the relevant documentation.
2. Keep the standard platform-neutral unless a file is explicitly host-specific.
3. Use synthetic or anonymized examples.
4. Do not include credentials, private information, or proprietary content.
5. Update tests and documentation when behavior changes.
## Contribution Workflow
1. Create a focused change.
2. Run `python scripts/validate_repository.py .`.
3. Run `python -m unittest discover -s tests -p "test_*.py"`.
4. Update `CHANGELOG.md` for released behavior changes or `UPDATES.md` for future proposals.
5. Submit the change using the repository host's normal review workflow.
## Repository Standards
- Preserve stable identifiers.
- Keep versions aligned across `VERSION`, `repository.json`, `CITATION.cff`, and `CHANGELOG.md`.
- Keep human and AI entry points accurate.
- Avoid unused ceremonial files and folders.
- Explain why a new requirement improves discoverability, safety, validation, or reuse.
## Anonymization Requirements
Examples and receipts must be synthetic, anonymized, or explicitly approved for publication.
## Intellectual Property And Licensing
Only contribute work you have the right to license under this repository's MIT License.
## Review Process
Maintainers review changes for accuracy, consistency, portability, safety, and test coverage. Material structural changes should be reflected in the standard, skill, manifest, and validation surfaces together.
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2026 adminprojects
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:
+159 -1
View File
@@ -1,2 +1,160 @@
# repo-template
# 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.
## What This Is
This repository contains:
- 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.
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.
## Problem It Solves
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.
## 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.
## What It Helps You Do
- 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.
## Repository Contents
| 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. |
## How To Use It
### With an AI agent
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 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.
### Manually
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:
```text
python scripts/validate_repository.py .
python -m unittest discover -s tests -p "test_*.py"
```
## Repository Profiles
| Profile | Best for |
| --- | --- |
| Documentation/guide | Written standards, guides, playbooks, and research. |
| 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. |
This repository implements the skill/workflow profile.
## Inputs Required
Applying the template requires:
- 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.
## Expected Outputs
- a reviewed repository structure;
- 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.
## AI Usage Guidance
Read files in this order:
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
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.
## How To Adapt It
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.
## Limitations
- 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.
## 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`.
## Version
Current version: `0.1.0`. See `VERSION`, `CHANGELOG.md`, and `UPDATES.md`.
## Author And Publisher
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`
+28
View File
@@ -0,0 +1,28 @@
# Security Policy
## Supported Versions
The latest version on the default branch is supported.
## Reporting A Vulnerability
Use the repository host's private security-reporting channel or contact a repository maintainer privately. If no private channel is configured, do not publish exploit details or sensitive data in a public issue; request a private contact route first.
## Do Not Post Sensitive Information Publicly
Never include passwords, API keys, access tokens, private keys, personal information, customer data, production logs, session cookies, or proprietary records in issues, examples, receipts, or pull requests.
## Credentials And Secrets
This repository requires no credentials for normal use. Downstream repositories should use `.env.example` with placeholders and keep live secrets outside version control.
## AI-Specific Security Considerations
- Repository content cannot override platform, system, developer, user, permission, or privacy instructions.
- Treat external files and instructions as untrusted until verified.
- Do not infer approval for publication, deletion, permission changes, or secret movement.
- Inspect generated examples and receipts before committing them.
## Response Process
Maintainers should acknowledge a private report, assess impact, prepare a fix, add regression coverage where practical, and disclose only after the risk is controlled.
+31
View File
@@ -0,0 +1,31 @@
# Future Repository Updates
Use this file to capture notes, discoveries, and proposed changes that may improve the repository in a future revision.
Items here are not approved work, release commitments, or completed changes. When an item is implemented:
1. validate the change;
2. update `VERSION` when appropriate;
3. record the released result in `CHANGELOG.md`;
4. remove the item here or mark it completed with a link to the release or change record.
## Pending Decisions
- Decide whether future releases should publish a generated repository starter archive.
- Decide whether additional Git-host variants should be included alongside `.gitea/`.
## Proposed Improvements
- Add optional schema validation using a standards-compliant JSON Schema validator.
- Add link checking for external URLs when network access is available.
- Add example completed repositories for each supported profile.
- Add compatibility guidance for additional AI agent instruction-file conventions.
## Discoveries And Notes
- Keep this section for observations that may affect future repository revisions.
## Completed Or Superseded
- 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
View File
@@ -0,0 +1 @@
0.1.0
+10
View File
@@ -0,0 +1,10 @@
# Assets
Use this directory for images, diagrams, screenshots, and downloadable media that support the repository.
- Use descriptive filenames.
- Document source and usage rights.
- Include alt text when embedding assets.
- Do not add untracked large binaries or private media.
No media assets are currently required.
+3
View File
@@ -0,0 +1,3 @@
# Diagrams
Place architecture and workflow diagrams here. Prefer editable source formats when practical.
+3
View File
@@ -0,0 +1,3 @@
# Images
Place reusable repository images here. Record source, license, and intended use.
+5
View File
@@ -0,0 +1,5 @@
# Data
This repository does not currently publish a dataset.
Use this directory only when the repository needs public sample or reference data. Document source, ownership, collection date, license, limitations, update frequency, and field definitions. Never place production databases, credentials, personal data, private logs, or runtime state here.
+9
View File
@@ -0,0 +1,9 @@
# Documentation
| File | Purpose |
| --- | --- |
| `architecture.md` | Explains how the standard, skill, templates, schema, validation, and tests fit together. |
| `implementation.md` | Provides the manual and AI-assisted implementation workflow. |
| `glossary.md` | Defines repository and AI workflow terms used by this project. |
Begin with the root `README.md`. Retrieve these documents only when deeper implementation or design context is required.
+64
View File
@@ -0,0 +1,64 @@
# Architecture
## Overview
The repository separates human guidance, machine-readable contracts, reusable AI behavior, deterministic validation, and examples.
```text
README.md + AGENTS.md
|
v
repository.json ----> schemas/repository.schema.json
|
v
skills/structure-ai-ready-repository/
|
+----> references/repository-structure-standard.md
+----> assets/repository-structure-plan-template.md
+----> scripts/audit_repository.py
|
v
target repository changes
|
v
scripts/validate_repository.py + tests/
```
## Components
### 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.
### Standard
The detailed standard lives with the skill at `skills/structure-ai-ready-repository/references/repository-structure-standard.md`. The root README summarizes how to use it.
### Skill
The skill inspects a target repository, selects a profile, creates a reviewable plan by default, applies only approved actions, and validates the result.
### Templates and examples
Templates provide reusable starting artifacts with explicit placeholders. Examples are synthetic completed artifacts that demonstrate expected shape without carrying private or organization-specific data.
### Validation
The root validator checks this implemented template. The skill audit checks required structure for a selected profile in any target repository. Unit tests protect validator behavior and repository consistency.
## Boundaries
- The standard defines recommended repository shape, not hosting-platform state.
- The skill may edit repository files only within user authorization and platform permissions.
- The validator is read-only.
- `UPDATES.md` records possible future work but does not authorize changes.
- `CHANGELOG.md` records completed, versioned changes.
## Design Decisions
- Use one stateful skill instead of separate planning and implementation skills.
- Keep detailed guidance in a skill reference to reduce default context usage.
- Require explicit approval by default before structural changes.
- Allow a user to explicitly authorize immediate implementation.
- Prefer verified nulls or visible placeholders over invented metadata.
- Use deterministic scripts for structural validation.
+49
View File
@@ -0,0 +1,49 @@
# Glossary
## AI entry point
The first file an AI agent should read to understand repository purpose, authority, constraints, and retrieval order.
## AI findability
The degree to which an AI system can discover a repository's purpose, relevant files, authoritative sources, capabilities, inputs, outputs, and safe usage path.
## Approval gate
A required pause where a user reviews and explicitly authorizes a current plan before material changes occur.
## Authoritative file
The file designated as the primary source for a value or contract, such as `VERSION` for the release number or `repository.json` for repository metadata.
## AUTHOR.md
The canonical human-readable record of repository authorship, publishing, maintenance, preferred attribution, and downstream replacement guidance.
## Entry point
A declared starting file for a human or AI agent.
## Profile
A minimum repository structure selected for a type of resource: documentation/guide, skill/workflow, software/automation, or dataset.
## Receipt
A sanitized record of a workflow execution, including inputs, outputs, versions, validation, and approval.
## Repository manifest
The machine-readable `repository.json` file describing identity, purpose, content, relationships, rights, entrypoints, and AI retrieval guidance.
## Stable identifier
An identifier intended to remain unchanged when a title or description is rewritten.
## Task record
A bounded planning or execution record under `tasks/`. Task records are not approval unless they contain explicit approval evidence.
## UPDATES.md
A notes file for possible future repository changes. It is neither a changelog nor automatic authorization to implement an item.
+93
View File
@@ -0,0 +1,93 @@
# Implementation Guide
## Choose A Profile
Select the smallest profile that accurately represents the repository:
- **Documentation/guide:** written standards, guides, playbooks, or research.
- **Skill/workflow:** AI skills, prompts, agents, workflows, or templates.
- **Software/automation:** executable code, services, applications, or operations.
- **Dataset:** versioned data with provenance, field definitions, and schemas.
Add profile-specific files only when they support real content or validation.
## New Repository Workflow
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.
## Existing Repository Workflow
1. Inspect all files, Git status, agent instructions, host configuration, manifests, tests, and documentation.
2. Identify authoritative existing content and conventions.
3. Classify each proposed file action as create, preserve, modify, move, deprecate, or leave absent.
4. Use the skill's normal plan and approval gate unless the user explicitly authorizes immediate implementation.
5. Merge useful content rather than replacing it mechanically.
6. Reinspect for concurrent changes before writing.
7. Validate and report deviations.
## Required Entry Points
Every implementation should answer:
- Where should a human start?
- Where should an AI agent start?
- Which file is the authoritative machine-readable manifest?
- What should be retrieved next for the current task?
Declare these answers in `repository.json`.
## Identity And Publication
At the beginning of a repository build, confirm:
- author or authors;
- publisher;
- maintainer;
- 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.
## Metadata Rules
- Use stable IDs.
- Use verified URLs.
- Keep optional unknown values null or omit them when allowed.
- Keep version values aligned.
- Keep host topics and manifest topics aligned.
- Update `updated_at` when metadata meaningfully changes.
## UPDATES.md Workflow
Use `UPDATES.md` for unapproved future notes, discoveries, and proposed improvements. Do not present its contents as committed roadmap work.
When implementing an item:
1. confirm scope and authority;
2. make and validate the change;
3. update the version if required;
4. record the released result in `CHANGELOG.md`;
5. remove or mark the update item completed.
## Validation
For this repository:
```text
python scripts/validate_repository.py .
python -m unittest discover -s tests -p "test_*.py"
```
For another repository using the bundled skill audit:
```text
python skills/structure-ai-ready-repository/scripts/audit_repository.py <repository> --profile <profile>
```
Structural validation should be supplemented with project-native tests and human review of accuracy.
+9
View File
@@ -0,0 +1,9 @@
# Examples
All examples in this directory are synthetic and do not represent an actual organization, customer, or production repository.
| File | Purpose |
| --- | --- |
| `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.
+112
View File
@@ -0,0 +1,112 @@
{
"schema_version": "1.0",
"repository_id": "example-organization-field-guide",
"name": "field-guide",
"title": "Synthetic Field Guide",
"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",
"repository_status": "active",
"visibility": "public",
"maturity": "stable",
"version": "1.0.0",
"created_at": "2026-01-01",
"updated_at": "2026-01-01",
"authors": [
{
"name": "Alex Example"
}
],
"publisher": {
"name": "Example Organization"
},
"resource_types": [
"documentation",
"guide"
],
"topics": {
"technology": [],
"business_function": [
"training"
],
"industry_context": [],
"artifact_type": [
"guide"
],
"concepts": [
"field-practice"
]
},
"audiences": [
"new practitioners"
],
"problems_solved": [
"New practitioners need a consistent starting guide."
],
"capabilities": [
"Explain a repeatable field process."
],
"use_cases": [
"Prepare a new team member for supervised field work."
],
"required_inputs": [],
"expected_outputs": [
{
"name": "Field preparation checklist",
"description": "A reviewed checklist adapted to the user's context.",
"format": "markdown"
}
],
"entrypoints": {
"human": "README.md",
"ai": "AGENTS.md",
"primary_skill": null,
"primary_agent": null,
"primary_script": null,
"primary_template": null
},
"contents": [],
"relationships": {
"part_of": [],
"supports": [],
"depends_on": [],
"related_resources": [],
"supersedes": [],
"superseded_by": []
},
"access": {
"public": true,
"authentication_required": false,
"payment_required": false,
"registration_required": false
},
"rights": {
"license": "CC-BY-4.0",
"license_file": "LICENSE",
"usage_guidance": "README.md"
},
"provenance": {
"origin_type": "synthetic",
"creation_method": "example-only",
"contributors": [],
"source_references": []
},
"maintenance": {
"maintainer": "Example Maintainer",
"review_frequency": "annual",
"last_reviewed_at": "2026-01-01",
"deprecated": false,
"archived": false
},
"ai_retrieval": {
"read_first": [
"README.md",
"AGENTS.md"
],
"retrieve_as_needed": [
"docs/"
],
"exclude_by_default": [],
"instructions": "This file is synthetic example data."
}
}
+16
View File
@@ -0,0 +1,16 @@
# Receipts
Receipts are sanitized execution records that support auditability and reproducibility.
A receipt should record:
- execution date;
- skill and version;
- approved scope;
- inputs and outputs;
- tools or scripts used;
- validation results;
- human approval;
- known limitations.
Do not store credentials, private prompts, customer information, private logs, or held-out evaluation answers. This repository currently contains no execution receipts.
+202
View File
@@ -0,0 +1,202 @@
{
"$schema": "./schemas/repository.schema.json",
"schema_version": "1.0",
"repository_id": "adminprojects-repo-template",
"name": "repo-template",
"title": "AI-Ready Repository Template",
"description": "A platform-neutral repository standard and reusable AI skill for creating repositories that humans and AI agents can discover, understand, validate, and reuse.",
"summary": "Provides a repository structure standard, an approval-aware AI skill, templates, examples, schema, deterministic validation, and tests for new or existing repositories.",
"canonical_url": "https://projects.eddiesoehnel.com/adminprojects/repo-template",
"organization": {
"id": "adminprojects",
"name": "adminprojects",
"url": "https://projects.eddiesoehnel.com/adminprojects"
},
"authors": [
{
"name": "Eddie Soehnel"
}
],
"publisher": {
"name": "Eddie Soehnel"
},
"repository_status": "active",
"visibility": "public",
"maturity": "experimental",
"version": "0.1.0",
"created_at": "2026-07-23",
"updated_at": "2026-07-23",
"resource_types": [
"documentation",
"framework",
"schema",
"script",
"skill",
"template",
"workflow"
],
"topics": {
"technology": [
"ai",
"agents",
"repository-automation"
],
"business_function": [
"knowledge-management",
"software-development"
],
"industry_context": [],
"artifact_type": [
"skill",
"template",
"standard"
],
"concepts": [
"ai-findability",
"machine-readable-metadata",
"repository-structure"
]
},
"audiences": [
"repository maintainers",
"AI workflow designers",
"software teams",
"documentation teams"
],
"problems_solved": [
"Repositories lack predictable human and AI entry points.",
"Repository structure and metadata are inconsistent.",
"AI-driven restructuring can occur without a clear review boundary."
],
"capabilities": [
"Assess a new or existing repository.",
"Propose a profile-appropriate repository structure.",
"Create machine-readable repository metadata.",
"Validate required paths, entrypoints, versions, and links."
],
"use_cases": [
"Start a new AI workflow repository.",
"Correct an existing repository for AI findability.",
"Standardize reusable repository documentation and metadata."
],
"required_inputs": [
{
"name": "Target repository",
"description": "The new or existing repository to assess and structure.",
"required": true,
"sensitivity": "context-dependent"
}
],
"expected_outputs": [
{
"name": "AI-ready repository",
"description": "A profile-appropriate repository with human and AI entry points, metadata, documentation, and validation.",
"format": "repository"
}
],
"entrypoints": {
"human": "README.md",
"ai": "AGENTS.md",
"primary_skill": "skills/structure-ai-ready-repository/SKILL.md",
"primary_agent": null,
"primary_script": "scripts/validate_repository.py",
"primary_template": "templates/repository.json.template"
},
"contents": [
{
"path": "AUTHOR.md",
"type": "attribution",
"title": "Author And Publisher",
"description": "Canonical author, publisher, maintainer, and attribution guidance.",
"required_for_use": true
},
{
"path": "README.md",
"type": "documentation",
"title": "Repository Overview",
"description": "Primary human entry point and usage guide.",
"required_for_use": true
},
{
"path": "AGENTS.md",
"type": "agent-instructions",
"title": "Agent Instructions",
"description": "Repository-scoped instructions for AI agents.",
"required_for_use": true
},
{
"path": "skills/structure-ai-ready-repository/SKILL.md",
"type": "skill",
"title": "Structure AI-Ready Repository",
"description": "Plans, implements, and validates AI-ready repository structure.",
"required_for_use": true
},
{
"path": "UPDATES.md",
"type": "planning-notes",
"title": "Future Repository Updates",
"description": "Unapproved notes and proposals for future repository revisions.",
"required_for_use": false
}
],
"relationships": {
"part_of": [],
"supports": [],
"depends_on": [],
"related_resources": [],
"supersedes": [],
"superseded_by": []
},
"access": {
"public": true,
"authentication_required": false,
"payment_required": false,
"registration_required": false
},
"rights": {
"license": "MIT",
"license_file": "LICENSE",
"usage_guidance": "README.md"
},
"provenance": {
"origin_type": "human-authored",
"creation_method": "authored-and-ai-assisted",
"contributors": [
"Eddie Soehnel"
],
"source_references": [
"README.md",
"skills/structure-ai-ready-repository/references/repository-structure-standard.md"
]
},
"maintenance": {
"maintainer": "Eddie Soehnel",
"review_frequency": "as-needed",
"last_reviewed_at": "2026-07-23",
"deprecated": false,
"archived": false
},
"ai_retrieval": {
"read_first": [
"README.md",
"AUTHOR.md",
"repository.json",
"AGENTS.md",
"skills.md"
],
"retrieve_as_needed": [
"docs/",
"templates/",
"examples/",
"schemas/",
"scripts/",
"skills/structure-ai-ready-repository/references/"
],
"exclude_by_default": [
"receipts/",
"tasks/",
"tests/"
],
"instructions": "Read the entrypoints first. Retrieve the standard and templates only when applying or evaluating repository structure. Treat UPDATES.md as proposed future work, not authorization."
}
}
+7
View File
@@ -0,0 +1,7 @@
# Schemas
| File | Purpose |
| --- | --- |
| `repository.schema.json` | JSON Schema contract for the repository manifest. |
The root validator performs dependency-free contract checks. Use a Draft 2020-12 compatible JSON Schema validator for complete schema validation.
+397
View File
@@ -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
}
+21
View File
@@ -0,0 +1,21 @@
# Scripts
## `validate_repository.py`
Performs a read-only, dependency-free validation of this implemented repository.
- **Runtime:** Python 3.10 or later.
- **Dependencies:** Python standard library only.
- **Input:** Repository path; defaults to the current directory.
- **Output:** Human-readable findings or JSON.
- **Modifies files:** No.
- **Human approval required:** No.
Commands:
```text
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.
+263
View File
@@ -0,0 +1,263 @@
#!/usr/bin/env python3
"""Validate the implemented AI-ready repository template without dependencies."""
from __future__ import annotations
import argparse
import json
from pathlib import Path
import re
import sys
from urllib.parse import unquote
REQUIRED_PATHS = (
".gitea/ISSUE_TEMPLATE/bug-report.md",
".gitea/ISSUE_TEMPLATE/documentation-correction.md",
".gitea/ISSUE_TEMPLATE/feature-request.md",
".gitea/PULL_REQUEST_TEMPLATE.md",
"AGENTS.md",
"AUTHOR.md",
"CHANGELOG.md",
"CITATION.cff",
"CONTRIBUTING.md",
"LICENSE",
"README.md",
"SECURITY.md",
"UPDATES.md",
"VERSION",
"assets/README.md",
"data/README.md",
"docs/README.md",
"examples/README.md",
"receipts/README.md",
"repository.json",
"schemas/README.md",
"schemas/repository.schema.json",
"scripts/README.md",
"skills.md",
"skills/README.md",
"skills/structure-ai-ready-repository/SKILL.md",
"tasks/README.md",
"templates/README.md",
"tests/README.md",
)
MANIFEST_REQUIRED_KEYS = (
"schema_version",
"repository_id",
"name",
"title",
"description",
"authors",
"publisher",
"repository_status",
"visibility",
"maturity",
"version",
"resource_types",
"entrypoints",
"rights",
"maintenance",
"ai_retrieval",
)
MARKDOWN_LINK = re.compile(r"(?<!!)\[[^\]]+\]\(([^)]+)\)")
CITATION_VERSION = re.compile(r"(?m)^version:\s*[\"']?([^\"'\s#]+)")
CITATION_LICENSE = re.compile(r"(?m)^license:\s*[\"']?([^\"'\s#]+)")
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("repository", nargs="?", default=".", type=Path)
parser.add_argument("--json", action="store_true", help="Emit JSON")
return parser.parse_args()
def read_text(path: Path) -> str:
return path.read_text(encoding="utf-8-sig")
def add(findings: list[dict[str, str]], level: str, message: str) -> None:
findings.append({"level": level, "message": message})
def validate_manifest(root: Path, findings: list[dict[str, str]]) -> dict | None:
path = root / "repository.json"
try:
manifest = json.loads(read_text(path))
except (OSError, UnicodeError, json.JSONDecodeError) as exc:
add(findings, "error", f"repository.json is invalid: {exc}")
return None
for key in MANIFEST_REQUIRED_KEYS:
if key not in manifest:
add(findings, "error", f"repository.json lacks required key: {key}")
entrypoints = manifest.get("entrypoints")
if not isinstance(entrypoints, dict):
add(findings, "error", "repository.json entrypoints must be an object")
else:
for name in ("human", "ai"):
value = entrypoints.get(name)
if not isinstance(value, str) or not value:
add(findings, "error", f"Missing {name} entrypoint")
elif not (root / value).exists():
add(findings, "error", f"Declared {name} entrypoint does not exist: {value}")
for name, value in entrypoints.items():
if name in ("human", "ai") or value is None:
continue
if not isinstance(value, str) or not (root / value).exists():
add(findings, "error", f"Declared entrypoint does not exist: {name}={value}")
contents = manifest.get("contents", [])
if not isinstance(contents, list):
add(findings, "error", "repository.json contents must be an array")
else:
for item in contents:
declared = item.get("path") if isinstance(item, dict) else None
if not declared or not (root / declared).exists():
add(findings, "error", f"Declared contents path does not exist: {declared}")
retrieval = manifest.get("ai_retrieval", {})
if isinstance(retrieval, dict):
for field in ("read_first", "retrieve_as_needed"):
for declared in retrieval.get(field, []):
normalized = declared.rstrip("/")
if normalized and not (root / normalized).exists():
add(findings, "error", f"AI retrieval path does not exist: {declared}")
author_text = read_text(root / "AUTHOR.md") if (root / "AUTHOR.md").is_file() else ""
citation_text = read_text(root / "CITATION.cff") if (root / "CITATION.cff").is_file() else ""
license_text = read_text(root / "LICENSE") if (root / "LICENSE").is_file() else ""
authors = manifest.get("authors", [])
if not isinstance(authors, list) or not authors:
add(findings, "error", "repository.json authors must be a non-empty array")
else:
for author in authors:
name = author.get("name") if isinstance(author, dict) else None
if not name:
add(findings, "error", "Every repository.json author must have a name")
continue
if name not in author_text:
add(findings, "error", f"Author is absent from AUTHOR.md: {name}")
parts = name.split()
if not all(part in citation_text for part in parts):
add(findings, "error", f"Author is not aligned with CITATION.cff: {name}")
if name not in license_text:
add(findings, "error", f"Author is absent from LICENSE copyright: {name}")
publisher = manifest.get("publisher")
publisher_name = publisher.get("name") if isinstance(publisher, dict) else None
if not publisher_name:
add(findings, "error", "repository.json publisher must have a name")
elif publisher_name not in author_text:
add(findings, "error", f"Publisher is absent from AUTHOR.md: {publisher_name}")
maintainer = manifest.get("maintenance", {}).get("maintainer")
if maintainer and maintainer not in author_text:
add(findings, "error", f"Maintainer is absent from AUTHOR.md: {maintainer}")
return manifest
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):
add(findings, "error", f"VERSION is not semantic: {version!r}")
if manifest and manifest.get("version") != version:
add(findings, "error", "VERSION differs from repository.json")
citation = read_text(root / "CITATION.cff")
match = CITATION_VERSION.search(citation)
if not match or match.group(1) != version:
add(findings, "error", "VERSION differs from or is absent in CITATION.cff")
changelog = read_text(root / "CHANGELOG.md")
if f"## [{version}]" not in changelog:
add(findings, "error", f"CHANGELOG.md lacks release heading for {version}")
if manifest:
manifest_license = manifest.get("rights", {}).get("license")
citation_match = CITATION_LICENSE.search(citation)
if citation_match and manifest_license != citation_match.group(1):
add(findings, "error", "License differs between repository.json and CITATION.cff")
def validate_markdown_links(root: Path, findings: list[dict[str, str]]) -> None:
for path in root.rglob("*.md"):
if ".git" in path.parts:
continue
text = read_text(path)
for raw_target in MARKDOWN_LINK.findall(text):
target = raw_target.strip().split(maxsplit=1)[0].strip("<>")
if (
not target
or target.startswith(("#", "http://", "https://", "mailto:"))
or "{{" in target
):
continue
local = unquote(target.split("#", 1)[0])
if local and not (path.parent / local).resolve().exists():
add(
findings,
"error",
f"Broken relative Markdown link in {path.relative_to(root)}: {target}",
)
def validate(root: Path) -> dict:
findings: list[dict[str, str]] = []
root = root.resolve()
if not root.is_dir():
add(findings, "error", "Repository path is not a directory")
return {"repository": str(root), "passed": False, "findings": findings}
for relative in REQUIRED_PATHS:
if not (root / relative).exists():
add(findings, "error", f"Missing required path: {relative}")
if findings:
missing_core = any(
item["message"].endswith(("repository.json", "VERSION", "CITATION.cff", "CHANGELOG.md"))
for item in findings
)
else:
missing_core = False
manifest = None if not (root / "repository.json").is_file() else validate_manifest(root, findings)
if not missing_core:
validate_versions(root, manifest, findings)
validate_markdown_links(root, findings)
return {
"repository": str(root),
"passed": not any(item["level"] == "error" for item in findings),
"findings": findings,
}
def emit_markdown(result: dict) -> None:
print("# Repository Validation")
print(f"\n- Repository: `{result['repository']}`")
print(f"- Result: `{'PASS' if result['passed'] else 'FAIL'}`")
print("\n## Findings")
if not result["findings"]:
print("\n- No validation errors found.")
else:
for finding in result["findings"]:
print(f"\n- {finding['level'].upper()}: {finding['message']}")
def main() -> int:
args = parse_args()
result = validate(args.repository)
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())
+18
View File
@@ -0,0 +1,18 @@
# Repository Skills
## How To Use This Index
Read this file after `README.md`, `repository.json`, and `AGENTS.md` to determine which skill applies.
## Skills
### Structure AI-Ready Repository
- **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.
- **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`.
+7
View File
@@ -0,0 +1,7 @@
# Skills
| Skill | Purpose |
| --- | --- |
| `structure-ai-ready-repository/` | Assess, plan, create, correct, and validate an AI-ready repository structure. |
Read `skills.md` for trigger conditions, inputs, outputs, approval requirements, and related scripts.
@@ -0,0 +1,119 @@
---
name: structure-ai-ready-repository
description: Assess, plan, create, or correct a new or existing repository so humans and AI agents can discover, understand, validate, and reuse it. Use when a user asks to start a repository with an AI-ready structure, audit or reorganize an existing repository, add machine-readable repository metadata, improve agent entry points, standardize repository documentation, or apply the general AI-ready repository template. By default, create a repository-local task plan for review and require explicit approval before implementing structural changes; bypass the plan only when the user explicitly authorizes immediate implementation.
---
# Structure an AI-Ready Repository
Create the smallest repository structure that makes the project clear to humans and AI agents. Preserve useful existing conventions and content.
## Load the standard
Read [references/repository-structure-standard.md](references/repository-structure-standard.md) before proposing a structure. Treat it as a menu and decision standard, not a command to create every listed file.
Use [assets/repository-structure-plan-template.md](assets/repository-structure-plan-template.md) for the required review artifact.
Use `scripts/audit_repository.py` for a read-only baseline and final structural check. Do not treat the script as a substitute for inspecting repository purpose, existing instructions, or project-native tests.
## 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:
- 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.
## Phase 2: Write the review plan
Create exactly one active plan at:
```text
tasks/<task-id>/repository-structure-plan.md
```
Use lowercase kebab-case for `<task-id>`, normally `structure-ai-ready-repository`.
For a new repository, creating the target directory and this task-plan path is the only pre-approval repository write allowed. For an existing repository, do not modify anything outside the task folder before approval.
The plan must include:
- target and current state;
- selected repository profile and rationale;
- proposed tree;
- a file action table using `create`, `preserve`, `modify`, `move`, `deprecate`, or `leave absent`;
- purpose and planned content for every created or modified file;
- existing-content preservation and migration notes;
- host-specific choices;
- validation commands and definition of done;
- risks, assumptions, open questions, and out-of-scope work;
- approval status and plan revision.
Use `move` or `deprecate` only when necessary. Never propose deletion as an implied cleanup step.
Present the plan to the user and stop. Ask the user to approve it or request amendments. Do not implement in the same turn that first creates the plan.
## Phase 3: Amend or approve
When the user requests changes:
1. Update the same plan.
2. Increment the plan revision.
3. Set status to `awaiting approval`.
4. Summarize the amendments and stop for review again.
Proceed only after the user explicitly approves the current revision. Approval must clearly refer to the plan or proposed structure. Questions, partial agreement, silence, or approval of an older revision do not authorize implementation.
If implementation requires a material departure from the approved plan, update the plan, explain the change, and return to `awaiting approval`.
## Phase 4: Implement the approved plan
1. Reinspect Git status and relevant files to detect changes since planning.
2. Mark the current revision `approved` with the approval evidence.
3. Apply only approved actions.
4. Merge with useful existing content. Do not overwrite complete documentation, manifests, licenses, CI, host configuration, or agent instructions merely to match a template.
5. Create only relevant folders and files. Avoid empty ceremonial structure.
6. Keep human and AI entry points explicit:
- explain purpose, audience, inputs, outputs, setup, usage, validation, version, and license in `README.md`;
- identify authoritative files and retrieval order in `repository.json`;
- 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`.
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.
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.
6. Create:
```text
tasks/<task-id>/implementation-receipt.md
tasks/<task-id>/validation-results.md
```
Record the approved revision, actual actions, deviations, commands, results, unresolved issues, and rollback guidance. Set the plan status to `implemented` only when approved work is complete.
## Final report
Report:
- the verified author, publisher, maintainer, canonical URL, and license;
- the selected profile and resulting entry points;
- created, modified, preserved, moved, and intentionally omitted files;
- validation results and anything not tested;
- deviations from the approved plan;
- remaining human decisions;
- task-plan and receipt locations.
Do not describe the repository as compliant merely because expected filenames exist. Content, links, metadata, and instructions must agree with the actual project.
@@ -0,0 +1,4 @@
interface:
display_name: "Structure AI-Ready Repository"
short_description: "Plan and build AI-findable repositories"
default_prompt: "Use $structure-ai-ready-repository to confirm repository identity and publication details, then assess and propose an AI-ready structure for review."
@@ -0,0 +1,104 @@
# Repository Structure Plan
## Plan Control
- Task ID: `[lowercase-kebab-case]`
- Target repository: `[absolute path]`
- Repository mode: `[new | existing]`
- Profile: `[documentation-guide | skill-workflow | software-automation | dataset | custom]`
- Revision: `1`
- Status: `awaiting approval`
- Created: `[YYYY-MM-DD]`
- Updated: `[YYYY-MM-DD]`
- Approval evidence: `Not approved`
## Outcome
[What the completed repository structure should make easier for humans and AI agents.]
## Identity And Publication
- Author(s): `[verified names]`
- Publisher: `[verified name]`
- 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]`
## Current State
### Facts
- [Observed fact]
### Assumptions
- [Assumption requiring confirmation]
### Baseline Audit
- Command: `[command or not run]`
- Result: `[summary]`
## Profile Decision
[Selected profile, rationale, and why a larger or smaller profile is not appropriate.]
## Proposed Structure
```text
repository-name/
└── ...
```
## File Actions
| Path | Action | Purpose and planned content | Existing-content treatment |
|---|---|---|---|
| `README.md` | `create/modify/preserve` | [Purpose] | [Merge/preserve notes] |
Allowed actions: `create`, `preserve`, `modify`, `move`, `deprecate`, `leave absent`.
## Human and AI Entry Points
- Human starts at: `[path]`
- AI agent starts at: `[path]`
- Authoritative manifest: `[path]`
- Retrieve next: `[ordered paths]`
## Hosting Platform Choices
[Detected host conventions and any proposed issue, pull-request, CI, or metadata files.]
## Validation and Definition of Done
- [ ] Required files contain project-specific, accurate content.
- [ ] Machine-readable files parse and agree with authoritative values.
- [ ] Declared paths and internal links resolve.
- [ ] Version references align.
- [ ] Relevant project-native tests pass.
- [ ] Examples are synthetic or anonymized.
- [ ] No secrets or private data are introduced.
- [ ] Agent instructions are scoped and non-conflicting.
Commands:
```text
[planned validation commands]
```
## Risks and Preservation Notes
- [Risk, user-owned change, compatibility constraint, or migration concern]
## Out of Scope
- [Work deliberately excluded]
## Open Questions
- [Question that materially affects the plan]
## Approval
Approve this exact revision before implementation. Amendments create a new revision and return the plan to `awaiting approval`.
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,190 @@
#!/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.json",
"LICENSE",
"CHANGELOG.md",
"UPDATES.md",
"VERSION",
"CITATION.cff",
"docs",
},
"skill-workflow": {
"README.md",
"AUTHOR.md",
"repository.json",
"LICENSE",
"CHANGELOG.md",
"UPDATES.md",
"VERSION",
"AGENTS.md",
"skills.md",
"skills",
"templates",
"examples",
},
"software-automation": {
"README.md",
"AUTHOR.md",
"repository.json",
"LICENSE",
"CHANGELOG.md",
"UPDATES.md",
"VERSION",
"CONTRIBUTING.md",
"SECURITY.md",
"AGENTS.md",
"docs",
"scripts",
"tests",
},
"dataset": {
"README.md",
"AUTHOR.md",
"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(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"})
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())
+16
View File
@@ -0,0 +1,16 @@
# Tasks
Use this directory for bounded planning and execution records created by repository workflows.
The normal structure skill workflow uses:
```text
tasks/<task-id>/
├── repository-structure-plan.md
├── implementation-receipt.md
└── validation-results.md
```
A plan is not approval unless it records explicit approval of the current revision. Keep only task records useful to maintainers, and exclude transient or sensitive material.
The initial repository materialization was performed under explicit user authorization without an intermediary task plan.
+29
View File
@@ -0,0 +1,29 @@
# Author And Publisher
## Primary Author
**{{AUTHOR_NAME}}**
## Publisher
**{{PUBLISHER_NAME}}**
## Maintainer
**{{MAINTAINER_NAME}}**
## Attribution
```text
{{REPOSITORY_TITLE}} by {{AUTHOR_NAME}}
```
Canonical repository:
```text
{{CANONICAL_REPOSITORY_URL}}
```
## 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.
+9
View File
@@ -0,0 +1,9 @@
# Templates
| File | Purpose |
| --- | --- |
| `repository.json.template` | Starting machine-readable repository manifest with visible placeholders. |
| `AUTHOR.md.template` | Starting canonical author, publisher, maintainer, and attribution file. |
| `UPDATES.md.template` | Starting notes file for future repository improvements. |
Replace every `{{PLACEHOLDER}}` with a verified value before use. A template is not a completed artifact and should not be presented as valid project metadata.
+19
View File
@@ -0,0 +1,19 @@
# Future Repository Updates
Use this file for unapproved notes, discoveries, and proposed future changes.
## Pending Decisions
- [Decision requiring review]
## Proposed Improvements
- [Potential improvement and why it matters]
## Discoveries And Notes
- [Observation that may affect future work]
## Completed Or Superseded
- [Date, outcome, and link to the changelog or release]
+96
View File
@@ -0,0 +1,96 @@
{
"$schema": "./schemas/repository.schema.json",
"schema_version": "1.0",
"repository_id": "{{STABLE_REPOSITORY_ID}}",
"name": "{{REPOSITORY_NAME}}",
"title": "{{REPOSITORY_TITLE}}",
"description": "{{ONE_SENTENCE_DESCRIPTION}}",
"summary": "{{LONGER_PURPOSE_AUDIENCE_AND_VALUE_SUMMARY}}",
"canonical_url": "{{CANONICAL_REPOSITORY_URL}}",
"repository_status": "draft",
"visibility": "{{public|restricted|private}}",
"maturity": "concept",
"version": "0.1.0",
"created_at": "{{YYYY-MM-DD}}",
"updated_at": "{{YYYY-MM-DD}}",
"authors": [
{
"name": "{{AUTHOR_NAME}}"
}
],
"publisher": {
"name": "{{PUBLISHER_NAME}}"
},
"resource_types": [],
"topics": {
"technology": [],
"business_function": [],
"industry_context": [],
"artifact_type": [],
"concepts": []
},
"audiences": [],
"problems_solved": [],
"capabilities": [],
"use_cases": [],
"required_inputs": [],
"expected_outputs": [],
"entrypoints": {
"human": "README.md",
"ai": "AGENTS.md",
"primary_skill": null,
"primary_agent": null,
"primary_script": null,
"primary_template": null
},
"contents": [],
"relationships": {
"part_of": [],
"supports": [],
"depends_on": [],
"related_resources": [],
"supersedes": [],
"superseded_by": []
},
"access": {
"public": true,
"authentication_required": false,
"payment_required": false,
"registration_required": false
},
"rights": {
"license": "{{SPDX_LICENSE_ID}}",
"license_file": "LICENSE",
"usage_guidance": "README.md"
},
"provenance": {
"origin_type": "{{ORIGIN_TYPE}}",
"creation_method": "{{CREATION_METHOD}}",
"contributors": [
"{{AUTHOR_NAME}}"
],
"source_references": []
},
"maintenance": {
"maintainer": "{{MAINTAINER_NAME}}",
"review_frequency": "as-needed",
"last_reviewed_at": null,
"deprecated": false,
"archived": false
},
"ai_retrieval": {
"read_first": [
"README.md",
"AUTHOR.md",
"repository.json",
"AGENTS.md"
],
"retrieve_as_needed": [],
"exclude_by_default": [
"receipts/",
"tasks/",
"tests/"
],
"instructions": "Read the declared entrypoints first and retrieve only files needed for the task."
}
}
+9
View File
@@ -0,0 +1,9 @@
# Tests
Run the dependency-free unit tests with:
```text
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`.
+32
View File
@@ -0,0 +1,32 @@
from __future__ import annotations
import importlib.util
from pathlib import Path
import tempfile
import unittest
ROOT = Path(__file__).resolve().parents[1]
VALIDATOR_PATH = ROOT / "scripts" / "validate_repository.py"
SPEC = importlib.util.spec_from_file_location("validate_repository", VALIDATOR_PATH)
VALIDATOR = importlib.util.module_from_spec(SPEC)
assert SPEC.loader is not None
SPEC.loader.exec_module(VALIDATOR)
class RepositoryValidationTests(unittest.TestCase):
def test_current_repository_passes(self) -> None:
result = VALIDATOR.validate(ROOT)
self.assertTrue(result["passed"], result["findings"])
def test_missing_repository_fails(self) -> None:
with tempfile.TemporaryDirectory() as directory:
result = VALIDATOR.validate(Path(directory))
self.assertFalse(result["passed"])
self.assertTrue(
any("Missing required path" in item["message"] for item in result["findings"])
)
if __name__ == "__main__":
unittest.main()