Files
repo-template-OPEN/docs/implementation.md
T

125 lines
4.4 KiB
Markdown
Raw Permalink Normal View History

2026-07-23 14:13:45 -06:00
# 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.
2026-07-24 15:14:23 -06:00
3. Create `repository-variables.json` using
`templates/repository-variables.json.template`.
4. Create `repository.json` using `templates/repository.json.template`.
2026-07-24 16:17:28 -06:00
5. If the repository contains recurring or numerous individual documents,
create `content-index.json` using
`templates/content-index.json.template`; otherwise leave it absent.
6. Select and create profile-required documentation and folders.
7. Add a verified license, version, and change record.
8. Add host-specific contribution templates.
9. Validate the repository.
2026-07-23 14:13:45 -06:00
## 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`.
2026-07-24 16:17:28 -06:00
## Content Index Decision
Use `content-index.json` when the repository contains recurring updates,
articles, research entries, policies, guides, or enough individual documents
that listing them directly in `repository.json` would be cumbersome.
Keep `repository.json` focused on repository identity, capabilities, entry
points, and major collections. Put one compact record per document in
`content-index.json`, and keep each Markdown file as the authoritative complete
text.
For only three or four major documents, list them directly in
`repository.json` and omit the content index.
Validate:
- unique `content_id` values;
- unique repository-relative paths;
- existence of every indexed file;
- resolution of `related_content_ids`;
- declaration of `content-index.json` in `repository.json`.
2026-07-23 14:13:45 -06:00
## Identity And Publication
2026-07-24 15:14:23 -06:00
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:
2026-07-23 14:13:45 -06:00
- author or authors;
- publisher;
- maintainer;
- canonical repository URL;
- intended license.
2026-07-24 15:14:23 -06:00
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.
2026-07-23 14:13:45 -06:00
## 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.