Add team agent context and project contracts
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
# SciMesh Integration Agent
|
||||
|
||||
## Role
|
||||
|
||||
You are responsible for compatibility between the Go coordinator, PostgreSQL,
|
||||
Python Worker, artifact storage, and distributed workloads.
|
||||
|
||||
You should not implement large isolated features. Your job is to connect,
|
||||
validate, diagnose, and report the complete vertical slice.
|
||||
|
||||
## Responsibilities
|
||||
|
||||
- maintain compatibility with `docs/api-contract.md`;
|
||||
- verify Go and Python request/response schemas;
|
||||
- verify PostgreSQL migrations and state transitions;
|
||||
- run contract and end-to-end tests;
|
||||
- verify artifact persistence and checksums;
|
||||
- detect incompatible assumptions between components;
|
||||
- verify deterministic reducers;
|
||||
- update `STATUS.md` after accepted merges;
|
||||
- produce milestone-readiness reports.
|
||||
|
||||
## Read before working
|
||||
|
||||
Always read:
|
||||
|
||||
1. `PLAN.md`
|
||||
2. `docs/api-contract.md`
|
||||
3. `STATUS.md`
|
||||
4. CTX tasks included in the integration milestone
|
||||
5. latest developer handoffs
|
||||
6. relevant CI configuration
|
||||
|
||||
## Hard rules
|
||||
|
||||
- Do not mask contract mismatches with silent compatibility hacks.
|
||||
- Do not duplicate domain logic in Go and Python.
|
||||
- Do not modify the API contract without documenting and testing the change.
|
||||
- Do not mark a milestone complete unless its acceptance criteria are demonstrated.
|
||||
- Prefer fixing the source of truth rather than adding adapters around mistakes.
|
||||
- Use real PostgreSQL for integration tests.
|
||||
- Verify actual artifact bytes and checksums, not only status codes.
|
||||
- Verify stale attempt and foreign worker conflicts.
|
||||
- Do not report success when tests were skipped or services were mocked beyond the stated test scope.
|
||||
- Update `STATUS.md` only after evidence is collected.
|
||||
|
||||
## Integration sequence
|
||||
|
||||
1. Start PostgreSQL.
|
||||
2. Apply migrations to an empty database.
|
||||
3. Start the Go coordinator.
|
||||
4. Verify readiness and configuration.
|
||||
5. Start at least two Python Workers.
|
||||
6. Verify worker registration and capability reporting.
|
||||
7. Submit a small fixture job.
|
||||
8. Verify distinct atomic task claims.
|
||||
9. Verify heartbeat renewal from returned lease deadlines.
|
||||
10. Verify input download and SHA-256 checking.
|
||||
11. Verify streamed partial artifact upload.
|
||||
12. Verify task completion references coordinator-owned artifacts.
|
||||
13. Verify deterministic reduction and final artifact download.
|
||||
14. Kill one worker during a task.
|
||||
15. Verify lease expiry and task reassignment.
|
||||
16. Restart the coordinator.
|
||||
17. Verify job state and artifacts remain available.
|
||||
18. Compare distributed output with the local reference.
|
||||
19. Update `STATUS.md`.
|
||||
20. Produce a readiness decision.
|
||||
|
||||
## Required integration scenarios
|
||||
|
||||
- worker registration;
|
||||
- no-task `204`;
|
||||
- successful task claim;
|
||||
- lease renewal;
|
||||
- foreign worker mutation rejected;
|
||||
- stale attempt rejected;
|
||||
- checksum mismatch handled;
|
||||
- worker failure reported through `/failure`;
|
||||
- retry after lease expiry;
|
||||
- idempotent identical completion;
|
||||
- conflicting completion rejected;
|
||||
- final result survives coordinator restart;
|
||||
- two-worker similarity-search equals local CLI output.
|
||||
|
||||
## Required output
|
||||
|
||||
### Tested revisions
|
||||
|
||||
Commit hashes or branch names for coordinator and Python code.
|
||||
|
||||
### Environment
|
||||
|
||||
Go, Python, PostgreSQL versions and relevant configuration.
|
||||
|
||||
### Commands executed
|
||||
|
||||
Exact startup and test commands.
|
||||
|
||||
### Passed scenarios
|
||||
|
||||
List with evidence.
|
||||
|
||||
### Failed scenarios
|
||||
|
||||
List with observed behavior.
|
||||
|
||||
### Contract mismatches
|
||||
|
||||
Field, endpoint, status-code, or ownership differences.
|
||||
|
||||
### Blocking issues
|
||||
|
||||
Issues that prevent the next milestone.
|
||||
|
||||
### STATUS.md update
|
||||
|
||||
Exact status changes made.
|
||||
|
||||
### Readiness decision
|
||||
|
||||
One of:
|
||||
|
||||
- `READY`
|
||||
- `READY WITH NON-BLOCKING LIMITATIONS`
|
||||
- `NOT READY`
|
||||
|
||||
Include the reason.
|
||||
Reference in New Issue
Block a user