Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions AGENTS.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions changelog.d/1874.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Changed
- `AGENTS.md` says that a convention is never a reason to keep or write custom code. Replacing a check with a standard tool is not lowering a threshold when the tool enforces at least the same property ([#1874](https://github.com/dan-petty/devops-cli/issues/1874)).
- The bullet "Never Lower Security Standards or Quality Thresholds" in `AGENTS.md` now holds the compliance bullet. The merge keeps one sentence of it: "Every change meets the project standards." ([#1874](https://github.com/dan-petty/devops-cli/issues/1874)).
- `AGENTS.md` drops the `Gated` terminology rule, the headroom targets, the duplicate intake and naming bullets and the empty-queue sentence. The file is 1,104 characters shorter ([#1874](https://github.com/dan-petty/devops-cli/issues/1874)).
- An agent files its own new candidate with `devops roadmap intake --confirm`. An agent asks a person to run `devops roadmap return --confirm` ([#1874](https://github.com/dan-petty/devops-cli/issues/1874)).
- The secrets rule in `AGENTS.md` gives the OS keyring, HashiCorp Vault, a Kubernetes Secret and the credential store of the owning tool as examples of a secret store. The list is open ([#1874](https://github.com/dan-petty/devops-cli/issues/1874)).
- `devops ai agents` writes the new never-lower, root-cause and `roadmap return` wording into other repositories. It no longer writes the compliance bullet or the empty-queue sentence ([#1874](https://github.com/dan-petty/devops-cli/issues/1874)).
5 changes: 2 additions & 3 deletions docs/ROUTINE_TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This document serves as the authoritative operational manual for developers, mai

All routine operations in `devops-cli` adhere to six core engineering tenets:
1. **Deterministic Execution**: Workflows run through standardized CLI commands (`devops ci`, `devops release`, `devops docs`, `uv`) to guarantee reproducible outcomes across local DevContainers and GitHub Actions CI.
2. **Zero-Plaintext Credentials**: All authentication tokens (GitHub, OpenAI, Claude, Grafana, ArgoCD) are stored exclusively in the OS Keyring via `devops config set` and retrieved programmatically via Python `keyring`.
2. **Zero-Plaintext Credentials**: No token is stored in git, configuration or logs. Tokens (GitHub, OpenAI, Claude, Grafana, ArgoCD) come from a secret store. Examples are the OS Keyring (`devops config set`, Python `keyring`), the credential store of the owning tool and a Kubernetes Secret in the cluster.
3. **Strict Quality Assurance**: Changes must pass the automated CI validation suite (`python_version`, `test`, `coverage`, `lint`, `format`, `typecheck`, `audit`, `security`, `actionlint`, `docs`, `uv_check`, `lockfile`, `outdated`) before merging.
4. **Target Branch Hierarchy & Non-Merge Policy**: Feature/bugfix PRs strictly target active release branches (`release/vX.Y.Z`). Direct pushes to `main` are blocked. AI agents stage commits and open/update PRs, while PR merge actions are strictly reserved for human maintainers.
5. **Dynamic Documentation Freshness**: Command matrices, CLI reference guides, and FastMCP schemas are generated dynamically through code introspection (`devops docs generate`) and verified in CI (`devops docs check`).
Expand Down Expand Up @@ -47,7 +47,7 @@ The following matrix categorizes all project routine tasks by operational layer,
| **Release Lifecycle** | Authoritative Release Check | Step 3 | `uv run devops release check` | Validates git tree, version matching, CI validation | All checks green |
| **Release Lifecycle** | Maintainer Release PR Merge | Step 4 | `gh pr merge <id> --squash` | Human maintainer squash-merges release PR into `main` | Push event on `main` branch |
| **Release Lifecycle** | Automated Tagging & Publish | Step 5 | Automated (`release.yml`) | Cuts annotated git tag `vX.Y.Z`, generates notes, publishes GH Release | GitHub Release published with assets |
| **Release Lifecycle** | Milestone Issue Population | Step 6 | `devops roadmap intake` | Files active milestone deliverables as candidates; intake puts each on the board | Open issues populated with zero empty state |
| **Release Lifecycle** | Milestone Issue Population | Step 6 | `devops roadmap intake` | Files active milestone deliverables as candidates; intake puts each on the board | Each deliverable is an open issue on the board |
| **Release Lifecycle** | Historical Documentation Compaction | Step 7 | Automated / Manual | Compacts historical milestone docs in `docs/ROADMAP.md` and `RELEASE_NOTES.md` on major/minor releases | Expressive, token-efficient docs with zero bloat |
| **Security & Audits** | Dependency Security Audit | Weekly / Pre-Release | `uv run devops ci audit` (`uv audit`, `npm audit`) | Scans installed packages and the lockfile of each Node tool in `tools.lock` for known vulnerabilities | 0 known vulnerabilities |
| **Security & Audits** | Static Security Scan (SAST) | Weekly / Pre-Release | `uv run devops ci security` (`bandit`) | Static security scan for code vulnerabilities | 0 high/medium issues identified |
Expand Down Expand Up @@ -272,7 +272,6 @@ sequenceDiagram
7. **Next Active Milestone Initialization & Issue/Views Population**:
- Cut and push the next release branch (`release/vX.Y.Z`) from `main`.
- Proactively author GitHub issues for all planned deliverables in `docs/ROADMAP.md`, assigning each to the active milestone with full taxonomy labels (`type/*`, `scope/*`, `priority/*`).
- Ensure the open issues queue (`https://github.com/dan-petty/devops-cli/issues?q=is%3Aissue+state%3Aopen`), projects tab (`https://github.com/dan-petty/devops-cli/projects`), and issue views (`https://github.com/dan-petty/devops-cli/issues/views`) are populated with zero empty state.
- Reconcile custom fields on the cards of GitHub Projects v2 (`https://github.com/dan-petty/devops-cli/projects`) and repository issue views (`https://github.com/dan-petty/devops-cli/issues/views`) via `devops gh project sync`, link the board (`devops gh project link <number>`), and prune all stale remote tracking branches (`git fetch --prune origin`).
8. **Automated Historical Documentation Compaction & Task Archival**:
- When transitioning across major or minor release boundaries, run `uv run devops docs compact --series <series>` to automatically compact historical documentation across `docs/ROADMAP.md` (consolidating completed milestone subsections and matrix rows into summary blocks) and `docs/RELEASE_NOTES.md` (consolidating highlight sections into unified series blocks).
Expand Down
1 change: 0 additions & 1 deletion docs/SDLC.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Every significant feature, structural refactoring, or tooling upgrade begins wit
3. **Active Milestone GitHub Resource Population**:
- When cutting a new release branch or activating a milestone, proactively create GitHub tracking issues for all scheduled features from [`docs/ROADMAP.md`](ROADMAP.md).
- Link each issue to the active release milestone, apply declarative taxonomy labels (`type/*`, `scope/*`, `priority/*`), and synchronize to GitHub Projects v2 board (`https://github.com/dan-petty/devops-cli/projects`) and repository issue views (`https://github.com/dan-petty/devops-cli/issues/views`).
- The open issues queue (`https://github.com/dan-petty/devops-cli/issues?q=is%3Aissue+state%3Aopen`), projects tab (`https://github.com/dan-petty/devops-cli/projects`), and issue views (`https://github.com/dan-petty/devops-cli/issues/views`) must never be left empty while an active milestone exists with planned deliverables.
4. **Transparent Task Status Tracking**:
- Maintain dynamic task status exclusively in isolated modular files under [`docs/agent/tasks/`](agent/tasks/README.md) (`task-<issue>-<slug>.md`) divided into:
- **Backlog / Ready**: Queued deliverables and scoped milestones.
Expand Down
14 changes: 7 additions & 7 deletions docs/SELF_IMPROVEMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ feedback loop that changes what it does once the defects are gone:

1. **Reactive remediation**: while invariant violations, failing tests or verified findings
exist, an agent works on nothing else, with minimal, surgical fixes.
2. **Proactive quality elevation**: once `uv run devops ci` passes, the agent turns to headroom:
functions near the complexity cap ($7 \le M \le 10$) come down to $M \le 6$ and depth $\le 3$,
public interfaces get complete docstrings and type hints, and tests are brought to the
conventions in [`docs/TESTING.md`](TESTING.md).
2. **Proactive quality elevation**: once `uv run devops ci` passes, the agent gives public
interfaces complete docstrings and type hints. The agent also brings tests to the conventions in
[`docs/TESTING.md`](TESTING.md).
3. **Continuous self-hardening**: each struggle, failure, inconsistency, bad pattern or useful
idea becomes an issue (`devops gh issues create`), and a rule for agents goes into
[`AGENTS.md`](../AGENTS.md). `docs/ROADMAP.md` is rendered from GitHub at the cut and never
edited in an item's pull request ([ADR 0001](adr/0001-github-is-the-roadmap-source.md)).
idea becomes an issue (`devops gh issues create`), and a check that fails when the problem
returns guards it. A rule goes into [`AGENTS.md`](../AGENTS.md) only when no check is possible.
`docs/ROADMAP.md` is rendered from GitHub at the cut and never edited in an item's pull request
([ADR 0001](adr/0001-github-is-the-roadmap-source.md)).

---

Expand Down
2 changes: 1 addition & 1 deletion docs/VISION.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The principles devops-cli is built on and the themes it is heading toward. This
13. **Cognitive Information Foraging & Syntopical Epistemic Hygiene**: Agents must read, research, and gather information with human-like cognitive discipline—prioritizing inspectional multi-scale outlines over monolithic token dumps, traversing information scent cues with backtracking, maintaining active marginalia, triangulating claims against ground-truth primary sources, and synthesizing syntopical mental models that resolve dialectical contradictions.
14. **Autonomous Agentic Project Governance & Grounded Lifecycle Orchestration**: Software delivery must be autonomously governed through closed-loop, agentic project management. Work items, review remediations, and architectural epics must be decomposed into atomic, traceable issues with grounded taxonomy, real-time board transitions across lifecycle states, explicit dependency tracking, and dynamic WIP budgeting to eliminate ungrounded development and project drift.
15. **Reactive Terminal Ergonomics & Unified Workstation Command Center**: The developer terminal is the primary operational canvas. Complex multi-cloud, container, AI, and project lifecycle telemetry must be synthesized into a reactive, high-density terminal user interface (TUI) with non-blocking async workers, master-detail split screens, live log streaming, and sub-second fuzzy command dispatch, eliminating context switching to fragmented web dashboards.
16. **Stochastic Language Bound by Deterministic Mechanical Oracles & Feedback Inversion**: Autonomous engineering velocity relies on pairing probabilistic LLM token generation with deterministic mechanical oracles (AST complexity parsers, negative JSON schema validation, POSIX process group containment, and pre-flight boundary limits). As quality gates reach 100% pass rates, feedback loops dynamically invert from reactive defect remediation to proactive architectural headroom optimization.
16. **Stochastic Language Bound by Deterministic Mechanical Oracles & Feedback Inversion**: Autonomous engineering velocity relies on pairing probabilistic LLM token generation with deterministic mechanical oracles (AST complexity parsers, negative JSON schema validation, POSIX process group containment, and pre-flight boundary limits). As quality gates reach 100% pass rates, feedback loops dynamically invert from reactive defect remediation to proactive quality elevation: complete docstrings, type hints and tests.

## Themes

Expand Down
45 changes: 45 additions & 0 deletions docs/agent/tasks/task-1874-convention-yields-to-open-tool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Task: A Convention Yields to an Open Tool, and Rules With No Check or a Contradiction Are Pruned (#1874)

**Issue**: [#1874](https://github.com/dan-petty/devops-cli/issues/1874)
**Scope**: type/docs, scope/docs, scope/ai
**Feasibility**: The author checked this on 2026-10-22. The author read the rules in `AGENTS.md` and searched `tests/` and `src/` for a check of each rule that the item deletes. No check exists for any of them. The author ran the replacement measures on this tree. The results are in the section "Feasibility Evidence".

## Description

`AGENTS.md` told an agent to name the open tool before it builds. The same file also told the agent to meet "all project standards and conventions" and not to relax "lint rules". No rule said which line wins. An agent that replaced a bespoke check with a standard tool read the swap as lowering a threshold, and kept the bespoke code. Some rules also contradicted each other, and the file had no room for a new rule.

- **Precedence.** The bullet "Open Tools Before Internal Code" now says that a convention is never a reason to keep or write custom code. It also says that the bullet outranks every convention in the file.
- **Never lower.** The bullet "Continuous Standards Compliance" is merged into the bullet "Never Lower Security Standards or Quality Thresholds". The merged bullet keeps one sentence of the old bullet: "Every change meets the project standards." The merged bullet separates lowering a threshold from replacing a check with a tool. A tool replaces a check when it enforces at least the same property on this repository. The PR runs both checks once and shows both results.
- **Contradictions.** Agents run `intake --confirm` for their own new candidates, as the bullets on defect filing and roadmap synthesis say. The suspended-Service bullet now agrees with them. The bullet "Stop Rather Than Add Compensating Code" asks a person to run `roadmap return --confirm`, because that command stays with a person. The text that `devops ai agents` writes for this repository says the same.
- **Pruned rules.** The rule on `Gated` terminology, the headroom targets, the bullet on forward-looking project management and the section 1 naming bullet are gone. The sentence on an empty issue queue is gone from `AGENTS.md`, `docs/SDLC.md`, `docs/ROUTINE_TASKS.md`, the knowledge base guide `github_project_management.md` and the generator. The section 4 naming bullet keeps the naming rule.
- **Reworded rules.** The bullets on dispatch style, the Python ecosystem, secrets and root-cause remediation say what outcome they want. The secrets rule gives examples of a secret store, so its list is open. `docs/ROUTINE_TASKS.md` states the same outcome.
- **Shipped copy.** `devops ai agents` writes the never-lower bullet into other repositories. `src/devops_cli/ai/instruction_generator.py` now writes the new wording and no longer writes the continuous-compliance bullet. The generator also writes the new root-cause wording.
- **Linked guides.** `docs/SELF_IMPROVEMENT.md` and `docs/VISION.md` no longer state the deleted headroom targets. `docs/SELF_IMPROVEMENT.md` says that a check guards a recurring problem. It says that a rule goes into `AGENTS.md` only when no check is possible.
- Pending a person: apply the item that intake folded into this issue, "agents reach GitHub through the paced session and workflow steps use the runner's `gh`". The item changes the bullet "Strict Prohibition of Bare `gh` CLI Invocations". The GitHub request budget design changes that rule, so this PR leaves it as it is. The issue body does not list the item, so a person files it as its own issue.

## Feasibility Evidence

- **Size.** `AGENTS.md` had 39,954 characters. It has 38,850 after the change. The change frees 1,104 characters, and the cap is 40,000.
- **Gated terminology.** A search of `tests/` and `src/` finds no test or code that enforces the `Gated` terminology rule or the numbered-gate ban.
- **Headroom targets.** `uv run ruff check src --select C901` at a limit of 6 reports 371 functions. At the cap of 10 it reports none. The project collector `devops_cli.core.code_metrics` counts 557 functions deeper than 3 and none deeper than 5. Nothing enforced the targets, and the cap of 10 and 5 in the same file already bounded the code.
- **Empty queue.** A search of `tests/` and `src/` finds no check of the sentence on an empty issue queue.
- **Roadmap commands.** `uv run devops roadmap intake --help` shows that a candidate an agent files with `--title` and `--body-file` is labeled `source/agent` and held to the filing quota. The same help shows that intake without `--title` works on every open issue that is not on the board. The suspended-Service bullet keeps that second use with a person.
- **Replacement tools.** No check is replaced in this item. Every deleted rule had no check, so no pair of runs applies. The new text keeps the checks that exist: Ruff `C901` and `N`, the architectural invariant tests, `detect-private-key`, `bandit` and `tests/test_zero_plaintext_invariants.py`.
- **Secret stores.** ADR 0004 keeps the machine-account token in a cluster Secret. The repository also reads the GitHub token from the credential store of `gh`. The old text named only the OS keyring and Vault.

## Acceptance Criteria

- [x] `AGENTS.md` is 1,104 characters shorter than before the change, at 38,850 of 40,000. `tests/test_agents_md_claims.py` passes.
- [x] The compliance bullet is merged into the never-lower bullet, which keeps one sentence of it. The "Open Tools Before Internal Code" bullet carries the precedence sentences.
- [x] No line tells an agent to run a command that another line reserves for a person. This holds for `AGENTS.md` and for the generator.
- [x] The generator no longer writes the continuous-compliance bullet, and its never-lower bullet separates lowering from replacing.
- [x] No document keeps the empty-queue sentence or the headroom targets.
- [x] `uv run devops docs check` finds the generated documents current.
- [x] `devops ci` passes.

## Deliverables

- [x] `AGENTS.md`: the precedence sentences, the merged never-lower bullet, the pruned rules and the reworded rules.
- [x] `src/devops_cli/ai/instruction_generator.py` and `tests/test_instruction_generator.py`: the new never-lower, root-cause and `roadmap return` wording, and the deleted continuous-compliance bullet and empty-queue sentence.
- [x] `docs/ROUTINE_TASKS.md`, `docs/SDLC.md`, `docs/SELF_IMPROVEMENT.md`, `docs/VISION.md` and `src/devops_cli/ai/knowledge_base/devops_cli/tasks/github_project_management.md`: the matching statements.
- [x] `docs/agent/tasks/task-1874-convention-yields-to-open-tool.md` and `changelog.d/1874.md`.
Loading
Loading