From 548ebfdd901ae6e9fed3ed72a22f1b756d85dd46 Mon Sep 17 00:00:00 2001 From: krustophski Date: Sat, 30 May 2026 13:53:25 +0300 Subject: [PATCH] Document project restore point workflow --- AGENTS.md | 11 +++ .../2026-05-30-chat-driven-knowledge-sync.md | 5 ++ projects/garage/agent-log.md | 8 ++ projects/garage/agent-prompts.md | 18 ++++- projects/garage/decisions.md | 6 ++ projects/garage/status.md | 3 + projects/garage/technical-spec.md | 7 ++ skills/chat-driven-knowledge-sync.md | 10 +++ skills/index.md | 1 + ...ject-restore-points-and-failed-attempts.md | 80 +++++++++++++++++++ skills/repository-memory.md | 10 +++ 11 files changed, 158 insertions(+), 1 deletion(-) create mode 100644 skills/project-restore-points-and-failed-attempts.md diff --git a/AGENTS.md b/AGENTS.md index ed7c018..b69a363 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,6 +49,17 @@ Rules: 6. `agent-bus/heartbeats/`, `agent-bus/commands/`, and `agent-bus/results/` are historical or on-demand diagnostic mechanisms, not the current source of live truth. 7. Normal OS services such as SSH, VNC, Git, and local credential stores may remain enabled and configured for autostart. +## Project Repository Restore Points + +When work changes an actual project repository, not only this knowledge base: + +1. A verified working solution should become a project repository restore point: commit it, push it to the appropriate remote, and create/push a tag for important stable states. +2. Record the project commit hash, branch, tag, verification, and rollback notes in this GitHub knowledge base. +3. If no solution was found but the attempt contains useful changes or diagnostics, preserve it on a separate project branch such as `attempt/`, `debug/`, or `failed/`. +4. Do not merge failed or unverified attempts into `main` or a stable branch. +5. If an attempt is useless or unsafe to preserve as code, do not push it to the project repository; instead record the failed approach in `problems/` or the project `agent-log.md`. +6. Always document what should not be repeated, why it failed, and the next hypotheses. + ## Access Requirement A repository URL is enough to identify this knowledge base, but it is not enough to read or write a private repository. diff --git a/dialog-summaries/2026-05-30-chat-driven-knowledge-sync.md b/dialog-summaries/2026-05-30-chat-driven-knowledge-sync.md index d45476b..71e442b 100644 --- a/dialog-summaries/2026-05-30-chat-driven-knowledge-sync.md +++ b/dialog-summaries/2026-05-30-chat-driven-knowledge-sync.md @@ -26,23 +26,28 @@ Stop constant realtime updates and background heartbeats, while preserving all u - Durable knowledge written locally or to the local Git server must also be duplicated to the GitHub knowledge base. - Realtime heartbeat polling, scheduled `garage-agent-runner` tasks, and automatic after-reboot knowledge uploads are disabled by default. - SSH, VNC, Git, and local key/credential services remain normal machine services. +- Verified working project repository changes should be committed/pushed as restore points, with tags for important stable states. +- Useful failed attempts should be preserved on separate `attempt/`, `debug/`, or `failed/` branches and documented so agents do not repeat ineffective approaches. ## Current State - The repository now documents chat-driven GitHub synchronization as the default workflow. - `garage-agent-runner` is treated as a legacy/on-demand diagnostic tool, not the normal coordination layer. - A Windows helper script exists to disable `garage-agent-runner-*` scheduled tasks. +- `skills/project-restore-points-and-failed-attempts.md` documents restore-point and failed-attempt branch policy. ## Next Actions - Paste the current default garage prompt into Codex on `pump`, `qore`, and `wuu`. - On each machine, disable existing `garage-agent-runner-*` scheduled tasks unless the user explicitly asks for live monitoring. - Continue verifying SSH, VNC, GitHub push access, and local Git server access through the normal chat-driven workflow. +- Apply restore-point and failed-attempt branch rules to garage project repositories when working on KAMAZ, ProjectionMapping, StereoWallND, or other project code. ## Knowledge Base Updates - `AGENTS.md` - `skills/chat-driven-knowledge-sync.md` +- `skills/project-restore-points-and-failed-attempts.md` - `skills/self-learning-agent-loop.md` - `skills/multi-agent-github-coordination.md` - `skills/multi-machine-agent-orchestration.md` diff --git a/projects/garage/agent-log.md b/projects/garage/agent-log.md index 1221b69..4acb212 100644 --- a/projects/garage/agent-log.md +++ b/projects/garage/agent-log.md @@ -8,6 +8,14 @@ - Files changed: Updated global instructions, self-learning and orchestration skills, garage status/spec/orchestration/prompts/decisions, and agent-bus documentation; added `skills/chat-driven-knowledge-sync.md` and `agent-bus/runners/windows/disable-garage-agent-runner.ps1`. - Next handoff: Paste the current default prompt from `projects/garage/agent-prompts.md` into Codex on `pump`, `qore`, and `wuu`. Each machine should disable any existing `garage-agent-runner-*` scheduled task unless the user explicitly asks for live monitoring, while keeping SSH/VNC/Git services available. +## 2026-05-30 - Project Restore Point And Failed Attempt Rule + +- Machine: current Codex Mac. +- Agent: Codex. +- Summary: Added the rule that verified working changes in project repositories should be committed/pushed as restore points, with tags for important stable states. Useful failed attempts should be preserved only on separate `attempt/`, `debug/`, or `failed/` branches and documented so agents do not repeat ineffective approaches. +- Files changed: Added `skills/project-restore-points-and-failed-attempts.md`; updated global instructions, garage prompts, status, technical specification, decisions, and memory workflow docs. +- Next handoff: Local agents on `pump`, `qore`, and `wuu` should apply this rule to project repositories such as `kamaz5360`, `Kamaz_Cleaner`, `ProjectionMapping`, and `StereoWallND`. + ## 2026-05-26 - qore KAMAZ 5360 Rollback Point "пустой камаз" - Machine: `qore`. diff --git a/projects/garage/agent-prompts.md b/projects/garage/agent-prompts.md index c4cc125..1df8df9 100644 --- a/projects/garage/agent-prompts.md +++ b/projects/garage/agent-prompts.md @@ -20,6 +20,7 @@ https://github.com/krustophski/agent-knowledge-base Сначала прочитай: - AGENTS.md - skills/chat-driven-knowledge-sync.md +- skills/project-restore-points-and-failed-attempts.md - skills/multi-machine-agent-orchestration.md - projects/garage/status.md - projects/garage/technical-spec.md @@ -44,7 +45,13 @@ SSH, VNC, Git и локальные ключи/credential store оставь к - projects/garage/repositories.md если поменялась карта репозиториев; - projects/garage/agent-log.md; - skills/, problems/, locations/ для reusable знаний. -5. git add/commit, затем git pull --rebase origin main, затем git push origin main. +5. Если работа меняла проектный репозиторий: + - проверенное рабочее решение закоммить и запушь в project repo как restore point; + - для важной стабильной точки создай и запушь tag; + - неудачную, но полезную попытку сохрани только в отдельной ветке `attempt/`, `debug/` или `failed/`; + - не мержи failed/unverified попытки в main/stable; + - запиши commit/tag/branch и выводы в agent-knowledge-base. +6. Для agent-knowledge-base сделай git add/commit, затем git pull --rebase origin main, затем git push origin main. Любые локальные заметки или изменения в локальном Git server 192.168.1.66 должны дублироваться в основной GitHub knowledge base. Пароли, VNC passwords, SSH private keys, tokens и содержимое local .vnc файлов не печатай и не коммить. ``` @@ -70,6 +77,7 @@ https://github.com/krustophski/agent-knowledge-base - projects/garage/computers.md - projects/garage/repositories.md - skills/chat-driven-knowledge-sync.md +- skills/project-restore-points-and-failed-attempts.md - skills/multi-machine-agent-orchestration.md - skills/windows-remote-access-baseline.md - skills/remote-visual-access.md @@ -188,6 +196,14 @@ https://github.com/krustophski/agent-knowledge-base 4. Не коммить изменения в проектные репозитории, кроме agent-knowledge-base, без отдельного разрешения. 5. Если локальный репозиторий требует пароль/ключ для push/pull, проверь, что доступ есть, но не сохраняй секрет в Git. +Правило проектных restore points: +1. Если найдено и проверено рабочее решение в проектном репозитории, сделай commit и push в project repo как точку восстановления. +2. Для важной стабильной точки создай tag и push tag. +3. В agent-knowledge-base запиши project path, remote, branch, commit hash, tag, что проверено и как откатиться. +4. Если решение не найдено, но попытка полезна, сохрани изменения только в отдельную ветку `attempt/`, `debug/` или `failed/` и запушь её, если доступ есть. +5. Не мержи failed/unverified ветки в main/stable. +6. Если попытка бесполезная или опасная, не пушь её в project repo; вместо этого запиши failed approach в problems/ или projects/garage/agent-log.md, чтобы её не повторяли. + Проверь VNC-файлы в `C:\git`: 1. Проверь, есть ли VNC connection/config файлы для `pump`, `qore`, `wuu`. 2. Используй их локально для VNC-подключения, если это нужно для проверки. diff --git a/projects/garage/decisions.md b/projects/garage/decisions.md index fa699db..3b6ae27 100644 --- a/projects/garage/decisions.md +++ b/projects/garage/decisions.md @@ -23,3 +23,9 @@ Reason: During the 2026-05-26 KAMAZ setup, Unreal-side offsets, custom PhysicsAs Decision: Use chat-driven GitHub knowledge synchronization as the default coordination model. Agents read the repository when the user gives the link, work in the local chat/session, update durable Markdown knowledge after meaningful operations, commit/pull-rebase/push to GitHub, and summarize useful dialogue context. Realtime heartbeat polling, scheduled `garage-agent-runner` tasks, and automatic after-reboot knowledge uploads are disabled by default. Reason: The user wants knowledge preserved and shared across chats and computers, but does not want computers constantly updating, uploading, or restarting background heartbeat services after reboot. SSH, VNC, Git, and local key/credential services remain normal machine services. + +## 2026-05-30 - Project Restore Points And Failed Attempts + +Decision: Verified working project changes should be committed and pushed as project repository restore points, with tags for important stable states. Useful failed attempts should be committed only to separate `attempt/`, `debug/`, or `failed/` branches and documented in the knowledge base. Failed or unverified branches must not be merged into `main` or another stable branch. + +Reason: The user wants agents to preserve both working recovery points and knowledge about approaches that did not solve a problem, so future agents do not repeat the same ineffective work. diff --git a/projects/garage/status.md b/projects/garage/status.md index a26d11e..5b35e32 100644 --- a/projects/garage/status.md +++ b/projects/garage/status.md @@ -7,6 +7,7 @@ Build and finish the garage auto-simulator setup by consolidating scattered proj ## Current State - 2026-05-30 operating-model update: garage coordination now uses chat-driven GitHub knowledge sync by default. Agents read/pull this repository when the user gives the link, work in the local chat/session, update durable knowledge after meaningful operations, commit/pull-rebase/push to GitHub, and summarize useful dialogue context. Realtime heartbeat polling, scheduled `garage-agent-runner` tasks, and automatic after-reboot knowledge uploads are disabled by default. SSH, VNC, Git, and local credential/key services remain normal machine services. +- 2026-05-30 project repository rule: verified working project changes should be committed and pushed as restore points in the project repository, with tags for important stable states. Useful failed attempts should be kept on separate `attempt/`, `debug/`, or `failed/` branches and documented so agents do not repeat the same ineffective approach. - 2026-05-26 `qore` KAMAZ 5360 Chaos Vehicle prototype: `C:\git\kamaz5360` now contains a working Unreal 5.7 standalone KAMAZ truck setup with cleaned Blender-derived skeletal mesh, automatic PhysicsAsset import, four Chaos wheels, measured wheel radius `53.78 cm`, mass `9500 kg`, ZF 9S1310-like gear ratios, working wheel rotation/steering, and tuned suspension/brake dive. Reconstruction notes are in `projects/garage/kamaz5360-chaos-vehicle.md`; reusable issue record is `problems/2026-05-26-ue57-chaos-vehicle-blender-wheel-suspension.md`. - 2026-05-26 `qore` KAMAZ 5360 hardware integration pass: `C:\git\kamaz5360` now has the copied `MOZAVehicleInput` plugin and minimal MOZA SDK from `C:\git\Kamaz_Cleaner`, F9 switching between default MOZA control and keyboard fallback, an HTTP telemetry page at `http://127.0.0.1:8765/dashboard`, JSON at `/api/telemetry`, and Buzina/CAN joystick docs/tools/component copied from `C:\git\joystick` for later plow control. A PIE crash from binding UE `HTTPServer` route `/` was fixed by moving the dashboard to `/dashboard`; see `problems/2026-05-26-ue57-httpserver-root-route-crash.md`. - 2026-05-26 `qore` local KAMAZ repo latest commit: `f67bdca Add MOZA input telemetry and joystick prep`. The bare repository now exists at `ssh://qore@192.168.1.66/srv/git/kamaz5360.git`; `master` is pushed at `f67bdca`, with tags `empty-kamaz` and `before-moza-telemetry-20260526-210144`. From `qore`, use `GIT_SSH_COMMAND` with `IdentitiesOnly=yes` and key `C:/Users/post/.ssh/id_devman`; default Git SSH can offer too many keys and fail with `Too many authentication failures`. @@ -110,6 +111,8 @@ The first useful version should probably be a small playable prototype: - On `pump`, `qore`, and `wuu`, disable existing `garage-agent-runner-*` scheduled tasks using `agent-bus/runners/windows/disable-garage-agent-runner.ps1` unless the user explicitly asks for live monitoring. - When this repository link is pasted into Codex on another machine, that agent should follow `skills/chat-driven-knowledge-sync.md`: read/pull context, do the requested work, update Markdown memory, commit, pull/rebase, and push to GitHub. +- When a garage project repository reaches a verified working state, push a project commit and tag if useful, then record the restore point in this knowledge base. +- When a garage project attempt fails but contains useful diagnostics or code, push it only to an `attempt/`, `debug/`, or `failed/` branch and record why it failed. - Treat `agent-bus/heartbeats/` as historical/on-demand diagnostics, not as live status. - Keep `C:\git\kamaz5360` pushed to `ssh://qore@192.168.1.66/srv/git/kamaz5360.git` after each confirmed working milestone. - Future KAMAZ vehicle agents should start from `projects/garage/kamaz5360-chaos-vehicle.md` before changing Blender export, UE import, PhysicsAsset, wheel, or suspension settings. diff --git a/projects/garage/technical-spec.md b/projects/garage/technical-spec.md index 66a6075..d665d8b 100644 --- a/projects/garage/technical-spec.md +++ b/projects/garage/technical-spec.md @@ -50,6 +50,9 @@ The simulator must support: - Each source computer must be documented in `locations/` once its name, role, and access method are known. - Existing local simulator projects must be inventoried before merging or rewriting. - Project consolidation must preserve useful work, decisions, and reusable solutions. +- Verified working changes in project repositories should be committed and pushed as restore points; important stable states should also get tags. +- Useful failed attempts should be preserved on separate `attempt/`, `debug/`, or `failed/` branches when they contain evidence worth keeping, and must not be merged into stable branches until they become verified solutions. +- Useless or unsafe failed attempts should not be pushed to project repositories, but the failed approach must be recorded in the knowledge base so future agents do not repeat it. - Project computers should support camera/webcam viewing for physical environment analysis where useful. - Project computers should support VNC remote control where useful; TightVNC Server is the Windows garage baseline, while TigerVNC remains useful as a viewer. - Project computers should support agent orchestration through GitHub knowledge-base commits, SSH, VNC, and local Git access. @@ -88,6 +91,7 @@ The simulator must support: - The simulator should separate rendering, input devices, projection calibration, and NDI output enough that they can be tested independently. - Source-computer inventory must be documented so agents can understand where each project fragment came from. - Repository/project merging must follow the shared multi-repository workflow and avoid destructive actions until inventory is complete. +- Restore points and failed-attempt branches must be documented in the knowledge base with branch names, commit hashes, tags, verification status, and rollback notes. - Camera and VNC credentials must not be stored in this repository. - Agent orchestration must be auditable and must not store secrets in command files. - Service recovery and connectivity checks must report only status facts, not passwords, tokens, private keys, or VNC credentials. @@ -209,6 +213,9 @@ The simulator must support: - The three source computers are identified and documented. - All existing local simulator repositories/projects are inventoried. - A consolidation plan exists before repositories are merged or rewritten. +- Verified working project milestones are pushed to the relevant project repository and referenced from the knowledge base. +- Important stable project milestones have tags where useful. +- Failed but useful attempts are preserved on non-stable branches and documented with why they failed. - A single target runtime computer is selected and documented. - A user can drive the truck. - Driving through or using the truck against snow visibly changes snow state. diff --git a/skills/chat-driven-knowledge-sync.md b/skills/chat-driven-knowledge-sync.md index 47ca601..811701a 100644 --- a/skills/chat-driven-knowledge-sync.md +++ b/skills/chat-driven-knowledge-sync.md @@ -51,6 +51,16 @@ GitHub is the required durable memory target. If local Git server notes or local repository notes are written, duplicate the durable knowledge to the GitHub knowledge base in the same session. +## Project Repository Push Rule + +When the agent changes an actual project repository: + +- verified working solution: commit and push it as a restore point in the project repository, create/push a stable tag for important states, and record the commit/tag in the GitHub knowledge base; +- useful failed or incomplete attempt: commit and push it only to a separate branch such as `attempt/`, `debug/`, or `failed/`, then record why it failed in the GitHub knowledge base; +- useless or unsafe attempt: do not push it to the project repository, but record the lesson in `problems/` or the project log. + +Do not merge unverified or failed attempts into `main` or another stable branch. + ## Disabled By Default Do not start persistent realtime sync for knowledge updates: diff --git a/skills/index.md b/skills/index.md index 07d62d4..13dbf8b 100644 --- a/skills/index.md +++ b/skills/index.md @@ -9,6 +9,7 @@ - `multi-repository-projects.md` - how to coordinate and merge multiple local git repositories into one project. - `self-learning-agent-loop.md` - required loop for agents to learn from work and update shared memory. - `chat-driven-knowledge-sync.md` - current default workflow: repo link in chat triggers read/work/summarize/commit/push; realtime runners are disabled by default. +- `project-restore-points-and-failed-attempts.md` - how to commit/push verified project restore points and preserve useful failed attempts on separate branches. - `mcp-server-management.md` - how agents keep a shared MCP server set synchronized across machines. - `dialog-summary-import.md` - how agents summarize useful context from separate dialogues into this repository. - `remote-visual-access.md` - how agents set up webcams/cameras and VNC for remote visual analysis and control. diff --git a/skills/project-restore-points-and-failed-attempts.md b/skills/project-restore-points-and-failed-attempts.md new file mode 100644 index 0000000..bc94b9d --- /dev/null +++ b/skills/project-restore-points-and-failed-attempts.md @@ -0,0 +1,80 @@ +# Project Restore Points And Failed Attempts + +## Purpose + +Preserve both successful project progress and useful failed attempts so future agents can restore known-good states and avoid repeating the same ineffective work. + +## Verified Solution Rule + +When a working solution is found and verified in a project repository: + +1. Commit the project changes in that project repository. +2. Push the commit to the appropriate project remote, usually the local Git server when available. +3. For important stable states, create and push a tag. +4. Update the GitHub knowledge base with: + - project repository path; + - branch; + - commit hash; + - tag name, if created; + - what was fixed or achieved; + - how it was verified; + - next safe restore command or rollback note. + +Use stable tags for meaningful restore points, for example: + +```text +stable-moza-input-YYYYMMDD-HHMM +stable-ndi-mirrors-YYYYMMDD-HHMM +stable-projection-calibration-YYYYMMDD-HHMM +empty-kamaz +``` + +Do not call a commit or tag stable unless it was actually verified. + +## Failed Attempt Rule + +When a solution is not found, but the attempt contains useful evidence, commands, code changes, or diagnostics: + +1. Do not merge the attempt into `main` or the project stable branch. +2. Preserve useful project changes on a separate branch. +3. Push that branch if project repository access is available. +4. Update the GitHub knowledge base with: + - symptoms; + - hypothesis; + - attempted commands and files changed; + - result; + - why it did not solve the problem; + - what should not be retried the same way; + - next hypotheses. + +Recommended branch prefixes: + +```text +attempt/ +debug/ +failed/ +``` + +Use `attempt/` for unfinished exploratory work, `debug/` for diagnostic branches, and `failed/` when the approach is known not to solve the problem but should be preserved. + +## Throwaway Attempts + +If an attempt is clearly useless, dangerous, or only temporary noise: + +1. Do not push it to the project repository. +2. Record the lesson in `problems/` or `projects//agent-log.md`. +3. Include enough detail so another agent does not repeat the same path. + +## Knowledge Base Linkage + +Every project restore point or failed attempt branch should be referenced from the knowledge base. + +Use: + +- `projects//status.md` for current state and next actions; +- `projects//agent-log.md` for chronological handoff; +- `projects//repositories.md` for branch/remote maps; +- `problems/` for reusable failed approaches and solved issues; +- `dialog-summaries/` when the current chat contains important context. + +GitHub `agent-knowledge-base` remains the required durable memory target even when the project code is pushed to a local Git server. diff --git a/skills/repository-memory.md b/skills/repository-memory.md index 5277a91..6a42ef7 100644 --- a/skills/repository-memory.md +++ b/skills/repository-memory.md @@ -11,6 +11,8 @@ Current default: synchronization is chat-driven. The repository link in a chat i Use this skill whenever an agent: - solves a non-trivial problem; +- reaches a verified project restore point; +- tries a useful approach that fails and should not be repeated; - discovers a machine-specific setup detail; - changes project state; - receives a user clarification that changes requirements or workflow; @@ -85,3 +87,11 @@ Every solved problem should include: - solution; - verification; - related files or commands. + +## Project Repository References + +When project code is changed, the knowledge base must record the project repository outcome: + +- verified solution: project repo path, branch, commit hash, pushed remote, tag if created, and verification; +- failed useful attempt: project repo path, failed branch name, commit hash if pushed, what was tried, why it failed, and what not to repeat; +- throwaway attempt: no project push, but a clear note in `problems/` or `projects//agent-log.md`.