Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .agents/skills/green-refactor/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Não use esta skill para:
- Primeiro faça os testes passarem com o menor código possível.
- Só depois refatore.
- Preserve contratos, nomes e limites arquiteturais do projeto.
- Use sempre o nome **AIgnt-Synapse-Flow** e deixe claro, ao menos uma vez, que ele é a engine própria de pipeline do AIgnt OS.
- Use sempre o nome **Synapse-Flow** e deixe claro, ao menos uma vez, que ele é a engine própria de pipeline do SynapseOS.
- Mantenha compatibilidade com o MVP:
- pipeline linear
- runtime dual simples
Expand All @@ -67,7 +67,7 @@ Depois de verde:
4. preserve contratos e testes
5. não aumente escopo da feature

# Pontos de atenção no AIgnt OS
# Pontos de atenção no SynapseOS

Tenha cuidado especial com:

Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/spec-editor/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Use esta skill quando a tarefa for transformar um pedido do usuári

# Objetivo

Transformar um pedido do usuário em uma SPEC de feature pequena, coerente com o AIgnt OS e pronta para alimentar TDD.
Transformar um pedido do usuário em uma SPEC de feature pequena, coerente com o SynapseOS e pronta para alimentar TDD.

# Leia antes de agir

Expand Down Expand Up @@ -44,7 +44,7 @@ Não use esta skill para:
- A SPEC deve ser pequena o suficiente para caber em 1 a 3 dias de trabalho.
- A SPEC deve ser coerente com o MVP:
- pipeline linear state-driven
- AIgnt-Synapse-Flow como engine própria de pipeline
- Synapse-Flow como engine própria de pipeline
- runtime dual simples
- memória semântica apenas advisory
- observabilidade local
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/spec-validator/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Não use esta skill para:
```bash
uv run --no-sync python -c "
from pathlib import Path
from aignt_os.specs.validator import validate_spec_file
from synapse_os.specs.validator import validate_spec_file
result = validate_spec_file(Path('features/<feature>/SPEC.md'))
print(result)
"
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/test-red/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Não use esta skill para:
4. Garanta que os testes falham pelos motivos certos.
5. Não implemente o código da feature nesta etapa.

# Convenções para o AIgnt OS
# Convenções para o SynapseOS

Priorize testes para:

Expand Down
2 changes: 1 addition & 1 deletion .claude/agents/explorer.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: explorer
description: Explorador read-only da arquitetura do AIgnt OS. Mapeia arquivos afetados, ADRs, SPECs e dependências operacionais antes de qualquer edição de código.
description: Explorador read-only da arquitetura do SynapseOS. Mapeia arquivos afetados, ADRs, SPECs e dependências operacionais antes de qualquer edição de código.
model: claude-sonnet-4-6
disallowedTools:
- Write
Expand Down
4 changes: 2 additions & 2 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Project-local Codex configuration for AIgnt OS.
# Project-local Codex configuration for SynapseOS.
# Repo defaults should be safe for daily work and explicit about multi-agent roles.

model = "gpt-5.4"
Expand Down Expand Up @@ -30,7 +30,7 @@ max_threads = 6
max_depth = 1

[agents.explorer]
description = "Read-only codebase explorer for mapping AIgnt OS architecture, affected code paths, specs, ADRs, and operational evidence before changes."
description = "Read-only codebase explorer for mapping SynapseOS architecture, affected code paths, specs, ADRs, and operational evidence before changes."
config_file = "agents/explorer.toml"

[agents.reviewer]
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aignt-os-codex-dev",
"name": "synapse-os-codex-dev",
"dockerComposeFile": [
"../compose.yaml",
"../compose.dev.yaml"
Expand Down
26 changes: 13 additions & 13 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copilot Instructions for `aignt-os`
# Copilot Instructions for `synapse-os`

## Read first

Expand Down Expand Up @@ -153,7 +153,7 @@ That is only a lightweight repo check. It does **not** replace the operational `

## High-level architecture

AIgnt OS is a CLI-first meta-orchestrator for external AI tools. The intended system is centered on **AIgnt-Synapse-Flow**, the repository's own pipeline engine, which is state-driven and spec-first.
SynapseOS is a CLI-first meta-orchestrator for external AI tools. The intended system is centered on **Synapse-Flow**, the repository's own pipeline engine, which is state-driven and spec-first.

