Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
5526 commits
Select commit Hold shift + click to select a range
2cbb242
Support better navigation, show edited leaf.
john-preston Jun 2, 2026
8b8b3eb
Support server-provided limits for rich messages.
john-preston Jun 2, 2026
b2a6ceb
Edit tables from context menu.
john-preston Jun 2, 2026
8552f0a
Support limits checking in tables.
john-preston Jun 2, 2026
54b3db7
Fix math block edit, media uploading.
john-preston Jun 2, 2026
7e8ad15
Support partial rich messages.
john-preston Jun 2, 2026
0bbfd31
Improve placeholder position in InputField.
john-preston Jun 3, 2026
b68b43e
Fix ripple in show full article button.
john-preston Jun 3, 2026
4ddd366
Fix the horizontal scrolling for nested blocks.
john-preston Jun 3, 2026
590f134
Optimize IV article resize and re-layout.
john-preston Jun 3, 2026
176d940
Attempt to fix large nested blockquote offset.
john-preston Jun 3, 2026
f34c4bd
Support copy-paste of blocks lists.
john-preston Jun 4, 2026
49ade76
Allow table title editing.
john-preston Jun 4, 2026
9bec144
Disable forward without sender for rich pages.
john-preston Jun 4, 2026
7c01893
[poll-view] Improved style of link option placeholder by message bubble.
23rd May 25, 2026
59ecce7
[poll-create] Extracted poll answer link box helper into shared module.
23rd May 25, 2026
b452f93
[poll-view] Added link option to inline poll add-option overlay.
23rd May 25, 2026
b2d84f9
[poll-view] Fixed poll add-option alive when link box steals focus.
23rd May 25, 2026
6a3907b
[poll-view] Routed webpage box preview click through special handler.
23rd May 25, 2026
089736c
Initial attempt to Undo/Redo in editor.
john-preston Jun 5, 2026
2499260
Allow Ctrl+A to select whole article.
john-preston Jun 5, 2026
4796cbe
Support jump-to-anchor in rich messages.
john-preston Jun 5, 2026
43cc919
Fix build on macOS.
john-preston Jun 5, 2026
dccc509
Fix text -> blocks serialization fixes.
john-preston Jun 8, 2026
f4ca736
Fix reveal animation in rich messages.
john-preston Jun 8, 2026
5d00587
Animated scroll to anchor, viewer context fix.
john-preston Jun 8, 2026
525a58e
Show correct captions for rich messages media.
john-preston Jun 8, 2026
4f776bb
Launch IV editor in a separate window.
john-preston Jun 9, 2026
9a23418
Disable IV editor for now.
john-preston Jun 9, 2026
735dbfc
Improve collage/slideshow, relax parsing.
john-preston Jun 9, 2026
61c74c9
Allow any capitalization in managed bot creation.
john-preston Jun 9, 2026
c42d87d
Skip unsuppored blocks in IV.
john-preston Jun 9, 2026
8f4a4ca
Add Mpr on Windows for QStorageInfo.
john-preston Jun 9, 2026
fa2164c
Move minizip into prepare.py/Dockerfile
ilya-fedin Jun 8, 2026
92b8d18
Fix patches revision in snap.
john-preston Jun 9, 2026
62030fd
Check patch apply in Qt 6 on Windows.
john-preston Jun 9, 2026
72697fc
Version 6.9.
john-preston Jun 9, 2026
1f734b2
Fix sending several same custom emoji.
john-preston Jun 9, 2026
52cd45b
Fix fallback font size in math blocks.
john-preston Jun 9, 2026
0b23be8
Fix build with GCC.
john-preston Jun 9, 2026
824b42b
Fix spoilers animate/restore in rich messages.
john-preston Jun 9, 2026
becf6d7
Attempt to fix nested lists.
john-preston Jun 9, 2026
0169567
Attempt to fix real article width counting.
john-preston Jun 9, 2026
1380c62
Version 6.9.1.
john-preston Jun 9, 2026
f8d91f1
Fix no-text rich messages.
john-preston Jun 10, 2026
5098ca6
Fix width of small rich messages.
john-preston Jun 10, 2026
e2ad242
Fix autocompleting mentions starting with a digit.
john-preston Jun 10, 2026
4fbfb9e
Fix list markers with media as first block.
john-preston Jun 10, 2026
05fa8ac
Fix aspect in location in rich_messages.
john-preston Jun 10, 2026
30fe208
Replace dispatch with TooManyCooks
ilya-fedin Jun 8, 2026
b94f7da
Replace [OBJ] with explicit TeX in flattened text.
john-preston Jun 10, 2026
4a7e890
Fix possible crash in full teardown.
john-preston Jun 10, 2026
0425565
Allow Ntlm proxy auth for system proxy.
john-preston Jun 10, 2026
a2f43e7
Added external control command channel over local socket.
23rd Jun 9, 2026
cf3dfa2
Added external commands to list, activate and cycle windows.
23rd Jun 9, 2026
fb0a652
Guarded external control commands with confirm box.
23rd Jun 9, 2026
adb7487
Improved position of expand arrow edit peer permissions box.
23rd Jun 9, 2026
8dc53fb
Added new shortcut to toggle web page preview in messages field.
23rd Jun 9, 2026
4fab6bc
Fixed display of userpic builder box on palette changes.
23rd Jun 9, 2026
6d887ef
Accelerated photo editor mode transition with eased animation.
23rd Jun 9, 2026
34e829b
Fixed color space use-after-free in CGImage conversion on old macOS.
23rd Jun 10, 2026
9a8c918
Slightly reduced star particle sizes in 3d covers.
23rd Jun 10, 2026
3c3f187
Fix one-on-one calls on Windows on ARM.
john-preston Jun 10, 2026
2241983
Fix rich messages in admin log.
john-preston Jun 10, 2026
d165b38
Guarded PiP renderer selection with successful RHI probe.
23rd Jun 10, 2026
d731681
Allowed closing boxes and layers with mouse back button.
23rd Jun 10, 2026
66faf6c
Allowed stepping back inside info sections with mouse back button.
23rd Jun 10, 2026
cf2e06b
Added experimental macOS option for instant reply on Cmd + Up/Down.
23rd Jun 10, 2026
1740db9
Use DWARF64 in Docker
ilya-fedin Jun 10, 2026
567a188
Fix boost flags inheritance in Docker
ilya-fedin Jun 10, 2026
7c4d411
Fix vpx debug info in Docker
ilya-fedin Jun 10, 2026
5dff3a8
Fix video in Collage / Slideshow.
john-preston Jun 10, 2026
7b33e71
Fixed chat closing on hiding filters sidebar in narrowed window.
23rd Jun 11, 2026
89e1ef0
Correctly check for OpenGL libs on Linux.
john-preston Jun 11, 2026
7cf6523
Add more warning ignoring in Linux build.
john-preston Jun 11, 2026
168c9f2
Workaround a bug in GCC 15+ with O2+LTO.
john-preston Jun 11, 2026
0bd6fe8
Make NTLM proxy fix inside Qt only, per-proxy.
john-preston Jun 11, 2026
65bb1a3
Improve min-width counting for rich messages.
john-preston Jun 11, 2026
67484a0
Optimize reveal animation of rich messages.
john-preston Jun 11, 2026
9f2920a
Remove clang from Docker and Snap
ilya-fedin Jun 11, 2026
7193c3d
Prevent periodic updater instantiation with autoupdates disabled
ilya-fedin Jun 11, 2026
b338719
Harden image size checks.
john-preston Jun 11, 2026
6c14476
Attempt to fix even more context losses.
john-preston Jun 11, 2026
033d383
Fix some math formula rendering.
john-preston Jun 11, 2026
d63506d
Activate window on swipe-to-reply.
MrSnowball-dev Jun 10, 2026
1363667
Fix possible crash in formula parsing.
john-preston Jun 11, 2026
ee1a9fd
Add .kml / .kmz as potentially IP-revealing.
john-preston Jun 11, 2026
b54239b
Attempt to force our fonts.
john-preston Jun 11, 2026
d73030d
Disable hinting for bundled math fonts.
john-preston Jun 11, 2026
8d60827
Fix possible crash in rich messages.
john-preston Jun 11, 2026
6532220
Slightly improved style of local storage section.
23rd Jun 11, 2026
82efd0c
Check blob extraction paths.
john-preston Jun 11, 2026
47eca40
Check passport encrypted data size.
john-preston Jun 11, 2026
8b6e326
Rasterize glyphs using Qt QPainterPath.
john-preston Jun 11, 2026
d4336a9
Fix possible crash in rich messages.
john-preston Jun 11, 2026
f5e93be
Version 6.9.2.
john-preston Jun 10, 2026
8165c7c
Update API scheme on layer 227.
john-preston Jun 11, 2026
90cdf55
Adjust resources for docker run script.
john-preston Jun 12, 2026
8ca06bd
Fix OpenGL in Windows builds.
john-preston Jun 12, 2026
7db0d5d
Fix parsing some incorrect formulas.
john-preston Jun 12, 2026
82c2954
Fix content size checks after undo/redo.
john-preston Jun 12, 2026
3887c78
Version 6.9.3.
john-preston Jun 12, 2026
49ff0bc
Fixed usedId assignment logic in edit_todo_list_box
Laky-64 May 21, 2026
8f06924
Use heredoc in Dockerfile
ilya-fedin Jun 11, 2026
d9a4283
Compress debug info in Docker
ilya-fedin Jun 12, 2026
6da54a2
Save dnf cache in Docker
ilya-fedin Jun 12, 2026
6a87fe2
Use ccache in Docker
ilya-fedin Jun 11, 2026
64dce78
Prevent cache invalidation by date/time in Docker
ilya-fedin Jun 12, 2026
6571285
Use ccache for libraries in Linux action
ilya-fedin Jun 12, 2026
999b28a
Cache tdesktop itself in Linux action
ilya-fedin Jun 13, 2026
2ed2083
Restore dispatch autodetection
ilya-fedin Jun 13, 2026
ae167db
Update patches
ilya-fedin Jun 15, 2026
c486314
Avoid full Telegram target rebuild on version change
ilya-fedin Jun 15, 2026
9cca005
Fix order in auctions list hashing.
john-preston Jun 15, 2026
1f804fc
Fixed build.
23rd Jun 16, 2026
043fa0a
Fix build on Windows.
john-preston Jun 16, 2026
4ce9177
Update TooManyCooks for LoongArch support
tzcnt Jun 16, 2026
abdc116
Fix Linux action tdesktop cache update
ilya-fedin Jun 16, 2026
afe2d0b
Fix albums selection by click outside of bubble.
john-preston Jun 16, 2026
641a43d
Fix random define tdesktop cache being used for no define
ilya-fedin Jun 17, 2026
61caec4
Fix build with Xcode.
john-preston Jun 17, 2026
3d63f50
Fix channel stats initial UI toggles.
john-preston Jun 17, 2026
d842777
Add some more MicroTeX safeguards.
john-preston Jun 15, 2026
0152fa2
Redirected chat list typing to search field in screen reader mode.
rezabakhshilaktasaraei Jun 4, 2026
b9aad5d
Engaged chat search on typing instead of focus in screen reader mode.
rezabakhshilaktasaraei Jun 2, 2026
1ef7001
Update README.md
osokin Mar 17, 2026
34c91cc
Fix clangd in vscode devcontainer
ilya-fedin Jun 18, 2026
4fff6a1
Ensure cmake gets preferred binutils version from PATH
ilya-fedin Jun 18, 2026
baa53ca
Support alternative edited-on date display.
john-preston Jun 19, 2026
cb97504
Fix pre-history visibility in manage group.
john-preston Jun 19, 2026
e98856d
One more attempt to restore context with ANGLE.
john-preston Jun 22, 2026
20542a1
Added logs of source path when an unknown deleted message is re-added.
23rd Jun 15, 2026
0cf37dd
Replaced gift button with call button for channel owner in info top bar.
23rd Jun 15, 2026
550f623
Slightly improved trackpad scroll handling in profile flexible top bar.
23rd Jun 16, 2026
16d9706
Added playback wave animation around voice message play button.
23rd Jun 16, 2026
92e9644
Allowed swipe-to-reply gesture in channels.
23rd Jun 16, 2026
9a38ab7
Fixed invisible small group call videos.
23rd Jun 20, 2026
c56fd45
Fixed repaint region for third column section animation.
23rd Jun 16, 2026
969e84f
Fixed clipped overlay buttons in group call QRhi viewport.
23rd Jun 16, 2026
407d2cf
Fixed new account intro opening in wrong window.
23rd Jun 20, 2026
df64efd
Fixed back from new account intro focusing wrong window.
23rd Jun 20, 2026
5d52a28
Added experimental option to keep unmuted unread dialogs on top.
23rd Jun 21, 2026
a74ee60
Added initial support of swipe-next-channel.
23rd Jun 16, 2026
49396c4
Added growing-capsule swipe-next-channel pull indicator with userpic.
23rd Jun 16, 2026
7549185
Added bottom-up section slide for swipe-next-channel jump.
23rd Jun 21, 2026
1b88612
Fixed stale truncated history view top bar title on peer name change.
23rd Jun 21, 2026
792cc5c
Fixed text recognition overlay rotation in QRhi media viewer.
23rd Jun 21, 2026
2da46cb
Added text recognition for image documents in media viewer.
23rd Jun 21, 2026
b9d6b07
Added recognized text selection and copying in overlay media viewer.
23rd Jun 21, 2026
05cb1e4
Added blockquote and code block rendering to media viewer captions.
23rd Jun 21, 2026
d0dba2e
Added text transfer between message field and gif caption box.
23rd Jun 22, 2026
d10e9ce
Added alphabetical section headers to contacts list sorted by name.
23rd Jun 22, 2026
076de2d
Added alphabetical fast-scroll index strip to contacts box.
23rd Jun 22, 2026
b8e82e3
Fixed opening sections from the settings search results.
23rd Jun 22, 2026
165d20a
Added support of deep link copying to settings search results.
23rd Jun 22, 2026
c40446b
[thanos] Fixed lost auto-scroll to bottom during animation.
23rd Jun 22, 2026
0ef307f
Added right-button clicks support to pinned bar.
23rd Jun 22, 2026
1ab8597
Added reverse iteration over pinned messages on right click.
23rd Jun 22, 2026
a1f3ee5
Added tooltip above link for hidden forwarded sender.
23rd Jun 22, 2026
e0504dd
[ai] Attempt to automate testing changes.
john-preston Jun 22, 2026
9ca694f
Rename currency-balance and post-suggestion strings to Grams.
john-preston Jun 22, 2026
4089646
Refresh and unify the TON diamond vector icons.
john-preston Jun 22, 2026
c9ed5ef
Update lib_base.
john-preston Jun 22, 2026
ee39aa3
Switch to Qt's queued invoker
ilya-fedin Jun 22, 2026
156c8e7
Use new base::option::changes in a few old options
ilya-fedin Jun 22, 2026
1520a81
Bump actions/checkout from 6 to 7
dependabot[bot] Jun 22, 2026
1d17852
Return hinting for math formula fonts.
john-preston Jun 15, 2026
c8ef31a
Fix rich pages in scheduled / shorcuts sending.
john-preston Jun 15, 2026
54a7fd0
Use correct table entities limits.
john-preston Jun 15, 2026
b01d375
Add some more math formula guardrails.
john-preston Jun 15, 2026
fa9b926
Make InputField menu extension with hooks.
john-preston Jun 15, 2026
8997785
Enable jump-to-date in forum search.
john-preston Jun 23, 2026
2e54c33
Fix build with MSVC.
john-preston Jun 23, 2026
ef76b58
Fix reaction preview crash in stories.
john-preston Jun 23, 2026
2622f02
Improve context of messages copied to clipboard.
john-preston Jun 23, 2026
9f61a9f
Work around freeze on Windows on ARM.
john-preston Jun 23, 2026
5ba77ac
[img-editor] Added pinch zoom gesture support.
23rd Jun 23, 2026
c9c02ad
[poll-view] Fixed description being selected instead of question.
23rd Jun 23, 2026
c02a358
Fixed wrong caption being selected in file albums.
23rd Jun 23, 2026
e37fc1d
Added pinch zoom gesture support to media viewer.
23rd Jun 24, 2026
6ab3a8e
Added swipe left-right navigation gesture to media viewer.
23rd Jun 24, 2026
1a0b504
Added billions suffix to shortened counters.
23rd Jun 24, 2026
b023fd2
Limited contacts alphabetical section headers to contacts box.
23rd Jun 24, 2026
a2f2db3
Made discussion group open in same non-primary window as its channel.
23rd Jun 24, 2026
57fdc4b
Fixed macOS now playing timeline drift after pausing playback.
23rd Jun 24, 2026
858a8fd
Reflected the playback speed in macOS now playing timeline.
23rd Jun 24, 2026
3adc0c1
Mapped macOS now playing skip buttons to relative seeking.
23rd Jun 24, 2026
b7dff42
[ai] Localize testing attempts.
john-preston Jun 23, 2026
4e6295b
[ai] Bring Codex skill up to speed.
john-preston Jun 23, 2026
0782b4d
[ai] Default to .ai/{project}/tasks/about.md task.
john-preston Jun 23, 2026
2428069
[ai] Clean up implementing.md every run.
john-preston Jun 23, 2026
18df941
Added screen reader tab-control accessibility for chat folders.
rezabakhshilaktasaraei Jun 7, 2026
7ffb2c5
Report the chat-folders tab strip as a vertical tab control
rezabakhshilaktasaraei Jun 23, 2026
c48860d
Expose locked folders as plain buttons, not selectable tabs
rezabakhshilaktasaraei Jun 24, 2026
9a5ec8b
Fixed stuck voice waveform highlight after leaving hovered message.
23rd Jun 24, 2026
8b4ccb7
Added display of hovered waveform time to voice message status line.
23rd Jun 24, 2026
91fb168
Moved out IsDarkTaskbar() from the Windows tray module.
23rd Jun 16, 2026
6477fdd
Added playback controls to Windows taskbar thumbnail.
23rd Jun 16, 2026
1c6220a
Update lib_ui submodule.
john-preston Jun 24, 2026
e99928b
Added custom emoji size support to sticker uploading.
23rd Jun 24, 2026
6241d23
Added custom emoji creation flow to sticker creator box.
23rd Jun 24, 2026
103c256
Added new-emoji button with menu to emoji set boxes.
23rd Jun 24, 2026
9895e5b
Added adapting existing sticker into custom emoji.
23rd Jun 24, 2026
ff2dfbf
Improve accessibility changes for left filters.
john-preston Jun 24, 2026
e4cde25
Fix build with Qt 5.
john-preston Jun 24, 2026
228934b
Work around qmake race condition
ilya-fedin Jun 24, 2026
ab8d1ff
Check GNotification option via base::options::lookup
ilya-fedin Jun 25, 2026
949f2a6
Expose the chat-folders strip as a list, not a tab control
rezabakhshilaktasaraei Jun 25, 2026
f43a2ca
Add QScroller experimental option
ilya-fedin Jun 25, 2026
ded7588
Update lib_ui.
john-preston Jun 26, 2026
54b9a6b
Restore Home/End navigation in the chat list
rezabakhshilaktasaraei Jun 26, 2026
e4fa072
Added animated icons to media saving toasts.
23rd Jun 24, 2026
145e580
Added animated icons to copy-to-clipboard toasts.
23rd Jun 24, 2026
bbcc5fc
Added animated icons to mute and pin quick action toasts.
23rd Jun 24, 2026
39cfbea
Added animated icons to shared media and group call pin toasts.
23rd Jun 24, 2026
8901dba
Added animated icon to chat archiving toast.
23rd Jun 24, 2026
6ecdee2
Added animated icon to premium purchased toast.
23rd Jun 24, 2026
5ed4e43
Added animated icons to sticker set install and copy toasts.
23rd Jun 24, 2026
8fa4ccb
Added support for dragging files out of shared media.
23rd Jun 25, 2026
ff3eb41
Added file preview to shared media drag.
23rd Jun 25, 2026
cfc99e4
Added support of zoom in shared media for photos.
23rd Jun 25, 2026
c255a97
Added a shadow to the action buttons in the profile top bar.
23rd Jun 26, 2026
e1d63f9
Prevented Xcode 27 libc++ platform warning from breaking mac build.
23rd Jun 26, 2026
cb1d81f
Added group emoji badge to emoji list widget.
23rd Jun 26, 2026
84a4eee
Added blur to poll attached media while loading.
23rd Jun 26, 2026
1c1a538
Fix accessible focus on filters refresh.
john-preston Jun 26, 2026
4943c41
Get rid of new Q_OS_LINUX
ilya-fedin Jun 27, 2026
3447020
Make macOS packaged cache key more stable
ilya-fedin Jun 29, 2026
22143a8
Per-week cache key for ccache on Linux action
ilya-fedin Jun 29, 2026
734d709
Allow to override ffmpeg thread count for debugging purposes
ilya-fedin Jun 29, 2026
d6f2e4c
Simplify the use of new ffmpeg thread option
ilya-fedin Jun 30, 2026
5e1a05f
Fix crash when removing pinned chats during folder changes.
gearonixx Jun 29, 2026
24ccd1c
Fix crash when finishing the appearing text animation
germiBest Jun 28, 2026
7f8c690
Remove duplicate QT_NO_PRIVATE_MODULE_WARNING from root CMakeLists.txt
ilya-fedin Jun 30, 2026
df268f3
Bump actions/cache from 5 to 6
dependabot[bot] Jun 30, 2026
12ce38f
Fixed editing of selected caption in album to target its own media.
23rd Jun 26, 2026
a5142b9
Slightly improved filling of swipe-next-channel gesture.
23rd Jun 27, 2026
76120b7
Replaced custom scroll processing in profile top bar with regular one.
23rd Jun 27, 2026
a4ed19f
Extended regular scroll processing to stories section.
23rd Jun 27, 2026
ffa6386
Cached peer list rows into opaque images while scrolling.
23rd Jun 27, 2026
fe8ca5a
Added separate painting of peer badge emoji status to peer list.
23rd Jun 27, 2026
1fb28f6
Added separate painting of peer list row emoji status to peer list.
23rd Jun 27, 2026
89b4a78
Allowed emoji status animation over cached peer list rows.
23rd Jun 27, 2026
3a90101
Added refresh of loaded userpics over cached peer list rows.
23rd Jun 28, 2026
55b7484
Added media view video as system media controls source.
23rd Jun 29, 2026
43b2110
Added metadata of media view video playback to system media controls.
23rd Jun 29, 2026
40b3f62
Added swipe-back gesture to info profile section.
23rd Jun 29, 2026
f362c16
Fixed instant Cmd+Up/Down reply in sections with compose controls.
23rd Jun 29, 2026
14909bc
Fixed display of sticker-set and favorite actions for sending stickers.
23rd Jun 29, 2026
85c9495
Added keyboard extension of message text selection to history sections.
23rd Jun 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
310 changes: 310 additions & 0 deletions .agents/shared/test-loop.md

