docs: update all documentation and add AI tooling configs

- Rewrite README.md with current architecture, features and stack
- Update docs/API.md with all current endpoints (corporate, BI, client 360)
- Update docs/ARCHITECTURE.md with cache, modular queries, services, ETL
- Update docs/GUIA-USUARIO.md for all roles (admin, corporate, agente)
- Add docs/INDEX.md documentation index
- Add PROJETO.md comprehensive project reference
- Add BI-CCC-Implementation-Guide.md
- Include AI agent configs (.claude, .agents, .gemini, _bmad)
- Add netbird VPN configuration
- Add status report

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 13:29:03 -04:00
parent c5b377e788
commit 647cbec54f
3246 changed files with 479789 additions and 983 deletions

View File

@@ -0,0 +1,97 @@
---
name: bmad-{module-code-or-empty}-agent-{agent-name}
description: {skill-description} # Format: [4-6 word summary]. [trigger: "User wants to talk to or ask {displayName}" or "{title}" or "{role}"]
---
# {displayName}
## Overview
{overview-template}
{if-headless}
## Activation Mode Detection
**Check activation context immediately:**
1. **Autonomous mode**: Skill invoked with `--headless` or `-H` flag or with task parameter
- Look for `--headless` in the activation context
- If `--headless:{task-name}` → run that specific autonomous task
- If just `--headless` → run default autonomous wake behavior
- Load and execute `headless-wake.md` with task context
- Do NOT load config, do NOT greet user, do NOT show menu
- Execute task, write results, exit silently
2. **Interactive mode** (default): User invoked the skill directly
- Proceed to `## On Activation` section below
**Example headless activation:**
```bash
# Autonomous - default wake
/bmad-{agent-skill-name} --headless
# Autonomous - specific task
/bmad-{agent-skill-name} --headless:refine-memories
```
{/if-headless}
## Identity
{Who is this agent? One clear sentence.}
## Communication Style
{How does this agent communicate? Be specific with examples.}
## Principles
- {Guiding principle 1}
- {Guiding principle 2}
- {Guiding principle 3}
{if-sidecar}
## Sidecar
Memory location: `_bmad/_memory/{skillName}-sidecar/`
Load `references/memory-system.md` for memory discipline and structure.
{/if-sidecar}
## On Activation
1. **Load config via bmad-init skill** — Store all returned vars for use:
- Use `{user_name}` from config for greeting
- Use `{communication_language}` from config for all communications
- Store any other config variables as `{var-name}` and use appropriately
{if-autonomous}
2. **If autonomous mode** — Load and run `autonomous-wake.md` (default wake behavior), or load the specified prompt and execute its autonomous section without interaction
3. **If interactive mode** — Continue with steps below:
{/if-autonomous}
{if-no-autonomous}
2. **Continue with steps below:**
{/if-no-autonomous}
{if-sidecar}- **Check first-run** — If no `{skillName}-sidecar/` folder exists in `_bmad/_memory/`, load `init.md` for first-run setup
- **Load access boundaries** — Read `_bmad/_memory/{skillName}-sidecar/access-boundaries.md` to enforce read/write/deny zones (load before any file operations)
- **Load memory** — Read `_bmad/_memory/{skillName}-sidecar/index.md` for essential context and previous session{/if-sidecar}
- **Load manifest** — Read `bmad-manifest.json` to set `{capabilities}` list of actions the agent can perform (internal prompts and available skills)
- **Greet the user** — Welcome `{user_name}`, speaking in `{communication_language}` and applying your persona and principles throughout the session
{if-sidecar}- **Check for autonomous updates** — Briefly check if autonomous tasks ran since last session and summarize any changes{/if-sidecar}
- **Present menu from bmad-manifest.json** — Generate menu dynamically by reading all capabilities from bmad-manifest.json:
```
{if-sidecar}Last time we were working on X. Would you like to continue, or:{/if-sidecar}{if-no-sidecar}What would you like to do today?{/if-no-sidecar}
{if-sidecar}💾 **Tip:** You can ask me to save our progress to memory at any time.{/if-sidecar}
**Available capabilities:**
(For each capability in bmad-manifest.json capabilities array, display as:)
{number}. [{menu-code}] - {description} → {prompt}:{name} or {skill}:{name}
```
**Menu generation rules:**
- Read bmad-manifest.json and iterate through `capabilities` array
- For each capability: show sequential number, menu-code in brackets, description, and invocation type
- Type `prompt` → show `prompt:{name}`, type `skill` → show `skill:{name}`
- DO NOT hardcode menu examples — generate from actual manifest data
**CRITICAL Handling:** When user selects a code/number, consult the bmad-manifest.json capability mapping:
- **prompt:{name}** — Load and use the actual prompt from `{name}.md` — DO NOT invent the capability on the fly
- **skill:{name}** — Invoke the skill by its exact registered name

