diff --git a/.github/LLM_PROTOCOL_DECISIONS.md b/.github/LLM_PROTOCOL_DECISIONS.md index b51587a..ee31676 100644 --- a/.github/LLM_PROTOCOL_DECISIONS.md +++ b/.github/LLM_PROTOCOL_DECISIONS.md @@ -133,6 +133,7 @@ The "primary" vs "inherit" distinction is defined in `protocol-audit/references/ | LLMP-DEC-67 | 2026-04-27 | Decision Log retention policy revised: **last-15-active rolling window + year-month bucket archives** (supersedes LLMP-DEC-25's "annual at ~50"); first archive operation executed (LLMP-DEC-1..52 → `LLM_PROTOCOL_DECISIONS_2026_04.md`); `docs-archive/SKILL.md` Rule A + Rule B refactor | **User-driven policy revision triggered by acute pain**: this `LLM_PROTOCOL_DECISIONS.md` file had grown past 25K tokens (multiple LLM sessions flagged the size as routine pre-load cost). The original LLMP-DEC-25 archival plan ("annual split at ~50 entries") was set when the protocol stack was nascent and entry velocity low. The April 2026 ID-format migration (LLMP-DEC-50..63 batch) generated 14 entries in 2 days; year-bucket archives would still grow into 100+-entry monsters during similar future high-velocity periods. **Two coordinated changes** based on user input *("inkább csak az utolsó 10 [→ 15] active entry-t tartsuk meg, többit archiválni; year+month bucket year helyett")*: **(A) Retention rule shift**: from "annual at ~50" to **last-N-active rolling window + year-month bucket archives**, where N = 15 (compromise between user's initial "10" suggestion and the migration-batch size of 14 entries — 15 keeps a complete recent initiative + buffer). **(B) Bucket granularity shift**: from `*_.md` to `*__.md`. Sparse files OK — only month-buckets containing archived entries get a file. Year-month scales for high-velocity periods (a heavy month produces a manageable file, a quiet month produces no file). **First archive operation**: LLMP-DEC-1..52 (2026-04-20 through 2026-04-26) moved to `LLM_PROTOCOL_DECISIONS_2026_04.md`. Active log now contains LLMP-DEC-53..67 (15 entries). **Second-pass archive note**: parallel sessions added LLMP-DEC-65 (topic-code length cap raise) and LLMP-DEC-66 (SIGDS topic creation) AFTER my drift-fix LLMP-DEC-64 but BEFORE this entry; the policy entry was originally planned as LLMP-DEC-65, became 67. The archive operation extended from 49 entries (LLMP-DEC-1..49) to 52 (LLMP-DEC-1..52) to maintain strict 15-cap at this entry's commit (without LLMP-DEC-50/51/52 archived too, active count would have been 18). **Cross-link integrity**: archive file is on-disk, on-demand readable; references from active entries to archived IDs (e.g., LLMP-DEC-58 references LLMP-DEC-43, LLMP-DEC-50) work — readers open the archive when following a link. IDs are append-only and stable across active ↔ archive boundaries. **Foundational decisions preserved**: the `## Current protocol state (quick reference)` summary at the top of the active file (introduced by LLMP-DEC-25, refreshed by LLMP-DEC-60) stays unchanged — survives all archiving. Foundational decisions (Rules #1-6, ID format spec, governance, etc.) reachable via the summary even when their dated entries are archived. **`docs-archive/SKILL.md` updates** (6 edits): frontmatter description rewritten; intro rewritten; `## Archive criterion (single rule)` restructured into `## Archive criteria (two rules)` with Rule A (Status-based for ISSUES/TODO) + Rule B (Last-15-active for DEC log) + "Why two rules" rationale; Step 4 updated to year-month bucket + sparse-files clause; pointer block example updated; Step 7 fully rewritten. **Governance section in summary** updated: LLMP-DEC-25-era "Archive annually at ~50" bullet replaced with "Last-15-active + year-month bucket" wording, cross-linking LLMP-DEC-67. **Active entry count = 15** — next archive triggers at LLMP-DEC-68 (LLMP-DEC-53 would rotate). | new file: `AyCode.Core/.github/LLM_PROTOCOL_DECISIONS_2026_04.md` (52 entries); modified: `AyCode.Core/.github/LLM_PROTOCOL_DECISIONS.md` (entries 1..52 removed via two sed passes; pointer block added + updated; governance bullet rewritten); `AyCode.Core/.github/skills/docs-archive/SKILL.md` (6 edits) | | LLMP-DEC-68 | 2026-06-07 | SIGDS phase 2 (code side): relocated `AcSignalRDataSource` + `TrackingItemHelpers` (`AyCode.Services.Server` → `AyCode.Services`) + removed orphan `SignalR.Core 1.2.0` from `AyCode.Blazor.Components` → unblocked WASM AOT for Blazor WebAssembly consumers; closes `ACCORE-SIGDS-T-D9F2` | Completes the code side of LLMP-DEC-66 (which moved only the SIGDS docs). **Symptom**: `FruitBankHybrid.Web.Client` (InteractiveWebAssembly) could not AOT-publish — Mono AOT cross-compiler crashed (`exit -1073741819`) precompiling `Microsoft.AspNetCore.SignalR.Core.dll` (`HubCallerContext.get_Features` → missing `Http.Features 2.x`). **Two root sources**: (1) `AcSignalRDataSource` lived in `AyCode.Services.Server` — a server assembly whose graph pulls `SignalR.Core` + `AyCode.Database`/`KeyDerivation`/`SendGrid` (none WASM-compatible) — forcing every WASM consumer to reference it; (2) an **orphan `Microsoft.AspNetCore.SignalR.Core 1.2.0`** (netstandard2.0 server-hub) `PackageReference` in `AyCode.Blazor.Components.csproj`, unused by code. JIT-WASM tolerated both (lazy load); AOT compiles all assemblies eagerly → crash. **Fix**: (a) `git mv` both files to `AyCode.Services/SignalRs/`, namespace `…Server.SignalRs` → `AyCode.Services.SignalRs` (zero server-only deps; dropped stray `Castle.Core.Logging` using); (b) removed the `SignalR.Core 1.2.0` package; (c) cleaned `.Server` DLL refs from Web.Client/Shared/Components csproj; (d) updated consumer usings; (e) `RunAOTCompilation=true` on Web.Client. **Verified**: AOT-input 175→165 assemblies, `SignalR.Core` gone, publish green (`[164/164]` AOT + emcc link). **Server stays JIT** (IIS in-process compatible — server Native AOT was never the goal; only the browser-WASM client AOTs, the user-observed ~2-3× deserialize speedup). **TourIAm consumer intentionally NOT updated** (per user — its build breaks until separately fixed). | moved: `AyCode.Services/SignalRs/{AcSignalRDataSource,TrackingItemHelpers}.cs` + `AyCode.Services/docs/SIGNALR_DATASOURCE/` folder; modified: `AyCode.Blazor.Components.csproj` (SignalR.Core 1.2.0 + Services.Server ref removed), `MgGridBase.cs`/`MgGridSignalRDataSource.cs` usings; `FruitBankHybrid.Web.Client.csproj` (5 `.Server` refs removed, AOT on), `FruitBankHybrid.Shared.csproj` (Services.Server ref removed) + 3 Shared usings; `TOPIC_CODES.md` SIGDS path; `SIGNALR_DATASOURCE_TODO.md` (closed). **Doc-link cross-refs (~18) pending** — mechanical path rewrite, follow-up doc-sync. **Rolling-window**: per LLMP-DEC-67 this entry rotates LLMP-DEC-53 → archive on next `docs-archive` run. | | LLMP-DEC-69 | 2026-07-08 | New repo joined the workspace: **GiaApp** (`GIAAPP`, product, Layer 2) — GPS ↔ worksheet reconciliation app on AyCode.Core + AyCode.Blazor; protocol docs scaffolded; `CONSUMERS.md` maps updated (ACCORE row added, ACBLAZOR file created) | 8th workspace repo (6th primary-rules file). **GiaApp**: Blazor Server (.NET 10) app matching field-service worksheet entries against GPS stops (~90 workers; import → stop-formation → geocoding → matching → approve/deny → justification workflow → month closure). Consumes AyCode.Core (entities/user-stack/`AcDalBase` data layer/logging) + AyCode.Blazor (MgGrid admin UI); does NOT use the SignalR binary transport or `MgGridSignalRDataSource` (server-side data binding); AcBinary/Toon + compression available where useful. **Amended 2026-07-09**: superseded same-day by the hybrid-concept update in the GiaApp analysis doc — app-level SignalR hubs DO use the base `AcBinaryHubProtocol` (`Bytes` mode, typed hub methods); only the tag-based client–server layer (`AcSignalRClientBase` / `AcWebSignalRHubBase` / `AcSignalRDataSource` / `AyCodeBinaryHubProtocol`) stays unused (analysis-doc decisions 13–14). **Prefix**: `GIAAPP` per `REPO_PREFIXES.md` "Picking a prefix" workflow (≥4 chars, no `Ac*`/`Mg*` collision, declared in `@repo` block). **Scaffolding**: `.github/copilot-instructions.md` (canonical Rules #1-6 copy from the FBANKAPP template — the pre-existing raw clone contained FruitBank domain rules + FBANKAPP prefix, fully replaced with GiaApp domain/technical rules from `docs/GPS-Munkalap-egyeztetes_elemzes-adatmodell-terv.md`); `.github/TOPIC_CODES.md` (empty per-repo registry, GIAAPP header); `docs/README.md` (navigation index); `docs/CONVENTIONS.md` (framework pointers + no-class-prefix product rule + XML Documentation section). **Consumer maps**: `AyCode.Core/CONSUMERS.md` — GIAAPP row added (7 consumers); `AyCode.Blazor/CONSUMERS.md` — NEW file (first ACBLAZOR consumer map: FBANKAPP + GIAAPP) per the LLMP-DEC-62 bounded-exception pattern. **Known follow-up**: protocol-audit scope texts say "all 5 repos" / "5 primary + 2 inherit" — with GiaApp it is 6 primary + 2 inherit; count-text refresh is a separate cross-repo pass (META-TODO candidate). | new: `GiaApp/.github/copilot-instructions.md` (rewrite), `GiaApp/.github/TOPIC_CODES.md` (rewrite), `GiaApp/docs/README.md`, `GiaApp/docs/CONVENTIONS.md`, `AyCode.Blazor/CONSUMERS.md`; modified: `AyCode.Core/CONSUMERS.md` (GIAAPP row + count), `GiaApp/docs/GPS-Munkalap-egyeztetes_elemzes-adatmodell-terv.md` (§3.1 "NEM használjuk" row narrowed to SignalR-only per user decision) | +| LLMP-DEC-70 | 2026-07-13 | Onboarded the **OpenAI Codex app** as a third coding agent: added `AGENTS.md` bootstrap files to all 6 primary repos (mirrors `CLAUDE.md`; Codex tool-mapping = shell + `apply_patch`) | A colleague started using the **Codex app** (OpenAI desktop app). It auto-loads `AGENTS.md` at the repo root (cascading by directory depth; the global `~/.codex/AGENTS.md` is not reliably injected into project chat context per a known open issue — so the **repo-root `AGENTS.md`** is the dependable vehicle, which also matches our per-repo `CLAUDE.md` pattern). **`AGENTS.md` is the Codex equivalent of `CLAUDE.md`** — a per-agent "bootstrap door" into the canonical shared protocol. **The single source of truth stays `.github/copilot-instructions.md`** — unchanged; the new files only tell Codex to read it first and how to map the protocol's Copilot tool-name verbs. **Content mirrors `CLAUDE.md` verbatim** (which is byte-identical across all 6 primary repos) **except two spots**: (a) the `## Tool mapping` section — Codex has no named `Read`/`Grep`/`Edit` tools, it works through its **shell** (`cat` / `sed -n` / `rg`) + **`apply_patch`**, so `get_file`/`file_search` → shell read/list, `code_search`/`find_symbol` → `rg`, `edit_file`/`create_file` → `apply_patch`; (b) the closing line reads "apply equally to Codex". **The behavioral rules are agent-neutral and carry over unchanged**: the mandatory `[LOADED_DOCS: ...]` first-line prefix on EVERY response (Rule #1 — the linchpin, and the riskiest discipline to get a third agent to honor consistently, as it was for Copilot), hard-gate (docs before code), no-re-read, context recovery, explicit consent. **Scope**: the 6 repos that carry `CLAUDE.md` (ACCORE, ACBLAZOR, MGNOPLIB, FBANKNOP, FBANKAPP, GIAAPP) each got an `AGENTS.md`; the 2 inherit repos (Mango.Nop.Core, Nop.Plugin.Misc.AIPlugin) have neither `CLAUDE.md` nor `AGENTS.md` — existing asymmetry preserved (they bootstrap via the inherit-style `copilot-instructions.md` pointer to ACCORE). **NOT touched (deliberate)**: the 5 skills' `compatibility:` frontmatter (still say "Claude Code and GitHub Copilot") and `protocol-audit`'s tool-mapping reference to "the active repo's `CLAUDE.md`" — these are descriptive-only metadata with zero behavioral impact; left unedited to respect the skill-stability boundary the user set earlier ("a skill-ekhez ne nyúlj, ezek most működnek"). **Known follow-up (META-TODO candidate)**: extend the 5 skill `compatibility:` lines + the `protocol-audit` tool-mapping reference + any future CLAUDE.md-presence audit invariant to also name/verify `AGENTS.md`; cosmetic, batchable. | new files: `AGENTS.md` × 6 (`AyCode.Core`, `AyCode.Blazor`, `Mango.Nop Libraries`, `FruitBank`, `FruitBankHybridApp`, `GiaApp`); `AyCode.Core/.github/LLM_PROTOCOL_DECISIONS.md` (this entry) | ## Known follow-ups diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..0b0c543 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,17 @@ +CRITICAL: Your FIRST action in every session MUST be reading `.github/copilot-instructions.md`. Execute ALL session-start instructions found there before responding to any user query. It is the single source of truth for this repo. + +## SEQUENTIAL EXECUTION OVERRIDE +The AI AGENT CORE PROTOCOL in copilot-instructions.md requires STRICT SEQUENTIAL execution. This OVERRIDES any default parallelization behavior. Do NOT parallelize doc reads with code searches. The sequence is: +1. Read copilot-instructions.md → process its rules FULLY +2. Read ALL docs/ .md files listed in the protocol → wait for completion +3. Output [LOADED_DOCS: ...] prefix +4. ONLY THEN respond to the user's query or search code + +## Tool mapping for AI AGENT CORE PROTOCOL +The copilot-instructions.md references Copilot tool names. Codex works through its shell + `apply_patch`, not named tools. Map them to Codex actions: +- `get_file` / `file_search` → shell: `cat`, `sed -n`, `rg --files` +- `code_search` / `get_symbols_by_name` / `find_symbol` → shell: `rg` +- `replace_string_in_file` / `edit_file` → `apply_patch` (update) +- `create_file` → `apply_patch` (add file) + +Follow the protocol using YOUR tools. The rules (LOADED_DOCS prefix, hard-gate, no-re-read, context recovery, explicit consent) apply equally to Codex.