Add multi-repository project coordination
This commit is contained in:
parent
537f5f5fcc
commit
0bed3e1ac0
10 changed files with 301 additions and 4 deletions
25
AGENTS.md
25
AGENTS.md
|
|
@ -12,7 +12,8 @@ At the beginning of work:
|
|||
4. Identify the active project from the user request or `projects/index.md`.
|
||||
5. Search global knowledge first: `skills/`, `problems/`, and `locations/`.
|
||||
6. Read the active project's `status.md`, `technical-spec.md`, `decisions.md`, `notes.md`, and `agent-log.md` when they exist.
|
||||
7. Update project status when a meaningful change happens.
|
||||
7. Read the active project's `repositories.md` when it exists.
|
||||
8. Update project status when a meaningful change happens.
|
||||
|
||||
## Access Requirement
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ Use project folders only for project-specific state:
|
|||
|
||||
- current status;
|
||||
- current technical specification;
|
||||
- repository map for all local and remote repos that belong to the project;
|
||||
- next actions;
|
||||
- project decisions;
|
||||
- project handoffs;
|
||||
|
|
@ -80,9 +82,23 @@ When a project changes:
|
|||
|
||||
1. Update `projects/<project>/status.md`.
|
||||
2. Update `projects/<project>/technical-spec.md` when requirements, constraints, functionality, acceptance criteria, or implementation assumptions change.
|
||||
3. Keep `Current State`, `Next Actions`, and `Open Questions` current.
|
||||
4. Add decisions to `decisions.md` if they affect future work.
|
||||
5. Add a short entry to `agent-log.md` with the date, machine, agent name if known, summary, and next handoff.
|
||||
3. Update `projects/<project>/repositories.md` when a local or remote repository is added, removed, renamed, split, merged, or changes responsibility.
|
||||
4. Keep `Current State`, `Next Actions`, and `Open Questions` current.
|
||||
5. Add decisions to `decisions.md` if they affect future work.
|
||||
6. Add a short entry to `agent-log.md` with the date, machine, agent name if known, summary, and next handoff.
|
||||
|
||||
## Multi-Repository Projects
|
||||
|
||||
A project may be composed from multiple local git repositories.
|
||||
|
||||
For every multi-repository project:
|
||||
|
||||
1. Keep `projects/<project>/repositories.md` as the project-level repository map.
|
||||
2. Each participating local repository should have its own root `AGENTS.md`.
|
||||
3. Use `templates/repository-agents.md` as the standard template for repository-level `AGENTS.md`.
|
||||
4. Repository-level `AGENTS.md` must describe that repository's role, paths, commands, dependencies, integration points, and handoff rules.
|
||||
5. Shared knowledge discovered inside any repository still belongs in global `skills/`, `problems/`, or `locations/`.
|
||||
6. Do not merge repositories mechanically until ownership, history preservation, target structure, and conflict handling are documented in `repositories.md`.
|
||||
|
||||
## Technical Specification Requests
|
||||
|
||||
|
|
@ -105,6 +121,7 @@ Agents should communicate asynchronously through:
|
|||
- `projects/<project>/agent-log.md` for handoffs and status messages;
|
||||
- `projects/<project>/status.md` for current state and next actions;
|
||||
- `projects/<project>/technical-spec.md` for the current technical specification;
|
||||
- `projects/<project>/repositories.md` for local and remote repositories that belong to the project;
|
||||
- `projects/<project>/decisions.md` for durable decisions;
|
||||
- `problems/` for solved issues and reusable fixes that may apply across projects;
|
||||
- `skills/` for repeatable procedures that may apply across projects.
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ Private repository access is required. A link lets an agent locate the repositor
|
|||
- `skills/` - reusable agent skills and procedures.
|
||||
- `projects/` - project-specific state, status, next actions, and decisions.
|
||||
- `projects/<project>/technical-spec.md` - current technical specification generated and updated from dialogue.
|
||||
- `projects/<project>/repositories.md` - map of local and remote git repositories that belong to the project.
|
||||
- `projects/<project>/agent-log.md` - cross-agent handoff log for a specific project.
|
||||
- `problems/` - solved problems, symptoms, root causes, and fixes that can be reused across projects.
|
||||
- `locations/` - physical locations, computers, access notes, and environment facts.
|
||||
|
|
|
|||
|
|
@ -25,3 +25,12 @@
|
|||
- Files changed: Added `projects/garage/technical-spec.md`, `templates/technical-spec.md`, and `skills/live-technical-spec.md`.
|
||||
- Verified: Technical specification file created for current `garage` state.
|
||||
- Next handoff: When the user asks for "ТЗ по проекту garage", return the latest `projects/garage/technical-spec.md` after applying any new conversation updates.
|
||||
|
||||
## 2026-05-24 - Multi-Repository Project Requirement
|
||||
|
||||
- Machine: current Codex desktop machine.
|
||||
- Agent: Codex.
|
||||
- Summary: User requested a way for agents to combine several local git repositories into one project, using matching `AGENTS.md` files in each repository.
|
||||
- Files changed: Added `projects/garage/repositories.md`, `skills/multi-repository-projects.md`, `templates/repository-agents.md`, and `templates/project-repositories.md`.
|
||||
- Verified: Repository map created for current `garage` state.
|
||||
- Next handoff: When a source repository is created for `garage`, add it to `projects/garage/repositories.md` and create its root `AGENTS.md` from `templates/repository-agents.md`.
|
||||
|
|
|
|||
48
projects/garage/repositories.md
Normal file
48
projects/garage/repositories.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Garage Repositories
|
||||
|
||||
## Project
|
||||
|
||||
`garage`
|
||||
|
||||
## Repository Map
|
||||
|
||||
| Name | Role | Local Path | Remote URL | Branch | Status |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| agent-knowledge-base | shared memory, project documentation, global skills | `/Users/post/Documents/Codex/2026-05-24/github-private-github` | `https://github.com/krustophski/agent-knowledge-base` | `main` | active |
|
||||
| garage-simulator | future simulator implementation repository | not selected | not created | not selected | planned |
|
||||
|
||||
## Topology
|
||||
|
||||
Current topology: project memory exists in `agent-knowledge-base`; simulator source code repository has not been created yet.
|
||||
|
||||
Expected topology options:
|
||||
|
||||
- create a separate `garage-simulator` repository for implementation;
|
||||
- keep implementation and project memory separate;
|
||||
- later consolidate implementation repositories if the simulator is split into client, assets, tooling, or services.
|
||||
|
||||
## Integration Points
|
||||
|
||||
- `agent-knowledge-base` stores project state, technical specification, decisions, handoffs, and reusable knowledge.
|
||||
- Future implementation repositories should each have a root `AGENTS.md` based on `templates/repository-agents.md`.
|
||||
|
||||
## Merge Or Consolidation Plan
|
||||
|
||||
- Current strategy: no repository merge yet.
|
||||
- Target structure: undecided.
|
||||
- Preserve history: yes, if implementation repositories are later combined.
|
||||
- Expected conflicts: unknown until source repositories exist.
|
||||
- Verification: build, run, and test the simulator after any repository consolidation.
|
||||
|
||||
## Agent Rules
|
||||
|
||||
- Do not put reusable implementation knowledge only in `projects/garage/`.
|
||||
- Store general engine, build, physics, GitHub, and agent workflow findings in global `skills/` or `problems/`.
|
||||
- Keep `projects/garage/repositories.md` current whenever a simulator repository is created, moved, renamed, split, or merged.
|
||||
- Every `garage` source repository should have a root `AGENTS.md`.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- What will the implementation repository be named?
|
||||
- Will `garage` start as one repository or several repositories?
|
||||
- Should implementation live in a separate private GitHub repository?
|
||||
|
|
@ -43,6 +43,7 @@ The prototype should demonstrate:
|
|||
- A browser-based Three.js prototype is a likely default if the user wants fast visual iteration and easy testing.
|
||||
- Unity, Unreal, or Godot may be considered if realistic vehicle physics becomes more important than fast browser iteration.
|
||||
- The first snow mechanic can be grid-based, tile-based, or visual-state-based instead of physically simulated.
|
||||
- The project may later consist of multiple local git repositories, each with its own root `AGENTS.md`; the project-level repository map is `projects/garage/repositories.md`.
|
||||
|
||||
## Data And Assets
|
||||
|
||||
|
|
@ -62,6 +63,7 @@ The prototype should demonstrate:
|
|||
## Milestones
|
||||
|
||||
- Choose target platform and engine.
|
||||
- Choose implementation repository structure.
|
||||
- Define first prototype architecture.
|
||||
- Build minimal truck movement.
|
||||
- Build minimal snow-clearing mechanic.
|
||||
|
|
@ -75,3 +77,4 @@ The prototype should demonstrate:
|
|||
- Should the first version be 2D, 2.5D, or 3D?
|
||||
- Should the truck use keyboard, gamepad, touch, or AI controls?
|
||||
- Should snow clearing be grid-based, mesh-based, particle-based, or physics-based?
|
||||
- Should implementation live in one repository or several local repositories that are later combined?
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ Each project should have:
|
|||
|
||||
- `status.md` - current state and next actions.
|
||||
- `technical-spec.md` - current technical specification formed from dialogue.
|
||||
- `repositories.md` - local and remote repositories that belong to the project.
|
||||
- `decisions.md` - durable decisions and rationale.
|
||||
- `notes.md` - useful context that does not fit elsewhere.
|
||||
- `agent-log.md` - chronological cross-agent handoff log.
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@
|
|||
- `multi-agent-github-coordination.md` - how agents on different computers coordinate through GitHub.
|
||||
- `global-knowledge-first.md` - how to keep reusable knowledge shared across all projects.
|
||||
- `live-technical-spec.md` - how to maintain and return project technical specifications.
|
||||
- `multi-repository-projects.md` - how to coordinate and merge multiple local git repositories into one project.
|
||||
|
|
|
|||
104
skills/multi-repository-projects.md
Normal file
104
skills/multi-repository-projects.md
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
# Multi-Repository Projects
|
||||
|
||||
## Purpose
|
||||
|
||||
Coordinate projects that are built from multiple local git repositories, and make it possible for agents to combine them into one coherent project when needed.
|
||||
|
||||
## Core Rule
|
||||
|
||||
The project-level memory tracks how repositories relate to each other. Each local repository tracks its own operational details in its own root `AGENTS.md`.
|
||||
|
||||
## Required Project File
|
||||
|
||||
Every project with more than one repository must maintain:
|
||||
|
||||
```text
|
||||
projects/<project>/repositories.md
|
||||
```
|
||||
|
||||
This file is the source of truth for:
|
||||
|
||||
- repository names;
|
||||
- local paths;
|
||||
- remote URLs;
|
||||
- repository roles;
|
||||
- primary branches;
|
||||
- ownership boundaries;
|
||||
- integration points;
|
||||
- merge or migration plan;
|
||||
- open conflicts and risks.
|
||||
|
||||
## Required Repository File
|
||||
|
||||
Every participating local repository should contain a root:
|
||||
|
||||
```text
|
||||
AGENTS.md
|
||||
```
|
||||
|
||||
Use:
|
||||
|
||||
```text
|
||||
templates/repository-agents.md
|
||||
```
|
||||
|
||||
as the standard template.
|
||||
|
||||
Repository-level `AGENTS.md` must answer:
|
||||
|
||||
- What does this repository do?
|
||||
- Which project does it belong to?
|
||||
- Where is it located locally?
|
||||
- What commands build, test, run, and verify it?
|
||||
- What files and directories matter most?
|
||||
- What other repositories does it depend on?
|
||||
- What should agents update before handoff?
|
||||
|
||||
## Agent Startup Procedure
|
||||
|
||||
When assigned to a multi-repository project:
|
||||
|
||||
1. Read the global memory repository `AGENTS.md`.
|
||||
2. Read `projects/<project>/repositories.md`.
|
||||
3. For each relevant local repository, read its root `AGENTS.md`.
|
||||
4. Check git status in every repository before editing.
|
||||
5. Work only inside the repository or repositories relevant to the task.
|
||||
6. Record reusable findings globally in `skills/`, `problems/`, or `locations/`.
|
||||
7. Update project-level `repositories.md` when repository topology changes.
|
||||
|
||||
## Combining Repositories
|
||||
|
||||
Before combining several repositories into one project:
|
||||
|
||||
1. Identify the target repository or new parent repository.
|
||||
2. Decide whether to preserve git history.
|
||||
3. Define the destination path for each source repository.
|
||||
4. List expected file conflicts.
|
||||
5. List dependency and build changes.
|
||||
6. Back up or push all source repositories first.
|
||||
7. Perform the merge using a documented method.
|
||||
8. Verify build, tests, and runtime behavior.
|
||||
9. Update every affected `AGENTS.md`.
|
||||
10. Update `projects/<project>/repositories.md`.
|
||||
|
||||
## Preferred Merge Strategies
|
||||
|
||||
Use one of these strategies based on the situation:
|
||||
|
||||
- `submodules`: keep independent repositories with pinned commits.
|
||||
- `subtree`: import another repository into a subdirectory while preserving useful history.
|
||||
- `monorepo migration`: move multiple repositories into one repository with clear subdirectories.
|
||||
- `workspace only`: keep separate repositories locally, but document how they work together.
|
||||
|
||||
Do not flatten multiple repositories into one directory without a written plan.
|
||||
|
||||
## Handoff Requirements
|
||||
|
||||
After changing repository topology:
|
||||
|
||||
- update `projects/<project>/repositories.md`;
|
||||
- update root `AGENTS.md` inside affected local repositories;
|
||||
- update `projects/<project>/agent-log.md`;
|
||||
- record reusable merge knowledge in global `skills/` or `problems/`;
|
||||
- commit and push all changed repositories that have remotes.
|
||||
|
||||
39
templates/project-repositories.md
Normal file
39
templates/project-repositories.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Project Repositories
|
||||
|
||||
## Project
|
||||
|
||||
Project name.
|
||||
|
||||
## Repository Map
|
||||
|
||||
| Name | Role | Local Path | Remote URL | Branch | Status |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| example | role | `/path/to/repo` | `https://github.com/owner/repo` | `main` | active |
|
||||
|
||||
## Topology
|
||||
|
||||
Describe whether the project is a monorepo, multiple independent repositories, submodules, subtrees, or a local workspace.
|
||||
|
||||
## Integration Points
|
||||
|
||||
- Repository A depends on Repository B through:
|
||||
|
||||
## Merge Or Consolidation Plan
|
||||
|
||||
- Current strategy:
|
||||
- Target structure:
|
||||
- Preserve history:
|
||||
- Expected conflicts:
|
||||
- Verification:
|
||||
|
||||
## Agent Rules
|
||||
|
||||
- Every local repository must keep a root `AGENTS.md`.
|
||||
- Repository-level `AGENTS.md` files should use `templates/repository-agents.md`.
|
||||
- Reusable knowledge belongs in global `skills/`, `problems/`, or `locations/`.
|
||||
- Project-specific repository topology belongs here.
|
||||
|
||||
## Open Questions
|
||||
|
||||
- None known.
|
||||
|
||||
74
templates/repository-agents.md
Normal file
74
templates/repository-agents.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
# Repository Agent Instructions
|
||||
|
||||
## Repository
|
||||
|
||||
- Name:
|
||||
- Project:
|
||||
- Local path:
|
||||
- Remote URL:
|
||||
- Primary branch:
|
||||
|
||||
## Role In Project
|
||||
|
||||
Describe what this repository owns.
|
||||
|
||||
## Agent Startup
|
||||
|
||||
1. Read this file.
|
||||
2. Check `git status`.
|
||||
3. Read the project-level memory in `projects/<project>/` from `krustophski/agent-knowledge-base`.
|
||||
4. Read related repository `AGENTS.md` files listed below.
|
||||
5. Search global `skills/` and `problems/` before solving repeated issues.
|
||||
|
||||
## Important Paths
|
||||
|
||||
- `path/` - purpose.
|
||||
|
||||
## Commands
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
# command
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
```bash
|
||||
# command
|
||||
```
|
||||
|
||||
### Test
|
||||
|
||||
```bash
|
||||
# command
|
||||
```
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
# command
|
||||
```
|
||||
|
||||
## Dependencies
|
||||
|
||||
- Runtime:
|
||||
- Package manager:
|
||||
- External services:
|
||||
- Related local repositories:
|
||||
|
||||
## Integration Points
|
||||
|
||||
- Repository/path/API:
|
||||
|
||||
## Handoff Checklist
|
||||
|
||||
- Update this repository's `AGENTS.md` if commands, paths, dependencies, or responsibilities changed.
|
||||
- Update project-level `projects/<project>/repositories.md` if repository topology changed.
|
||||
- Record reusable solutions in global `skills/` or `problems/`.
|
||||
- Commit and push relevant changes when allowed.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- None recorded.
|
||||
|
||||
Reference in a new issue