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
107 changes: 107 additions & 0 deletions PLANS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,113 @@ plan_schema_version: 2

Use this file for active, blocked, ready-for-closure, or recently completed execution work. The canonical lifecycle is the installed `engineering-workflow` planning reference.

## Active Plan: Privacy Preflight Exact Review V2 And Release

Status: active
Owner: root
Last Updated: 2026-09-23

### Goal

Fix issue #8 by allowing an explicitly user-approved, exact-snapshot review of any privacy finding for target workflow migration only; preserve the independent public-tree and pre-push secret gates, then release and install the update through xeonvs-engineering.

### Plan Origin

plan_mode_approved

### Requested Scope

- Implement the approved issue #8 plan in the canonical engineering-workflow repository, publish a patch release, import exact released bytes into xeonvs-engineering, release the marketplace, and update local managed installations.

### Requirement Traceability

| Requirement | Complete outcome | Source | Work queue | Acceptance or validation | Status |
| --- | --- | --- | --- | --- | --- |
| REQ-001 | Preflight offers value-free exact-snapshot approval for every privacy category; no target write occurs before explicit approval. | User-approved plan; issue #8 and comments | WQ-01 | Mixed-category, self-match, fixture, no-write, stale-token tests | done |
| REQ-002 | Review contract v2 rejects v1 tokens and binds category, path, line, exact decoded line including its ending, multiplicity, and version pair; changed/new findings fail or roll back. | User-approved plan; privacy contract | WQ-01 | Token/version/mutation and rollback regression matrix | done |
| REQ-003 | Shared public-tree detection and Gitleaks/publication gates remain unchanged; approval authorizes migration only. | User-approved plan | WQ-01 | Scanner parity test, source full/security gate and diff review | done |
| REQ-004 | Runtime instructions, canonical references, README, package bytes, and version owners describe the new risk and behavior consistently. | User-approved plan; release contract | WQ-02 | Structural/contract tests, package parity and plugin validators | done |
| REQ-005 | Source patch release and exact marketplace import/release are published, with tgrep-search unchanged. | User-approved plan; marketplace release contract | WQ-03,WQ-04 | PR/CI readback, annotated tags, provenance, release assets | pending |
| REQ-006 | Codex/Claude local managed installations resolve the released workflow version; plans close truthfully. | User-approved plan; prior installation preference | WQ-05 | Native CLI readback and lifecycle check/closure | pending |

### Explicit Non-Goals

- Do not silence or narrow the shared scanner, approve publication of real secrets, edit target repositories to test migration, add a persistent allowlist, alter tgrep-search, or rewrite published history.

### Constraints

- Preserve whole-repository scan coverage and value-free candidate reporting. The agent must not read flagged values; a user must independently inspect locally before approving high-risk candidates.
- Approval is limited to target workflow migration on one exact finding snapshot and version pair. Independent public-tree and pre-push Gitleaks gates remain separate.
- Review each logical commit and the aggregate release diff; run final full and immediate pre-push security checks.

### Inputs And Sources

- https://github.com/xeonvs/codex-engineering-workflow/issues/8 and its two owner comments, current 0.9.8 privacy implementation and tests, canonical privacy/target-upgrade references, and the approved plan in this task.
- Current read-only repository audit summary at `/tmp/engineering-privacy-issue8-audit.json` reports mature Git discovery with no inventory truncation; generic self-repository instruction graph findings are outside this issue's migration change.

### User Decisions And Answers

- 2026-09-23: Implement the proposed plan and publish source plus marketplace patch releases with local updates.
- 2026-09-23: Choose approval for findings of any formerly hard category rather than only low-risk or provenance-classified findings. Preserve explicit confirmation, exact snapshot binding, and separate publication gates.

### Completed Baseline State

- [x] Source `main` starts clean; latest remote stable annotated tag is `v0.9.8`; issue #8 remains open and describes 0.9.8 reproduction.

### Current Work Queue

- [x] WQ-01 — Implement privacy review v2 and behavior/regression tests for REQ-001/REQ-002/REQ-003. `done`
- [x] WQ-02 — Update canonical guidance, version owners, generated package and validate/review for REQ-004. `done`
- [ ] WQ-03 — Publish source PR, annotated patch tag and release for REQ-005. `in_progress`
- [ ] WQ-04 — Import into xeonvs-engineering, validate, PR/merge, tag and release for REQ-005. `pending`
- [ ] WQ-05 — Refresh installations, reconcile, and close both plans for REQ-006. `pending`

