stealthos-cli 0.1.0-alpha.3 → 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/CONTRACT.md +110 -0
- package/ai/INDEX.md +203 -0
- package/ai/README.md +434 -0
- package/ai/ROUTER.md +288 -0
- package/ai/agents/README.md +103 -0
- package/ai/agents/architect.md +59 -0
- package/ai/agents/backend-engineer.md +62 -0
- package/ai/agents/founder.md +45 -0
- package/ai/agents/frontend-engineer.md +61 -0
- package/ai/agents/product-manager.md +56 -0
- package/ai/agents/qa-engineer.md +53 -0
- package/ai/agents/researcher.md +74 -0
- package/ai/agents/reviewer.md +73 -0
- package/ai/agents/security-engineer.md +59 -0
- package/ai/agents/sre-engineer.md +70 -0
- package/ai/agents/tech-lead.md +70 -0
- package/ai/architecture/README.md +35 -0
- package/ai/architecture/components.md +24 -0
- package/ai/architecture/containers.md +30 -0
- package/ai/architecture/event-flows.md +36 -0
- package/ai/architecture/sequence-diagrams.md +38 -0
- package/ai/architecture/system-context.md +46 -0
- package/ai/architecture/threat-modeling.md +40 -0
- package/ai/blueprints/README.md +67 -0
- package/ai/blueprints/_schema.json +40 -0
- package/ai/blueprints/ai-platform.json +28 -0
- package/ai/blueprints/crm.json +22 -0
- package/ai/blueprints/game.json +25 -0
- package/ai/blueprints/mobile.json +24 -0
- package/ai/blueprints/realtime.json +22 -0
- package/ai/blueprints/saas.json +25 -0
- package/ai/blueprints/telemetry.json +30 -0
- package/ai/blueprints/web.json +23 -0
- package/ai/bootstrap/discovery-questions.md +117 -0
- package/ai/bootstrap/dispatcher.md +85 -0
- package/ai/bootstrap/existing-project.md +191 -0
- package/ai/bootstrap/new-project.md +127 -0
- package/ai/bootstrap/tech-mapping.md +164 -0
- package/ai/clients/README.md +114 -0
- package/ai/clients/antigravity.md +125 -0
- package/ai/clients/claude-code.md +65 -0
- package/ai/clients/cline.md +69 -0
- package/ai/clients/codex-aider-cli.md +82 -0
- package/ai/clients/continue.md +67 -0
- package/ai/clients/copilot.md +49 -0
- package/ai/clients/cursor.md +81 -0
- package/ai/clients/snippets/mcp-absolute-paths.json +9 -0
- package/ai/clients/snippets/mcp-http.json +7 -0
- package/ai/clients/snippets/mcp-stdio.json +9 -0
- package/ai/clients/trae.md +69 -0
- package/ai/clients/windsurf.md +71 -0
- package/ai/core/pipeline/execution-engine.md +157 -0
- package/ai/engineering/README.md +32 -0
- package/ai/engineering/observability/incident-response.md +82 -0
- package/ai/evals/protocol-tests.md +150 -0
- package/ai/evolution/agent-evolution.md +161 -0
- package/ai/evolution/improvements.md +91 -0
- package/ai/evolution/learnings.md +49 -0
- package/ai/evolution/patterns-discovered.md +48 -0
- package/ai/execution/README.md +33 -0
- package/ai/execution/backlog.md +27 -0
- package/ai/execution/milestones.md +26 -0
- package/ai/execution/roadmap.md +30 -0
- package/ai/execution/sprint.md +42 -0
- package/ai/governance/README.md +34 -0
- package/ai/governance/architecture-principles.md +99 -0
- package/ai/governance/definition-of-done.md +88 -0
- package/ai/governance/definition-of-ready.md +69 -0
- package/ai/governance/engineering-principles.md +70 -0
- package/ai/governance/quality-gates.md +85 -0
- package/ai/governance/security-policies.md +84 -0
- package/ai/hooks/enforce-audit.ps1 +41 -0
- package/ai/hooks/enforce-audit.sh +39 -0
- package/ai/hooks/guard-edit.ps1 +182 -0
- package/ai/hooks/guard-edit.sh +161 -0
- package/ai/hooks/inject-os-reminder.ps1 +40 -0
- package/ai/hooks/inject-os-reminder.sh +16 -0
- package/ai/manifest.json +238 -0
- package/ai/memory/_detected-stack.json +33 -0
- package/ai/memory/_summary.md +49 -0
- package/ai/memory/archive/.gitkeep +3 -0
- package/ai/memory/completed-tasks.md +156 -0
- package/ai/memory/decisions.md +257 -0
- package/ai/memory/errors-and-solutions.md +41 -0
- package/ai/memory/known-issues.md +40 -0
- package/ai/memory/pending-tasks.md +37 -0
- package/ai/memory/project-context.md +67 -0
- package/ai/operating-system/architecture.md +54 -0
- package/ai/operating-system/coding-standards.md +84 -0
- package/ai/operating-system/folder-structure.md +126 -0
- package/ai/operating-system/performance-rules.md +86 -0
- package/ai/operating-system/quality-control.md +81 -0
- package/ai/operating-system/security-rules.md +91 -0
- package/ai/operating-system/workflow.md +86 -0
- package/ai/product/README.md +24 -0
- package/ai/product/business-rules.md +26 -0
- package/ai/product/personas.md +29 -0
- package/ai/product/user-journeys.md +30 -0
- package/ai/product/vision.md +35 -0
- package/ai/rules/behavior.md +45 -0
- package/ai/rules/do.md +47 -0
- package/ai/rules/dont.md +46 -0
- package/ai/rules/execution-flow.md +125 -0
- package/ai/rules/structural-constraints.md +59 -0
- package/ai/rules/structure-canon.md +116 -0
- package/ai/runtime.md +179 -0
- package/ai/scripts/detect-stack.ps1 +166 -0
- package/ai/scripts/detect-stack.sh +172 -0
- package/ai/scripts/init-ai-os.ps1 +170 -0
- package/ai/scripts/init-ai-os.sh +99 -0
- package/ai/scripts/lint-os.ps1 +99 -0
- package/ai/scripts/lint-os.sh +85 -0
- package/ai/scripts/start-os.ps1 +151 -0
- package/ai/scripts/start-os.sh +141 -0
- package/ai/server/README.md +105 -0
- package/ai/server/aios-server.mjs +2134 -0
- package/ai/server/package-lock.json +802 -0
- package/ai/server/package.json +31 -0
- package/ai/server/src/analyzer/graph-builder.ts +92 -0
- package/ai/server/src/analyzer/index.ts +191 -0
- package/ai/server/src/analyzer/module-mapper.ts +171 -0
- package/ai/server/src/analyzer/smell-detector.ts +54 -0
- package/ai/server/src/analyzer/stack-detector.ts +70 -0
- package/ai/server/src/index.ts +16 -0
- package/ai/server/src/packager/context-builder.ts +217 -0
- package/ai/server/src/packager/index.ts +3 -0
- package/ai/server/src/packager/memory-injector.ts +128 -0
- package/ai/server/src/packager/module-summarizer.ts +60 -0
- package/ai/server/src/packager/token-estimator.ts +26 -0
- package/ai/server/src/snapshot/index.ts +3 -0
- package/ai/server/src/snapshot/snapshot-creator.ts +206 -0
- package/ai/server/src/snapshot/snapshot-diff.ts +86 -0
- package/ai/server/src/snapshot/snapshot-restore.ts +14 -0
- package/ai/server/src/types.ts +94 -0
- package/ai/server/tsconfig.json +26 -0
- package/ai/skills/architecture-design.md +82 -0
- package/ai/skills/backend-engineering.md +57 -0
- package/ai/skills/database-design.md +76 -0
- package/ai/skills/frontend-engineering.md +63 -0
- package/ai/skills/performance.md +73 -0
- package/ai/skills/scalability.md +84 -0
- package/ai/skills/security.md +71 -0
- package/ai/skills/testing.md +77 -0
- package/ai/specs/ADR/ADR-0002-typescript-runtime.md +103 -0
- package/ai/specs/ADR/ADR-0004-runtime-orchestrator.md +94 -0
- package/ai/specs/ADR/ADR-0005-workflow-engine.md +105 -0
- package/ai/specs/ADR/ADR-0006-runtime-state.md +104 -0
- package/ai/specs/ADR/ADR-0007-state-compiler-drift-context-layers-artifact-index.md +82 -0
- package/ai/specs/ADR/ADR-0008-intent-runtime-discovery-branching.md +93 -0
- package/ai/specs/ADR/ADR-0009-confidence-system-maturity-tracking.md +113 -0
- package/ai/specs/ADR/ADR-0010-structural-architecture-standards.md +121 -0
- package/ai/specs/ADR/ADR-0011-mcp-prompts.md +86 -0
- package/ai/specs/ADR/ADR-0012-stealthos-hybrid-architecture.md +174 -0
- package/ai/specs/ADR/_TEMPLATE.md +60 -0
- package/ai/specs/BRD/_TEMPLATE.md +50 -0
- package/ai/specs/PRD/_TEMPLATE.md +72 -0
- package/ai/specs/README.md +43 -0
- package/ai/specs/RFC/RFC-0001-runtime-orchestrator.md +149 -0
- package/ai/specs/RFC/RFC-0002-runtime-orchestrator-extended.md +134 -0
- package/ai/specs/RFC/_TEMPLATE.md +61 -0
- package/ai/specs/RUNBOOKS/_TEMPLATE.md +68 -0
- package/ai/specs/SDD/_TEMPLATE.md +104 -0
- package/ai/specs/TASKS/_TEMPLATE.md +52 -0
- package/ai/tools/debugging.md +64 -0
- package/ai/tools/dependency-analysis.md +46 -0
- package/ai/tools/internet-research.md +42 -0
- package/ai/tools/mcp-discovery.md +44 -0
- package/ai/workflows/_schema.json +81 -0
- package/ai/workflows/init.json +148 -0
- package/ai/workflows/sync.json +71 -0
- package/ai/workflows/work.json +91 -0
- package/package.json +7 -1
- package/scripts/bundle-ai.mjs +58 -0
- package/src/cli.mjs +1 -1
- package/src/commands/install.mjs +35 -11
- package/src/lib/resolve-source.mjs +27 -10
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
updated: 2026-05-16
|
|
4
|
+
tier: on-demand
|
|
5
|
+
tokens: ~500
|
|
6
|
+
load: blueprint, compose, scaffold, estrutura inicial
|
|
7
|
+
triggers: blueprint, scaffolding, novo projeto, estrutura inicial, compose
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Structural Blueprints — Catálogo + Composition Guide
|
|
11
|
+
|
|
12
|
+
> Fragmentos declarativos de estrutura por tipo de projeto. Projetos modernos são **híbridos** — combine múltiplos blueprints via `aios_compose_structure`.
|
|
13
|
+
|
|
14
|
+
## Catálogo (8 blueprints)
|
|
15
|
+
|
|
16
|
+
| Blueprint | Quando | Foca em |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| [`web.json`](./web.json) | Aplicação web típica | apps/web + services/api + packages/ui |
|
|
19
|
+
| [`saas.json`](./saas.json) | Produto SaaS multi-tenant | + billing, tenancy, permissions, audit |
|
|
20
|
+
| [`crm.json`](./crm.json) | CRM ou plataforma de relacionamento | + customers, leads, pipelines, communications |
|
|
21
|
+
| [`mobile.json`](./mobile.json) | App mobile (nativo ou cross-platform) | + offline, sync, device, push |
|
|
22
|
+
| [`game.json`](./game.json) | Jogo / engine | + engine, scenes, entities, physics, ai |
|
|
23
|
+
| [`ai-platform.json`](./ai-platform.json) | Plataforma com runtime IA | + ai-runtime, prompts, agents, embeddings |
|
|
24
|
+
| [`telemetry.json`](./telemetry.json) | Telemetry / logistics / IoT | + tracking, geofencing, devices, providers |
|
|
25
|
+
| [`realtime.json`](./realtime.json) | Sistema realtime / eventos | + websockets, queues, event-streams |
|
|
26
|
+
|
|
27
|
+
## Como compor (via MCP)
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
aios_list_blueprints()
|
|
31
|
+
→ { count: 8, blueprints: [...] }
|
|
32
|
+
|
|
33
|
+
aios_get_blueprint({ name: "saas" })
|
|
34
|
+
→ { id: "saas", description: ..., folders: [...], modules: [...], ... }
|
|
35
|
+
|
|
36
|
+
aios_compose_structure({ types: ["saas", "telemetry", "realtime"] })
|
|
37
|
+
→ {
|
|
38
|
+
types_resolved: ["web", "saas", "telemetry", "realtime"], // 'extends' expandido
|
|
39
|
+
folders: [...], // union dedupe
|
|
40
|
+
modules: [...], // union dedupe
|
|
41
|
+
packages_recommended: [...],
|
|
42
|
+
integrations_recommended: [...],
|
|
43
|
+
constraints: { ... }, // merged
|
|
44
|
+
notes: [...]
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Princípios
|
|
49
|
+
|
|
50
|
+
1. **Compose, don't fork**: nunca duplique blueprint para customizar — referencie via `extends`.
|
|
51
|
+
2. **Evolutionary**: comece com 1-2 blueprints; adicione conforme necessidade.
|
|
52
|
+
3. **Constraints heredity**: composição mescla constraints; mais restritivo vence.
|
|
53
|
+
4. **Modules são apenas sugestões**: não force criar todos os módulos listados; surgem quando há requisito real.
|
|
54
|
+
5. **Domain-first sempre**: módulos novos seguem `.ai/rules/structure-canon.md`.
|
|
55
|
+
|
|
56
|
+
## Adicionar blueprint novo
|
|
57
|
+
|
|
58
|
+
1. Criar `.ai/blueprints/<id>.json` seguindo `_schema.json`.
|
|
59
|
+
2. Listar `extends` se reaproveita outro (ex.: SaaS extends Web).
|
|
60
|
+
3. Adicionar linha ao catálogo acima.
|
|
61
|
+
4. Atualizar `.ai/manifest.json` (`required_files`) com bypass `.claude/.unlock` + ADR amendment se for change major.
|
|
62
|
+
|
|
63
|
+
## Referências
|
|
64
|
+
|
|
65
|
+
- ADR-0010 (decisão)
|
|
66
|
+
- `.ai/rules/structure-canon.md` (princípios qualitativos)
|
|
67
|
+
- `.ai/rules/structural-constraints.md` (limites quantitativos)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "AI OS Structural Blueprint",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["id", "description", "folders", "modules"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9_-]{1,32}$" },
|
|
8
|
+
"description": { "type": "string" },
|
|
9
|
+
"extends": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": { "type": "string" },
|
|
12
|
+
"description": "IDs de outros blueprints cujo conteúdo é incluído transitivamente."
|
|
13
|
+
},
|
|
14
|
+
"folders": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": { "type": "string" },
|
|
17
|
+
"description": "Pastas a adicionar ao root (com '/' final)."
|
|
18
|
+
},
|
|
19
|
+
"modules": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": { "type": "string" },
|
|
22
|
+
"description": "Módulos de domínio recomendados (geralmente sob services/api/src/modules/)."
|
|
23
|
+
},
|
|
24
|
+
"packages_recommended": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"items": { "type": "string" },
|
|
27
|
+
"description": "Packages sob packages/ que tendem a ser úteis."
|
|
28
|
+
},
|
|
29
|
+
"integrations_recommended": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": { "type": "string" },
|
|
32
|
+
"description": "Integrações externas comuns para este tipo."
|
|
33
|
+
},
|
|
34
|
+
"constraints_overrides": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"description": "Overrides de structural-constraints.md (ex.: max_modules_before_split aumentado)."
|
|
37
|
+
},
|
|
38
|
+
"notes": { "type": "string" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "ai-platform",
|
|
4
|
+
"description": "Plataforma com runtime de IA (LLM-driven): prompts, agents, embeddings, RAG.",
|
|
5
|
+
"extends": ["web"],
|
|
6
|
+
"folders": [
|
|
7
|
+
"services/ai-runtime/",
|
|
8
|
+
"packages/llm-adapters/",
|
|
9
|
+
"packages/prompts/",
|
|
10
|
+
"data/embeddings/",
|
|
11
|
+
"workflows/evaluations/"
|
|
12
|
+
],
|
|
13
|
+
"modules": [
|
|
14
|
+
"agents",
|
|
15
|
+
"prompts",
|
|
16
|
+
"embeddings",
|
|
17
|
+
"rag",
|
|
18
|
+
"evaluations",
|
|
19
|
+
"guardrails",
|
|
20
|
+
"telemetry-llm"
|
|
21
|
+
],
|
|
22
|
+
"packages_recommended": ["llm-adapters", "prompt-library", "vector-store-sdk"],
|
|
23
|
+
"integrations_recommended": ["anthropic", "openai", "pinecone", "langfuse"],
|
|
24
|
+
"constraints_overrides": {
|
|
25
|
+
"max_modules_before_split": 15
|
|
26
|
+
},
|
|
27
|
+
"notes": "Prompts versionados. Evaluations rodam em CI. Guardrails entre prompt e LLM (PII redact, injection detect)."
|
|
28
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "crm",
|
|
4
|
+
"description": "CRM ou plataforma de relacionamento com pipelines, comunicações e analytics de leads.",
|
|
5
|
+
"extends": ["web"],
|
|
6
|
+
"folders": [
|
|
7
|
+
"workflows/automation/",
|
|
8
|
+
"data/exports/"
|
|
9
|
+
],
|
|
10
|
+
"modules": [
|
|
11
|
+
"customers",
|
|
12
|
+
"leads",
|
|
13
|
+
"pipelines",
|
|
14
|
+
"deals",
|
|
15
|
+
"communications",
|
|
16
|
+
"tasks",
|
|
17
|
+
"contacts"
|
|
18
|
+
],
|
|
19
|
+
"packages_recommended": ["email-templates", "sms-adapter", "analytics-core"],
|
|
20
|
+
"integrations_recommended": ["sendgrid", "twilio", "google-calendar", "hubspot"],
|
|
21
|
+
"notes": "Modelo dominante: pipeline com estados configuráveis. Eventos cross-module via communications/."
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "game",
|
|
4
|
+
"description": "Jogo (single-player ou multiplayer) com engine, scenes, entities e física.",
|
|
5
|
+
"folders": [
|
|
6
|
+
"apps/client/",
|
|
7
|
+
"services/game-server/",
|
|
8
|
+
"packages/engine/",
|
|
9
|
+
"packages/assets/",
|
|
10
|
+
"data/scenes/"
|
|
11
|
+
],
|
|
12
|
+
"modules": [
|
|
13
|
+
"engine",
|
|
14
|
+
"scenes",
|
|
15
|
+
"entities",
|
|
16
|
+
"physics",
|
|
17
|
+
"network",
|
|
18
|
+
"ai-npcs",
|
|
19
|
+
"input",
|
|
20
|
+
"audio"
|
|
21
|
+
],
|
|
22
|
+
"packages_recommended": ["engine", "ecs-core", "asset-pipeline"],
|
|
23
|
+
"integrations_recommended": ["steam", "playfab", "discord-rpc"],
|
|
24
|
+
"notes": "ECS (Entity-Component-System) recomendado para entidades. Asset pipeline separado do code path."
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "mobile",
|
|
4
|
+
"description": "App mobile nativo ou cross-platform com offline-first e sync.",
|
|
5
|
+
"folders": [
|
|
6
|
+
"apps/mobile/",
|
|
7
|
+
"packages/mobile-sdk/",
|
|
8
|
+
"packages/sync-engine/"
|
|
9
|
+
],
|
|
10
|
+
"modules": [
|
|
11
|
+
"offline",
|
|
12
|
+
"sync",
|
|
13
|
+
"device",
|
|
14
|
+
"storage",
|
|
15
|
+
"push",
|
|
16
|
+
"deep-linking"
|
|
17
|
+
],
|
|
18
|
+
"packages_recommended": ["mobile-sdk", "sync-engine", "device-info"],
|
|
19
|
+
"integrations_recommended": ["firebase", "onesignal", "sentry-mobile"],
|
|
20
|
+
"constraints_overrides": {
|
|
21
|
+
"max_file_lines": 400
|
|
22
|
+
},
|
|
23
|
+
"notes": "Offline-first: state sempre persistente local. Sync conflict resolution explícito (last-write-wins ou CRDT)."
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "realtime",
|
|
4
|
+
"description": "Sistema realtime / event-driven: websockets, queues, event streams, CQRS.",
|
|
5
|
+
"folders": [
|
|
6
|
+
"services/realtime/",
|
|
7
|
+
"services/event-bus/",
|
|
8
|
+
"packages/event-types/",
|
|
9
|
+
"workflows/event-handlers/"
|
|
10
|
+
],
|
|
11
|
+
"modules": [
|
|
12
|
+
"websockets",
|
|
13
|
+
"event-streams",
|
|
14
|
+
"queues",
|
|
15
|
+
"subscriptions",
|
|
16
|
+
"presence",
|
|
17
|
+
"broadcasts"
|
|
18
|
+
],
|
|
19
|
+
"packages_recommended": ["event-types", "ws-adapters", "queue-sdk"],
|
|
20
|
+
"integrations_recommended": ["redis-streams", "kafka", "nats", "ably"],
|
|
21
|
+
"notes": "Idempotência obrigatória em handlers (eventos podem reprocessar). Schema registry para event-types. Backpressure + dead-letter queue."
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "saas",
|
|
4
|
+
"description": "Produto SaaS multi-tenant com billing, permissões granulares e auditoria.",
|
|
5
|
+
"extends": ["web"],
|
|
6
|
+
"folders": [
|
|
7
|
+
"apps/admin/",
|
|
8
|
+
"services/billing/",
|
|
9
|
+
"data/migrations/billing/"
|
|
10
|
+
],
|
|
11
|
+
"modules": [
|
|
12
|
+
"billing",
|
|
13
|
+
"subscriptions",
|
|
14
|
+
"tenancy",
|
|
15
|
+
"permissions",
|
|
16
|
+
"audit",
|
|
17
|
+
"feature-flags"
|
|
18
|
+
],
|
|
19
|
+
"packages_recommended": ["stripe-adapter", "auth-sdk", "feature-flag-sdk"],
|
|
20
|
+
"integrations_recommended": ["stripe", "auth0", "posthog", "intercom"],
|
|
21
|
+
"constraints_overrides": {
|
|
22
|
+
"max_modules_before_split": 25
|
|
23
|
+
},
|
|
24
|
+
"notes": "Tenancy isolation é crítico: nunca consultar dados cross-tenant sem filtro explícito. Audit log obrigatório em mudanças sensíveis."
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "telemetry",
|
|
4
|
+
"description": "Telemetry / logistics / IoT: tracking, geofencing, ingestão de devices.",
|
|
5
|
+
"extends": ["web"],
|
|
6
|
+
"folders": [
|
|
7
|
+
"services/telemetry/",
|
|
8
|
+
"services/ingestion/",
|
|
9
|
+
"data/timeseries/",
|
|
10
|
+
"workflows/ingestion/",
|
|
11
|
+
"workflows/alerts/"
|
|
12
|
+
],
|
|
13
|
+
"modules": [
|
|
14
|
+
"tracking",
|
|
15
|
+
"telemetry",
|
|
16
|
+
"geofencing",
|
|
17
|
+
"fleet",
|
|
18
|
+
"devices",
|
|
19
|
+
"providers",
|
|
20
|
+
"trips",
|
|
21
|
+
"events",
|
|
22
|
+
"alerts"
|
|
23
|
+
],
|
|
24
|
+
"packages_recommended": ["telemetry-core", "geo-utils", "provider-adapters"],
|
|
25
|
+
"integrations_recommended": ["google-maps", "mapbox", "mqtt", "kafka", "timescaledb"],
|
|
26
|
+
"constraints_overrides": {
|
|
27
|
+
"max_modules_before_split": 30
|
|
28
|
+
},
|
|
29
|
+
"notes": "Time-series volumoso. Providers adapter pattern crítico (cada device fabricante = adapter). Backpressure obrigatório em ingestão."
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./_schema.json",
|
|
3
|
+
"id": "web",
|
|
4
|
+
"description": "Base para aplicação web típica: SPA/SSR + API REST/GraphQL + UI library compartilhada.",
|
|
5
|
+
"folders": [
|
|
6
|
+
"apps/web/",
|
|
7
|
+
"services/api/",
|
|
8
|
+
"packages/ui/",
|
|
9
|
+
"packages/contracts/",
|
|
10
|
+
"packages/types/",
|
|
11
|
+
"infrastructure/docker/",
|
|
12
|
+
"infrastructure/ci/",
|
|
13
|
+
"tests/e2e/"
|
|
14
|
+
],
|
|
15
|
+
"modules": [
|
|
16
|
+
"auth",
|
|
17
|
+
"users",
|
|
18
|
+
"notifications"
|
|
19
|
+
],
|
|
20
|
+
"packages_recommended": ["ui", "contracts", "types", "sdk"],
|
|
21
|
+
"integrations_recommended": ["sendgrid", "sentry"],
|
|
22
|
+
"notes": "Base mínima. Adicionar blueprints (saas/crm/etc.) para capacidades extras."
|
|
23
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
updated: 2026-05-14
|
|
4
|
+
tier: on_demand
|
|
5
|
+
tokens: ~600
|
|
6
|
+
load: bootstrap_discovery
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Discovery Questions
|
|
10
|
+
|
|
11
|
+
> Banco de perguntas estruturadas. Use uma de cada vez. Pare quando tiver o essencial.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## TL;DR
|
|
16
|
+
|
|
17
|
+
- **Não fazer 10 perguntas de uma vez.** Uma por turno.
|
|
18
|
+
- **Inferir antes de perguntar.** Só pergunte o que NÃO dá para descobrir lendo.
|
|
19
|
+
- **Marcar `?` em `project-context.md`** para itens não confirmados — preencher quando souber.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Categorias
|
|
24
|
+
|
|
25
|
+
### 1. Negócio / Visão
|
|
26
|
+
- Em uma frase, qual o objetivo deste projeto?
|
|
27
|
+
- Quem é o usuário final? (interno, B2B, B2C, número aproximado)
|
|
28
|
+
- Qual a métrica de sucesso? (uso, receita, retenção, qualidade...)
|
|
29
|
+
- Existe deadline ou marco importante? Qual data?
|
|
30
|
+
- O projeto é estratégico, experimental ou manutenção?
|
|
31
|
+
|
|
32
|
+
### 2. Stack & Técnica
|
|
33
|
+
- Stack atual / preferida?
|
|
34
|
+
- Há requisitos de linguagem ou framework não-negociáveis?
|
|
35
|
+
- Cloud / on-prem / híbrido?
|
|
36
|
+
- Existe sistema legado com o qual integrar?
|
|
37
|
+
|
|
38
|
+
### 3. Time
|
|
39
|
+
- Quantas pessoas tocam o código?
|
|
40
|
+
- Papéis (front, back, DevOps, QA, design)?
|
|
41
|
+
- Quem decide arquitetura?
|
|
42
|
+
- Qual o nível médio (júnior, pleno, sênior, misto)?
|
|
43
|
+
|
|
44
|
+
### 4. Ambiente Operacional
|
|
45
|
+
- Quais ambientes existem (dev, staging, prod, outros)?
|
|
46
|
+
- Janelas de deploy? Janelas de blackout?
|
|
47
|
+
- Quem é on-call?
|
|
48
|
+
- Qual SLA do produto?
|
|
49
|
+
|
|
50
|
+
### 5. Compliance & Risco
|
|
51
|
+
- LGPD / GDPR / PCI-DSS / HIPAA / SOC2 / outros aplicam?
|
|
52
|
+
- Há auditoria externa periódica?
|
|
53
|
+
- Dados sensíveis manipulados? (PII, financeiro, saúde)
|
|
54
|
+
- Riscos conhecidos (segurança, performance, dependência única)?
|
|
55
|
+
|
|
56
|
+
### 6. Histórico (só para projeto existente)
|
|
57
|
+
- O projeto tem quantos meses/anos?
|
|
58
|
+
- Houve incidente significativo recente? (vazamento, downtime, regressão grave)
|
|
59
|
+
- Quais áreas do código são "intocáveis"?
|
|
60
|
+
- Qual a maior dor técnica hoje?
|
|
61
|
+
|
|
62
|
+
### 7. Direção
|
|
63
|
+
- Próximos 30 dias: o que precisa estar pronto?
|
|
64
|
+
- Próximos 90 dias: principal entrega?
|
|
65
|
+
- 6-12 meses: visão de produto?
|
|
66
|
+
|
|
67
|
+
### 8. Limites do Agente
|
|
68
|
+
- O agente pode commitar direto ou só via PR?
|
|
69
|
+
- Pode rodar comandos de DB? (read? write?)
|
|
70
|
+
- Pode acessar internet/MCPs? (busca, browser, ...)
|
|
71
|
+
- Há diretórios proibidos?
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Tabela de Mínimo Vital
|
|
76
|
+
|
|
77
|
+
Antes de **qualquer execução não-trivial**, o agente deve ter pelo menos:
|
|
78
|
+
|
|
79
|
+
| Campo | Origem |
|
|
80
|
+
|---|---|
|
|
81
|
+
| Objetivo | Q1.1 |
|
|
82
|
+
| Stack | Inspeção + Q2.1 |
|
|
83
|
+
| Ambientes | Q4.1 |
|
|
84
|
+
| Compliance (se há) | Q5.1 |
|
|
85
|
+
| Limites do agente | Q8.* |
|
|
86
|
+
|
|
87
|
+
Sem isso → conduzir o diálogo. Não improvisar.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Ritmo do Diálogo
|
|
92
|
+
|
|
93
|
+
1. **Bloco temático por turno.** Ex: faz 1-2 perguntas de "Stack", aguarda.
|
|
94
|
+
2. **Resumir** a cada 3-4 respostas e pedir confirmação.
|
|
95
|
+
3. **Salvar progressivamente** em `project-context.md` — não esperar o final.
|
|
96
|
+
4. **Encerrar quando "mínimo vital" estiver coberto** + perguntar se há mais algo crítico.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Sugestões Pró-ativas Durante Descoberta
|
|
101
|
+
|
|
102
|
+
Conforme o usuário responde, o agente pode propor:
|
|
103
|
+
- "Você mencionou X — sugiro também considerar Y. Quer que eu detalhe?"
|
|
104
|
+
- "A combinação de A + B é incomum por causa de C. Confirma essa direção?"
|
|
105
|
+
- "Pelo descrito, alguns trade-offs aparecem cedo. Quer que eu liste?"
|
|
106
|
+
|
|
107
|
+
Sugestão NÃO é decisão. Decisão fica em ADR.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Quando Pular Discovery
|
|
112
|
+
|
|
113
|
+
- Tarefa é trivial (ler arquivo, responder pergunta factual).
|
|
114
|
+
- `project-context.md` já está preenchido e relevante.
|
|
115
|
+
- Usuário declarou "só faça X, sem perguntas".
|
|
116
|
+
|
|
117
|
+
Mas mesmo nestes casos: **mínimo vital** deve estar em `project-context.md` antes de qualquer mudança estrutural.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
updated: 2026-05-14
|
|
4
|
+
tier: conditional
|
|
5
|
+
tokens: ~500
|
|
6
|
+
load: bootstrap_triggers
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Bootstrap Dispatcher
|
|
10
|
+
|
|
11
|
+
> Ponto de entrada para qualquer projeto novo ou já em andamento.
|
|
12
|
+
> Carregado pelo ROUTER quando o usuário fala em "começar", "novo projeto", "projeto existente", "setup", "init".
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## TL;DR
|
|
17
|
+
|
|
18
|
+
1. **Pergunta 1**: novo ou existente?
|
|
19
|
+
2. Se **novo** → carregar `bootstrap/new-project.md`.
|
|
20
|
+
3. Se **existente** → carregar `bootstrap/existing-project.md`.
|
|
21
|
+
4. Em ambos, em seguida → `bootstrap/discovery-questions.md`.
|
|
22
|
+
|
|
23
|
+
Não pular para implementação enquanto não houver respostas mínimas de descoberta.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Fluxo
|
|
28
|
+
|
|
29
|
+
### Passo 0 — Identificar contexto
|
|
30
|
+
Antes de fazer pergunta, o agente verifica:
|
|
31
|
+
- O diretório atual tem `package.json`/`pyproject.toml`/`Cargo.toml`/`go.mod`/etc? → provável existente.
|
|
32
|
+
- O diretório está vazio (ou só com `.ai/`)? → provável novo.
|
|
33
|
+
- O usuário já indicou? → respeitar.
|
|
34
|
+
|
|
35
|
+
Apresentar a hipótese e confirmar, não assumir cegamente.
|
|
36
|
+
|
|
37
|
+
### Passo 1 — Pergunta de classificação
|
|
38
|
+
|
|
39
|
+
Formato (adaptar idioma ao usuário):
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Antes de eu seguir, preciso entender o ponto de partida.
|
|
43
|
+
|
|
44
|
+
[ ] Projeto NOVO (vamos criar do zero)
|
|
45
|
+
[ ] Projeto EXISTENTE em andamento
|
|
46
|
+
→ Onde está o projeto? (caminho, repositório, ou descrição)
|
|
47
|
+
|
|
48
|
+
Pode escolher e, se existente, me indicar o local.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Passo 2 — Rota
|
|
52
|
+
|
|
53
|
+
| Resposta | Próximo arquivo |
|
|
54
|
+
|---|---|
|
|
55
|
+
| Novo | `.ai/bootstrap/new-project.md` |
|
|
56
|
+
| Existente | `.ai/bootstrap/existing-project.md` |
|
|
57
|
+
| Ambíguo | repetir pergunta com exemplos |
|
|
58
|
+
|
|
59
|
+
### Passo 3 — Descoberta
|
|
60
|
+
Após rota, carregar `.ai/bootstrap/discovery-questions.md`. Conduzir o diálogo até ter os campos mínimos para preencher `memory/project-context.md`.
|
|
61
|
+
|
|
62
|
+
### Passo 4 — Maturação
|
|
63
|
+
- Preencher `memory/project-context.md` com o que foi descoberto.
|
|
64
|
+
- Sugerir 1-3 melhorias se o agente identificar lacunas (ex: "sua stack não tem testes — sugiro adicionar configuração mínima").
|
|
65
|
+
- Confirmar plano antes de codar.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Anti-padrões
|
|
70
|
+
|
|
71
|
+
- Começar a implementar sem descoberta básica.
|
|
72
|
+
- Fazer 10 perguntas de uma vez (sobrecarrega o usuário).
|
|
73
|
+
- Aceitar "tanto faz" e improvisar sem registrar a escolha em `decisions.md`.
|
|
74
|
+
- Pular preenchimento de `project-context.md` "para ganhar tempo".
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Maturidade
|
|
79
|
+
|
|
80
|
+
Um projeto é considerado "amadurecido" (não precisa mais de bootstrap) quando:
|
|
81
|
+
- `memory/project-context.md` tem stack, ambientes, restrições.
|
|
82
|
+
- ≥3 ADRs em `memory/decisions.md`.
|
|
83
|
+
- `operating-system/architecture.md` está específico ao projeto.
|
|
84
|
+
|
|
85
|
+
Antes disso → diálogo guiado. Depois disso → o agente já pode operar com autonomia razoável.
|