@jaimevalasek/aioson 1.17.2 → 1.18.0

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +85 -51
  3. package/docs/en/3-recipes/full-feature-with-sheldon.md +1 -1
  4. package/docs/en/5-reference/cli-reference.md +4 -4
  5. package/docs/en/5-reference/qa-browser.md +2 -2
  6. package/docs/en/README.md +1 -1
  7. package/docs/en/deyvin-subtask-scout/how-to-use.md +2 -2
  8. package/docs/en/deyvin-subtask-scout/sub-task-scout.md +3 -3
  9. package/docs/en/deyvin-subtask-scout/troubleshooting.md +1 -1
  10. package/docs/pt/3-receitas/publicar-no-aioson-com.md +17 -0
  11. package/docs/pt/5-referencia/comandos-cli.md +2 -2
  12. package/docs/pt/5-referencia/inteligencia-adaptativa.md +3 -3
  13. package/docs/pt/5-referencia/skills.md +1 -1
  14. package/docs/pt/5-referencia/web3.md +3 -3
  15. package/docs/pt/README.md +1 -1
  16. package/docs/pt/_arquivo/README.md +1 -1
  17. package/docs/pt/_arquivo/cenarios.md +31 -31
  18. package/docs/pt/_arquivo/design-hybrid-forge.md +5 -5
  19. package/docs/pt/_arquivo/guia-engineer.md +1 -1
  20. package/docs/pt/_arquivo/profiler-system.md +1 -1
  21. package/docs/pt/_arquivo/site-forge.md +16 -16
  22. package/docs/pt/_arquivo/squad-genome.md +2 -2
  23. package/docs/pt/agentes.md +37 -37
  24. package/docs/pt/deyvin-subtask-scout/como-usar.md +2 -2
  25. package/docs/pt/deyvin-subtask-scout/sub-task-scout.md +1 -1
  26. package/docs/pt/deyvin-subtask-scout/troubleshooting.md +1 -1
  27. package/docs/pt/living-memory/README.md +1 -1
  28. package/docs/pt/living-memory/memoria-viva.md +2 -2
  29. package/docs/pt/living-memory/reflexao-in-harness.md +1 -1
  30. package/docs/pt/living-memory/troubleshooting.md +6 -6
  31. package/package.json +4 -2
  32. package/src/commands/gate-approve.js +56 -1
  33. package/src/commands/live.js +81 -54
  34. package/src/commands/op-capture.js +27 -2
  35. package/src/commands/op-list.js +33 -1
  36. package/src/commands/store-system.js +104 -12
  37. package/src/commands/tool-capabilities.js +14 -10
  38. package/src/commands/workflow-heal.js +47 -1
  39. package/src/i18n/messages/en.js +6 -5
  40. package/src/i18n/messages/pt-BR.js +6 -5
  41. package/src/lib/dev-resume.js +6 -1
  42. package/src/lib/tool-capabilities.js +64 -37
  43. package/src/operator-memory/decision.js +11 -4
  44. package/src/operator-memory/proposal.js +11 -7
  45. package/src/session-handoff.js +52 -1
  46. package/template/.aioson/agents/analyst.md +34 -2
  47. package/template/.aioson/agents/architect.md +33 -1
  48. package/template/.aioson/agents/briefing.md +26 -1
  49. package/template/.aioson/agents/copywriter.md +1 -1
  50. package/template/.aioson/agents/dev.md +2 -2
  51. package/template/.aioson/agents/deyvin.md +12 -12
  52. package/template/.aioson/agents/neo.md +74 -74
  53. package/template/.aioson/agents/orchestrator.md +26 -0
  54. package/template/.aioson/agents/pentester.md +66 -14
  55. package/template/.aioson/agents/pm.md +18 -1
  56. package/template/.aioson/agents/product.md +12 -1
  57. package/template/.aioson/agents/qa.md +3 -3
  58. package/template/.aioson/agents/sheldon.md +24 -4
  59. package/template/.aioson/agents/tester.md +115 -2
  60. package/template/.aioson/docs/briefing/briefing-craft.md +16 -0
  61. package/template/.aioson/docs/deyvin/runtime-handoffs.md +1 -1
  62. package/template/.aioson/docs/handoff-persistence.md +7 -7
  63. package/template/.aioson/docs/pentester/browser-dast-playbook.md +398 -0
  64. package/template/.aioson/rules/agent-structural-contract.md +139 -0
  65. package/template/.aioson/skills/process/decision-presentation/SKILL.md +2 -2
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: agent-structural-contract
3
+ description: Contrato estrutural que todo agente AIOSON deve seguir — seções obrigatórias, ordem de observabilidade, padrão de handoff, e integridade de comandos CLI
4
+ priority: 5
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Agent Structural Contract
9
+
10
+ Every AIOSON agent file (`template/.aioson/agents/*.md`) must comply with this structural contract. Violations are caught by `@qa` during Gate D and by `@sheldon` during enrichment reviews.
11
+
12
+ ## 1. Language boundary (mandatory, line 3)
13
+
14
+ Every agent MUST start with:
15
+
16
+ ```markdown
17
+ > **LANGUAGE BOUNDARY:** Agent instructions are canonical in English. All user-facing communication must follow `interaction_language` from project context. If it is absent, fall back to `conversation_language`.
18
+ ```
19
+
20
+ ## 2. Mandatory sections
21
+
22
+ Every agent that interacts with the user MUST have these sections (order may vary):
23
+
24
+ | Section | Purpose | Required for |
25
+ |---|---|---|
26
+ | `## Mission` | What the agent does in 1-2 lines | All agents |
27
+ | `## Required input` | What files must be read before acting | All agents |
28
+ | `## Hard constraints` | Non-negotiable rules | All agents |
29
+ | Observability block | `agent:done` + `pulse:update` at session end | All agents |
30
+
31
+ Agents that are part of the SDD workflow additionally MUST have:
32
+
33
+ | Section | Purpose | Required for |
34
+ |---|---|---|
35
+ | Handoff section | Structured next-agent recommendation | briefing, product, sheldon, analyst, architect, pm, orchestrator |
36
+ | `## Feature dossier` | Dossier read/write integration | product, sheldon, analyst, architect, pm, orchestrator |
37
+
38
+ ## 3. Observability command order (session end)
39
+
40
+ At session end, commands MUST appear in this exact order. Missing steps are acceptable when marked N/A — wrong order is not.
41
+
42
+ ```
43
+ 1. gate:approve (if this agent owns a gate — analyst=A, architect=B, pm=C, qa=D)
44
+ 2. op:capture (if user confirmed decisions — product, sheldon, pm)
45
+ 3. pulse:update (ALL agents — automated project-pulse update)
46
+ 4. agent:done (ALL agents — ALWAYS LAST)
47
+ ```
48
+
49
+ `runtime:emit` milestones happen DURING the session at strategic moments, NOT in the session-end block. Each agent should emit at least 2 milestones during execution.
50
+
51
+ ### Milestone timing per agent
52
+
53
+ | Agent | Milestone 1 (emit during work) | Milestone 2 (emit during work) |
54
+ |---|---|---|
55
+ | @briefing | Briefing draft written | Briefing approved |
56
+ | @product | PRD written | Feature registered in features.md |
57
+ | @sheldon | Sizing decided | Enrichment applied |
58
+ | @analyst | Requirements written | Spec skeleton created |
59
+ | @architect | Architecture decided | Gate B check |
60
+ | @pm | Implementation plan written | Gate C approved |
61
+ | @orchestrator | Lanes initialized | Merge complete |
62
+ | @dev | Slice started | Slice landed |
63
+ | @qa | Review started | Verdict decided |
64
+
65
+ ## 4. Handoff contract
66
+
67
+ Every workflow agent MUST end with a handoff block following this template:
68
+
69
+ ```markdown
70
+ **Handoff message:**
71
+ ```
72
+ [Artifact produced]: .aioson/context/[artifact].md
73
+ [Gate status]: Gate [X]: [approved|pending]
74
+ Next agent: @[name] ([condition or rationale])
75
+ Action: /[agent-name]
76
+ ```
77
+ > Recommended: `/clear` before activating — fresh context window.
78
+ ```
79
+
80
+ Rules:
81
+ - The handoff message MUST include at least: artifact path, next agent, and rationale.
82
+ - `/clear` recommendation MUST be present.
83
+ - Do NOT continue into the next agent's work — output only the handoff and stop.
84
+
85
+ ## 5. CLI error handling
86
+
87
+ Every `aioson` CLI command in an agent file MUST end with `2>/dev/null || true` to prevent silent failures from breaking the session.
88
+
89
+ ```
90
+ aioson <command> . --flag=value 2>/dev/null || true
91
+ ```
92
+
93
+ The ONLY exception is commands inside "Quick start" or "Prerequisites" sections where the user runs them manually (not the agent).
94
+
95
+ ## 6. CLI flag integrity
96
+
97
+ Agent files must reference CLI commands with correct flag names. When adding a new command reference:
98
+
99
+ 1. Check `src/commands/<command>.js` for the actual option names.
100
+ 2. Use `--flag=value` syntax (not positional arguments) for clarity.
101
+ 3. Never guess flags — verify against the source.
102
+
103
+ Known correct signatures (reference table):
104
+
105
+ | Command | Correct flags |
106
+ |---|---|
107
+ | `gate:approve` | `--feature=<slug> --gate=<A\|B\|C\|D>` |
108
+ | `gate:check` | `--feature=<slug> --gate=<A\|B\|C\|D>` |
109
+ | `pulse:update` | `--agent=<name> --feature=<slug> --action="<summary>" --next="<recommendation>"` |
110
+ | `op:capture` | `--signal=<type> --quote="<verbatim>" --proposal="<paraphrase>" --source-agent=<name>` |
111
+ | `brain:query` | `--tags=<csv> --min-quality=<n> --format=<compact\|json\|ids>` |
112
+ | `artifact:validate` | `--feature=<slug>` (NOT `--spec=<file>`) |
113
+ | `dossier:audit` | `--check=<template-parity\|coverage>` (NOT `--slug=<slug>`) |
114
+ | `dossier:add-finding` | `--slug=<slug> --agent=<name> --section="<section>" --content="<text>"` |
115
+ | `dossier:add-codemap` | `--slug=<slug> --file=<path> --role=<role> --coupling=<low\|medium\|high> --added-by=<agent>` |
116
+ | `dossier:link-rule` | `--slug=<slug> --rule=<path> --reason="<text>"` |
117
+ | `runtime:emit` | `--agent=<name> --type=<milestone\|gate_check> --summary="<text>"` |
118
+ | `memory:search` | `--query="<text>"` |
119
+ | `context:search` | `--query="<text>"` |
120
+ | `preflight` | `--agent=<name> --feature=<slug>` |
121
+ | `dev:state:write` | `--feature=<slug> --phase=<n> --next="<description>" --context=<tokens>` |
122
+
123
+ ## 7. Template-workspace parity
124
+
125
+ Agent files in `template/.aioson/agents/` are the canonical source. Workspace files in `.aioson/agents/` are copies synced via `npm run sync:agents`.
126
+
127
+ Rules:
128
+ - Edits MUST be made in `template/` first, then synced to workspace.
129
+ - After any agent edit session, verify parity with `diff template/.aioson/agents/<file> .aioson/agents/<file>`.
130
+ - Drift between template and workspace is a bug — the template always wins.
131
+
132
+ ## On violation detected
133
+
134
+ When an agent file violates this contract:
135
+
136
+ 1. **During @qa Gate D:** flag as a Medium finding with `recommended_owner: dev`.
137
+ 2. **During @sheldon enrichment:** flag in `sheldon-enrichment-{slug}.md` improvements list.
138
+ 3. **During @deyvin pair session:** fix inline if the touched file is already in scope.
139
+ 4. **Never block a feature** for structural violations alone — document and fix as follow-up.
@@ -12,7 +12,7 @@ activation: |
12
12
 
13
13
  ## When to use
14
14
 
15
- Load this skill before the first user-facing decision in any agent that interacts directly with the user. Mandatory in V1 for: `@neo`, `@setup`, `@product`, `@dev`, `@deyvin`.
15
+ Load this skill before the first user-facing decision in any agent that interacts directly with the user. Mandatory in V1 for: `@neo`, `@setup`, `@product`, `@dev`, `@deyvin`, `@pentester`.
16
16
 
17
17
  Activation mode is decided by `profile` in `project.context.md`:
18
18
 
@@ -92,7 +92,7 @@ When this skill is active, every user-facing decision produces:
92
92
 
93
93
  The doctor check `jargon_leak_detection` (defined in this same feature) verifies adherence in CI:
94
94
 
95
- - scope filter: only events from `[neo, setup, product, dev, deyvin]`
95
+ - scope filter: only events from `[neo, setup, product, dev, deyvin, pentester]`
96
96
  - profile filter: only runs when active project has `profile=creator`
97
97
  - success threshold: `count=0` jargon leaks in a feature MICRO completa run with `profile=creator`
98
98