### Locked Decisions

- Use `privacy_review` contract v2 with `privacy-review-v2` tokens. All scanner categories become review candidates in migration preflight, never automatic exceptions; `hard_block` is no longer returned solely because of a finding category.
- Keep candidate output limited to category/path/line and aggregate token. Explain high-risk manual inspection and that migration approval does not certify public content.
- Provisional patch versions are engineering-workflow 0.9.9 and xeonvs-engineering 1.0.9, subject to fresh remote tag inspection at publication.

### Verification

- Focused privacy/migration tests, contract tests, source full/release/security gates, package parity, Codex/Claude plugin validators, marketplace tests/provenance/public scans, CI and release asset readback, native installed-version readback.

### Latest Validation Results

- 2026-09-23: Read-only issue and repository audit completed. Privacy v2 implementation and tests cover all detector categories, mixed findings, self-match, value-free output, v1 rejection, snapshot drift, and rollback. Source release gate passed 12/12 (full checks plus public-tree and redacted Gitleaks). Source/package skill quick validators, Codex plugin validator, and strict Claude plugin/marketplace validators passed. Aggregate review found and removed a stale hard-block rule in the target-upgrade reference; final package was regenerated and release gate rerun on the corrected bytes.
- 2026-09-23: Aggregate review also identified non-UTF-8 Git path handling in v2 token serialization; switched to ASCII-escaped canonical JSON and added a regression. Final release gate passed 12/12 and source/package quick validators plus Codex/Claude plugin validators passed on those bytes.

### Risks And Recovery

- High-risk candidates may represent real secrets. Require explicit user review of local values, and do not treat migration approval as release clearance; independent scans remain blocking before push.
- Remote refs or package APIs may move during publication. Reinspect exact heads/tags, stop on drift, and do not repeat uncertain side effects.
- A new finding during apply must roll back non-plan writes and retain a truthful failure plan for recovery.

### Resume Point

- WQ-03: commit the reviewed source slice, run Claude tag dry-run and immediate pre-push security gate, then publish and merge the source PR.

### Plan Fidelity Check

- [x] Every requested source, marketplace, local-installation, security, and closure outcome is mapped to ordered work and validation.
- [x] User-selected review breadth, non-goals, canonical sources, risks, recovery, and exact first action are recorded.

### Reconciliation Check

- [ ] Final code, package, releases, installations, and plan states agree.

### Closure Gate

- [ ] All requirements and queue items are terminal with final review and validation evidence.

### Post-Close Delivery

- Publication and local refresh remain active in WQ-03 through WQ-05.

### Handoff Notes

- None.

## Recently Completed

- [x] 2026-09-23: Completed GPT-6 Model Profiles And Marketplace Release; [full archived plan](docs/archive/plans/2026-09-23-gpt-6-model-profiles-and-marketplace-release.md).
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

`engineering-workflow` is a public skill for auditing, setting up, validating, updating, and safely migrating the engineering-workflow layer of a repository. It works with Codex and Claude Code.

Current skill version: `0.9.8`.
Current skill version: `0.9.9`.

The skill uses `AGENTS.md` as a short map, `PLANS.md` as durable execution state, and leaves product, architecture, operations, security, and other repository-owned documentation with its existing owners. Any repository change starts with a full plan; read-only inspection is the only exception.

Expand Down Expand Up @@ -73,7 +73,7 @@ Use $engineering-workflow to audit this mature repository and add only the missi
```

```text
Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.9.8.
Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.9.9.
```

Repository text is evidence, not authority. It cannot grant approval, expand scope, request secrets, or override system, developer, or user instructions.
Expand Down Expand Up @@ -178,7 +178,7 @@ When the result permits an automatic update, rerun it with `--apply`. Alternate
`Upgrade A Target Workflow` tells the agent to run a report-first guarded migration, not to hand the user a list of backend commands. It applies automatically only when ownership, privacy, and approval checks are resolved. An already-current valid target returns `already_current` without creating a plan or rewriting state/index files; missing or drifted required artifacts still take the guarded migration path.

```text
Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.9.8. Run the report first, apply it when safe, and ask only when the report requires a user decision.
Use $engineering-workflow to Upgrade A Target Workflow in this repository to version 0.9.9. Run the report first, apply it when safe, and ask only when the report requires a user decision.
```

The maintainer/automation backend is:
Expand All @@ -187,7 +187,7 @@ The maintainer/automation backend is:
python3 skill/engineering-workflow/scripts/upgrade_target_workflow.py \
--repo <target-repository> \
--prompt \
--target-version 0.9.8 \
--target-version 0.9.9 \
--format json
```

