From 8379c906c4221352161b01ffa4dcf6aeab1d0dda Mon Sep 17 00:00:00 2001 From: ToxicCrzay270 <185776014+ToxicCrzay270@users.noreply.github.com> Date: Fri, 15 May 2026 01:00:31 +0200 Subject: [PATCH] Apply updated Codex repository kit guidance --- .codex/project.md | 76 +++++++++++++++++++ .gitea/workflows/template-compliance.yml | 2 + .gitignore | 36 +++++++++ AGENTS.md | 48 ++++++++++++ .../.codex/project.md | 4 +- opera-cache-cleaner-extension/AGENTS.md | 5 +- .../docs/agent-handoff.md | 6 +- 7 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 .codex/project.md create mode 100644 .gitignore create mode 100644 AGENTS.md diff --git a/.codex/project.md b/.codex/project.md new file mode 100644 index 0000000..bd57f92 --- /dev/null +++ b/.codex/project.md @@ -0,0 +1,76 @@ +# Codex Project Notes + +## Project + +`Opera-Extensions` currently contains the `Opera Cache Cleaner` extension in `opera-cache-cleaner-extension/`. + +Repository: + +```text +Toxic/Opera-Extensions +``` + +Gitea URL: + +```text +https://git.wilkensxl.de/Toxic/Opera-Extensions.git +``` + +Repository owner and name are derived from this target remote, not from the Codex repository kit remote. + +## Commands + +Use these commands as the source of truth from the repository root: + +```text +Syntax check background: node --check opera-cache-cleaner-extension/background.js +Syntax check popup: node --check opera-cache-cleaner-extension/popup/popup.js +Build package: cd opera-cache-cleaner-extension && mkdir -p dist && zip -r dist/opera-cache-cleaner-extension.zip manifest.json background.js popup icons -x "*.DS_Store" +``` + +No install, lint, test, README generation, or dependency audit command exists. The extension has no package manifest and no vendored dependencies. + +## Stack + +```text +Manifest V3 Chromium extension using plain HTML, CSS, and JavaScript. +``` + +Package manager or build tool: + +```text +None. +``` + +## Build Artifacts + +Release artifacts are produced in: + +```text +opera-cache-cleaner-extension/dist/ +``` + +Expected file: + +```text +opera-cache-cleaner-extension.zip +``` + +## Security Rules + +- Keep the extension limited to `browsingData`, `storage`, and `alarms` permissions unless a feature explicitly requires more. +- The extension must clear only cache data through `chrome.browsingData.remove(..., { cache: true })`. +- Do not request cookie, history, downloads, tabs, or host permissions without a documented user request. +- Do not add external network calls. +- Do not commit secrets, tokens, `.env` files, certificates, or private keys. + +## Release Rules + +Before a release: + +1. run the syntax checks, +2. review `opera-cache-cleaner-extension/docs/security-review.md`, +3. update `opera-cache-cleaner-extension/CHANGELOG.md`, +4. build `opera-cache-cleaner-extension/dist/opera-cache-cleaner-extension.zip`, +5. load the unpacked extension in Opera for a manual smoke test, +6. create a tag and release only when the user explicitly asks for it. diff --git a/.gitea/workflows/template-compliance.yml b/.gitea/workflows/template-compliance.yml index 0374bf8..2511372 100644 --- a/.gitea/workflows/template-compliance.yml +++ b/.gitea/workflows/template-compliance.yml @@ -18,6 +18,8 @@ jobs: - name: Verify Codex baseline files shell: bash run: | + test -f AGENTS.md + test -f .codex/project.md test -f opera-cache-cleaner-extension/AGENTS.md test -f opera-cache-cleaner-extension/.codex/project.md test -f opera-cache-cleaner-extension/SECURITY.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7f0fa3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +# Local helper checkouts +codex-agent-repository-kit/ + +# Build outputs +dist/ +build/ +out/ +release/ +opera-cache-cleaner-extension/dist/ + +# Logs and temporary files +*.log +*.tmp +*.temp +.cache/ + +# Local environment and secrets +.env +.env.* +!.env.example +*.pem +*.key +*.pfx +*.p12 +*.crt +*.cer +*.token +secrets/ + +# OS and editor files +.DS_Store +Thumbs.db +.idea/ +.vscode/ +*.swp +*.swo diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..f5be928 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,48 @@ +# Agent Instructions + +## Project + +This repository contains Opera extension projects. The active project is `opera-cache-cleaner-extension`, a Manifest V3 Chromium extension for clearing only the browser cache from an Opera toolbar popup. + +## Repository Rules + +- Derive the repository owner and repository name from the target repository remote or CI repository context. Never reuse the owner from the repository kit remote. +- Keep application changes scoped to `opera-cache-cleaner-extension/` unless repository-level workflows or agent documentation need updates. +- Preserve the plain Manifest V3 extension structure. Do not add a framework unless the user explicitly asks for it. +- Keep permissions minimal. The extension currently uses only `browsingData`, `storage`, and `alarms`. +- Do not add host permissions, network calls, cookie/history access, or broad browser permissions without documenting the reason. +- Do not create a release unless the user explicitly asks for one. +- Keep `.codex/project.md` and `opera-cache-cleaner-extension/.codex/project.md` aligned when commands, artifact paths, or release rules change. + +## Commands + +Use these commands from the repository root: + +```bash +node --check opera-cache-cleaner-extension/background.js +node --check opera-cache-cleaner-extension/popup/popup.js +``` + +To build a package from the repository root: + +```bash +cd opera-cache-cleaner-extension +mkdir -p dist && zip -r dist/opera-cache-cleaner-extension.zip manifest.json background.js popup icons -x "*.DS_Store" +``` + +There is no package manager, dependency install, lint, or dependency audit command for the current project. + +## Artifacts + +Expected release artifact: + +```text +opera-cache-cleaner-extension/dist/opera-cache-cleaner-extension.zip +``` + +## Finish Checklist + +- `git diff --check` passes. +- `node --check opera-cache-cleaner-extension/background.js` passes. +- `node --check opera-cache-cleaner-extension/popup/popup.js` passes. +- Gitea workflows are polled after pushed workflow-triggering commits. diff --git a/opera-cache-cleaner-extension/.codex/project.md b/opera-cache-cleaner-extension/.codex/project.md index 4027059..435018b 100644 --- a/opera-cache-cleaner-extension/.codex/project.md +++ b/opera-cache-cleaner-extension/.codex/project.md @@ -16,9 +16,11 @@ Gitea URL: https://git.wilkensxl.de/Toxic/Opera-Extensions.git ``` +Repository owner and name are derived from this target remote, not from the Codex repository kit remote. + ## Commands -Use these commands as the source of truth from the repository root: +Use these commands as the source of truth from this extension directory: ```text Syntax check background: node --check background.js diff --git a/opera-cache-cleaner-extension/AGENTS.md b/opera-cache-cleaner-extension/AGENTS.md index 888321c..42f5f2a 100644 --- a/opera-cache-cleaner-extension/AGENTS.md +++ b/opera-cache-cleaner-extension/AGENTS.md @@ -6,6 +6,7 @@ Opera Cache Cleaner is an Opera-compatible Chromium extension that clears only t ## Repository Rules +- Derive the repository owner and repository name from the target repository remote or CI repository context. Never reuse the owner from the repository kit remote. - Preserve the plain Manifest V3 extension structure. Do not add a framework unless the user explicitly asks for it. - Keep runtime code in `background.js` and `popup/`. - Keep permissions minimal. The extension currently uses only `browsingData`, `storage`, and `alarms`. @@ -15,7 +16,7 @@ Opera Cache Cleaner is an Opera-compatible Chromium extension that clears only t ## Commands -Use these commands from the repository root: +Use these commands from this extension directory: ```bash node --check background.js @@ -27,7 +28,7 @@ There is no package manager, dependency install, lint, or dependency audit comma ## Artifacts -Expected release artifact: +Expected release artifact from this extension directory: ```text dist/opera-cache-cleaner-extension.zip diff --git a/opera-cache-cleaner-extension/docs/agent-handoff.md b/opera-cache-cleaner-extension/docs/agent-handoff.md index ede6ee4..8d199eb 100644 --- a/opera-cache-cleaner-extension/docs/agent-handoff.md +++ b/opera-cache-cleaner-extension/docs/agent-handoff.md @@ -2,16 +2,16 @@ ## Current State -The Codex repository baseline has been applied to the local Opera Cache Cleaner extension. +The Codex repository baseline has been applied to the local Opera Cache Cleaner extension and repository root. ## Notes For Next Agent - The project is not currently a Git repository in this workspace. - Expected Gitea repository: `https://git.wilkensxl.de/Toxic/Opera-Extensions.git`. +- Repository owner/name must be derived from the project remote, not from the repository kit remote. - The project has no package manager and no external dependencies. - Use syntax checks and manual Opera extension testing as the main verification path. ## Open Items -- Initialize or connect a Git repository if the project should be pushed to Gitea. -- Confirm whether this extension should live at the repository root or inside `opera-cache-cleaner-extension/` before enabling package publishing or Gitea API polling. +- Confirm whether this extension should continue living inside `opera-cache-cleaner-extension/` before enabling package publishing.