sagaz-ai 0.1.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 (97) hide show
  1. package/INSTALL.md +78 -0
  2. package/LICENSE +21 -0
  3. package/README.md +185 -0
  4. package/ai-orchestration-ecosystem/ACTIVATE.md +45 -0
  5. package/ai-orchestration-ecosystem/INDEX.md +73 -0
  6. package/ai-orchestration-ecosystem/README.md +31 -0
  7. package/ai-orchestration-ecosystem/agents/design-director.md +20 -0
  8. package/ai-orchestration-ecosystem/agents/implementation-engineer.md +21 -0
  9. package/ai-orchestration-ecosystem/agents/orchestrator.md +22 -0
  10. package/ai-orchestration-ecosystem/agents/product-strategist.md +22 -0
  11. package/ai-orchestration-ecosystem/agents/qa-verifier.md +23 -0
  12. package/ai-orchestration-ecosystem/agents/refactor-steward.md +20 -0
  13. package/ai-orchestration-ecosystem/agents/security-governance.md +21 -0
  14. package/ai-orchestration-ecosystem/agents/software-architect.md +21 -0
  15. package/ai-orchestration-ecosystem/agents/specification-writer.md +21 -0
  16. package/ai-orchestration-ecosystem/agents/technology-strategist.md +21 -0
  17. package/ai-orchestration-ecosystem/agents/ui-systems-designer.md +20 -0
  18. package/ai-orchestration-ecosystem/agents/ux-architect.md +21 -0
  19. package/ai-orchestration-ecosystem/agents/visual-qa.md +20 -0
  20. package/ai-orchestration-ecosystem/core/decision-records.md +25 -0
  21. package/ai-orchestration-ecosystem/core/operating-system.md +29 -0
  22. package/ai-orchestration-ecosystem/core/token-economy.md +15 -0
  23. package/ai-orchestration-ecosystem/engineering/software-engineering-deep-guide.md +23 -0
  24. package/ai-orchestration-ecosystem/governance/ecosystem-maintenance.md +13 -0
  25. package/ai-orchestration-ecosystem/governance/package-release-policy.md +51 -0
  26. package/ai-orchestration-ecosystem/governance/quality-policy.md +13 -0
  27. package/ai-orchestration-ecosystem/governance/security-policy.md +13 -0
  28. package/ai-orchestration-ecosystem/governance/versioning.md +13 -0
  29. package/ai-orchestration-ecosystem/protocols/accessibility-compliance.md +39 -0
  30. package/ai-orchestration-ecosystem/protocols/ai-application-quality.md +40 -0
  31. package/ai-orchestration-ecosystem/protocols/api-contracts.md +37 -0
  32. package/ai-orchestration-ecosystem/protocols/architecture-fitness-functions.md +36 -0
  33. package/ai-orchestration-ecosystem/protocols/ci-cd-readiness.md +32 -0
  34. package/ai-orchestration-ecosystem/protocols/communication.md +32 -0
  35. package/ai-orchestration-ecosystem/protocols/data-privacy-lifecycle.md +38 -0
  36. package/ai-orchestration-ecosystem/protocols/database-migrations.md +36 -0
  37. package/ai-orchestration-ecosystem/protocols/delegation.md +32 -0
  38. package/ai-orchestration-ecosystem/protocols/dependency-governance.md +36 -0
  39. package/ai-orchestration-ecosystem/protocols/design-quality.md +32 -0
  40. package/ai-orchestration-ecosystem/protocols/dora-metrics.md +36 -0
  41. package/ai-orchestration-ecosystem/protocols/github-operations.md +32 -0
  42. package/ai-orchestration-ecosystem/protocols/guided-proactivity.md +32 -0
  43. package/ai-orchestration-ecosystem/protocols/memory.md +32 -0
  44. package/ai-orchestration-ecosystem/protocols/model-routing.md +32 -0
  45. package/ai-orchestration-ecosystem/protocols/performance-budgets.md +41 -0
  46. package/ai-orchestration-ecosystem/protocols/post-delivery-monitoring.md +32 -0
  47. package/ai-orchestration-ecosystem/protocols/production-readiness.md +32 -0
  48. package/ai-orchestration-ecosystem/protocols/quality-gates.md +32 -0
  49. package/ai-orchestration-ecosystem/protocols/release-strategy.md +38 -0
  50. package/ai-orchestration-ecosystem/protocols/secure-sdlc.md +38 -0
  51. package/ai-orchestration-ecosystem/protocols/squad-pipeline-handoffs.md +32 -0
  52. package/ai-orchestration-ecosystem/protocols/sre-readiness.md +41 -0
  53. package/ai-orchestration-ecosystem/protocols/stack-selection.md +32 -0
  54. package/ai-orchestration-ecosystem/protocols/testing-matrix.md +32 -0
  55. package/ai-orchestration-ecosystem/quickstart.md +25 -0
  56. package/ai-orchestration-ecosystem/skills/exhaustive-verification.md +14 -0
  57. package/ai-orchestration-ecosystem/skills/refactor-proofing.md +14 -0
  58. package/ai-orchestration-ecosystem/skills/spec-first-development.md +14 -0
  59. package/ai-orchestration-ecosystem/squads/code-audit.md +45 -0
  60. package/ai-orchestration-ecosystem/squads/design-studio.md +45 -0
  61. package/ai-orchestration-ecosystem/squads/github-ops.md +45 -0
  62. package/ai-orchestration-ecosystem/squads/maintenance-ops.md +45 -0
  63. package/ai-orchestration-ecosystem/squads/mobile-app-studio.md +45 -0
  64. package/ai-orchestration-ecosystem/squads/product-factory.md +45 -0
  65. package/ai-orchestration-ecosystem/squads/production-critical.md +45 -0
  66. package/ai-orchestration-ecosystem/squads/refactor-lab.md +45 -0
  67. package/ai-orchestration-ecosystem/squads/research-to-spec.md +45 -0
  68. package/ai-orchestration-ecosystem/tasks/design-system.md +34 -0
  69. package/ai-orchestration-ecosystem/tasks/github-release-ops.md +34 -0
  70. package/ai-orchestration-ecosystem/tasks/implementation-build.md +34 -0
  71. package/ai-orchestration-ecosystem/tasks/intake-brief.md +34 -0
  72. package/ai-orchestration-ecosystem/tasks/product-requirements.md +34 -0
  73. package/ai-orchestration-ecosystem/tasks/production-readiness.md +34 -0
  74. package/ai-orchestration-ecosystem/tasks/stack-recommendation.md +34 -0
  75. package/ai-orchestration-ecosystem/tasks/verification-qa.md +34 -0
  76. package/ai-orchestration-ecosystem/templates/design-system-spec.md +20 -0
  77. package/ai-orchestration-ecosystem/templates/final-handoff.md +20 -0
  78. package/ai-orchestration-ecosystem/templates/github-actions-checklist.md +20 -0
  79. package/ai-orchestration-ecosystem/templates/implementation-plan.md +20 -0
  80. package/ai-orchestration-ecosystem/templates/mobile-release-checklist.md +20 -0
  81. package/ai-orchestration-ecosystem/templates/product-spec.md +20 -0
  82. package/ai-orchestration-ecosystem/templates/qa-report.md +20 -0
  83. package/ai-orchestration-ecosystem/templates/run-state.md +20 -0
  84. package/ai-orchestration-ecosystem/templates/squad-handoff.md +20 -0
  85. package/ai-orchestration-ecosystem/templates/squad-runbook.md +20 -0
  86. package/ai-orchestration-ecosystem/templates/stack-recommendation.md +20 -0
  87. package/ai-orchestration-ecosystem/templates/task-brief.md +20 -0
  88. package/ai-orchestration-ecosystem/templates/technical-spec.md +20 -0
  89. package/ai-orchestration-ecosystem/workflows/brownfield-refactor-safe.md +25 -0
  90. package/ai-orchestration-ecosystem/workflows/bugfix-to-release.md +25 -0
  91. package/ai-orchestration-ecosystem/workflows/greenfield-web-app.md +25 -0
  92. package/ai-orchestration-ecosystem/workflows/mobile-app-production.md +36 -0
  93. package/ai-orchestration-ecosystem/workflows/web-production-release.md +39 -0
  94. package/bin/sagaz.js +107 -0
  95. package/codex-skill/sagaz/SKILL.md +69 -0
  96. package/package.json +42 -0
  97. package/scripts/verify-package.js +29 -0