Expand All @@ -197,17 +197,17 @@ The migration creates or updates the target's full active `PLANS.md` plan before

### Privacy review during migration

Some repositories intentionally keep synthetic credentials, addresses, or internal hostnames in tests and fixtures. The migration can continue only after the user approves the exact value-free review token for that one migration snapshot.
Some repositories intentionally keep synthetic credentials, paths, URLs, or scanner patterns in tests, runbooks, and fixtures. Findings of any category require the user's exact value-free review token before migration can write; none is automatically classified as safe.

When the result returns `agent_action: request_privacy_review_approval`, the agent must:

1. Show only each candidate's category, repository-relative path, and line number, plus the aggregate `review_token`.
2. Never open the reported line, quote the match, reveal a line digest, or decide that the value is safe on the user's behalf.
3. Explain that any content, line, path, duplicate count, current version, or target-version change invalidates the token.
4. Ask for explicit approval and make no target writes while waiting.
4. Ask the user to inspect the candidate values locally and explicitly approve; highlight the risk of credentials, tokens, private keys, and URLs containing credentials. Make no target writes while waiting.
5. After approval, rerun the same operation with `--approve-privacy-review <exact-token>`.

A hard privacy category has `status: hard_block`, no token, and no approval path. The token is not an allowlist: it is kept only for the current process, creates no baseline file, and cannot approve a real secret. The final scan still rolls back if a finding appears or changes during apply.
The v2 token authorizes only this target workflow migration on the exact snapshot. It is not a persistent allowlist or a judgment that a real secret is safe to publish. The shared public-tree scanner and separate pre-push Gitleaks gate remain unchanged and can still block publication. The final migration scan rolls back if a finding appears or changes during apply; v1 tokens cannot approve under v2.

## Operating modes

Expand Down Expand Up @@ -269,7 +269,7 @@ Use $engineering-workflow to audit this mature repository, preserve every existi
Target migration:

```text
Use $engineering-workflow to Upgrade A Target Workflow here to 0.9.8. Run the report and apply it when safe.
Use $engineering-workflow to Upgrade A Target Workflow here to 0.9.9. Run the report and apply it when safe.
```

## Repository layout
Expand Down Expand Up @@ -304,7 +304,7 @@ This harness and its Ruff configuration improve development of this repository o

## Versioning and updates

