Skip to content
Merged
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
9a195d9
chore(deps): upgrade pi-ai/pi-agent-core to 0.69.0, add pi-coding-age…
hqhq1025 Apr 23, 2026
61bf355
feat(core): add createCodesignSession wrapper around pi-coding-agent …
hqhq1025 Apr 23, 2026
89c80a0
feat(desktop): config.toml -> AuthStorage + ModelRegistry bridge (T1.…
hqhq1025 Apr 23, 2026
3cbf705
feat(core): add 5 P0 design skills (form-layout, empty-states, loadin…
hqhq1025 Apr 23, 2026
730299e
feat(core): scaffolds bundle - 30 starter templates (T4.2)
hqhq1025 Apr 23, 2026
969741f
refactor(desktop): delete legacy SQL stack (snapshots/chat-messages/c…
hqhq1025 Apr 23, 2026
bffa87c
feat(core): system prompt - Brand Acquisition + Multi-screen baton se…
hqhq1025 Apr 23, 2026
4043994
feat(desktop): bash Permission Dialog UI + main IPC bridge (T2.1)
hqhq1025 Apr 23, 2026
65aec16
feat(core): bash hard-blocklist for irreversible commands (T2.2)
hqhq1025 Apr 23, 2026
a81a5a4
feat(desktop): workspace FSWatcher IPC bridge (T2.3)
hqhq1025 Apr 23, 2026
51c90d5
feat(core): T3.1/T3.2/T3.3/T3.4/T3.6 tool scaffolding
hqhq1025 Apr 23, 2026
1ec100d
feat(core): T3.1/T3.2/T3.3/T3.4/T3.6 design-domain tool scaffolding
hqhq1025 Apr 23, 2026
e1f62a0
feat(core): T3.5 cross-file tweaks parser + T2.5 comment anchor format
hqhq1025 Apr 23, 2026
fb37281
feat(core): brand-refs bundle - 25 brand DESIGN.md files (T4.4)
hqhq1025 Apr 23, 2026
4b9c1ca
feat(desktop): T2.6 v0.1->v0.2 migration + T5.1 process registry
hqhq1025 Apr 23, 2026
a3eb342
fix(renderer): replace hardcoded text-[10px]/bg-white with design tok…
hqhq1025 Apr 23, 2026
25796d0
fix(desktop): externalize pi-coding-agent/pi-tui from main bundle
hqhq1025 Apr 24, 2026
77025f3
fix(desktop): add pi-coding-agent/pi-ai/pi-agent-core as direct deps
hqhq1025 Apr 24, 2026
a6d6aac
feat(core): add narration rhythm rule to workflow prompt
hqhq1025 Apr 24, 2026
f383003
feat+fix: set_title tool + narration rhythm + comment null-crash + du…
hqhq1025 Apr 24, 2026
21f20cd
fix(renderer): wire set_title tool to renameDesign on tool_call_start
hqhq1025 Apr 24, 2026
42443d6
fix(renderer): optimistic local rename while snapshots IPC is stubbed…
hqhq1025 Apr 24, 2026
14f34e1
feat(core): register skill tool (T-a)
hqhq1025 Apr 24, 2026
a23f91d
feat(core): register cross-file tweaks tool (T-c)
hqhq1025 Apr 24, 2026
426fd13
feat(core): register preview tool (T-d)
hqhq1025 Apr 24, 2026
606ce21
feat(core): register scaffold tool + workspaceRoot input (T-b)
hqhq1025 Apr 24, 2026
d72dd3c
feat: register ask tool + AskModal UI + IPC round-trip (T-e)
hqhq1025 Apr 24, 2026
97d2548
merge: T-a skill tool
hqhq1025 Apr 24, 2026
f0c4952
merge: T-b scaffold tool + workspaceRoot
hqhq1025 Apr 24, 2026
ebfb63f
merge: T-c tweaks tool (cross-file)
hqhq1025 Apr 24, 2026
aef1ca9
merge: T-d preview tool
hqhq1025 Apr 24, 2026
35427e6
merge: T-e ask tool + AskModal UI + IPC
hqhq1025 Apr 24, 2026
12a3cd8
feat(desktop): wire workspaceRoot into core generate input
hqhq1025 Apr 24, 2026
1a70b10
feat(desktop): wire readWorkspaceFiles into core generate input
hqhq1025 Apr 24, 2026
b388b19
feat(desktop): wire runPreview into core generate input
hqhq1025 Apr 24, 2026
a464443
merge: wire workspaceRoot (W-root stub)
hqhq1025 Apr 24, 2026
9fe6f0a
merge: wire readWorkspaceFiles (W-files)
hqhq1025 Apr 24, 2026
efc9d2f
merge: wire runPreview (W-preview)
hqhq1025 Apr 24, 2026
f8d37fc
refactor(desktop-main): split connection-ipc IPC handlers to drop com…
hqhq1025 Apr 24, 2026
7860e99
merge: origin/main into dev/v0.2 (PR #173 workspace binding + #215 ca…
hqhq1025 Apr 24, 2026
7078185
fix(renderer): synthesize ghost design entry on set_title rename
hqhq1025 Apr 24, 2026
ffea08e
merge: rebase on origin/main (PR #173 workspace binding + #215 capabi…
hqhq1025 Apr 24, 2026
7947c84
chore(core,renderer): retire declare_tweak_schema + quiet set_title d…
hqhq1025 Apr 24, 2026
d0faaab
feat(desktop): auto-bind default workspace on design creation
hqhq1025 Apr 24, 2026
d731825
refactor(core): extract shared context-format and artifact-collect lib
hqhq1025 Apr 24, 2026
5f7e107
refactor(desktop-main): extract redact helpers from diagnostics-ipc
hqhq1025 Apr 24, 2026
1a61b23
refactor(renderer): extract input primitives from TweakPanel
hqhq1025 Apr 24, 2026
f8071eb
refactor(renderer): extract preview message helpers from PreviewPane
hqhq1025 Apr 24, 2026
7e7c533
fix(desktop): restore garbled Chinese strings in codex-oauth-ipc (#202)
hqhq1025 Apr 24, 2026
c885976
refactor(core): split loader.ts to drop complexity suppressions (#94)
hqhq1025 Apr 24, 2026
e5d5243
chore(deps): patch bumps (lucide-react / tailwindcss / puppeteer-core)
hqhq1025 Apr 24, 2026
0a4b525
chore(deps): i18next 23→26, react-i18next 15→17
hqhq1025 Apr 24, 2026
afe2c2e
chore(deps): Biome 1.9.4 → 2.4.13 with config migration
hqhq1025 Apr 24, 2026
398ff10
chore(deps): TypeScript 5.9.3 → 6.0.3 across workspace
hqhq1025 Apr 24, 2026
8248983
chore(deps): Vite 6→8, Vitest 2→4, plugin-react 4→6, electron-vite 2→5
hqhq1025 Apr 24, 2026
3825aa8
chore(deps): zod 3.25.76 → 4.3.6 across workspace
hqhq1025 Apr 24, 2026
8af3475
perf(renderer): lazy-load Settings + TweakPanel (first-paint shrink)
hqhq1025 Apr 24, 2026
2b65285
chore(deps): pi-agent-core 0.69 → 0.70 (core)
hqhq1025 Apr 24, 2026
fd18663
refactor(desktop-main): split diagnostics-ipc parsers + handlers (#118)
hqhq1025 Apr 24, 2026
6300d47
refactor(desktop-main): split TOML importers + keychain/preferences p…
hqhq1025 Apr 24, 2026
a6b04fa
feat(core): hard rule - code goes to files, never chat
hqhq1025 Apr 24, 2026
22f8ae9
fix(desktop): externalize electron in main bundle for electron-vite 5
hqhq1025 Apr 24, 2026
fa27d25
fix(desktop): externalize electron in preload bundle for electron-vite 5
hqhq1025 Apr 24, 2026
a236c88
feat(core): scope-aware Implement step - step-by-step for 4+ todos
hqhq1025 Apr 24, 2026
efcb352
feat(core): step-by-step is universal, tick todos live
hqhq1025 Apr 24, 2026
c1cd689
fix(core): done tool treats HTML files as first-class, not JSX-only
hqhq1025 Apr 24, 2026
2db9905
feat(templates): move scaffolds/skills/brand-refs/frames/design-skill…
hqhq1025 Apr 24, 2026
d70aa5f
refactor(desktop-renderer): split Settings.tsx into per-tab modules
hqhq1025 Apr 24, 2026
79acbd8
refactor(desktop-main): split onboarding-ipc.ts into domain modules
hqhq1025 Apr 24, 2026
47c45ed
refactor(desktop-main): split snapshots-db.ts by domain
hqhq1025 Apr 24, 2026
5ea99c3
fix(desktop): cleanly shut down child processes on quit
hqhq1025 Apr 24, 2026
87f6197
chore(core,renderer): retire v0.2 legacy residue
hqhq1025 Apr 24, 2026
3ad5e3f
fix(runtime): inject React+Babel+frames into HTML artifacts that need…
hqhq1025 Apr 24, 2026
9fcd899
fix(desktop): don't let preview Chrome hijack the user's running Chro…
hqhq1025 Apr 24, 2026
4975bfe
refactor(core,desktop): applyComment goes through the agent loop
hqhq1025 Apr 24, 2026
12ef345
refactor(core): remove <artifact> contract from base prompt
hqhq1025 Apr 24, 2026
02d33f4
fix: stop artifact/chrome/token leaks around done + preview
hqhq1025 Apr 24, 2026
1a25a7e
feat(desktop): files panel reads the workspace directory directly
hqhq1025 Apr 24, 2026
4f56684
refactor(desktop-main): split main/index.ts IPC handlers into domain …
hqhq1025 Apr 24, 2026
ca63c07
refactor(core): extract prompts/index.ts sections to sections/*.md
hqhq1025 Apr 24, 2026
1d1220e
fix(desktop-main): copy prompts/sections/*.md into bundle out/main
hqhq1025 Apr 24, 2026
849c6e0
refactor(desktop-renderer): split store.ts into slices + pure lib
hqhq1025 Apr 24, 2026
b8f2dc1
chore(deps): pnpm overrides for 7 open Dependabot alerts
hqhq1025 Apr 24, 2026
4775804
fix(desktop): clear lint warnings in AskModal and RebindWorkspaceDialog
hqhq1025 Apr 24, 2026
dd424f8
feat(desktop): watch workspace dir so external edits refresh files panel
hqhq1025 Apr 24, 2026
2517b32
refactor(core): replace inline iOS template with scaffold pointer
hqhq1025 Apr 24, 2026
79ba0fc
chore(core,scripts): retire legacy single-turn generate() pipeline
hqhq1025 Apr 24, 2026
38671f4
feat(preview): support standalone jsx tsx files
hqhq1025 Apr 26, 2026
c00dfa0
fix(preview): allow slower jsx tsx startup
hqhq1025 Apr 26, 2026
4f63ad6
fix(preview): resolve placeholder html sources
hqhq1025 Apr 26, 2026
bf136cd
fix(preview): resolve placeholder html sources
hqhq1025 Apr 26, 2026
762c9ac
fix(preview): harden workspace source resolution
hqhq1025 Apr 26, 2026
9de8002
fix(preview): harden workspace source resolution
hqhq1025 Apr 26, 2026
b1dc809
fix(preview): ignore optional runtime font failures
hqhq1025 Apr 26, 2026
de9061e
fix(preview): ignore optional runtime font failures
hqhq1025 Apr 26, 2026
806c450
fix(preview): cover workspace file read fallback
hqhq1025 Apr 26, 2026
dab2634
fix(preview): cover workspace file read fallback
hqhq1025 Apr 26, 2026
67c707f
merge(preview): merge jsx tsx preview support
hqhq1025 Apr 26, 2026
08e30be
fix(runtime): initialize vendored preview components before artifacts
hqhq1025 Apr 26, 2026
7ae95ff
fix: repair JSX preview runtime handling
hqhq1025 Apr 26, 2026
9e06567
fix: unify workspace preview source resolution
hqhq1025 Apr 26, 2026
7e7dea9
fix: harden preview source resolution
hqhq1025 Apr 26, 2026
646a104
fix: persist design chat sessions to JSONL
hqhq1025 Apr 27, 2026
598150b
fix(desktop): persist tweak edits to workspace
hqhq1025 Apr 27, 2026
627c4bf
merge: session history persistence fix
hqhq1025 Apr 27, 2026
81d5668
merge(dev): integrate tweak persistence fix
hqhq1025 Apr 27, 2026
0cbb792
docs: refresh release and agentic design copy
vdcdxxs Apr 27, 2026
7bec35b
fix(core): enforce fail-fast runtime boundaries
hqhq1025 Apr 27, 2026
fd9adfb
refactor: make codesign prompts manifest-first
hqhq1025 Apr 28, 2026
d03c04f
refactor: harden manifest-first agent harness
hqhq1025 Apr 28, 2026
218b322
fix(core): align done verification with JSX runtime
hqhq1025 Apr 28, 2026
d4e9f57
Feat/dev memory (#255)
cydxxzg Apr 29, 2026
fec9665
fix(core): retry transport-level terminated errors with conversation …
Sun-sunshine06 Apr 30, 2026
accc0c2
fix: harden v0.2 build and workspace runtime
hqhq1025 May 1, 2026
632683c
merge: sync dev/v0.2 release fixes
hqhq1025 May 1, 2026
c0d7e9c
fix: remove sqlite runtime storage
hqhq1025 May 1, 2026
111584e
fix(providers): match standalone 'terminated' in transport retry rege…
Sun-sunshine06 May 1, 2026
3825cfb
fix(errors): harden provider diagnostics recovery
hqhq1025 May 2, 2026
43d6b30
fix(release): repair Scoop distribution
hqhq1025 May 2, 2026
8763d7b
fix(release): correct Scoop plugin extraction path
hqhq1025 May 2, 2026
8faf5d8
ci: restore DeepSeek PR review script
Sun-sunshine06 May 3, 2026
debf538
ci: align PR review bot marker
Sun-sunshine06 May 3, 2026
8f56be7
fix: address issue 254 follow-ups
Sun-sunshine06 May 3, 2026
cb1b2fe
chore: backfill selected main fixes into v0.2
hqhq1025 May 3, 2026
ee0aeeb
merge: anchor main for v0.2 promotion
hqhq1025 May 3, 2026
0b5bd4e
fix: harden promotion security checks
hqhq1025 May 3, 2026
762bf80
fix: clear remaining promotion scan alerts
hqhq1025 May 3, 2026
797621e
fix: finish promotion scan cleanup
hqhq1025 May 3, 2026
cd068c0
fix: avoid markdown URL double decoding
hqhq1025 May 3, 2026
25f22ab
fix: keep markdown URL entity decoding single-pass
hqhq1025 May 3, 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
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .Codex/environments/environment.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
version = 1
name = "codesign"

[setup]
script = ""

[[actions]]
name = "运行"
icon = "run"
command = "pnpm install && pnpm dev"
33 changes: 33 additions & 0 deletions .Codex/workspace/agents_md_v2_update_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# AGENTS.md v2 Update Plan

## Goal

Update `AGENTS.md` so Codex agents follow the latest v0.2 plan instead of the stale `CLAUDE.md` copy.

## Sources Read

- `CLAUDE.md`
- `AGENTS.md`
- `docs/VISION.md`
- `docs/PRINCIPLES.md`
- `docs/v0.2-plan.md`

## Steps

1. Identify stale CLAUDE/AGENTS content. - complete
2. Rewrite `AGENTS.md` around v0.2 agentic workspace decisions. - complete
3. Validate for stale references and whitespace issues. - complete

## Findings

- `CLAUDE.md` and current `AGENTS.md` still describe Open CoDesign mainly as a prompt-to-artifact app rather than a local design agent.
- They still point design history at SQLite, while v0.2 moves sessions to pi JSONL and files to real workspaces.
- They say pi-ai gaps should become `packages/providers` extensions, but the pi spike says provider/session/capability/bash should be handed to pi-coding-agent.
- They hard-code some stack versions; `AGENTS.md` should tell agents to read manifests for exact versions.
- Latest plan: design equals pi session, every design has a workspace, no sealed/open mode, no project abstraction in v0.2.
- Validation found no stale old phrases for `better-sqlite3`, old provider-extension guidance, hardcoded React/Vite versions, or old storage wording.
- `git diff --no-index --check /dev/null AGENTS.md` produced no whitespace warnings.

## Errors

- First stale-phrase search used a shell command with unescaped backticks in the pattern. That triggered command substitution. Re-ran with `rg -e` patterns and no backticks.
141 changes: 141 additions & 0 deletions .Codex/workspace/core_fail_fast_audit.md

Large diffs are not rendered by default.

487 changes: 487 additions & 0 deletions .Codex/workspace/full_review_root_fix_plan.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions .Codex/workspace/issue_triage_findings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Issue Triage Findings

## Project Context Read
- `docs/VISION.md`: open-codesign is a local-first Electron app for prompt-to-design artifacts, with all model support routed through `pi-ai`.
- `docs/PRINCIPLES.md`: keep features lean, lazy-load heavy capabilities, avoid silent fallbacks, and ensure public/persistent contracts are versioned.
- Current branch is `dev/v0.2`, ahead of `origin/dev/v0.2` by 4 commits.
- `AGENTS.md` is untracked in the working tree.

## Issue Context
- Recent provider-related issues cluster around provider capability profiles (#206), wire/role/reasoning policy (#207), diagnostics parity (#216), and model discovery modes (#210).
- Gemini-specific bug #175 was closed by merged PR #186, which strips `models/` from Gemini OpenAI-compatible model IDs at the provider wire boundary.
- #175 has a recent follow-up comment: a user confirms the issue still persists in the latest version for Google Gemini models.
- PR #186 review comments identified a separate flaw: Gemini endpoint detection was initially too broad, and even after a follow-up was still host-only rather than requiring an OpenAI-compatible `/openai` path.
- Issue #229 is separate but related provider compatibility work: self-signed TLS and `developer` role rejection by Bedrock-like OpenAI-compatible backends.
- Local code contains the #186 fix in `packages/providers/src/index.ts`, but the live v0.2 generation path uses `packages/core/src/agent.ts::buildPiModel`.
- `buildPiModel` currently sets `id: model.modelId` directly and `reasoning: true` for every provider/wire. This bypasses Gemini `models/` stripping and can also force developer/reasoning behavior on OpenAI-compatible custom providers.
- This explains why #175 can remain visible after being closed: title/legacy provider calls were patched, but the agent runtime path still sends the old model ID shape.
21 changes: 21 additions & 0 deletions .Codex/workspace/issue_triage_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Issue Triage Plan

## Goal
Review recent GitHub issue activity for open-codesign, identify still-active problems in recently closed issues, and fix the Gemini-related issue if it is reproducible from the codebase.

## Phases
- [complete] Gather issue context from GitHub, focusing on recent comments and Gemini-related threads.
- [complete] Map the issue symptoms to local code paths and reproduce or explain the bug.
- [complete] Implement the smallest aligned fix with tests if code changes are needed.
- [complete] Run targeted verification and summarize remaining risks.

## Project Constraints
- Model calls must go through `@mariozechner/pi-ai`; no direct provider SDK imports in app code.
- Use `pnpm`, Vitest, Biome, and strict TypeScript.
- Keep changes lean, local-first, and scoped.

## Errors Encountered
| Error | Attempt | Resolution |
|---|---|---|
| Vitest startup failed because `@rolldown/binding-darwin-arm64` is missing from `node_modules`. | Ran targeted provider/core tests. | Reinstall dependencies with `pnpm i`, then rerun targeted tests. |
| Initial targeted Vitest command matched no files because package-relative paths were required. | Used workspace-root paths with `pnpm --filter`. | Reran with `pnpm --dir packages/... exec vitest run src/...`; tests executed and passed. |
16 changes: 16 additions & 0 deletions .Codex/workspace/issue_triage_progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Issue Triage Progress

## Session Log
- Started issue triage for recent GitHub activity, with emphasis on Gemini-related problems that may remain after a closed issue.
- Read project vision and engineering principles before making changes.
- Queried recent GitHub issue activity and Gemini-specific threads.
- Confirmed #175 has a recent "still persists" comment after its closing fix PR #186.
- Traced local model construction and found the likely bypass in the live agent runtime.
- Patched Gemini URL detection and agent-runtime model construction; added provider/core regression tests.

## Verification
- `pnpm --dir packages/providers exec vitest run src/gemini-compat.test.ts src/index.test.ts` — 2 files, 36 tests passed.
- `pnpm --dir packages/core exec vitest run src/agent.test.ts` — 1 file, 25 tests passed.
- `pnpm typecheck` — passed across workspace.
- `pnpm lint` — passed after fixing provider export ordering.
- `git diff --check` on touched source/test files — passed.
35 changes: 35 additions & 0 deletions .Codex/workspace/pr_review_bot_update_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# PR Review Bot Update Plan

## Goal

Update the Codex PR review bot so public PR reviews do not cite private/internal docs as evidence and do not rely on stale model knowledge for version-sensitive claims.

## Constraints Read

- `docs/VISION.md`
- `docs/PRINCIPLES.md`
- `docs/COLLABORATION.md`
- `CLAUDE.md`
- `AGENTS.md`

## Plan

1. Complete context scan of the bot workflow and prompt. - complete
2. Edit `.github/prompts/codex-pr-review.md` with public-evidence and fresh-version rules. - complete
3. Check the edited prompt for consistency with the workflow. - complete
4. Run lightweight validation on changed files. - complete

## Findings

- Bot is configured by `.github/workflows/codex-pr-review.yml`.
- Main behavior lives in `.github/prompts/codex-pr-review.md`.
- `docs/` is explicitly gitignored/internal; public contributors cannot see those files.
- Current prompt names internal docs as "Key docs" and asks the bot to load/cite them, which can make public reviews point at files contributors cannot access.
- Current prompt states version facts like "Electron 33+" directly, which can go stale as dependencies move.
- Updated prompt now distinguishes public context from internal-only context.
- Updated prompt requires repository/package metadata first, and public authoritative sources when needed, before version-sensitive findings.
- `git diff --check` passed.

## Errors

None so far.
12 changes: 12 additions & 0 deletions .Codex/workspace/preview_blank_fix_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Preview Blank Fix Plan

## Hypothesis

Root cause: workspace file preview can render a JSX-backed `index.html` through the runtime, but `FilesTabView` does not subscribe to sandbox `IFRAME_ERROR` messages, so runtime failures appear as a blank canvas and the model/user workaround becomes adding React/Babel CDN scripts directly to `index.html`.

## Tasks

- [ ] Add regression coverage for HTML + `text/babel` preview and file-tab iframe error handling.
- [ ] Wire `FilesTabView` iframe messages through the same trusted `IFRAME_ERROR` path as `PreviewPane`.
- [ ] Tighten prompt/output guidance so generated `index.html` stays host-runtime source, not standalone CDN HTML.
- [ ] Run focused tests.
12 changes: 12 additions & 0 deletions .Codex/workspace/session_history_restore_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Session History Restore Plan

## Root Cause

`window.codesign.chat.*` in `apps/desktop/src/preload/index.ts` is a v0.2 TODO stub. It returns empty lists and resolves appends in memory, so renderer chat rows are never persisted or reloaded.

## Plan

1. [x] Restore persisted chat IPC channels in main using the existing chat message helpers.
2. [x] Point preload chat methods at those IPC channels.
3. [x] Add IPC regression coverage for append/list, snapshot seeding, and tool status updates.
4. [x] Run the focused desktop main-process tests.
17 changes: 17 additions & 0 deletions .Codex/workspace/tweaks_root_fix_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Tweak Editing Root Fix Plan

## Goal

Make the tweaks panel actually edit workspace artifacts by tracing and fixing the full path from UI control changes to EDITMODE file updates and preview refresh.

## Steps

1. Trace current tweak schema/tool parsing in `packages/core`.
2. Trace renderer tweak panel, preview bridge, IPC/file APIs, and pending tweak delta handling in `apps/desktop`.
3. Add a focused failing test that proves user edits update the right EDITMODE block.
4. Patch the underlying contract rather than only the panel surface.
5. Run targeted unit tests and a relevant package typecheck if feasible.

## Findings

- `docs/` is gitignored and absent from this worktree, so product context was read from the original checkout at `/Users/haoqing/Documents/Github/codesign/docs`.
24 changes: 24 additions & 0 deletions .Codex/workspace/v0_2_audit_findings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# v0.2 Audit Findings

## Initial Findings

- `docs/v0.2-final-report.md` already states v0.2 is not fully complete: T3 renderer integration, Processes panel, E2E, multi-fixture migration tests, and allowlist persistence are follow-ups.
- Need verify current code state because the report may be stale relative to this checkout.

## Verified Findings

- Current branch is `dev/v0.2`; it has follow-up commits after `docs/v0.2-final-report.md`, including `AskModal`, preview wiring, workspace watcher, and legacy-generate cleanup work.
- `ask` is now wired end-to-end enough to display `AskModal`: main bridge `ask-ipc.ts`, renderer component `AskModal.tsx`, and App mount are present.
- `preview` tool is now backed by `apps/desktop/src/main/preview-runtime.ts` and passed into `generateViaAgent` when a workspace is attached.
- Scaffolds/skills/brand refs exist under `apps/desktop/resources/templates`: 31 scaffold manifest entries, 9 skills, 25 brand refs.
- Process registry exists and tests pass, but no renderer `ProcessesPanel` or IPC surface was found; it is not user-visible.
- Permission dialog exists, but no concrete allowlist persistence implementation was found. `permission-ipc.ts` only resolves `once|always|deny`.
- The big architecture goal is not complete: SQLite still defines and uses `designs`, `design_snapshots`, `chat_messages`, `comments`, and `design_files`. The live generate path writes through the virtual FS/SQLite path, not a pure JSONL + workspace filesystem model.
- The live agent path uses `@mariozechner/pi-agent-core` with custom `text_editor/list_files/done/read_design_system` tools; the plan expected pi-coding-agent built-ins plus hook interception as the primary execution path.
- No Playwright E2E suite/config was found for the v0.2 golden path.

## Verification

- `pnpm --filter @open-codesign/core test -- --run agent-session tool-manifest tools/ask tools/scaffold tools/skill tools/preview tools/done security/bash-blocklist`: 8 files / 64 tests passed.
- `pnpm --filter @open-codesign/desktop test -- --run ask-ipc permission-ipc preview-runtime process-registry workspace-watcher migration/v01-to-v02 ensure-user-templates`: 7 files / 39 tests passed.
- `pnpm typecheck`: 10/10 package tasks passed.
7 changes: 7 additions & 0 deletions .Codex/workspace/v0_2_audit_progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# v0.2 Audit Progress

- Started audit in `/Users/haoqing/Documents/Github/codesign`.
- Read `docs/VISION.md`, `docs/PRINCIPLES.md`, `docs/v0.2-plan.md` excerpt, `docs/v0.2-final-report.md`, and `docs/v0.2-progress.md`.
- Verified current source tree and found follow-up implementation after final report.
- Ran focused core/desktop tests and full workspace typecheck; all passed.
- Final conclusion prepared: plan v0.2 is not fully implemented, mostly because storage/session architecture, pi-coding-agent primary path, allowlist persistence, Processes UI, and E2E are incomplete.
17 changes: 17 additions & 0 deletions .Codex/workspace/v0_2_audit_task_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# v0.2 Implementation Audit Plan

Goal: check whether `docs/v0.2-plan.md` is fully implemented in the current checkout, using docs as claims and source/tests as evidence.

## Phases

- [x] Read project constraints and v0.2 summary docs.
- [x] Extract v0.2 acceptance areas and task list.
- [x] Verify implementation evidence in source tree.
- [x] Run focused checks where practical.
- [x] Summarize complete, partial, and missing items.

## Notes

- This is a read-only audit unless a tiny progress note update is useful.
- Treat `docs/v0.2-final-report.md` as a claim, not proof.
- Current conclusion: v0.2 plan is partially implemented, with many modules green, but not fully implemented against the plan's architecture.
38 changes: 38 additions & 0 deletions .Codex/workspace/vision_principles_v2_update_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Vision and Principles v2 Update Plan

## Goal

Update `docs/VISION.md` and `docs/PRINCIPLES.md` so they reflect the latest v0.2 direction rather than the earlier Claude Design reproduction framing.

## Source Order

1. `docs/v0.2-plan.md` as the main source for the latest plan.
2. `docs/V0.2_ROADMAP.md` and `docs/plans/2026-04-23-v0.2-agentic-design-loop-design.md` for supporting context if needed.
3. Existing `docs/VISION.md` and `docs/PRINCIPLES.md` for stable constraints that should remain.

## Steps

1. Read v0.2 plan and supporting roadmap/design docs. - complete
2. Extract the product direction changes that belong in Vision. - complete
3. Extract engineering principle changes that belong in Principles. - complete
4. Edit both docs in place, preserving useful existing structure. - complete
5. Run lightweight Markdown/diff validation. - complete

## Notes

- Preserve hard constraints unless v0.2 plan clearly supersedes them.
- Keep docs direct and public-maintainer friendly.
- Avoid adding implementation plans to Vision; keep detailed work sequencing in roadmap/plan docs.

## Findings

- `docs/v0.2-plan.md` supersedes the older v0.2 agentic design doc because it was updated after the pi-coding-agent spike.
- The latest plan moves storage from SQLite to pi JSONL sessions plus real workspace files.
- The latest plan treats each design as a pi session, not a project entity.
- The latest plan says every design has a workspace; sealed/open mode is removed.
- `pi-coding-agent` now owns session, built-in tools, bash, model capabilities, provider registration, and events.
- Open CoDesign owns design-specific tools: ask, scaffold, skill, preview, gen_image, tweaks, todos, done.
- `DESIGN.md` is now both design-system input and generated artifact, using Google's spec.
- Built-in skills, scaffolds, and brand refs need progressive disclosure and license/source metadata.
- Repo license is MIT, so `docs/VISION.md` should not keep the older Apache-2.0 row.
- Validation: checked stale phrases (`Apache-2.0`, `shared SQLite`, old Claude Design demo framing, `§6b`), confirmed `docs/CONFIG.md` exists, and ran `git diff --check`.
10 changes: 10 additions & 0 deletions .changeset/codeql-hardening.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@open-codesign/shared": patch
"@open-codesign/runtime": patch
"@open-codesign/exporters": patch
"@open-codesign/providers": patch
"@open-codesign/core": patch
"@open-codesign/desktop": patch
---

Harden HTML, URL, marker, stack-frame, and retry parsing paths flagged by CodeQL during the v0.2 mainline promotion.
13 changes: 13 additions & 0 deletions .changeset/manifest-first-prompt-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@open-codesign/core": patch
"@open-codesign/providers": patch
"@open-codesign/templates": patch
"@open-codesign/desktop": patch
---

refactor: make create prompts manifest-first

- Replace keyword-routed create prompt composition with deterministic base sections plus resource manifest summaries.
- Move heavyweight guidance into lazy-loaded skills and remove stale single-shot artifact prompt exports.
- Remove full skill body injection helpers and demote old tool names in the chat working-card UI.
- Add artifact composition, chart rendering, and craft polish skill manifests for explicit progressive disclosure.
Loading
Loading