pi-aftc-toolset - Change Log ============================ Updates v1.20.x --------------- - Codex: the "AI is not prepped yet" banner now warns that on-demand codex loads can burn low-tier subscription quotas fast, advises keeping 1M-context models under 35% (the dumb zone starts above 45%), and adds a Kimi K3 Vivace recommendation. - Release process: npm publishing is no longer automated and is never part of the release steps - the maintainer publishes to npm manually. The npm token and the publish.bat helper script were removed from the repository (2026-08); the shipping checklist in AGENTS.md now stops at the GitHub release. - Theme: the bundled aftc-orange-viz theme has been updated. - Startup intro: the AFTC wordmark + feedback line now plays on a real pi startup AND on /new - /reload, resume and fork no longer replay it (they used to stack the animation on every reload). - Notifications: the context-window 25/50/75% sounds no longer re-fire after a /reload or session resume while usage stays above the threshold - every session start pre-marks thresholds usage is already at or above, so only a genuine drop below (eg after compaction) re-arms them. - Codex: new "Cloud Codex Resource Contribution" toggle in the /codex menu (default on). Each time the AI adds a codex entry, it is silently contributed to the public curation inbox in the background - no errors, warnings or logs ever surface, and the endpoint address is never shown in the chat, so nothing prompts users to abuse it. Turn the toggle off to stop the contributions. Also added the test suite codex-cloud-contribution-check. - Codex upgrade path for existing users is now lossless and proven against the actual published package: updating from a release that shipped the old codex layout (design/, tools/apache|docker|mysql|nginx|vsftpd) merges your learned entries into their new v1 homes, and any codex topics YOU created in the old design/ folder are relocated into the new ui-ux/ folder as your own topics - nothing is left behind, split or duplicated. The upgrade is covered by the new codex-upgrade-check suite (built from the real published seed) and the Docker end-to-end test now fails if the old and new layouts ever co-exist. - README: fixed the stars/forks badges (they pointed at the wrong repo) and reworded the feedback line. - README: added a feature description section up top (Codex, DocX, Sub Agents, SSH, Usage Report, Footer Widget, run_script) and fixed a handful of typos throughout. - Codex sync conflicts are now resolved instead of left for you: /codex-live-to-seed (maintainer release sync) auto-resolves same-ID differences - your live wording wins and replaces the seed entry - and then asks the AI to review the merged entries and correct anything wrong. The user-facing /codex-sync gained a sync manifest: shipped entries you have never edited now follow improved shipped wording automatically, while entries you (or the AI) have edited are still protected and never overwritten. - Sub-agents: the built-in roster now uses plain job names and ships 9 agents - Worker, Planner, Researcher, Reviewer and Explorer (was Scout) plus new Advisor (was Oracle), Documenter (writes/updates docs), Designer (concrete design proposals) and Tester (writes and runs tests). Setups match the job: the Researcher can now search and scrape the web, and aftc-codex knowledge-base access is granted only where it helps (Worker, Planner, Reviewer, Documenter, Designer, Tester) instead of to every agent. If you already had the old agents, /007-sync adds the new ones without touching your copies. Shipped subagents seed version bumped to 6. - Startup intro: once the wordmark line finishes and lingers, the extension prints "PI-AFTC-Toolset > Like the extension? Got some feedback?" with the feedback page link (https://dev.aftc.uk/pi-aftc-toolset/feedback) underneath into the console transcript - informational output that scrolls away as you work (not pinned to the bottom, never part of the model context), and a clickable hyperlink in terminals that support links (Windows Terminal, iTerm2, etc.). The wordmark itself now types the "All For The Code - " prefix in orange and the random message after it in white. - Sub-agents: /007-edit is now a menu sequence - with no name it shows an agent picker; the selected agent then opens an options menu with its On/Off feature toggles (Codex access, Codex write, Stall detection, Loop detection, Output transcript, Persist session, Agent enabled - each written into the agent's frontmatter), plus "Edit the raw file" and "Reset to default". Built-ins are synced to an editable live copy first (codex-style, the seed is never written); `/007-edit ` still jumps straight to the options menu, and headless prints the file path as before. The picker also lists disabled agents (marked as such) so they can be re-enabled from inside pi - discovery gained an `includeDisabled` option for it. - New command /docx-update: instead of regenerating everything like /docx, it reconciles the EXISTING ./docx/ documentation set with the source of truth - docs are minted for new source files, retired (IDs reserved) for removed ones, drifted docs corrected in place, maps/indexes kept in sync - and then fact-checks the root README.md WITHOUT rewriting it: your layout, formatting and style are preserved while incorrect facts are fixed, changed features updated and missing features added. Requires an existing ./docx/ (run /docx first otherwise); same context-window gates, confirmations and project-type packs as /docx. Backup naming reworked for both commands: backups now accumulate in docx/backups/ as timestamped zips - "Original Documentation Backup YYMMDD HHMM.zip" (/docx) and "Documentation Backup YYMMDD HHMM.zip" (/docx-update) - replacing the single docx/old_docs.zip. - Usage report Overview improvements: (1) the period summary scoreboards now show three task-time rows - Avg Task Time plus Longest Avg Task Time and Shortest Avg Task Time, each naming the model, thinking level and formatted average time (completed tasks only, per model × thinking level). (2) The cost-share-by-model doughnut gained an on-theme window selector: Last 24 Hours (rolling), 1 Day, 3 Days, 5 Days, 1 Week, 1 Month, 3 Months, 6 Months, 1 Year and All Time (default selection: 3 Days) - calendar windows anchor to local midnight / 1st of month / Jan 1 like the footer timeframes, and the chart updates in place. (3) Fixed money formatting: the client-side thousands-separator regex was corrupted by template-literal embedding, so values >= $1,000 (total cost pane, period summary panes) never got commas - $1,000 and $1,000,000 now format correctly, guarded by a regression test. - Usage report rebuilt as a real web app: the old single-file report.html (HTML + CSS + ~600 lines of JS inside one TS template literal - uneditable, and the source of an escape-mangling money bug) is replaced by a shipped seed website at `data/usage-report/` (index.html, styles.css, one ES-module class per tab, bundled Chart.js - no CDN). `/usage-report` seeds it to `/usage-report/` (version-stamped), generates a fresh `data.json`, and starts the bundled zero-dependency server in its own terminal window - the server opens your browser, prints its info, and shuts down when you close the window or after 30 minutes idle. All tabs, charts and figures are unchanged, and everything now works fully offline. Title is now "PI AFTC Toolset - Usage Report". - Sub-agents footer line upgrade: the line is now always visible while the feature is enabled (no more auto-hide when idle) and is styled exactly like the rest of the footer bar (same theme colours as the Prompts:/Turn Time lines). New layout: `Sub Agents running: 2/4 | Session cost: $0.14 | Agent avg task time: 1m 30s | Agents running: worker 42%, scout 18%` - runs active vs max concurrent, this session's total sub-agent cost, the average time completed tasks took, and which agents are running right now (each with its context-window %). The user guide (seed README, re-seeded to live) and all docs updated; shipped subagents seed version bumped to 3 (/007-sync picks up the new guide). - Sub-agents: plain wording throughout - the spy theme is gone. "Operatives" are now just sub-agents/agents and "missions" are runs across every menu, console message, the `subagent` tool description (its `operative` parameter is renamed `agent`) and the child prompt; the shipped agent files get plain display names (Worker, Researcher, Oracle, Planner, Scout, Reviewer). Menus are simpler ("Sub-Agents ..." titles, plain Yes/No confirms), and the enable confirm now only appears when the local agents folder does not exist yet ("Unable to detect local sub agents data directory. Shall I create and seed?") - an existing folder enables silently. The /007 command names are unchanged. Shipped subagents seed version bumped to 2 (/007-sync picks up the reworded built-ins). - NEW FEATURE: 007 sub-agents - delegate focused work to isolated child agents. The parent model calls the new `subagent` tool to hand a task to a sub-agent (scout, planner, reviewer, worker, oracle, researcher ship built-in); each sub-agent runs as its own child pi process with a fresh context window, its own model/thinking level and a profile-locked toolset, and hands back a bounded report (nested usage rides on the tool result, counted exactly once). Foreground only in this first release - parallel work = sibling calls. Everything is observable and killable: /007 menu, /007-status live table, /007-kill multi-select, stall + loop watchdogs steer-then-abort stuck runs, and no child process tree can survive abort, timeout, reload or shutdown. Agents are markdown files with YAML frontmatter in your live agents folder (/007-open-agent-dir, /007-guide walkthrough, /007-edit //007-reset, /007-install seeds, /007-sync merges improved shipped built-ins without ever overwriting your edits, /007-doctor checks your setup, /007-settings for presets/concurrency/budgets/watchdogs). Safety model: the feature ships DISABLED (/007 option 1 enables and seeds), capabilities live in the profile and can never be escalated from a tool call, children are hermetic (the only exposable capability is read-only access to the aftc-codex knowledge base, on by default and triple-gated), models are resolved BEFORE spawn, and the only spending guard is the existing subscription allowance gate (confirm near your limit). No usage-database writes - sub-agent spend is in-memory for the session and shown in the footer line (toggle in /007-settings). Own config file (`subagents-config.json`), own seed version, 11 token-free test suites driven by a scripted fake RPC child. Updates v1.19.x --------------- - aftc-codex: topics removed or renamed in the shipped seed now actually disappear from your live codex. The seed->live sync was strictly additive, so an obsolete topic file lingered in your copy forever (and kept appearing in the resource list). The seed now ships a cumulative `codex-resource-removal-list.json` that `/codex-sync` and startup auto-sync apply before the merge: every listed resource is deleted from the live copy (empty category folders pruned with it). Deletion is unconditional and idempotent, strictly confined to the live `resources/` dir (path traversal, absolute paths and non-`.md` entries are rejected), and removals are shown in the `/codex-sync` output. `/codex-live-to-seed` and `/codex-install` are unaffected. Shipped codex version bumped to 9 (aftc-framework topic split into php-aftc-framework + bun-aftc-framework). - /docx (BETA 4): the generation prompt is now tailored by project type - after the confirmations a picker modal (auto-detect pre-selected) asks for the closest stack and ONE focused type pack is appended to a slim core prompt; headless uses `--type ` or auto-detect. 10 packs: web-app (PHP/Apache/MySQL/Docker, MVC backends, Angular/React/Next/Vue + custom TS/JS frontends), basic-website, webgpu-webgl (Three.js/Babylon), desktop-app (Electron/.NET/Java/Qt), juce-vst, mobile-app, python-app, cli-tool, shell-scripts, generic. The old all-in-one prompt is gone for good. The generated layout changed: `docx/` IS the documentation folder (no more `docs/` subfolder) - the docs tree now mirrors the structure map as `_/` folders, so a doc's path IS its map ancestry. Every reachable surface gets its own doc - including modals and popups (login, register, checkout, settings) - with a build-ready per-page contract (fields/controls from source, data stored/read, states, flows); complex screens split into per-region leaves by a per-screen complexity rule. Source-over-docs is now the lead discipline: old docs are recon hints only, and a claim confirmable nowhere in source is dropped or reported as drift. map-scan now also emits UI surface hints (template/surface-named files for the model to verify), and link-audit verifies the mirrored tree itself (ID-prefixed folders, ancestry chains, a folder per node-with-children, cross-cutting docs at the docx root). The hard context gate dropped from 50% to 25% - `/new` first above that, even with `--yes`. - Clean console by default: the `[aftc-toolset]` startup/diagnostic chatter (every module's "loaded -" line, prefix-churn and compaction notes, etc.) no longer prints - new `debugLoggingEnabled` preference (default off) with `/aftc-debug-log-on` and `/aftc-debug-log-off` to turn it on when investigating; toggling applies instantly, no reload. Every diagnostic line is also captured to a rotating debug log at `/debug.log` (5MB cap, one `debug.log.old` generation) whether the flag is on or not, and error diagnostics now ALWAYS print and always land in the file - a flag can never silence a real failure. The duplicate help-registry log spam on /reload is gone too (identical re-registrations are the normal reload path and stay silent; only genuine name fights log). - Removed the /cd command (and /cd-set-max-depth): the directory-switch picker is retired. If you used /cd, start pi in the target directory instead (or open a second pi window). All docs, readmes and in-code pattern references were updated in the same change. - config.json management is now fully data-driven (config.ts stays the single door everything imports - no new class). Adding a preference is now just the interface + DEFAULT_PREFERENCES: the load-merge automatically backfills any missing or wrong-typed key on the next read and re-saves (no more per-key migration boilerplate). Retiring a preference is one line in the new RETIRED_KEYS registry - the strip re-saves on its own, and the registry is never pruned, so users who skip many releases still get cleaned up whenever they do update. Your existing values are untouched either way. - /codex menu simplified: the body now shows "AFTC Codex: resources available" and "Session state: Prepped / Not prepped (Run /codex-init to prep the AI) / Rules-only", and the toggles read Codex Enabled, Inject Thought Guidance, Auto-Detect & Load Docs and Auto Sync Codex Update on Startup (all Yes/No). Two options were removed: "Task Addition Approval" is gone for good - codex entries are always written directly now (the write tools already enforce format, uniqueness and the generality/secrets guards), and its old config.json key is stripped automatically on upgrade; "Help & Commands" was removed - the README is the help surface (the popup never had enough room). - aftc-codex: fixed the phantom "Your AFTC codex is outdated" warning that kept re-appearing on every /reload (and looked stuck even after a successful sync - /codex-sync correctly reported "already up to date" while the warning replayed). The warning banner is a durable transcript entry that pi re-renders on /reload//resume, and it was painting its append-time snapshot; it now re-checks the real version state every time it renders, so a fixed codex flips the banner to "up to date" and an already-prepped session no longer gets a stale "run /codex-init" nag. Auto-sync also now runs on the first session start of any kind (once per extension load), not just a fresh pi launch - a /reload after an update or a resumed session in a new process self-heals too. - /ssh-connect improvements: names with spaces can be quoted (/ssh-connect "my box"), matching falls back to case-insensitive, and an unknown name now warns and lists your saved connections (it used to silently do nothing). No name still opens the picker. - /docx: the context-window guidance now matches reality. Measured runs used only 5-8% of a 1M-token window (even large projects stayed under 20%), so the scary high-usage warning is gone: at 20%+ used you get a calm advisory (long wait ahead; /new first is highly advised - no compaction risk, no prior conversation steering the docs), and above 50% /docx flat-out refuses to run, even with --yes. The confirm modal and the start message now set the time expectation: the bigger and more complex the project, the longer the wait. - aftc-codex: Auto Sync on Startup (new /codex toggle, ON by default) - when an update ships new codex content, your live copy merges it in automatically on pi start; the out-of-date pause is now only a fallback. One shared sync engine (codex-sync.ts) backs both the auto-sync and /codex-sync. Message overhaul across the whole feature: the out-of-date screen is a clean laid-out choice between /codex-sync and /codex-install, /codex-status gained a Codex version row (not installed / up to date / update available + the fix command), the /codex menu shows the session state (prepped / not prepped / rules-only) with the next command to run, /codex-disable reports when already disabled, and /codex-live-to-seed stamps YOUR live version after a bump (no more false out-of-date on the maintainer machine) and explains itself when there is nothing to port. - /codex-live-to-seed now bumps the shipped codexVersion itself when an apply actually wrote seed files (new topics or merged entries) - no more forgetting the bump and users silently never receiving synced content (a no-op sync leaves the version alone). The TUI flow also exits straight after the confirm instead of showing the applied output again. Shipped codex version is now 6 (new npm topic + npm/docker/batch lessons from a learn session). - Releases now publish to npm via a maintainer script (`publish.bat`): after the GitHub release, one command pushes the package to npmjs.com with a local granular token (fed through a temp .npmrc it deletes after - the token never touches the repo or your npm config). No CI pipeline, no Docker. - aftc-codex: new /aftc-codex-sync (alias /codex-sync) - the non-destructive answer to an out-of-date codex. Previously, when an update shipped new codex content your only fix was /codex-install, which wipes your whole live codex including learned entries. /codex-sync merges the new shipped topics and entries into your live copy instead: new topic docs are copied, new entries are appended to their sections, the fixed top-level docs are updated, and your learned entries are never touched (on a conflicting edit your version wins and is reported). The out-of-date guard message, the session prep notice and codex_load all now point at /codex-sync first, with /codex-install as the fresh-copy alternative. The success message adapts to your state (disabled -> /codex-enable, prepped -> /codex-refresh, otherwise /codex-init). The codex also drops its old stage tag: the session prep-notice banner is now just "AFTC CODEX", and the README no longer labels the feature. - /docx: UI surfaces are now first-class in the generated documentation on every platform. The old guide only mapped route trees for SPAs/server-rendered sites, so desktop, mobile, plugin and CLI UIs could end up undocumented. Now every reachable page/screen/window/view (web, mobile, Electron/.NET/Java desktop, VST/plugin editors, CLI/TUI screens) is mapped as its own branch nodes; every UI branch (public frontend, admin frontend, app window set, CLI screen set) gets a mandatory sitemap doc with a high-level surface tree plus low-level per-surface entries detailed enough to build each screen from; design rules get a global design.md and/or per-area _design.md docs (eg public website vs admin/CMS); and a single complex screen can be broken into per-region leaf docs - or deliberately kept as one document when the regions are too intertwined. Maintenance rule added: a change that adds a screen/component with its own rules mints a leaf doc + sitemap entry in the same commit. The link audit understands the new sitemap/design partner docs. Shipped codex version bumped to 5 (the documentation-generation + pi-extension lessons from this work ride along). - New maintainer command: /codex-live-to-seed [--apply] - runs the live-to-seed codex sync from inside pi (dry run shown first, confirm, then apply; conflicts reported, never auto-overwritten). Dev-gated by the .dev marker folder so it only runs in the dev checkout. /qd's third option ("Open pi-aftc-toolset dir") was removed - it opened the wrong directory in installed copies. Shipped codex version bumped to 4 (new documentation-generation entries ride along). - /docx: much better root README generation. The old README is now classified first - an extensive one (many sections, tables, images) becomes the structural skeleton of the new README (sections followed closely, images kept after verifying the files exist, every fact re-verified), and a thin or absent one is built from a project-type archetype: tool/extension/library packages get what-it-contains, per-feature usage, install + requirements, command/shortcut tables and images (no tech-stack table needed), while runtime/multi-container apps get requirements, exact tech-stack versions, install, per-script usage (.bat/.sh/.ps1) and a service overview. - /docx: the generated documentation is now strictly load-on-demand. The AGENTS.md block no longer tells the model to read anything up front - it points at the master's Documentation Index and the map's annotations as the only two discovery entry points, with an explicit "load only the doc for the area you are working on" rule (the one doc-maintenance rule rides the block so docs don't rot). Map annotations now use full file names as link text, and the link audit mechanically verifies every generated doc is listed in the master's index. - Bumped the shipped codex version to 3: on your next session pi will notice your knowledge base is behind and tell you to run /codex-install, which installs everything the seed gained since v1.16.3 (the new documentation-generation topic, 13 new entries, and the generality/secrets guard docs). This replaces learned entries in your live codex by design - run /codex-install, then /codex-init to get back to a prepped session. - New feature: /docx - project documentation generator. Regenerates your project's full documentation set: a fresh GitHub README.md at the project root (written last, once the model understands the whole project - the old README is evaluated, never copied), plus ./docx/ (master documentation, structure map, ID-prefixed deep docs, sub-maps and cross-cutting docs) following the shipped documentation guide. Before anything is generated, all existing documentation (root .md files and ./docs/) is moved to ./docx/old_docs/ with its folder structure preserved, and zipped to ./docx/old_docs.zip when generation completes - restore by unzipping and copying back. AGENTS.md is never replaced: it gets a managed AFTC-DOCX pointer block and its existing rules are preserved verbatim. Safeguards: a context-window warning when your window is already 10%+ used, a confirmation modal (advises making your own backup first), verified move counts, and framework/sub-project documentation is structurally untouchable (the backup only ever reads the project root and ./docs/). Sub-projects get full docs generated at the root while their folders stay read-only. Run /docx --yes to skip the confirmations. - aftc-codex: the entry tools now enforce a generality + secrets guard. codex_add_entry and codex_edit_entry reject entries that look project-specific (real absolute machine paths, real URLs, the current project's directory name) or that contain anything credential-like (concrete KEY=value assignments, JWTs, bearer tokens, private-key blocks) - placeholder shorthand like /path/to/x and example.com still passes. The /codex-learn prompt and the aftc-codex skill now carry an explicit pre-write check with BAD/GOOD examples: entries must make sense on ANY project, and passwords/secrets/sensitive values are never saved, not even as examples. Updates v1.18.x --------------- - aftc-codex: the rules-only session mode is now invoked with a single command, /codex-inject-rules. The old /aftc-codex-rules-only and /codex-rules-only names were removed; behaviour is unchanged (injects ONLY the Critical Global Rules for this session, works with codex disabled, cleared by a fresh session). - Updated the footer widget screenshot in the README to match the reworked bar. - README brought in line with the current release: footer line-4 documentation rewritten for the new averages format and the /aftc-footer menu, the removed /aftc-set-costs-timeframe row dropped from the command tables, codex stage labels made consistent (BETA everywhere), the shipped codex topic count corrected to 59, and a handful of typos fixed. - aftc-codex seed updated with what your live codex learned: 5 new entries ported into the aftc-framework, css, html and puppeteer resources (they reach users via a fresh install / Start Fresh). - aftc-codex: the /codex-learn instruction prompt has been rewritten to be shorter and plainer for weaker models. It now spells out that loading an existing topic IS the duplicate check (amend or skip a lesson that exists in any wording - never add a near-duplicate), that new topics need no prior load, and that a refused write means load-and-retry, never drop the lesson. Implementation details the entry tools enforce themselves (IDs, formatting, section placement, live-vs-seed target, date stamps) were removed from the prompt. - Footer dashboard: /aftc-footer now opens a settings menu instead of toggling directly - Enable footer (ON/OFF), Show recorded averages (ON/OFF, hides or shows the line-4 averages), and Set averages timeframe (current choice shown in the menu; Enter opens a picker). The old /aftc-set-costs-timeframe and /aftc-footer-report-timeframe commands were removed. The timeframe picker offers 19 windows: ten rolling "Last ..." windows (1, 2, 3, 4, 5, 6, 12, 24, 48 and 72 hours - always measured back from your current time) and nine calendar-anchored windows (1 Day = since midnight, 2/3/5/7 Days = calendar days including today, Month / 3 Months / 6 Months = since the 1st of the month, 1 Year = since January 1st). Old timeframe choices are migrated automatically (Today -> 1 Day, Last 28 Days -> Month). - Footer dashboard: the 4th line (long-term averages) has been reworked. It is now prefixed with the chosen time window (eg "3 Hour Averages:", "Today Averages:", "7 Day Averages:") and shows: total cost (proper money formatting - $0.00 / 4 decimals under $1 / 2 decimals / thousands separators at $1,000+), the window's prompt SUMS (User and AI, where AI counts tool-call continuation turns), average cache hit %, and the new Avg Task Time - the average wall-clock of completed tasks in the window (failed/aborted tasks excluded, matching the usage report). The old average think/response time segments were removed from this line (they remain on line 3 for the current session). - aftc-codex seed updated with what your live codex learned: new resource topics for xterm.js and uv, plus 20 new entries across the design-common, css, javascript, pytorch, nodejs, electron and git resources (they reach users via a fresh install / Start Fresh). Also removed two old miscategorised entries from codex-rules.md (visual-acceptance process guidance belongs in thought-and-action-guidance.md, where it already lives). - Audio notifications: new context-window usage alerts. Three new sound categories warn you as the context window fills up: usage crossing 25%, 50% or 75% (checked after every assistant message via pi's own context estimate, so mid-task crossings are caught when they happen). Each threshold has its own picker in /aftc-notifications (NONE by default; the shipped warning MP3s now live in context-window/25, /50 and /75 subfolders so each picker lists only its own set), fires once on the upward crossing, and re-arms when usage drops back below the threshold (e.g. after compaction) so it can warn you again. One message jumping several thresholds plays only the highest one. Updates v1.17.x --------------- - aftc-codex: new codex entry tools - codex_add_entry, codex_edit_entry and codex_remove_entry make every knowledge-base write deterministic. Entry [ID]s are now generated by the tool (no more model-invented or missing IDs), the three entry-kind formats are validated on every write, entries land under the correct section automatically, new topic files (three-section skeleton) and new category folders are created on demand, and the resource list regenerates internally when a topic is created - the model no longer hand-edits resource files or runs the sync script via bash. Safety guards: a topic must be codex_load-ed in the session before the tools will modify it (stale-content guard), exact duplicates are rejected, the fixed top-level docs (rules/guidance/markdown) are refused, and all writes are atomic. /aftc-codex-learn and the codex rules now teach this tool-based flow; codex_add_entry accepts a batch of entries in one call. - aftc-codex: much wider project auto-detection - C++ (cpp), C#/.NET (cs, .sln, .csproj), Blazor (.razor + .csproj content), MAUI (.csproj content), Rust (rs), Java, Twig, bash, batch, WiX, JUCE (CMakeLists content), CMake, Deno, nginx, Apache, MySQL (compose images), Electron, Shoelace and Node.js are now detected alongside the existing maps. Detected topics with no resource file yet are named separately in the marker as "no codex resource yet" bootstrap hints instead of being silently dropped. Design domains now imply design-common (and mysql implies database-common) so the shared resources load too. - aftc-codex: projects can now pin their stack for detection with an `` block in AGENTS.md / CLAUDE.md / .github/copilot-instructions.md / GEMINI.md / .cursorrules / .windsurfrules - the only detection path for design domains (web-app, desktop-app, ...) and target OS, and it doubles as manual pinning. The codex rules teach the model to create and maintain the block; a strict whole-word keyword scan of those files (with an ambiguity stoplist) picks up unpinned mentions. - aftc-codex: new os/ resource category - os/windows.md (moved from tools/), plus new os/linux.md and os/osx.md; os entries must name their scope (distro family, mac arch, Windows version) per the updated rules. - aftc-codex: new /codex-rules-only command - a per-session rules-only mode: just the Critical Global Rules section rides the system prompt, with no docs, resource list, guidance, marker, learn or /codex-init ceremony, for when you want the common do-nots without the full knowledge base. It lives in session state only (no config setting, works even with codex disabled, survives /reload); /codex-init, /codex-refresh and /codex-learn refuse while it is active, and starting a new session clears it - /new + /codex-init is the way back to the full codex. - aftc-codex: codex_load on an empty resource (headings, no entries) now returns a one-line "no entries yet" answer instead of the file content. Updates v1.16.x --------------- - aftc-codex seed updated with what your live codex learned: new resource topics for electron and shoelace, plus 20 new entries across the css, html, javascript, php, pinescript, scss, bash, docker, mysql, powershell and vite resources (they reach users via a fresh install / Start Fresh). - aftc-codex seed updated with what your live codex learned: new resource topics for git, nginx and vsftpd, plus 8 new entries across the aftc-framework, css, php, pytorch, docker, headless-chrome and puppeteer resources (they reach users via a fresh install / Start Fresh). pi 0.83 compatibility verified (the TypeBox 1.3.7 breaking changes do not affect this extension). - aftc-codex auto-detection fixes: `.scss` files now suggest the scss resource (they were mapped to css, so scss.md was never auto-loaded); EVERY package.json in the project tree is now parsed (not just the root), including a word-boundary scan of scripts keys/values so tools that only appear in run scripts ("dev": "vite", "build": "webpack ...", "start": "bun run ...") are detected; bun is found via the modern bun.lock lockfile (only bun.lockb/bunfig.toml were covered); and a project containing an aftc-framework/ folder now suggests the aftc-framework resource. - /codex-install no longer asks for confirmation when your live codex version differs from the shipped one - the mismatch guard sent you there, so typing the command is the confirmation and the wipe + fresh re-install just runs (headless included). The confirmation modal still appears when the versions match (a destructive re-install you don't need). - bulk-read skill fixed for large projects: the helper (now `scripts/bulk-read.mjs`) reports the output's exact line count and size, and prints a loud WARNING when the result exceeds a single read (pi's read tool truncates at 2000 lines / 50 KB) with chunked offset/limit read instructions - previously a big run produced a 1 MB+ file that the agent could only ever see a small truncated slice of, silently analysing a fraction of the files. SKILL.md now documents the chunk-reading protocol. - Config files are now read fresh from disk on every access - no in-memory cache. Hand-editing config.json while pi runs takes effect immediately (previously a stale cache survived /new, so your edits were invisible until a full restart and the next settings change could silently revert them; this is what hid a manually reset aftcCodexVersion from the codex version-mismatch guard). setPreference is now a fresh read-modify-write, so edits made outside pi are never clobbered. The package-shipped config was renamed data/config.json -> data/extension-config.json to end the mix-up with your live config.json; the full contract lives in the new docs/working-with-config.md. - aftc-codex: /codex-sync removed (the seed→live merge didn't handle the current structure) along with the Re-Seed Resources and Sync Codex Resources menu options - the /codex → Resources & Updates menu is now just Start Fresh + Open Codex Resource Dir. Start Fresh (new description: "Wipe users codex files and start fresh") now truly deletes the WHOLE live codex dir and installs a full fresh copy of the shipped seed - previously it wiped resources/ but re-seeded rules+guidance only, leaving resources empty. Format-mismatch recovery (central guard, codex_load, fresh-session NOTICE) now points at /codex-install, and codex-merge.ts was slimmed to codex-compat.ts (version guard only). - aftc-codex: new scss seed resource - modularisation rules for non-trivial SCSS projects (manifest-only index.scss with @use, includes → template → components → pages folder split, one file per page, co-located media queries, CSS custom property theming) plus @use/cascade gotchas; the cascade-comparison entry moved from css.md into it. Load with codex_load("scss"); run /codex-sync to pull it into your live copy. - aftc-codex: resource entries now live under three typed sections - ## Rules (single-line conventions we enforce), ## Gotchyas (single-line technology traps that must state the trap AND the countermeasure) and ## Issues & Solutions (the existing symptom/Cause/Fix format, the only dated kind). codex-rules.md and the /aftc-codex-learn prompt teach a strict three-question classification so weaker models file entries correctly; /codex-sync now inserts new shipped entries into the matching section of your files; every seed resource doc was restructured. Also fixed: runtimes/ was missing from the category list (counts, read tracking, ensure-entry-ids). - aftc-codex: format versioning with wipe-on-mismatch. The shipped codex carries a codexVersion in the new package config (data/config.json); your live copy's version is recorded in config.json (aftcCodexVersion). A central guard (ctx.checkCompat()) pauses injection, codex_load and the codex commands when they differ; /codex-sync then wipes the live codex and installs a full fresh copy of the seed (no backup), unblocking everything. An unseeded/first-time install is never blocked, and an unknown seed version fails soft (never wipes). - New: /qd quick dir access menu ("AFTC Quick Dir Access") - open the users data dir, the .pi dir, or the pi-aftc-toolset dir in your OS file manager, cross-platform. Replaces /aftc-open-data-dir and /aftc-odd, which are removed - menu option 1 is the same action. - New: cut the whole input editor to the clipboard with Alt+X (or /aftc-cut-input). Uses pi's own cross-platform clipboard writer (native, clip/pbcopy/wl-copy/xclip/xsel, OSC 52 for remote sessions); the editor is only cleared after the copy succeeds, so a failed copy never loses your text. Updates v1.15.x --------------- - Removed aftc-deep-thought entirely (module, docs, tests, preferences). - Footer allowance line fix: the 5-hour segment no longer flickers off. When a provider response omits the 5-hour window (seen with Kimi), the last good window is kept until its reset time passes instead of the segment vanishing for a refresh cycle. - New: help registry. /aftc-help is now generated from a live registry that each module feeds next to its command registration, so the help screen always matches the real commands (drift fails the test suite). Also added the previously missing /aftc-footer-report-timeframe alias entry. - Housekeeping: module companion docs renamed from *.readme.md to *-readme.md, stale internal doc references cleaned up. Updates v1.14.x --------------- - aftc-codex redesign: codex-rules.md, markdown-guidance.md, AND thought-and-action-guidance.md are all FIXED maintainer docs - /codex-sync now force-overwrites all three from the shipped seed so updates always reach you, and /aftc-codex-learn no longer writes to them (it records TECH gotchas into resources/ only). The out-of-sync notice is generalised: any content drift in the fixed docs (not just missing files) triggers the "run /codex-sync" warning. Also fixed codex-rules.md typos, split a run-on rule, and clarified (in three places) that thought-and-action-guidance.md uses prose leads with NO [ID]s. - New feature: aftc-console - one centralised console-output module (ui/aftc-console.ts). Every feature now writes transcript messages through aftcConsole.emphasis (accent/emphasis colour for status, success, and state changes - the colour ctx.ui.notify could not produce), aftcConsole.warn (yellow), aftcConsole.error (red), and aftcConsole.info (dim); load/diagnostic stdout goes through aftcConsole.log ("[aftc-toolset]" prefix). Wired once via aftcConsole.init(pi) in the orchestrator. The old ad-hoc / per-feature notify calls and the throwaway ssh/info-entry.ts are gone. See docs/aftc-console-documentation.md. - Renamed ui/aftcUi.ts -> ui/aftc-ui.ts and docs/aftc-ui-dialogs.md -> docs/aftc-ui-documentation.md (kebab-case file names); all importers and references updated. Exported identifiers (AftcUi, AftcPalette, etc.) are unchanged. - SSH command output now uses the theme accent (emphasis) colour. Status, success, and state-change messages from /ssh-* commands (e.g. /ssh-status, /ssh-connect, transfers, shell/interrupt confirmations, and the connection manager's saved/updated/deleted notices) render in the accent colour instead of the warning yellow or dim info they used before. Genuine warnings (no session connected, missing args, not a file) and failures stay yellow/red. This needed a new accent-coloured transcript entry because ctx.ui.notify only supports info/warning/error, none of which is the accent colour. Updates v1.13.x --------------- - aftc-codex: out-of-sync notice on the fresh-session prep box. When your live knowledge base is behind the shipped package resources (a new file or new [ID] entries you don't have yet), the "AFTC CODEX" notice shown on /new gains a white line: "NOTICE: Your AFTC codex resources are out of sync with the latest resource, run /codex-sync". Your own entries and edits never trigger it. - aftc-codex: new /aftc-codex-sync command (alias /codex-sync). Merges package updates into your live knowledge base without losing your own additions: missing top-level files and seed-only resource files are copied over, and any shipped entry whose [ID] is missing from one of your resource docs is appended to it. Your entries always win - an [ID] you already have (even if you edited its text) is never touched, and your own files/folders are left alone. The resource list is always regenerated afterwards. Run it after updating pi-aftc-toolset to pick up new shipped gotchas. Also available from the config menu: /aftc-codex > Resources & Updates > Sync Codex Resources. - Audio notifications: master on/off + sensible shipped defaults. /aftc-notifications gains an "Enabled" toggle row and the feature is OFF by default for fresh installs - nothing plays until you switch it on. When enabled, the pre-configured sounds are sensible shipped picks (question: voc_question_07, task complete: voc_task_complete_07 with a 1s threshold, error: voc_we_got_a_problem_01, startup: xp, aborted: none) instead of all-none. Your existing settings are never touched: the config migration only ADDS missing keys - if you already had sounds configured the feature stays ON and your choices (and your saved /replay prompt) are preserved exactly; the saved replay prompt remains empty by default and is only ever written by an explicit /save-replay-prompt. - aftc-codex seed fix: real Deno and Node.js resource docs. The shipped seed's runtimes/deno.md and runtimes/nodejs.md were placeholders containing only "# Bun"; they now carry the real curated entries (identical to the live data-dir copies), so a re-seed, Start Fresh or re-install restores the real docs instead of clobbering them with stubs. - aftc-codex sync / update / root removed; codex is now a strict one-way copy. The /aftc-codex-sync, /aftc-codex-update and /aftc-codex-root commands (and their /codex-* aliases) are gone, together with all the 3-way drift / .sync.json / backup / merge-by-ID machinery behind them and the aftcCodexRoot preference (the codex root is now always the data-dir copy). The codex is a strict one-way copy from the shipped seed to your live data-dir folder: your live edits (e.g. via /aftc-codex-learn) are never auto-overwritten and there is no merge step. The Resources menu keeps Re-Seed and Start Fresh (now 'Clear and restore default codex resources' - it wipes the live copy and re-copies the seed with no backup, so it is irreversible) and gains Open Codex Resource Dir (opens the live resources/ folder in your file manager). /aftc-codex-learn, codex_load, the rules + guidance injection, auto-detect and ensure-IDs are unchanged - learning issues and solutions into the resource docs with unique IDs is still the whole point. - aftc-codex Resources menu simplified. The /aftc-codex Resources & updates menu no longer shows Sync / Merge Updates, View Resource List or View a Resource - those were maintainer/dev affordances, not user ones, and the sync/merge feature has been removed entirely. In their place is Open Codex Resource Dir, which opens your live resources/ folder in the OS file manager (explorer.exe on Windows, open on macOS, xdg-open on Linux). Start Fresh now reads "Clear and restore default codex resources" and simply wipes your resources and re-copies the shipped defaults (then regenerates codex-resource-list.md) - it no longer takes a backup, so it is irreversible. - aftc-codex thought harvest removed. The optional thought-harvest feature (recording the model's reasoning to a private thought-log/) has been removed from aftc-codex: the Thought Harvest menu toggle and the aftcCodexThoughtLog preference are gone, and codex-learn.ts now owns only the /aftc-codex-learn self-education loop. Nothing else changes - codex enable/disable, guidance injection, auto-load, sync/merge and -learn all work as before. Any existing thought-log/ folder in your data dir is left untouched; delete it manually if you want it gone. - Usage report - Task Time everywhere + new Timings tab. The usage report now analyses Task Time (the wall-clock time from when you press enter to when the AI fully returns control, across all of a prompt's tool-call turns). Each period card (24h / 7d / 28d) gains an Avg task time scoreboard row and excludes $0 (subscription) models from the COST rows only (Cheapest / Most costly) - usage, cache and timing rows keep them, so a subscription-only day still shows its real response / think / cache figures; every row is always present, and any row that cannot be computed stays visible as N/A with a tooltip explaining why; the Models and Thinking levels tables gain a Task Time column (info icon explains the metric); and Projections drops zero-cost models entirely. The new Timings tab (before Projections) is built around the tasks table: avg / longest task, turns per task, error and abort counts, task-time-by-model and daily task-time charts, a thinking / responding / tools-and-overhead breakdown of where the time goes, user-prompt vs AI turn timings, and the top-10 longest tasks. To make the error counts real, failed tasks (error / abort) are now recorded to the tasks table too, with their time-to-failure - they are counted but never averaged into Task Time (averages stay completed-only, superseding the earlier "isn't recorded" note above). /usage-clear now clears both tables. Money formatting tiers were also simplified: $1 to $1,000 now always shows two decimals ($4.10, $310.40 - $100-$999 no longer rounds to whole dollars), $1,000+ stays whole with thousands separators. - Footer "Task Time" metric. Line 2 of the footer now shows Task Time - the wall-clock time from when you press enter to when the AI fully returns control (one prompt's complete agent run, across all its tool-call turns), formatted like Session Time. It ticks live while the AI works, then holds the last task's duration. An error/abort stops the timer and shows the time to that point but is not recorded (a failed duration is not a useful metric); completed tasks are recorded to a new tasks table in the usage database (duration, stop reason, model, thinking level, turn count) ready for the usage report. It keeps running through questions, steering, retries and compaction. Distinct from the existing per-turn Turn Time and the whole-session Session Time. - New run_script tool - reliable large-script execution. Works around a pi bash-tool bug that silently truncates large inline commands (the first part runs, the rest is dropped, with no error). The model now hands the whole script to run_script, which writes it to a temp file and runs it with bash - no inline-size limit, so multi-line / large scripts run to completion every time. The model uses it automatically for any multi-line or large script (short one-liners still go to the bash tool). Bash only (git-bash on Windows). Because it is a workaround for an upstream bug, it disables cleanly: /run-script-off then /reload (and /run-script-on to re-enable). Updates v1.12.x --------------- - aftc-codex self-education hardened against runaway deliberation. /aftc-codex-learn (and spontaneous lesson recording) now spends far less effort second-guessing itself: the entry format is canonicalised (every new entry carries a short [ID], ending the old ID-vs-no-ID ambiguity), the rules and the learn prompt now state plainly that you write to the live copy in your OS data dir (the package seed is read-only), routing is "pick the best-fit file and move on", and new thinking-guidance rules tell the model to commit to a decision once, match the nearest example for ambiguous style, switch approach instead of theorising when a tool fails, and report an empty result honestly rather than pad. Adds a tools/bash.md resource (the stdin/heredoc partial-execution gotcha). - Usage-report money formatting + pie legend clean-up. Every money value in the report now goes through the tiered formatter (4 decimal places below $1, whole dollars at $100+, thousands separators at every magnitude - $1,179, $18,021, $1,000,000) including the chart axis ticks, which previously showed raw values like $1179. The cost-share pie chart legend no longer lists models with a 0.0% share (invisible slices, pure clutter). - Usage-report period scoreboard fixed. The per-model scoreboard rows in the 24h / 7d / 28d period cards on the Overview tab now always show a value after the model name: Cheapest / Most costly model show the average cost per turn (formatted with the money tiers - 4 decimal places below $1, whole dollars at $100+, thousands separators like $1,000), and Most / Least used model show their prompt counts. - Startup intro simplified. The AFTC text intro now runs on its own, wired directly (as it was originally - rock solid). The experimental WarGames intro and the intro factory have been disconnected (files kept in the package, dormant). /aftc-intro-on / /aftc-intro-off work exactly as before. - New aftc-codex knowledge base (opt-in). A new off-by-default feature injects a curated knowledge base - unified coding rules, thinking-and-action guidance, and a generated resource list - into the model's system prompt, and gives the model a codex_load tool to fetch topic docs (TypeScript, Python, Docker, Three.js, Godot, and ~27 more) on demand. Enable with /codex-enable, initialise with /codex-init, configure everything through the /aftc-codex menu. It auto-detects your project's technologies, can record durable lessons back into the knowledge base (/aftc-codex-learn), and updates safely with a backed-up, model-assisted merge (/aftc-codex-sync) that never overwrites your edits. Your knowledge base lives in your OS user profile, so it survives pi update. See the README section "aftc-codex (knowledge base)". - New /aftc-open-data-dir command (alias /aftc-odd). Opens the pi-aftc-toolset data directory (where your usage history, config, SSH connections, and codex knowledge base live) in your OS file manager. Works on Windows (explorer.exe), Linux (xdg-open), and macOS (open). Updates v1.11.x --------------- - Period summary scoreboard + smarter money formatting. Each period card (24h / 7d / 28d) now shows a per-model scoreboard: cheapest/most costly model, most/least used model, best/worst cache hit, best/worst response time, best/worst think time. Money values now use intelligent decimal tiers (4dp below $1, 3dp below $5, 2dp below $100, whole numbers at $100+) with thousands separators. The old "Top model" line is gone - the pie chart legend carries share % instead. - Usage-report pie chart improvements. The "Cost share by model" legend now shows each model's percentage (for example gpt-5 (42.3%)), slice colours are now clearly distinct from each other, the chart is slightly wider to fit the extra legend text, and it no longer overflows the page (forcing a horizontal scrollbar) after you shrink and re-expand the browser window. - Your data now survives updates. Usage history (turns.db), preferences, saved SSH connections and the replay prompt are now stored in your OS user profile (for example %APPDATA%\pi-aftc-toolset\data on Windows, ~/.local/share/pi-aftc-toolset/data on Linux, ~/Library/Application Support/pi-aftc-toolset/data on macOS) instead of inside the install folder, so pi update --extensions no longer wipes them. Upgrading from an older version moves any data still present in the old install-folder location over automatically on first run. (Data already lost to a previous update cannot be recovered.) Updates v1.10.x --------------- - New keyboard shortcut hub. All shortcuts now live in one place. New Alt+N inserts a newline at the cursor for better multi-line prompt formatting, and Alt+C still clears the editor. The QwenCloud provider module is temporarily disabled because pi now registers providers natively - it stays in the package and can be re-enabled if needed. Updates v1.9.x -------------- - Usage Report rebuilt and now in BETA. The report is now a clean tabbed page (Overview / Models / Thinking levels / Projections). Just use slash command /usage-report and your browser should open showing your usage report. See the README Usage report section for further information. Updates v1.8.x -------------- - Usage Report rebuilt and now in BETA. The HTML report is now a clean tabbed page (Overview / Models / Thinking levels / Projections). - Footer line 5 now supports Kimi for Coding. With Kimi as the active model, the footer shows your 5-hour and weekly Kimi subscription usage with live reset countdowns (the same numbers kimi.com shows), refreshed after each prompt and every few minutes during long-running ones. - AFTC UI suite - replacement for user input screens. Now ships the full interactive layer. The old pi dialogues appeared in the middle of the terminal and were hard to read and distinguish from TUI output. - New bundled ssh skill. Load it with /skill:ssh for full model-facing guidance on driving the SSH feature from inside pi: routing non-interactive commands to ssh_run, interactive programs (Nano, Vi, htop, tmux) to the PTY shell tools, file work to the SFTP tools, and the privacy model that keeps credentials and endpoints out of the model context. - New fully featured SSH capabilities (with sftp). A packaged Paramiko carrier talks JSON-RPC over local stdio with no socket, HTTP service, or GUI bridge. Capabilities: - Multiple simultaneous in-memory connections; password and private-key (including encrypted-key) authentication; session-only host-key approval. - Non-interactive commands with bounded standard input; interactive PTY shells (Nano, Vi, htop, tmux) through a local terminal overlay and model tools. - Recursive SFTP upload and download with optional --preserve, chunked and cancellable transfers with live progress; remote list, stat, read, write, mkdir, rename, and remove. - Local (-L), remote (-R), and dynamic SOCKS5 (-D) port forwarding, local-command-only so endpoints stay out of the model context. - Credential isolation: the model only ever sees opaque session and shell ids; credentials are memory-only and cleared after each attempt; all output is bounded and redacted; saved records hold non-secret metadata only. - Built and tested on Windows and Linux against a Docker OpenSSH fixture, and integrated. - Deleted all SSH features. Yep, they are gone, in the bin. But there is another jedi, see above. - Restored the subscription-allowance footer line. A Pi compatibility regression in optional credential metadata handling broke some things; it should now work again for zai, minimax and gpt subscriptions.