@@ -0,0 +1,21 @@
1
+ # Agent: Ux Architect
2
+
3
+ ## Mission
4
+
5
+ Design flows, journeys, information architecture, and interactions that reduce friction.
6
+
7
+ ## Responsibilities
8
+
9
+ - Define users and primary tasks.
10
+ - Map happy paths, errors, and empty states.
11
+ - Organize navigation and information hierarchy.
12
+ - Set usability criteria.
13
+
14
+ ## Standard Output
15
+
16
+ - Primary journey
17
+ - Navigation map
18
+ - Screen states
19
+ - Interaction requirements
20
+ - Usability criteria
21
+
@@ -0,0 +1,20 @@
1
+ # Agent: Visual Qa
2
+
3
+ ## Mission
4
+
5
+ Validate interfaces visually before delivery and block layout, hierarchy, responsiveness, and accessibility issues.
6
+
7
+ ## Responsibilities
8
+
9
+ - Check desktop and mobile viewports.
10
+ - Find overlap, overflow, misalignment, clipping, and weak contrast.
11
+ - Validate interactive states.
12
+ - Compare implementation against the design system.
13
+
14
+ ## Standard Output
15
+
16
+ - Viewports tested
17
+ - Issues found
18
+ - Recommended fixes
19
+ - Verdict
20
+
@@ -0,0 +1,25 @@
1
+ # Decision Records
2
+
3
+ Use ADRs for decisions that affect architecture, stack, public contracts, deployment, cost, or maintainability.
4
+
5
+ ## Template
6
+
7
+ ```md
8
+ # ADR-[number] - [title]
9
+
10
+ Date:
11
+ Status: proposed | accepted | superseded | revoked
12
+
13
+ ## Context
14
+
15
+ ## Decision
16
+
17
+ ## Alternatives Considered
18
+
19
+ ## Consequences
20
+
21
+ ## Evidence
22
+
23
+ ## Future Review
24
+ ```
25
+
@@ -0,0 +1,29 @@
1
+ # Operating System
2
+
3
+ ## Objective
4
+
5
+ Create autonomous, auditable, outcome-oriented AI teams inside Codex with low token usage and strong quality verification.
6
+
7
+ ## Principles
8
+
9
+ 1. Verifiable outcomes over fast answers.
10
+ 2. Specifications before execution when ambiguity or risk is meaningful.
11
+ 3. The smallest sufficient team.
12
+ 4. Explicit delegation, concise handoffs, and required evidence.
13
+ 5. Independent validation for meaningful changes.
14
+ 6. Markdown memory that is concise, versionable, and reusable.
15
+ 7. No refactor without a behavior contract.
16
+ 8. Failures become ecosystem improvements.
17
+ 9. Senior software engineering by default: simplicity, testability, security, observability, and maintainability.
18
+ 10. Architecture must emerge from the problem, existing code, and requirements.
19
+ 11. Guided proactivity: detect useful next steps, explain reason/impact/risk, and ask permission before meaningful actions.
20
+ 12. Stack choices must be explained by cost, speed, scale, maintainability, maturity, security, deployment, and future changes.
21
+ 13. Multi-team work must use sequential handoffs with user approval.
22
+ 14. Medium/large work must use named workflows, formal tasks, and persistent run state.
23
+ 15. Mobile projects require dedicated mobile gates and release checklists.
24
+ 16. Production projects must consider CI/CD and post-delivery monitoring.
25
+ 17. Production systems should consider SRE readiness, incident response, and operational recovery.
26
+ 18. Repeated delivery cycles should track DORA metrics without turning them into vanity metrics.
27
+ 19. Security must be integrated through the full SDLC, including threat modeling and verification.
28
+ 20. Dependencies, data lifecycle, API contracts, migrations, releases, accessibility, performance, and AI quality must have explicit protocols when relevant.
29
+
@@ -0,0 +1,15 @@
1
+ # Token Economy
2
+
3
+ ## Objective
4
+
5
+ Reduce token usage without reducing reliability.
6
+
7
+ ## Rules
8
+
9
+ - Load indexes before detailed files.
10
+ - Use small squads.
11
+ - Keep handoffs concise.
12
+ - Avoid repeating context already stored in templates.
13
+ - Write long specs to files, not chat.
14
+ - Load only the workflow, squad, protocol, task, or template required for the current phase.
15
+
@@ -0,0 +1,23 @@
1
+ # Software Engineering Deep Guide
2
+
3
+ ## Philosophy
4
+
5
+ Good software solves the right problem, stays understandable after delivery, fails predictably, can be tested, can be operated, and can evolve without unnecessary fear.
6
+
7
+ ## Golden Rules
8
+
9
+ 1. Understand before changing.
10
+ 2. Specify before building when risk is meaningful.
11
+ 3. Prefer verifiable simplicity.
12
+ 4. Preserve existing contracts.
13
+ 5. Validate inputs at boundaries.
14
+ 6. Isolate side effects.
15
+ 7. Test behavior, not accidental implementation details.
16
+ 8. Document durable decisions.
17
+ 9. Measure before optimizing.
18
+ 10. Deliver with evidence.
19
+
20
+ ## Production Standard
21
+
22
+ For production work, require a reproducible build, relevant tests, smoke checks, security review, documented configuration, deployment plan, rollback or mitigation, and residual risk disclosure.
23
+
@@ -0,0 +1,13 @@
1
+ # Ecosystem Maintenance
2
+
3
+ ## Purpose
4
+
5
+ Maintain Sagaz as a reliable, safe, versionable, low-token orchestration ecosystem.
6
+
7
+ ## Checklist
8
+
9
+ - Is this reusable?
10
+ - Does it reduce future risk?
11
+ - Does it preserve low token usage?
12
+ - Is the user impact clear?
13
+
@@ -0,0 +1,51 @@
1
+ # Package Release Policy
2
+
3
+ ## Purpose
4
+
5
+ Keep GitHub, the npm package, the portable Codex skill, and the installed local skill synchronized whenever Sagaz changes.
6
+
7
+ ## Required Update Targets
8
+
9
+ When Sagaz changes, update every relevant location:
10
+
11
+ - `ai-orchestration-ecosystem/`
12
+ - `codex-skill/sagaz/SKILL.md`
13
+ - installed local skill at `~/.codex/skills/sagaz` when working on this machine
14
+ - `README.md`
15
+ - `INSTALL.md`
16
+ - `package.json` version when publishing a package update
17
+ - GitHub repository
18
+ - npm package when the installer or distributed files change
19
+
20
+ ## Release Checklist
21
+
22
+ ```md
23
+ Change summary:
24
+ Files updated:
25
+ Skill updated:
26
+ Installed local skill updated:
27
+ README updated:
28
+ Package version updated:
29
+ Package verified:
30
+ Git commit:
31
+ Git push:
32
+ npm publish:
33
+ Post-publish install test:
34
+ ```
35
+
36
+ ## npm Publishing
37
+
38
+ Use npm only for installation packaging. Sagaz itself is intended for Codex Desktop, not as a standalone CLI agent runtime.
39
+
40
+ Before publishing:
41
+
42
+ ```powershell
43
+ npm test
44
+ npm pack --dry-run
45
+ ```
46
+
47
+ Publish:
48
+
49
+ ```powershell
50
+ npm publish --access public
51
+ ```
@@ -0,0 +1,13 @@
1
+ # Quality Policy
2
+
3
+ ## Purpose
4
+
5
+ Maintain Sagaz as a reliable, safe, versionable, low-token orchestration ecosystem.
6
+
7
+ ## Checklist
8
+
9
+ - Is this reusable?
10
+ - Does it reduce future risk?
11
+ - Does it preserve low token usage?
12
+ - Is the user impact clear?
13
+
@@ -0,0 +1,13 @@
1
+ # Security Policy
2
+
3
+ ## Purpose
4
+
5
+ Maintain Sagaz as a reliable, safe, versionable, low-token orchestration ecosystem.
6
+
7
+ ## Checklist
8
+
9
+ - Is this reusable?
10
+ - Does it reduce future risk?
11
+ - Does it preserve low token usage?
12
+ - Is the user impact clear?
13
+
@@ -0,0 +1,13 @@
1
+ # Versioning
2
+
3
+ ## Purpose
4
+
5
+ Maintain Sagaz as a reliable, safe, versionable, low-token orchestration ecosystem.
6
+
7
+ ## Checklist
8
+
9
+ - Is this reusable?
10
+ - Does it reduce future risk?
11
+ - Does it preserve low token usage?
12
+ - Is the user impact clear?
13
+
@@ -0,0 +1,39 @@
1
+ # Protocol: Accessibility Compliance
2
+
3
+ ## Objective
4
+
5
+ Make user interfaces usable by people with different abilities and devices.
6
+
7
+ ## Required Checks
8
+
9
+ - Keyboard navigation.
10
+ - Visible focus states.
11
+ - Semantic landmarks and headings.
12
+ - Accessible labels for controls.
13
+ - Color contrast.
14
+ - Touch target size.
15
+ - Screen reader friendly states.
16
+ - Error messages connected to fields.
17
+ - Reduced motion support when motion is meaningful.
18
+ - No information conveyed by color alone.
19
+
20
+ ## Output
21
+
22
+ ```md
23
+ Accessibility review:
24
+ Viewports/components checked:
25
+ Keyboard:
26
+ Focus:
27
+ Labels:
28
+ Contrast:
29
+ Screen reader considerations:
30
+ Issues:
31
+ Verdict:
32
+ ```
33
+
34
+ ## Blocking Conditions
35
+
36
+ - Primary flow cannot be completed by keyboard when applicable.
37
+ - Important controls lack accessible names.
38
+ - Text contrast blocks readability.
39
+
@@ -0,0 +1,40 @@
1
+ # Protocol: AI Application Quality
2
+
3
+ ## Objective
4
+
5
+ Make AI-powered features testable, observable, cost-aware, and safer to operate.
6
+
7
+ ## Required Checks
8
+
9
+ - Define expected AI behavior and failure modes.
10
+ - Version prompts and model choices.
11
+ - Add evals or golden test cases for important flows.
12
+ - Handle hallucination and uncertainty.
13
+ - Define guardrails for unsafe or out-of-scope output.
14
+ - Track token/cost impact when relevant.
15
+ - Avoid sending sensitive data to models unnecessarily.
16
+ - Log enough to debug without exposing private data.
17
+ - Define fallback behavior when the model/API fails.
18
+ - Regression-test prompts after changes.
19
+
20
+ ## Output
21
+
22
+ ```md
23
+ AI quality review:
24
+ Feature:
25
+ Model/prompt version:
26
+ Expected behavior:
27
+ Failure modes:
28
+ Evals/tests:
29
+ Cost risk:
30
+ Privacy risk:
31
+ Fallback:
32
+ Verdict:
33
+ ```
34
+
35
+ ## Blocking Conditions
36
+
37
+ - AI feature has no defined success/failure behavior.
38
+ - Sensitive data is sent without a clear purpose and control.
39
+ - Critical AI behavior has no eval or regression check.
40
+
@@ -0,0 +1,37 @@
1
+ # Protocol: API Contracts
2
+
3
+ ## Objective
4
+
5
+ Keep APIs reliable, documented, compatible, and testable.
6
+
7
+ ## Required Checks
8
+
9
+ - Define request and response schemas.
10
+ - Validate external input.
11
+ - Use consistent error models.
12
+ - Document pagination, filtering, sorting, and rate limits when relevant.
13
+ - Define idempotency for critical write operations.
14
+ - Preserve backward compatibility unless a breaking change is explicit.
15
+ - Version APIs when needed.
16
+ - Add contract tests for important integrations.
17
+ - Document deprecation paths.
18
+
19
+ ## Output
20
+
21
+ ```md
22
+ API contract:
23
+ Endpoint/event/interface:
24
+ Inputs:
25
+ Outputs:
26
+ Errors:
27
+ Compatibility:
28
+ Tests:
29
+ Deprecation notes:
30
+ ```
31
+
32
+ ## Blocking Conditions
33
+
34
+ - Public API changes without compatibility review.
35
+ - Unvalidated external payloads.
36
+ - Ambiguous or inconsistent error behavior.
37
+
@@ -0,0 +1,36 @@
1
+ # Protocol: Architecture Fitness Functions
2
+
3
+ ## Objective
4
+
5
+ Protect architecture quality over time with objective checks.
6
+
7
+ ## Examples
8
+
9
+ - Bundle size budget.
10
+ - Build time budget.
11
+ - Test runtime budget.
12
+ - Dependency boundary rules.
13
+ - API compatibility checks.
14
+ - Accessibility score target.
15
+ - Performance budget.
16
+ - Coverage threshold for critical logic.
17
+ - Complexity limits for critical modules.
18
+ - Security scan requirements.
19
+
20
+ ## Required Practice
21
+
22
+ - Define fitness functions for architecture decisions that must remain true.
23
+ - Automate checks when possible.
24
+ - Record manual checks when automation is not practical.
25
+ - Revisit fitness functions after major refactors.
26
+
27
+ ## Output
28
+
29
+ ```md
30
+ Fitness function:
31
+ Why it matters:
32
+ How measured:
33
+ Threshold:
34
+ Failure response:
35
+ ```
36
+
@@ -0,0 +1,32 @@
1
+ # Protocol: Ci Cd Readiness
2
+
3
+ ## Objective
4
+
5
+ Define how Sagaz should handle Ci Cd Readiness while keeping the process clear, low-token, safe, and verifiable.
6
+
7
+ ## Required Practice
8
+
9
+ - Start from the user goal and current project state.
10
+ - Load only relevant context.
11
+ - Separate facts, assumptions, inferences, risks, and decisions.
12
+ - Ask permission before meaningful state changes.
13
+ - Record evidence and residual risk.
14
+
15
+ ## Standard Recommendation Format
16
+
17
+ ```md
18
+ Recommendation:
19
+ Why now:
20
+ What changes:
21
+ Benefit:
22
+ Risk:
23
+ Permission required:
24
+ ```n
25
+ ## Blocking Conditions
26
+
27
+ - The primary flow fails.
28
+ - A relevant build, check, or test fails without explanation.
29
+ - Secrets or sensitive data would be exposed.
30
+ - A high risk is not accepted by the user.
31
+ - Verification evidence is missing for the risk level.
32
+
@@ -0,0 +1,32 @@
1
+ # Protocol: Communication
2
+
3
+ ## Objective
4
+
5
+ Define how Sagaz should handle Communication while keeping the process clear, low-token, safe, and verifiable.
6
+
7
+ ## Required Practice
8
+
9
+ - Start from the user goal and current project state.
10
+ - Load only relevant context.
11
+ - Separate facts, assumptions, inferences, risks, and decisions.
12
+ - Ask permission before meaningful state changes.
13
+ - Record evidence and residual risk.
14
+
15
+ ## Standard Recommendation Format
16
+
17
+ ```md
18
+ Recommendation:
19
+ Why now:
20
+ What changes:
21
+ Benefit:
22
+ Risk:
23
+ Permission required:
24
+ ```n
25
+ ## Blocking Conditions
26
+
27
+ - The primary flow fails.
28
+ - A relevant build, check, or test fails without explanation.
29
+ - Secrets or sensitive data would be exposed.
30
+ - A high risk is not accepted by the user.
31
+ - Verification evidence is missing for the risk level.
32
+
@@ -0,0 +1,38 @@
1
+ # Protocol: Data Privacy Lifecycle
2
+
3
+ ## Objective
4
+
5
+ Handle data responsibly from collection through storage, use, logging, retention, deletion, backup, and restore.
6
+
7
+ ## Required Checks
8
+
9
+ - Identify personal, sensitive, financial, health, or regulated data.
10
+ - Minimize collected data.
11
+ - Define retention and deletion expectations.
12
+ - Avoid sensitive data in logs.
13
+ - Encrypt secrets and sensitive data where appropriate.
14
+ - Define backup and restore expectations.
15
+ - Protect exports and generated files.
16
+ - Review analytics and third-party data sharing.
17
+ - Document user consent or legal basis when applicable.
18
+
19
+ ## Output
20
+
21
+ ```md
22
+ Data/privacy review:
23
+ Data collected:
24
+ Purpose:
25
+ Storage:
26
+ Retention:
27
+ Deletion:
28
+ Logging risk:
29
+ Third parties:
30
+ Residual risk:
31
+ ```
32
+
33
+ ## Blocking Conditions
34
+
35
+ - Sensitive data is collected without purpose.
36
+ - PII appears in logs or public files.
37
+ - Destructive data change has no backup or mitigation.
38
+
@@ -0,0 +1,36 @@
1
+ # Protocol: Database Migrations
2
+
3
+ ## Objective
4
+
5
+ Change data structures safely without data loss or unplanned downtime.
6
+
7
+ ## Required Checks
8
+
9
+ - Identify destructive operations.
10
+ - Back up production data before risky changes.
11
+ - Prefer additive migrations before destructive ones.
12
+ - Define rollback or forward-fix strategy.
13
+ - Test migrations on representative data when possible.
14
+ - Consider concurrency and long-running locks.
15
+ - Validate data integrity after migration.
16
+ - Document seed/test data expectations.
17
+
18
+ ## Output
19
+
20
+ ```md
21
+ Migration plan:
22
+ Change type:
23
+ Data at risk:
24
+ Backup:
25
+ Rollback/forward fix:
26
+ Validation:
27
+ Downtime risk:
28
+ Permission required:
29
+ ```
30
+
31
+ ## Blocking Conditions
32
+
33
+ - Destructive production migration without backup or explicit approval.
34
+ - Migration cannot be validated.
35
+ - Rollback or mitigation is undefined for high-risk data changes.
36
+
@@ -0,0 +1,32 @@
1
+ # Protocol: Delegation
2
+
3
+ ## Objective
4
+
5
+ Define how Sagaz should handle Delegation while keeping the process clear, low-token, safe, and verifiable.
6
+
7
+ ## Required Practice
8
+
9
+ - Start from the user goal and current project state.
10
+ - Load only relevant context.
11
+ - Separate facts, assumptions, inferences, risks, and decisions.
12
+ - Ask permission before meaningful state changes.
13
+ - Record evidence and residual risk.
14
+
15
+ ## Standard Recommendation Format
16
+
17
+ ```md
18
+ Recommendation:
19
+ Why now:
20
+ What changes:
21
+ Benefit:
22
+ Risk:
23
+ Permission required:
24
+ ```n
25
+ ## Blocking Conditions
26
+
27
+ - The primary flow fails.
28
+ - A relevant build, check, or test fails without explanation.
29
+ - Secrets or sensitive data would be exposed.
30
+ - A high risk is not accepted by the user.
31
+ - Verification evidence is missing for the risk level.
32
+
@@ -0,0 +1,36 @@
1
+ # Protocol: Dependency Governance
2
+
3
+ ## Objective
4
+
5
+ Reduce risk from third-party packages, tools, libraries, and build scripts.
6
+
7
+ ## Required Checks
8
+
9
+ - Justify every new dependency.
10
+ - Prefer mature, maintained packages.
11
+ - Review license compatibility when relevant.
12
+ - Check known vulnerabilities when tooling exists.
13
+ - Watch for abandoned packages.
14
+ - Avoid packages with suspicious install scripts.
15
+ - Preserve lockfiles.
16
+ - Avoid broad dependency upgrades mixed with feature work.
17
+ - Consider SBOM generation for production-critical systems.
18
+
19
+ ## Recommendation Format
20
+
21
+ ```md
22
+ Dependency recommendation:
23
+ Package/tool:
24
+ Why needed:
25
+ Alternatives:
26
+ Maintenance signal:
27
+ Security/licensing risk:
28
+ Permission required:
29
+ ```
30
+
31
+ ## Blocking Conditions
32
+
33
+ - Dependency introduces known critical vulnerability.
34
+ - License is incompatible with intended use.
35
+ - Package appears unmaintained or suspicious and has safer alternatives.
36
+
@@ -0,0 +1,32 @@
1
+ # Protocol: Design Quality
2
+
3
+ ## Objective
4
+
5
+ Define how Sagaz should handle Design Quality while keeping the process clear, low-token, safe, and verifiable.
6
+
7
+ ## Required Practice
8
+
9
+ - Start from the user goal and current project state.
10
+ - Load only relevant context.
11
+ - Separate facts, assumptions, inferences, risks, and decisions.
12
+ - Ask permission before meaningful state changes.
13
+ - Record evidence and residual risk.
14
+
15
+ ## Standard Recommendation Format
16
+
17
+ ```md
18
+ Recommendation:
19
+ Why now:
20
+ What changes:
21
+ Benefit:
22
+ Risk:
23
+ Permission required:
24
+ ```n
25
+ ## Blocking Conditions
26
+
27
+ - The primary flow fails.
28
+ - A relevant build, check, or test fails without explanation.
29
+ - Secrets or sensitive data would be exposed.
30
+ - A high risk is not accepted by the user.
31
+ - Verification evidence is missing for the risk level.
32
+
@@ -0,0 +1,36 @@
1
+ # Protocol: DORA Metrics
2
+
3
+ ## Objective
4
+
5
+ Track software delivery performance without turning metrics into vanity numbers.
6
+
7
+ ## Metrics
8
+
9
+ - Lead time for changes: time from committed code to production deployment.
10
+ - Deployment frequency: how often the project successfully deploys.
11
+ - Change failure rate: percentage of deployments requiring immediate remediation.
12
+ - Failed deployment recovery time: how long it takes to recover from failed deployments.
13
+ - Rework rate: how often deployments require follow-up correction work.
14
+
15
+ ## When To Use
16
+
17
+ Use when a project has CI/CD, production deployments, releases, or repeated maintenance cycles.
18
+
19
+ ## Required Practice
20
+
21
+ - Recommend DORA tracking when the project reaches production or repeated release cycles.
22
+ - Explain metrics in plain language.
23
+ - Avoid optimizing for speed without stability.
24
+ - Use metrics to identify bottlenecks, not to punish work.
25
+
26
+ ## Output
27
+
28
+ ```md
29
+ Delivery metrics recommendation:
30
+ Why now:
31
+ Metrics to track:
32
+ How to collect:
33
+ Risk if skipped:
34
+ Permission required:
35
+ ```
36
+