View File

@@ -0,0 +1,37 @@
---
name: autonomous-wake
description: Default autonomous wake behavior — runs when --headless or -H is passed with no specific task.
---
# Autonomous Wake
You're running autonomously. No one is here. No task was specified. Execute your default wake behavior and exit.
## Context
- Memory location: `_bmad/_memory/{skillName}-sidecar/`
- Activation time: `{current-time}`
## Instructions
- Don't ask questions
- Don't wait for input
- Don't greet anyone
- Execute your default wake behavior
- Write results to memory
- Exit
## Default Wake Behavior
{default-autonomous-behavior}
## Logging
Append to `_bmad/_memory/{skillName}-sidecar/autonomous-log.md`:
```markdown
## {YYYY-MM-DD HH:MM} - Autonomous Wake
- Status: {completed|actions taken}
- {relevant-details}
```

View File

@@ -0,0 +1,47 @@
{if-module}
# First-Run Setup for {displayName}
Welcome! Setting up your workspace.
## Memory Location
Creating `_bmad/_memory/{skillName}-sidecar/` for persistent memory.
## Initial Structure
Creating:
- `index.md` — essential context, active work
- `patterns.md` — your preferences I learn
- `chronology.md` — session timeline
Configuration will be loaded from your module's config.yaml.
{custom-init-questions}
## Ready
Setup complete! I'm ready to help.
{/if-module}
{if-standalone}
# First-Run Setup for {displayName}
Welcome! Let me set up for this environment.
## Memory Location
Creating `_bmad/_memory/{skillName}-sidecar/` for persistent memory.
{custom-init-questions}
## Initial Structure
Creating:
- `index.md` — essential context, active work, saved paths above
- `patterns.md` — your preferences I learn
- `chronology.md` — session timeline
## Ready
Setup complete! I'm ready to help.
{/if-standalone}

View File