Large diffs are not rendered by default.

311 changes: 311 additions & 0 deletions .agents/skills/implement/SKILL.md

Large diffs are not rendered by default.

559 changes: 559 additions & 0 deletions .agents/skills/task-think/PROMPTS.md

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions .agents/skills/task-think/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
name: task-think
description: Orchestrate a multi-phase implementation workflow for this repository with artifact files under .ai/<project-name>/<letter>/ using Codex subagents instead of shell-spawned child processes. Use when the user wants one prompt to drive context gathering, planning, plan assessment, implementation, build verification, and review with persistent artifacts, clear phase handoffs, and a thin parent thread. Prefer spawn_agent/send_input/wait_agent, keep heavy pre-build work delegated when possible, and avoid pulling timed-out phases back into the main session.
---

# Task Pipeline

Run a full implementation workflow with repository artifacts and clear phase boundaries.

## Inputs

Collect:
- task description
- optional project name (if missing, derive a short kebab-case name)
- optional constraints (files, architecture, risk tolerance)
- optional screenshot paths

If screenshots are attached in UI but not present as files, write a brief textual summary into the task artifacts before spawning fresh subagents so later phases can read the requirements without inheriting the whole parent thread.

## Overview

The workflow is organized around projects. Each project lives in `.ai/<project-name>/` and can contain multiple sequential tasks (labeled `a`, `b`, `c`, ... `z`).