There are two related flows to keep straight:

Expand All @@ -173,21 +173,21 @@ REQUEST → SPEC_DISCOVERY → SPEC_NORMALIZATION → SPEC_VALIDATION → PLAN

The docs describe a larger target system, but the current codebase now includes more than the earliest MVP slices. The implemented modules are concentrated in:

- `src/aignt_os/cli/app.py` for the public Typer CLI
- `src/aignt_os/runtime/` for the minimal persistent runtime lifecycle, worker loop, and dispatch service
- `src/aignt_os/specs/validator.py` for SPEC validation
- `src/aignt_os/state_machine.py` for the linear state machine
- `src/aignt_os/pipeline.py`, `src/aignt_os/persistence.py`, and `src/aignt_os/reporting.py` for the current persisted pipeline path and `RUN_REPORT.md`
- `src/aignt_os/adapters.py` and `src/aignt_os/supervisor.py` for the first real adapter and deterministic supervision behavior
- `src/aignt_os/contracts.py` and `src/aignt_os/config.py` for base contracts and settings
- `src/synapse_os/cli/app.py` for the public Typer CLI
- `src/synapse_os/runtime/` for the minimal persistent runtime lifecycle, worker loop, and dispatch service
- `src/synapse_os/specs/validator.py` for SPEC validation
- `src/synapse_os/state_machine.py` for the linear state machine
- `src/synapse_os/pipeline.py`, `src/synapse_os/persistence.py`, and `src/synapse_os/reporting.py` for the current persisted pipeline path and `RUN_REPORT.md`
- `src/synapse_os/adapters.py` and `src/synapse_os/supervisor.py` for the first real adapter and deterministic supervision behavior
- `src/synapse_os/contracts.py` and `src/synapse_os/config.py` for base contracts and settings

`observability/` is still effectively future-facing, and future sessions should verify concrete implementation before assuming a dedicated observability module exists.

### Current runtime slice

The current runtime is a minimal dual-mode foundation:

- The CLI exposes `aignt version`, `aignt runtime {start,status,run,ready,stop}`, and `aignt runs {list,show,submit}`.
- The CLI exposes `synapse version`, `synapse runtime {start,status,run,ready,stop}`, and `synapse runs {list,show,submit}`.
- `RuntimeService` manages a resident process and persists runtime state to a JSON file.
- `RunDispatchService` already backs the public submit path and resolves synchronous vs. queued dispatch.
- `RuntimeStateStore` treats missing state as `stopped` and corrupted or mismatched persisted state as `inconsistent`.
Expand Down Expand Up @@ -224,7 +224,7 @@ To validate a SPEC locally:
```bash
uv run --no-sync python -c "
from pathlib import Path
from aignt_os.specs.validator import validate_spec_file
from synapse_os.specs.validator import validate_spec_file
result = validate_spec_file(Path('features/<feature>/SPEC.md'))
print(result)
"
Expand Down Expand Up @@ -266,7 +266,7 @@ The architecture docs are important and should guide naming and design, but the

### Use the official terminology

When referring to the internal runtime flow, use **AIgnt-Synapse-Flow** and make clear at least once that it is the repository's own pipeline engine.
When referring to the internal runtime flow, use **Synapse-Flow** and make clear at least once that it is the repository's own pipeline engine.

Keep these terms stable:

Expand All @@ -290,7 +290,7 @@ Do not treat a green local hook as equivalent to the operational preflight.

### Configuration and environment variables

All `AppSettings` fields are overridable via environment variables with the `AIGNT_OS_` prefix (e.g., `AIGNT_OS_ENVIRONMENT`, `AIGNT_OS_RUNTIME_STATE_DIR`). Never use `os.environ` directly — always read settings through `AppSettings`.
All `AppSettings` fields are overridable via environment variables with the `SYNAPSE_OS_` prefix (e.g., `SYNAPSE_OS_ENVIRONMENT`, `SYNAPSE_OS_RUNTIME_STATE_DIR`). Never use `os.environ` directly — always read settings through `AppSettings`.

### Follow the repo's Python execution style

Expand Down
12 changes: 6 additions & 6 deletions .github/instructions/python.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Use `python -m pytest` e `python -m mypy` — não os wrappers bare (`pytest`, `

