From 7ad90d93a7b7fdfe97725bfc83bda228d266c657 Mon Sep 17 00:00:00 2001 From: Labyricorn Date: Mon, 24 Aug 2026 19:57:30 -0700 Subject: [PATCH] feat(agents): add .DCP shorthand command and dcp skill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .DCP = Document, Commit, Push — updates in-repo docs and .labyricorn devlog records for recent milestones, validates, commits, and pushes to origin/main. Skill defined at .agents/skills/dcp/SKILL.md. Command documented in root AGENTS.md shorthand commands section. --- .agents/skills/dcp/SKILL.md | 154 ++++++++++++++++++++++++++++++++++++ AGENTS.md | 11 ++- 2 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 .agents/skills/dcp/SKILL.md diff --git a/.agents/skills/dcp/SKILL.md b/.agents/skills/dcp/SKILL.md new file mode 100644 index 0000000..ff0a3b5 --- /dev/null +++ b/.agents/skills/dcp/SKILL.md @@ -0,0 +1,154 @@ +--- +name: dcp +description: > + Triggered by the user command ".DCP". Updates in-repo documentation and + .labyricorn devlog records to reflect recent work, then commits and pushes + all changes to origin/main (production). Run this skill whenever the user + issues ".DCP". +--- + +# DCP — Document, Commit, Push + +The user command `.DCP` means: bring documentation and Labyricorn publishing +records up to date with the current state of the codebase, then commit +everything and push to production (`origin/main`). + +Read this file fully before starting. Also read: +- `AGENTS.md` (root) — communication and authorization rules +- `.labyricorn/AGENTS.md` — publishing boundaries and content contract +- `.labyricorn/devlog/AGENTS.md` — devlog entry format and safety rules +- `.labyricorn/project/AGENTS.md` — project record rules + +--- + +## Phase 1 — Orient + +1. Run `git log --oneline -10` to see the most recent commits since the last + `.DCP` run (look for the previous "docs:" or "devlog:" commit to find the + boundary). +2. Run `git diff --stat HEAD` (or `git status`) to see any uncommitted changes. +3. Identify what changed: new features, bug fixes, refactors, renamed + files, config changes, dependency updates, etc. +4. Note today's date (`YYYY-MM-DD`) and the **full 40-character commit SHA** + of the most recent relevant commit (`git rev-parse HEAD`). + +--- + +## Phase 2 — Update In-Repo Documentation + +Update any documentation files that are stale relative to the current +implementation. This includes: + +- `README.md` — feature lists, setup steps, API examples, port numbers, + binary names, MCP config snippets, environment variable names +- `CHANGELOG.md` — add an `[Unreleased]` entry or append to the current one + summarizing what changed (use the draft-release-notes skill format if + already in use) +- `docs/` content — any `.mdx` / `.md` files whose prose contradicts or + omits the current implementation +- `backend/README.md` — if API or server behavior changed +- Any other doc whose claims are now incorrect + +**Rules:** +- Only update what is actually stale. Do not rewrite correct documentation. +- Do not alter application source code as part of a `.DCP` run. +- After edits, run `git diff --check` to confirm no whitespace errors. + +--- + +## Phase 3 — Update .labyricorn Devlog + +Create or update devlog entries for the milestones reached since the last +`.DCP`. Follow `.labyricorn/devlog/AGENTS.md` strictly. + +### Entry location +`devlog//contents.lr` — one entry per meaningful milestone. +If multiple milestones occurred since the last `.DCP`, create multiple entries. + +### Required fields (all mandatory) +``` +_model: devlog-entry +schema_version: 1 +title: +date: +author: Labyricorn +summary: +tags: +source_commit: +--- +body: + + +``` + +### Update the devlog index +Ensure `.labyricorn/devlog/contents.lr` lists any new entry slug in its +`entries` field (if the schema uses an index). + +### Update project record if needed +If the project status, summary, or description at +`.labyricorn/project/contents.lr` is stale, update it. Ask before changing +`project_id`, `repository_url`, `default_branch`, or `author`. + +### Validate +Run: +``` +python devlog_editor.py --validate +``` +Fix any validation errors before proceeding. If the script is unavailable, +manually verify all required fields are present in every touched record. + +--- + +## Phase 4 — Commit + +Stage only the documentation and `.labyricorn/` changes: + +``` +git add README.md CHANGELOG.md docs/ .labyricorn/ +# Add any other doc files that were updated +git add +``` + +Do **not** stage unrelated application source changes unless the user +explicitly included them in the current session's work. + +Run `git diff --check --cached` to confirm no whitespace errors in staged +files. + +Commit with a message in this format: + +``` +docs: update documentation and devlog for + +- Updated README.md: +- Updated CHANGELOG.md: +- Added devlog entry '': +- Updated project record: (if applicable) +``` + +--- + +## Phase 5 — Push + +``` +git push +``` + +This pushes to `origin/main` (production). Confirm the push succeeded and +report the final commit SHA and push status to the user. + +--- + +## Handoff report + +After completing all phases, tell the user: +1. Which documentation files were updated and what changed +2. Which devlog entries were created or updated (with their slugs and dates) +3. The commit SHA and message +4. Push status (succeeded / failed + error) +5. Any items that need follow-up (e.g. validation warnings, stale docs + that need more information from the user before they can be updated) diff --git a/AGENTS.md b/AGENTS.md index 1740954..99fbc80 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,4 +45,13 @@ scoped `AGENTS.md` files before making changes. - Alternatively, launch the graphical editor with `python devlog_editor.py` for interactive management of devlog entries and publishing status. - Run `git diff --check` and review diffs carefully before staging or committing. -- At handoff, summarize files changed, validation performed, and any next steps. \ No newline at end of file +- At handoff, summarize files changed, validation performed, and any next steps. + +## Shorthand commands + +- `.DCP` — **Document, Commit, Push.** When the user issues `.DCP`, read and + execute the `.agents/skills/dcp/SKILL.md` skill in full. This means: + update any stale in-repo documentation (README, CHANGELOG, docs/), write or + update `.labyricorn/` devlog entries for recent milestones, validate with + `python devlog_editor.py --validate`, commit the documentation and devlog + changes, and push to `origin/main`. \ No newline at end of file