@@ -0,0 +1,129 @@
# Memory System for {displayName}
**Memory location:** `_bmad/_memory/{skillName}-sidecar/`
## Core Principle
Tokens are expensive. Only remember what matters. Condense everything to its essence.
## File Structure
### `index.md` — Primary Source
**Load on activation.** Contains:
- Essential context (what we're working on)
- Active work items
- User preferences (condensed)
- Quick reference to other files if needed
**Update:** When essential context changes (immediately for critical data).
### `access-boundaries.md` — Access Control (Required for all agents)
**Load on activation.** Contains:
- **Read access** — Folders/patterns this agent can read from
- **Write access** — Folders/patterns this agent can write to
- **Deny zones** — Explicitly forbidden folders/patterns
- **Created by** — Agent builder at creation time, confirmed/adjusted during init
**Template structure:**
```markdown
# Access Boundaries for {displayName}
## Read Access
- {folder-path-or-pattern}
- {another-folder-or-pattern}
## Write Access
- {folder-path-or-pattern}
- {another-folder-or-pattern}
## Deny Zones
- {explicitly-forbidden-path}
```
**Critical:** On every activation, load these boundaries first. Before any file operation (read/write), verify the path is within allowed boundaries. If uncertain, ask user.
{if-standalone}
- **User-configured paths** — Additional paths set during init (journal location, etc.) are appended here
{/if-standalone}
### `patterns.md` — Learned Patterns
**Load when needed.** Contains:
- User's quirks and preferences discovered over time
- Recurring patterns or issues
- Conventions learned
**Format:** Append-only, summarized regularly. Prune outdated entries.
### `chronology.md` — Timeline
**Load when needed.** Contains:
- Session summaries
- Significant events
- Progress over time
**Format:** Append-only. Prune regularly; keep only significant events.
## Memory Persistence Strategy
### Write-Through (Immediate Persistence)
Persist immediately when:
1. **User data changes** — preferences, configurations
2. **Work products created** — entries, documents, code, artifacts
3. **State transitions** — tasks completed, status changes
4. **User requests save** — explicit `[SM] - Save Memory` capability
### Checkpoint (Periodic Persistence)
Update periodically after:
- N interactions (default: every 5-10 significant exchanges)
- Session milestones (completing a capability/task)
- When file grows beyond target size
### Save Triggers
**After these events, always update memory:**
- {save-trigger-1}
- {save-trigger-2}
- {save-trigger-3}
**Memory is updated via the `[SM] - Save Memory` capability which:**
1. Reads current index.md
2. Updates with current session context
3. Writes condensed, current version
4. Checkpoints patterns.md and chronology.md if needed
## Write Discipline
Before writing to memory, ask:
1. **Is this worth remembering?**
- If no → skip
- If yes → continue
2. **What's the minimum tokens that capture this?**
- Condense to essence
- No fluff, no repetition
3. **Which file?**
- `index.md` → essential context, active work
- `patterns.md` → user quirks, recurring patterns, conventions
- `chronology.md` → session summaries, significant events
4. **Does this require index update?**
- If yes → update `index.md` to point to it
## Memory Maintenance
Regularly (every few sessions or when files grow large):
1. **Condense verbose entries** — Summarize to essence
2. **Prune outdated content** — Move old items to chronology or remove
3. **Consolidate patterns** — Merge similar entries
4. **Update chronology** — Archive significant past events
## First Run
If sidecar doesn't exist, load `init.md` to create the structure.

View File

@@ -0,0 +1,282 @@
# Quality Report: {agent-name}
**Scanned:** {timestamp}
**Skill Path:** {skill-path}
**Report:** {report-file-path}
**Performed By** QualityReportBot-9001 and {user_name}
## Executive Summary
- **Total Issues:** {total-issues}
- **Critical:** {critical} | **High:** {high} | **Medium:** {medium} | **Low:** {low}
- **Overall Quality:** {Excellent|Good|Fair|Poor}
- **Overall Cohesion:** {cohesion-score}
- **Craft Assessment:** {craft-assessment}
<!-- Synthesize 1-3 sentence narrative: agent persona/purpose (from enhancement-opportunities skill_understanding.purpose + agent-cohesion agent_identity), architecture quality, and most significant finding. Frame this as an agent assessment, not a workflow assessment. -->
{executive-narrative}
### Issues by Category
| Category | Critical | High | Medium | Low |
|----------|----------|------|--------|-----|
| Structure & Capabilities | {n} | {n} | {n} | {n} |
| Prompt Craft | {n} | {n} | {n} | {n} |
| Execution Efficiency | {n} | {n} | {n} | {n} |
| Path & Script Standards | {n} | {n} | {n} | {n} |
| Agent Cohesion | {n} | {n} | {n} | {n} |
| Creative | — | — | {n} | {n} |
---
## Agent Identity
<!-- From agent-cohesion agent_identity block. -->
- **Persona:** {persona-summary}
- **Primary Purpose:** {primary-purpose}
- **Capabilities:** {capability-count}
---
## Strengths
*What this agent does well — preserve these during optimization:*
<!-- Collect from ALL of these sources:
- All scanners: findings[] with severity="strength" or category="strength"
- prompt-craft: findings where severity="note" and observation is positive
- prompt-craft: positive aspects from assessments.skillmd_assessment.notes and persona_context assessment
- enhancement-opportunities: bright_spots from each assessments.user_journeys[] entry
- structure: positive observations from assessments.metadata (e.g., memory setup present, headless mode configured)
Group by theme. Each strength should explain WHY it matters. -->
{strengths-list}
---
{if-truly-broken}
## Truly Broken or Missing
*Issues that prevent the agent from working correctly:*
<!-- Every CRITICAL and HIGH severity issue from ALL scanners. Maximum detail: description, affected files/lines, fix instructions. These are the most actionable part of the report. -->
{truly-broken-findings}
---
{/if-truly-broken}
## Detailed Findings by Category
### 1. Structure & Capabilities
<!-- Source: structure-temp.json. Agent-specific: includes identity effectiveness, memory setup, headless mode, capability cross-references. -->
{if-structure-metadata}
**Agent Metadata:**
- Sections found: {sections-list}
- Capabilities: {capabilities-count}
- Memory sidecar: {has-memory}
- Headless mode: {has-headless}
- Manifest valid: {manifest-valid}
- Structure assessment: {structure-assessment}
{/if-structure-metadata}
<!-- List findings by severity: Critical > High > Medium > Low. Omit empty severity levels. -->
{structure-findings}
### 2. Prompt Craft
<!-- Source: prompt-craft-temp.json. Agent-specific: includes persona_context assessment and persona-voice/communication-consistency categories. Remember: persona voice is INVESTMENT not waste for agents. -->
**Agent Assessment:**
- Agent type: {skill-type-assessment}
- Overview quality: {overview-quality}
- Progressive disclosure: {progressive-disclosure}
- Persona context: {persona-context}
- {skillmd-assessment-notes}
{if-prompt-health}
**Prompt Health:** {prompts-with-config-header}/{total-prompts} with config header | {prompts-with-progression}/{total-prompts} with progression conditions | {prompts-self-contained}/{total-prompts} self-contained
{/if-prompt-health}
{prompt-craft-findings}
### 3. Execution Efficiency
<!-- Source: execution-efficiency-temp.json. Agent-specific: includes memory-loading category. -->
{efficiency-issue-findings}
{if-efficiency-opportunities}
**Optimization Opportunities:**
<!-- From findings[] with severity ending in -opportunity. Each: title, detail (includes type/savings narrative), action. -->
{efficiency-opportunities}
{/if-efficiency-opportunities}
### 4. Path & Script Standards
<!-- Source: path-standards-temp.json + scripts-temp.json -->
{if-script-inventory}
**Script Inventory:** {total-scripts} scripts ({by-type-breakdown}) | Missing tests: {missing-tests-list}
{/if-script-inventory}
{path-script-findings}
### 5. Agent Cohesion
<!-- Source: agent-cohesion-temp.json. This is the agent-specific section — persona-capability alignment, gaps, redundancies, coherence. -->
{if-cohesion-analysis}
**Cohesion Analysis:**
<!-- Include only dimensions present in scanner output. -->
| Dimension | Score | Notes |
|-----------|-------|-------|
| Persona Alignment | {score} | {notes} |
| Capability Completeness | {score} | {notes} |
| Redundancy Level | {score} | {notes} |
| External Integration | {score} | {notes} |
| User Journey | {score} | {notes} |
{if-consolidation-opportunities}
**Consolidation Opportunities:**
<!-- From cohesion_analysis.redundancy_level.consolidation_opportunities[]. Each: capabilities that overlap and how to combine. -->
{consolidation-opportunities}
{/if-consolidation-opportunities}
{/if-cohesion-analysis}
{cohesion-findings}
{if-creative-suggestions}
**Creative Suggestions:**
<!-- From findings[] with severity="suggestion". Each: title, detail, action. -->
{creative-suggestions}
{/if-creative-suggestions}
### 6. Creative (Edge-Case & Experience Innovation)
<!-- Source: enhancement-opportunities-temp.json. These are advisory suggestions, not errors. -->
**Agent Understanding:**
- **Purpose:** {skill-purpose}
- **Primary User:** {primary-user}
- **Key Assumptions:**
{key-assumptions-list}
**Enhancement Findings:**
<!-- Organize by: high-opportunity > medium-opportunity > low-opportunity.
Each: title, detail, action. -->
{enhancement-findings}
{if-top-insights}
**Top Insights:**
<!-- From enhancement-opportunities assessments.top_insights[]. These are the synthesized highest-value observations.
Each: title, detail, action. -->
{top-insights}
{/if-top-insights}
---
{if-user-journeys}
## User Journeys
*How different user archetypes experience this agent:*
<!-- From enhancement-opportunities user_journeys[]. Reproduce EVERY archetype fully. -->
### {archetype-name}
{journey-summary}
**Friction Points:**
{friction-points-list}
**Bright Spots:**
{bright-spots-list}
<!-- Repeat for ALL archetypes. Do not skip any. -->
---
{/if-user-journeys}
{if-autonomous-assessment}
## Autonomous Readiness
<!-- From enhancement-opportunities autonomous_assessment. Include ALL fields. This is especially important for agents which may need headless/autonomous operation. -->
- **Overall Potential:** {overall-potential}
- **HITL Interaction Points:** {hitl-count}
- **Auto-Resolvable:** {auto-resolvable-count}
- **Needs Input:** {needs-input-count}
- **Suggested Output Contract:** {output-contract}
- **Required Inputs:** {required-inputs-list}
- **Notes:** {assessment-notes}
---
{/if-autonomous-assessment}
{if-script-opportunities}
## Script Opportunities
<!-- Source: script-opportunities-temp.json. These identify LLM work that could be deterministic scripts. -->
**Existing Scripts:** {existing-scripts-list}
<!-- For each finding: title, detail (includes determinism/complexity/savings narrative), action. -->
{script-opportunity-findings}
**Token Savings:** {total-estimated-token-savings} | Highest value: {highest-value-opportunity} | Prepass opportunities: {prepass-count}
---
{/if-script-opportunities}
## Quick Wins (High Impact, Low Effort)
<!-- Pull from ALL scanners: findings where fix effort is trivial/low but impact is meaningful. -->
| Issue | File | Effort | Impact |
|-------|------|--------|--------|
{quick-wins-rows}
---
## Optimization Opportunities
<!-- Synthesize across scanners — not a copy of findings but a narrative of improvement themes. -->
**Token Efficiency:**
{token-optimization-narrative}
**Performance:**
{performance-optimization-narrative}
**Maintainability:**
{maintainability-optimization-narrative}
---
## Recommendations
<!-- Rank by: severity first, then breadth of impact, then effort (prefer low-effort). Up to 5. -->
1. {recommendation-1}
2. {recommendation-2}
3. {recommendation-3}
4. {recommendation-4}
5. {recommendation-5}

View File

@@ -0,0 +1,29 @@
---
name: save-memory
description: Explicitly save current session context to memory
menu-code: SM
---
# Save Memory
Immediately persist the current session context to memory.
## Process
1. **Read current index.md** — Load existing context
2. **Update with current session:**
- What we're working on
- Current state/progress
- Any new preferences or patterns discovered
- Next steps to continue
3. **Write updated index.md** — Replace content with condensed, current version
4. **Checkpoint other files if needed:**
- `patterns.md` — Add new patterns discovered
- `chronology.md` — Add session summary if significant
## Output
Confirm save with brief summary: "Memory saved. {brief-summary-of-what-was-updated}"