Skip to content

Commit 4861794

Browse files
NagyViktNagyVikt
andauthored
Auto-finish: agent/claude/remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27 (#583)
Co-authored-by: NagyVikt <nagy.viktordp@gmail.com>
1 parent a59ad3a commit 4861794

13 files changed

Lines changed: 113 additions & 16 deletions

File tree

.agents

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ logs/*
5959
.dev-ports.json
6060
apps/logs/*.log
6161

62-
.agents/hooks/state/
63-
.agents/.personality_migration
64-
.agents/version.json
65-
.agents/log/
6662
.venv
6763

6864
.omx/

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,3 @@
1414
path = examples/skills_for_claude
1515
url = https://github.com/NagyVikt/skills_for_claude.git
1616
branch = main
17-
[submodule "vscode-material-icon-theme"]
18-
path = vscode-material-icon-theme
19-
url = https://github.com/NagyVikt/vscode-material-icon-theme.git
20-
branch = main

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The `/project-conventions` skill is auto-activated on code edits (PreToolUse gua
8585
| Convention | Location | When |
8686
| ----------------------- | ------------------------------------- | ---------------------------- |
8787
| Code Conventions (Full) | `/project-conventions` skill | On code edit (auto-enforced) |
88-
| Git Workflow | `.agents/conventions/git-workflow.md` | Commit / PR |
88+
| Git Workflow | `.codex/conventions/git-workflow.md` | Commit / PR |
8989

9090
## UI/UX Skill Default (UI Pro Max)
9191

@@ -99,7 +99,8 @@ The `/project-conventions` skill is auto-activated on code edits (PreToolUse gua
9999
- Do not commit ephemeral local runtime artifacts (for example `.dev-ports.json` and `apps/logs/*.log`).
100100
- Treat local OMX/Codex session state files as agent-ignored (as if they were in `.gitignore`) even when they appear in working tree status.
101101
- Never stage or commit:
102-
- `.agents/settings.local.json`
102+
- `.codex/settings.local.json`
103+
- `.claude/settings.local.json`
103104
- `.omc/project-memory.json`
104105
- `.omc/state/**`
105106
- `.omx/state/**`
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
schema: spec-driven
2+
created: 2026-05-15
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Why
2+
3+
- The `vscode-material-icon-theme` submodule was added three weeks ago but is not used by anything in the repo — it pulls in unrelated upstream history and clutters the root listing.
4+
- The `.agents` symlink at the repo root is a dead backward-compat bridge: it points at `.codex` and exists only so legacy paths like `.agents/hooks/skill_guard.py` keep resolving. No live tooling, hook config, or settings file references those paths anymore (the `repo hook settings reference real local hook directories` test already enforces that `.agents/hooks/...` cannot appear in any settings command).
5+
- Carrying both surfaces costs visible structural noise at the repo root, drags four stale `.gitignore` entries for paths that no longer exist (`.agents/hooks/state/`, `.agents/.personality_migration`, `.agents/version.json`, `.agents/log/`), and forces multi-agent state-file globs in three scripts plus the agent contract to list `.agents/settings.local.json` alongside the real `.codex` / `.claude` paths.
6+
7+
## What Changes
8+
9+
- Remove the `vscode-material-icon-theme` submodule (gitlink + `.gitmodules` stanza).
10+
- Delete the `.agents` symlink. All resolved content stays in place under `.codex` (and the per-agent variant under `.claude`).
11+
- Drop the `.agents/hooks/skill_guard.py` entry from the skill-guard regression test — the remaining `.codex` and `.claude` copies already prove identical behavior.
12+
- Replace `.agents/conventions/git-workflow.md` with `.codex/conventions/git-workflow.md` in the agent contract's Code Conventions table.
13+
- Replace the single `.agents/settings.local.json` line in the Git Hygiene "Never stage or commit" list with the two real per-agent paths (`.codex/settings.local.json`, `.claude/settings.local.json`).
14+
- Update the auto-transfer / auto-resolve / worktree-prune exclude globs in `templates/scripts/agent-branch-start.sh`, `templates/scripts/agent-branch-finish.sh`, and `templates/scripts/agent-worktree-prune.sh` the same way.
15+
- Drop the four stale `.agents/...` entries from `.gitignore`.
16+
- Keep the negative assertion in `test/setup.test.js` that no settings command references `/.agents/hooks/` — it is now a regression guard against re-introducing the bridge.
17+
18+
## Impact
19+
20+
- Affected surfaces: repo root layout, `.gitmodules`, `.gitignore`, `AGENTS.md` / `CLAUDE.md` (symlinked), `test/setup.test.js`, three `templates/scripts/*.sh`.
21+
- Risk: external user-level Codex configs that hardcode `.agents/hooks/skill_guard.py` would lose the bridge. The repo's own settings files (`.codex/settings.json`, `.claude/settings.json`) already point at `.codex/hooks/...` and `.claude/hooks/...` directly, so in-repo behavior is unaffected. Any user with an older host config can simply point it at the per-agent hook path.
22+
- No published version bump (no behavior surface for downstream `gx` consumers changes — the template glob defaults expand cleanly with the two replacement entries).
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## ADDED Requirements
2+
3+
### Requirement: Repo root SHALL NOT carry the `vscode-material-icon-theme` submodule
4+
5+
The system SHALL keep the repo root free of the `vscode-material-icon-theme` submodule and its `.gitmodules` registration.
6+
7+
#### Scenario: `.gitmodules` no longer registers `vscode-material-icon-theme`
8+
- **WHEN** a contributor inspects `.gitmodules` at `HEAD`
9+
- **THEN** no stanza named `[submodule "vscode-material-icon-theme"]` is present
10+
- **AND** `git submodule status` does not list a `vscode-material-icon-theme` entry.
11+
12+
#### Scenario: `vscode-material-icon-theme` path is gone from the working tree
13+
- **WHEN** a contributor runs `ls vscode-material-icon-theme` at the repo root
14+
- **THEN** the path does not exist
15+
- **AND** `git ls-tree HEAD vscode-material-icon-theme` returns no entry.
16+
17+
### Requirement: Repo root SHALL NOT carry the legacy `.agents` bridge symlink
18+
19+
The system SHALL remove the `.agents` symlink at the repo root and rely on the per-agent `.codex/` and `.claude/` surfaces directly.
20+
21+
#### Scenario: `.agents` is absent from `HEAD`
22+
- **WHEN** a contributor runs `git ls-tree HEAD .agents`
23+
- **THEN** the command returns no entry
24+
- **AND** no `.agents` path exists in the working tree.
25+
26+
#### Scenario: Internal references migrate off `.agents`
27+
- **WHEN** a contributor greps the repo (excluding `openspec/changes/archive/` and any historical `agent-codex-*` change folders) for `\.agents/`
28+
- **THEN** the only match is the negative regex guard in `test/setup.test.js` that asserts settings commands MUST NOT reference `/.agents/hooks/`.
29+
30+
#### Scenario: Stale ignore patterns are dropped
31+
- **WHEN** a contributor inspects `.gitignore`
32+
- **THEN** none of `.agents/hooks/state/`, `.agents/.personality_migration`, `.agents/version.json`, `.agents/log/` appear.
33+
34+
### Requirement: Multi-agent state-file glob defaults SHALL reference the real per-agent paths
35+
36+
The system SHALL list the live `.codex/settings.local.json` and `.claude/settings.local.json` paths (not `.agents/settings.local.json`) in the auto-transfer, auto-resolve, and worktree-prune state-file glob defaults.
37+
38+
#### Scenario: Template script defaults expand cleanly
39+
- **WHEN** a contributor inspects `AUTO_TRANSFER_EXCLUDE_DEFAULT` in `templates/scripts/agent-branch-start.sh`, `AUTO_RESOLVE_SAFE_GLOBS_DEFAULT` in `templates/scripts/agent-branch-finish.sh`, and `WORKTREE_STATE_EXCLUDE_GLOBS_DEFAULT` in `templates/scripts/agent-worktree-prune.sh`
40+
- **THEN** each default contains `:.codex/settings.local.json:.claude/settings.local.json:`
41+
- **AND** none of them contain `:.agents/settings.local.json:`.
42+
43+
#### Scenario: Agent contract Git Hygiene list matches
44+
- **WHEN** a contributor reads the "Never stage or commit" list in `AGENTS.md` (and the `CLAUDE.md` symlink)
45+
- **THEN** `.codex/settings.local.json` and `.claude/settings.local.json` are present
46+
- **AND** `.agents/settings.local.json` is absent.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## Definition of Done
2+
3+
This change is complete only when **all** of the following are true:
4+
5+
- Every checkbox below is checked.
6+
- The agent branch reaches `MERGED` state on `origin` and the PR URL + state are recorded in the completion handoff.
7+
- If any step blocks (test failure, conflict, ambiguous result), append a `BLOCKED:` line under section 4 explaining the blocker and **STOP**. Do not tick remaining cleanup boxes; do not silently skip the cleanup pipeline.
8+
9+
## Handoff
10+
11+
- Handoff: change=`agent-claude-remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27`; branch=`agent/claude/remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27`; scope=`drop vscode submodule + legacy .agents bridge + migrate state-file globs`; action=`continue in worktree or finish via gx branch finish ... --via-pr --wait-for-merge --cleanup`.
12+
- Copy prompt: Continue `agent-claude-remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27` on branch `agent/claude/remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27`. Work inside the existing sandbox, review `openspec/changes/agent-claude-remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27/tasks.md`, continue from the current state instead of creating a new sandbox, and when the work is done run `gx branch finish --branch agent/claude/remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27 --base main --via-pr --wait-for-merge --cleanup`.
13+
14+
## 1. Specification
15+
16+
- [x] 1.1 Finalize proposal scope and acceptance criteria for `agent-claude-remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27`.
17+
- [x] 1.2 Define normative requirements in `specs/remove-vscode-icon-submodule-and-prune-agents-dir/spec.md`.
18+
19+
## 2. Implementation
20+
21+
- [x] 2.1 Drop the `vscode-material-icon-theme` submodule (gitlink + `.gitmodules` stanza).
22+
- [x] 2.2 Delete the `.agents` symlink and remove its four stale `.gitignore` entries.
23+
- [x] 2.3 Migrate the agent contract's Code Conventions row from `.agents/conventions/git-workflow.md` to `.codex/conventions/git-workflow.md`.
24+
- [x] 2.4 Replace `.agents/settings.local.json` with the live `.codex/settings.local.json` + `.claude/settings.local.json` entries in `AGENTS.md`'s "Never stage or commit" list and in the three `templates/scripts/*.sh` glob defaults.
25+
- [x] 2.5 Drop the `.agents/hooks/skill_guard.py` import from the skill-guard regression test; keep the negative assertion that settings commands must not reference `/.agents/hooks/`.
26+
27+
## 3. Verification
28+
29+
- [ ] 3.1 Run `node --test test/setup.test.js` and confirm both the "repo hook settings reference real local hook directories" and "repo skill guard blocks shell output redirect bypasses" tests pass.
30+
- [ ] 3.2 Run `openspec validate agent-claude-remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27 --type change --strict`.
31+
- [ ] 3.3 Run `openspec validate --specs`.
32+
33+
## 4. Cleanup (mandatory; run before claiming completion)
34+
35+
- [ ] 4.1 Run the cleanup pipeline: `gx branch finish --branch agent/claude/remove-vscode-icon-submodule-and-prune-a-2026-05-16-00-27 --base main --via-pr --wait-for-merge --cleanup`. This handles commit -> push -> PR create -> merge wait -> worktree prune in one invocation.
36+
- [ ] 4.2 Record the PR URL and final merge state (`MERGED`) in the completion handoff.
37+
- [ ] 4.3 Confirm the sandbox worktree is gone (`git worktree list` no longer shows the agent path; `git branch -a` shows no surviving local/remote refs for the branch).

templates/scripts/agent-branch-finish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ WAIT_TIMEOUT_SECONDS_RAW="${GUARDEX_FINISH_WAIT_TIMEOUT_SECONDS:-1800}"
1717
WAIT_POLL_SECONDS_RAW="${GUARDEX_FINISH_WAIT_POLL_SECONDS:-10}"
1818
PARENT_GITLINK_AUTO_COMMIT_RAW="${GUARDEX_FINISH_PARENT_GITLINK_AUTO_COMMIT:-true}"
1919
AUTO_RESOLVE_MODE_RAW="${GUARDEX_FINISH_AUTO_RESOLVE:-none}"
20-
AUTO_RESOLVE_SAFE_GLOBS_DEFAULT='.omc/**:.omx/state/**:.dev-ports.json:apps/logs/**:.agents/settings.local.json:.codex/state/**:.claude/state/**'
20+
AUTO_RESOLVE_SAFE_GLOBS_DEFAULT='.omc/**:.omx/state/**:.dev-ports.json:apps/logs/**:.codex/settings.local.json:.claude/settings.local.json:.codex/state/**:.claude/state/**'
2121
AUTO_RESOLVE_SAFE_GLOBS_RAW="${GUARDEX_FINISH_AUTO_RESOLVE_SAFE_GLOBS-$AUTO_RESOLVE_SAFE_GLOBS_DEFAULT}"
2222
PREFLIGHT_ENABLED_RAW="${GUARDEX_FINISH_PREFLIGHT:-true}"
2323
PREFLIGHT_SCRIPT_RAW="${GUARDEX_FINISH_PREFLIGHT_SCRIPT:-scripts/agent-preflight.sh}"

templates/scripts/agent-branch-start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ OPENSPEC_MASTERPLAN_LABEL_RAW="${GUARDEX_OPENSPEC_MASTERPLAN_LABEL-masterplan}"
1717
OPENSPEC_TIER_RAW="${GUARDEX_OPENSPEC_TIER:-T3}"
1818
REUSE_EXISTING_RAW="${GUARDEX_BRANCH_START_REUSE_EXISTING:-true}"
1919
AUTO_TRANSFER_ENABLED_RAW="${GUARDEX_AUTO_TRANSFER:-true}"
20-
AUTO_TRANSFER_EXCLUDE_DEFAULT='.omc/**:.omx/state/**:.dev-ports.json:apps/logs/**:.agents/settings.local.json:.codex/state/**:.claude/state/**'
20+
AUTO_TRANSFER_EXCLUDE_DEFAULT='.omc/**:.omx/state/**:.dev-ports.json:apps/logs/**:.codex/settings.local.json:.claude/settings.local.json:.codex/state/**:.claude/state/**'
2121
AUTO_TRANSFER_EXCLUDE_RAW="${GUARDEX_AUTO_TRANSFER_EXCLUDE-$AUTO_TRANSFER_EXCLUDE_DEFAULT}"
2222
PRINT_NAME_ONLY=0
2323
POSITIONAL_ARGS=()

0 commit comments

Comments
 (0)