Project structure:
```text
.ai/<project-name>/
about.md # Single source of truth for the entire project
a/ # First task
context.md # Gathered codebase context for this task
plan.md # Implementation plan
review1.md # Code review documents (up to 3 iterations)
review2.md
review3.md
logs/
phase-*.prompt.md
phase-*.progress.md
phase-*.result.md
b/ # Follow-up task
context.md
plan.md
review1.md
logs/
...
c/ # Another follow-up task
...
```

- `about.md` is the project-level blueprint: a single comprehensive document describing what this project does and how it works, written as if everything is already fully implemented. It contains no temporal state ("current state", "pending changes", "not yet implemented"). It is rewritten, not appended to, each time a new task starts, incorporating the new task's changes as if they were always part of the design.
- Each task folder (`a/`, `b/`, ...) contains self-contained files for that task. The task's `context.md` carries all task-specific information: what specifically needs to change, the delta from the current codebase, gathered file references, and code patterns. Planning, implementation, and review phases should rely on the current task folder.

## Artifacts

Create and maintain:
- `.ai/<project-name>/about.md`
- `.ai/<project-name>/<letter>/context.md`
- `.ai/<project-name>/<letter>/plan.md`
- `.ai/<project-name>/<letter>/review<R>.md` (up to 3 review iterations)
- `.ai/<project-name>/<letter>/logs/phase-<name>.prompt.md`
- `.ai/<project-name>/<letter>/logs/phase-<name>.progress.md` for delegated phases
- `.ai/<project-name>/<letter>/logs/phase-<name>.result.md`