## Estrutura do projeto

- Código de produção em `src/aignt_os/`.
- Layout: `src/aignt_os/<módulo>/` com `__init__.py` explícito.
- Contratos em `src/aignt_os/contracts.py` — preserve as distinções existentes (ex: `stdout_raw` vs `stdout_clean`).
- Configurações via `src/aignt_os/config.py` com Pydantic Settings — não use `os.environ` diretamente.
- Código de produção em `src/synapse_os/`.
- Layout: `src/synapse_os/<módulo>/` com `__init__.py` explícito.
- Contratos em `src/synapse_os/contracts.py` — preserve as distinções existentes (ex: `stdout_raw` vs `stdout_clean`).
- Configurações via `src/synapse_os/config.py` com Pydantic Settings — não use `os.environ` diretamente.

## Pydantic e contratos

Expand All @@ -44,12 +44,12 @@ Use `python -m pytest` e `python -m mypy` — não os wrappers bare (`pytest`, `

## Imports

- Imports absolutos: `from aignt_os.contracts import ...`
- Imports absolutos: `from synapse_os.contracts import ...`
- Não use imports relativos (`from ..contracts import ...`) exceto dentro do mesmo subpacote.
- Ordem: stdlib → third-party → local (ruff isort cuida disso automaticamente).

## Proibições

- Não crie módulos fora de `src/aignt_os/` para código de produção.
- Não crie módulos fora de `src/synapse_os/` para código de produção.
- Não adicione dependências pesadas sem justificativa alinhada ao MVP.
- Não antecipe subsistemas não implementados (`adapters/`, `orchestrator/`, `pipeline/`, `memory/`, `db/`).
2 changes: 1 addition & 1 deletion .github/instructions/spec.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Para validar uma SPEC localmente:

```bash
uv run --no-sync python -c "
from aignt_os.specs.validator import SpecValidator
from synapse_os.specs.validator import SpecValidator
v = SpecValidator()
result = v.validate_file('features/<feature>/SPEC.md')
print(result)
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/operational-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:

- name: Validate branch alignment
env:
AIGNT_EVENT_NAME: ${{ github.event_name }}
AIGNT_HEAD_REF: ${{ github.head_ref }}
AIGNT_REF_NAME: ${{ github.ref_name }}
SYNAPSE_EVENT_NAME: ${{ github.event_name }}
SYNAPSE_HEAD_REF: ${{ github.head_ref }}
SYNAPSE_REF_NAME: ${{ github.ref_name }}
run: |
branch_name="$AIGNT_REF_NAME"
if [[ "$AIGNT_EVENT_NAME" == "pull_request" ]]; then
branch_name="$AIGNT_HEAD_REF"
branch_name="$SYNAPSE_REF_NAME"
if [[ "$SYNAPSE_EVENT_NAME" == "pull_request" ]]; then
branch_name="$SYNAPSE_HEAD_REF"
fi
./scripts/validate-branch.sh --fetch --allow-main --base-ref origin/main --branch-name "$branch_name"

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ build/
*.db
artifacts/
.worktrees/
.aignt-os/
.synapse-os/
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AGENTS.md

## Objetivo do repositório
Este repositório implementa o AIgnt OS, um meta-orquestrador de agentes de IA via CLI.
Este repositório implementa o SynapseOS, um meta-orquestrador de agentes de IA via CLI.
A implementação deve seguir a arquitetura e decisões já documentadas, sem reinventar o projeto a cada feature.

O runtime interno deve ser referido como **AIgnt-Synapse-Flow**, deixando claro que ele é a **engine própria de pipeline** do AIgnt OS.
O runtime interno deve ser referido como **Synapse-Flow**, deixando claro que ele é a **engine própria de pipeline** do SynapseOS.

## Fontes de verdade
Antes de iniciar qualquer trabalho, leia nesta ordem:
Expand All @@ -28,7 +28,7 @@ Em caso de conflito:
- Prefira mudanças pequenas, localizadas e reversíveis.
- Nunca altere docs centrais sem necessidade real da feature.
- Preserve o caráter **CLI-first**, **spec-first** e **feature-by-feature** do projeto.
- Use sempre o nome **AIgnt-Synapse-Flow** ao se referir ao runtime interno do AIgnt OS, deixando explícito ao menos uma vez por documento que ele é a **engine própria de pipeline** do AIgnt OS.
- Use sempre o nome **Synapse-Flow** ao se referir ao runtime interno do SynapseOS, deixando explícito ao menos uma vez por documento que ele é a **engine própria de pipeline** do SynapseOS.

## Convenção de nomes para agents/skills
- Use o padrão `<domínio>-<papel>`.
Expand Down Expand Up @@ -266,7 +266,7 @@ Neste repositório, a operação do Codex deve ser container-first via ./scripts

O serviço codex-dev existe só para desenvolvimento assistido.

O serviço aignt-os continua sendo o container de runtime da aplicação e do AIgnt-Synapse-Flow, a engine própria de pipeline do AIgnt OS.
O serviço synapse-os continua sendo o container de runtime da aplicação e do Synapse-Flow, a engine própria de pipeline do SynapseOS.

Não rode o Codex diretamente no host quando a tarefa exigir execução prática em container.

Expand Down
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@

Baseline atual apos as merges mais recentes em `main`:

- `aignt runs watch <run_id>` consolidado como dashboard TUI local, com explorer de artifacts e visualizacao de logs com buffer limitado
- `synapse runs watch <run_id>` consolidado como dashboard TUI local, com explorer de artifacts e visualizacao de logs com buffer limitado
- dashboard TUI com filtros visuais por falha (`f`), atividade (`r`) e restauracao da lista completa (`x`)
- `aignt runs cancel <run_id>` e atalho `k` no dashboard para cancelamento local e gracioso de runs
- `synapse runs cancel <run_id>` e atalho `k` no dashboard para cancelamento local e gracioso de runs
- runtime com timeout global por step e retry simples para falhas transientes
- auth local com RBAC (`viewer`, `operator`, `admin`) e documentacao publica de `--role`
- abstracao local de `auth_provider=file` pronta para futuros backends sem promover auth remota

## 0.1.0

Primeira release tecnica coerente da etapa 2 do AIgnt OS.
Primeira release tecnica coerente da etapa 2 do SynapseOS.

Superficie publica consolidada:

- `aignt doctor` para diagnostico local advisory do fluxo minimo atual
- `aignt runs submit <spec_path>` com `--mode auto|sync|async` e `--stop-at`
- `aignt runs show <run_id>` para inspecao de runs persistidas
- `aignt runs show <run_id> --preview report`
- `aignt runs show <run_id> --preview <STEP_STATE>.clean`
- `synapse doctor` para diagnostico local advisory do fluxo minimo atual
- `synapse runs submit <spec_path>` com `--mode auto|sync|async` e `--stop-at`
- `synapse runs show <run_id>` para inspecao de runs persistidas
- `synapse runs show <run_id> --preview report`
- `synapse runs show <run_id> --preview <STEP_STATE>.clean`

Limites conhecidos:

Expand Down
32 changes: 16 additions & 16 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Use `--full-runtime` only when the change touches boot, lifecycle, persistence,
```bash
uv run --no-sync python -c "
from pathlib import Path
from aignt_os.specs.validator import validate_spec_file
from synapse_os.specs.validator import validate_spec_file
result = validate_spec_file(Path('features/<feature>/SPEC.md'))
print(result)
"
Expand All @@ -70,14 +70,14 @@ The public API is `validate_spec_file(path: Path) -> SpecDocument` — there is

## Architecture overview

AIgnt OS is a CLI-first meta-orchestrator for external AI tools (Gemini, Codex, Claude, etc.). Two flows exist and must not be confused:
SynapseOS is a CLI-first meta-orchestrator for external AI tools (Gemini, Codex, Claude, etc.). Two flows exist and must not be confused:

1. **Official feature development workflow** (humans/agents working in the repo):
```
DOCKER_PREFLIGHT → SPEC → TEST_RED → CODE_GREEN → REFACTOR → QUALITY_GATE → SECURITY_REVIEW → REPORT → COMMIT
```

2. **Internal runtime state flow** (AIgnt-Synapse-Flow, the repository's own pipeline engine):
2. **Internal runtime state flow** (Synapse-Flow, the repository's own pipeline engine):
```
REQUEST → SPEC_DISCOVERY → SPEC_NORMALIZATION → SPEC_VALIDATION → PLAN → TEST_RED → CODE_GREEN → REVIEW → SECURITY → DOCUMENT → COMPLETE
```
Expand All @@ -86,17 +86,17 @@ AIgnt OS is a CLI-first meta-orchestrator for external AI tools (Gemini, Codex,

| Module | Role |
|---|---|
| `src/aignt_os/cli/app.py` | Typer CLI entry point (`aignt` command) |
| `src/aignt_os/state_machine.py` | `AIgntStateMachine` — linear state machine for AIgnt-Synapse-Flow |
| `src/aignt_os/pipeline.py` | `PipelineEngine` — executes steps, coordinates `StepExecutor` impls |
| `src/aignt_os/persistence.py` | `RunRepository` (SQLAlchemy/SQLite) + `ArtifactStore` (filesystem) + `PersistedPipelineRunner` |
| `src/aignt_os/adapters.py` | `BaseCLIAdapter` — async subprocess execution with circuit breaker |
| `src/aignt_os/supervisor.py` | Deterministic failure handling (retry / reroute / fail) |
| `src/aignt_os/runtime/` | `RuntimeService`, `RuntimeWorker`, `RunDispatchService`, `RuntimeStateStore` |
| `src/aignt_os/specs/validator.py` | SPEC validation engine |
| `src/aignt_os/contracts.py` | Domain models via Pydantic v2 |
| `src/aignt_os/config.py` | `AppSettings` (pydantic-settings, `AIGNT_OS_` env prefix) |
| `src/aignt_os/reporting.py` | `RUN_REPORT.md` generation at `DOCUMENT` state |
| `src/synapse_os/cli/app.py` | Typer CLI entry point (`synapse` command) |
| `src/synapse_os/state_machine.py` | `SynapseStateMachine` — linear state machine for Synapse-Flow |
| `src/synapse_os/pipeline.py` | `PipelineEngine` — executes steps, coordinates `StepExecutor` impls |
| `src/synapse_os/persistence.py` | `RunRepository` (SQLAlchemy/SQLite) + `ArtifactStore` (filesystem) + `PersistedPipelineRunner` |
| `src/synapse_os/adapters.py` | `BaseCLIAdapter` — async subprocess execution with circuit breaker |
| `src/synapse_os/supervisor.py` | Deterministic failure handling (retry / reroute / fail) |
| `src/synapse_os/runtime/` | `RuntimeService`, `RuntimeWorker`, `RunDispatchService`, `RuntimeStateStore` |
| `src/synapse_os/specs/validator.py` | SPEC validation engine |
| `src/synapse_os/contracts.py` | Domain models via Pydantic v2 |
| `src/synapse_os/config.py` | `AppSettings` (pydantic-settings, `SYNAPSE_OS_` env prefix) |
| `src/synapse_os/reporting.py` | `RUN_REPORT.md` generation at `DOCUMENT` state |

### Runtime modes

Expand All @@ -119,14 +119,14 @@ Feature directories: `features/F<NN>-<slug>/SPEC.md`

### Terminology

- **AIgnt-Synapse-Flow** = the repository's own pipeline engine (always name it this way)
- **Synapse-Flow** = the repository's own pipeline engine (always name it this way)
- `SPEC` = the formal feature specification
- `run` = one pipeline execution
- `worker` / `runtime` = the resident long-lived mode

### Configuration

All `AppSettings` fields use the `AIGNT_OS_` prefix. Never use `os.environ` directly — always go through `AppSettings`.
All `AppSettings` fields use the `SYNAPSE_OS_` prefix. Never use `os.environ` directly — always go through `AppSettings`.

### Contracts

Expand Down
Loading
Loading