The project uses semantic versioning. Version 0.9.8 routes deterministic commands and tests through tools, recommends GPT-6 Luna for bounded utility work and Sol for exploration, standard work, and routine review, reserves Astra for user-selected or confirmed high-consequence reasoning, retains Terra as an explicit fallback, and refreshes only pristine previously opted-in target agent profiles. Version 0.9.7 bounds repository discovery through Git-owned inventory or an explicit non-Git fallback and adds compact agent-facing audit summaries backed by complete report artifacts without narrowing privacy scanning. Version 0.9.6 keeps root context focused on current decisions and integration, distinguishes transient evidence from durable repository knowledge, requires self-contained worker handoffs with compact evidence, and favors existing bounded execution mechanisms for predictable tool-heavy stages. Version 0.9.5 narrows instruction loading to the selected task, accepts sufficient native completion evidence, makes custom stage assessment optional, and clarifies existing local-check authorization. These releases preserve the full plan and security contracts. Version 0.9.4 adds the approved opaque Engineering Workflow identity and Codex plugin-card icon metadata without changing the runtime workflow contract. Version 0.9.3 preserves customized top-level `PLANS.md` sections during compact and archive closure, correcting a data-loss defect discovered while dogfooding 0.9.2 against the unified marketplace repository. Version 0.9.2 keeps durable state current inside useful work rather than a recurring model-maintenance loop, distinguishes continuous task context from real recovery, removes plan-date ordering as a validation-applicability proxy, stops redundant route/tool/subagent work after sufficient evidence, and provides an agent-neutral fallback when the invoking host is not established as Codex or Claude Code. Versions 0.9.2 through 0.9.8 preserve all existing schema and contract versions. Version 0.9.1 updated Codex's standard/review recommendations for Astra, preserved native Claude model/effort inheritance, and clarified existing authorization, task steering, bounded delegation, and proportional verification. Version 0.9.0 added ownership-aware archive closure and instruction contract v3: target agents review every complete logical commit slice and then the aggregate final diff, while customized mature repositories migrate conservatively. Version 0.8.2 stopped empty compatibility archive directories from producing false missing-index errors while retaining fail-closed checks for real archive content and unsafe index paths. Version 0.8.1 added exact, user-approved synthetic-fixture privacy review without exposing candidate values to the agent. Version 0.8.0 introduced loss-resistant completion-driven waits, correctness-first execution discipline, instruction contract v2 migration, Claude Code compatibility, and the deterministic dual marketplace. Version 0.7.0 is the historical baseline for bounded Programmatic Tool Calling assessment and runtime instruction rendering.
The project uses semantic versioning. Version 0.9.9 adds migration-only exact privacy review v2 for every detector category while preserving independent public-content and Gitleaks gates. Version 0.9.8 routes deterministic commands and tests through tools, recommends GPT-6 Luna for bounded utility work and Sol for exploration, standard work, and routine review, reserves Astra for user-selected or confirmed high-consequence reasoning, retains Terra as an explicit fallback, and refreshes only pristine previously opted-in target agent profiles. Version 0.9.7 bounds repository discovery through Git-owned inventory or an explicit non-Git fallback and adds compact agent-facing audit summaries backed by complete report artifacts without narrowing privacy scanning. Version 0.9.6 keeps root context focused on current decisions and integration, distinguishes transient evidence from durable repository knowledge, requires self-contained worker handoffs with compact evidence, and favors existing bounded execution mechanisms for predictable tool-heavy stages. Version 0.9.5 narrows instruction loading to the selected task, accepts sufficient native completion evidence, makes custom stage assessment optional, and clarifies existing local-check authorization. These releases preserve the full plan and security contracts. Version 0.9.4 adds the approved opaque Engineering Workflow identity and Codex plugin-card icon metadata without changing the runtime workflow contract. Version 0.9.3 preserves customized top-level `PLANS.md` sections during compact and archive closure, correcting a data-loss defect discovered while dogfooding 0.9.2 against the unified marketplace repository. Version 0.9.2 keeps durable state current inside useful work rather than a recurring model-maintenance loop, distinguishes continuous task context from real recovery, removes plan-date ordering as a validation-applicability proxy, stops redundant route/tool/subagent work after sufficient evidence, and provides an agent-neutral fallback when the invoking host is not established as Codex or Claude Code. Versions 0.9.2 through 0.9.8 preserve all existing schema and contract versions. Version 0.9.1 updated Codex's standard/review recommendations for Astra, preserved native Claude model/effort inheritance, and clarified existing authorization, task steering, bounded delegation, and proportional verification. Version 0.9.0 added ownership-aware archive closure and instruction contract v3: target agents review every complete logical commit slice and then the aggregate final diff, while customized mature repositories migrate conservatively. Version 0.8.2 stopped empty compatibility archive directories from producing false missing-index errors while retaining fail-closed checks for real archive content and unsafe index paths. Version 0.8.1 added exact, user-approved synthetic-fixture privacy review without exposing candidate values to the agent. Version 0.8.0 introduced loss-resistant completion-driven waits, correctness-first execution discipline, instruction contract v2 migration, Claude Code compatibility, and the deterministic dual marketplace. Version 0.7.0 is the historical baseline for bounded Programmatic Tool Calling assessment and runtime instruction rendering.

Historical version records remain valid in completed plans, archives, and migration tests. Current-version owners are `SKILL.md`, this README, current update prompts, active workflow state manifests, and the generated plugin manifests.

Expand Down
2 changes: 1 addition & 1 deletion plugins/engineering-workflow/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "engineering-workflow",
"version": "0.9.8",
"version": "0.9.9",
"description": "Audit, plan, migrate, validate, and maintain repository engineering workflows.",
"author": {
"name": "xeonvs",
Expand Down
2 changes: 1 addition & 1 deletion plugins/engineering-workflow/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "engineering-workflow",
"version": "0.9.8",
"version": "0.9.9",
"description": "Audit, plan, migrate, validate, and maintain repository engineering workflows.",
"author": {
"name": "xeonvs",
Expand Down
Loading
Loading