Each `phase-<name>.result.md` should capture a concise outcome summary: whether the phase completed, which files it touched, and any follow-up notes or blockers.
Each delegated `phase-<name>.progress.md` should act as a heartbeat: a tiny monotonic counter plus current step, files being read or edited, concrete findings so far, and the next checkpoint. It is not a final artifact; it exists so the parent can distinguish active research from a truly stuck subagent without rereading large context.

## Phases

Run these phases sequentially:

1. Phase 0: Setup - Record start time, detect follow-up vs new project, create directories.
2. Phase 1: Context Gathering - Read codebase, write `about.md` and `context.md`. Use Phase 1F for follow-up tasks.
3. Phase 2: Planning - Read context, write detailed `plan.md` with numbered steps grouped into phases.
4. Phase 3: Plan Assessment - Review and refine the plan for correctness, completeness, code quality, and phase sizing.
5. Phase 4: Implementation - Execute one implementation unit per plan phase.
6. Phase 5: Build Verification - Build the project, fix any build errors. Skip if no source code was modified.
7. Phase 6: Code Review Loop - Run review and fix iterations until approved or the iteration limit is reached.
8. Phase 7: Windows Text Normalization - On Windows only, after review passes and before the final summary, normalize LF to CRLF for the text source/config files Codex edited in this task and ensure rewritten UTF-8 project files are saved without BOM.

Use the phase prompt templates in `PROMPTS.md`.

## Execution Mode

Use Codex subagents as the primary orchestration mechanism.

- When delegation is available, Phase 1, Phase 2, Phase 3, each Phase 4 implementation unit, and each Phase 6 review or review-fix pass must run in fresh subagents. Do not rerun those phases in the main session midstream just because a wait timed out or an artifact is missing.
- Run Phase 7 in the main session on Windows because it depends on the final local file state and the exact touched-file set for the current task.
- When any same-session helper rewrites Windows project text files, preserve CRLF and write UTF-8 without BOM. Avoid writer APIs or defaults that silently inject a UTF-8 BOM.
- The main session may read `context.md` once after Phase 1 and `plan.md` once after Phase 3. After that, prefer narrow shell checks, file existence checks, and status-line reads instead of rereading full documents or diffs.
- Prefer `worker` for phases that write files. Use `explorer` only for narrow read-only questions that unblock your next local step.
- Keep `fork_context` off by default. Pass the phase prompt and explicit file paths instead of the whole thread unless the phase truly needs prior conversational context or thread-only attachments.
- When the platform supports it, request `model: gpt-5.4` and `reasoning_effort: xhigh` for spawned phase agents. If overrides are unavailable, inherit the current session settings.
- Write the exact phase prompt to the matching `logs/phase-<name>.prompt.md` file before you delegate. Use the same prompt file as a checklist if you later need to fall back to same-session execution.
- For delegated phases, require an early `logs/phase-<name>.progress.md` heartbeat before deep work. The subagent should create or update it early, keep it tiny, and refresh it sparingly: preferably at natural milestones, and otherwise only after a longer quiet stretch such as roughly 5-10 minutes.
- In every delegated prompt, require a compact final reply with only status, artifact paths, touched files, and blocker or `none`. Detailed reasoning belongs in `.ai/` artifacts, not in the chat reply.
- After a subagent finishes, verify that the expected artifacts or code changes exist, then write a short result log in `logs/phase-<name>.result.md`.
- For delegated phases, use `wait_agent` with a 5-minute timeout by default while a phase is still clearly in progress. Successful completion may wake earlier, so this does not add latency to finished phases.
- When a phase looks close to completion — for example the final artifact has appeared, a build is in its final pass, or the agent said it is wrapping up — switch to 1-2 minute waits until it lands.
- A timeout is not a failure; it only means no final status arrived yet. Do not treat short waits as stall detection for research-heavy phases.
- On timeout, inspect the expected artifact, the phase progress file mtime, and the worktree for movement. Prefer mtime checks first; only reread the progress file when you need detail.
- If the progress file mtime moved or its heartbeat counter increased since the previous check, treat that as active progress and wait again.
- If no usable final artifact exists yet but the progress file is appearing or advancing, keep the same subagent alive. Progress-file movement does not count toward the retry limit.
- If no usable final artifact exists yet and neither the expected artifact nor the progress file has moved since the previous blocked check, send one short follow-up asking the same subagent to refresh the progress file, finish the artifact, and return the compact status block, then wait again.
- Only if the same subagent still shows no meaningful movement in either the expected artifact or the progress file after two full default waits and one follow-up should you close it and rerun that phase in a fresh subagent.
- Use `wait_agent` only when the next step is blocked on the result. While the delegated phase runs, do small non-overlapping local tasks such as validating directory structure or preparing the next prompt file.
- Build verification is critical-path work. Prefer running the build in the main session, and only delegate a bounded build-fix phase when there is a concrete reason.
- If subagents are unavailable in the current environment, or current policy does not allow delegation from the start, run the phase in the main session using the same prompt files. Otherwise, do not switch a pre-build phase to same-session midstream. Never fall back to shell-spawned `codex exec` child processes from this skill.

## Verification Rules

- If build or test commands fail due to file locks or access-denied outputs (C1041, LNK1104), stop and ask the user to close locking processes before retrying.
- Treat a delegated phase as complete only when the required artifact or status update exists on disk and matches the phase goals; do not rely on the chat reply alone.
- Never claim completion without:
- implemented code changes present
- build attempt results recorded
- review pass documented with any follow-up fixes
- on Windows, if the task edited project source/config text files, a CRLF / no-BOM normalization pass recorded after review

## Completion Criteria

Mark complete only when:
- All plan phases are done
- Build verification is recorded
- Review issues are addressed or explicitly deferred with rationale
- On Windows, Codex-edited project source/config text files have been normalized to CRLF, any UTF-8 rewrites were saved without BOM, and the result is logged
- Display total elapsed time since start (format: `Xh Ym Zs`, omitting zero components)
- Remind the user of the project name so they can request follow-up tasks within the same project

## Error Handling

- If any phase fails, times out, or gets stuck, follow the retry ladder from Execution Mode. Do not close an agent solely because the final artifact is missing while its progress file is still moving. After two delegated attempts remain blocked with no meaningful progress, report the issue to the user. Do not absorb the phase into the main session before build unless delegation was unavailable from the start.
- If `context.md` or `plan.md` is not written properly by a phase, rerun that phase in a fresh subagent with more specific instructions. Do not repair it locally before build unless delegation was unavailable from the start.
- If build errors persist after the build phase's attempts, report the remaining errors to the user.
- If a review-fix phase introduces new build errors that it cannot resolve, report to the user.
- If Phase 7 cannot safely normalize a touched file on Windows or remove an introduced UTF-8 BOM from a touched project text file, record the failure in the result log and report it in the final summary instead of silently skipping it.

## User Invocation

Use plain language with the skill name in the request, for example:

`Use local task-think skill with subagents: make sure FileLoadTask::process does not create or read QPixmap on background threads; use QImage with ARGB32_Premultiplied instead.`

For follow-up tasks on an existing project:

`Use local task-think skill with subagents: my-project also handle the case where the file is already cached`

If screenshots are relevant, include file paths in the same prompt when possible.
Loading