sagaz-ai 0.3.2 → 0.4.1

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 (45) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/README.md +6 -0
  3. package/RELEASE_NOTES.md +21 -21
  4. package/ai-orchestration-ecosystem/INDEX.md +39 -0
  5. package/ai-orchestration-ecosystem/README.md +10 -0
  6. package/ai-orchestration-ecosystem/evals/golden-output-evaluation.md +79 -0
  7. package/ai-orchestration-ecosystem/evals/sagaz-evaluation-suite.md +34 -0
  8. package/ai-orchestration-ecosystem/golden-outputs/README.md +48 -0
  9. package/ai-orchestration-ecosystem/golden-outputs/design-handoff-output.md +77 -0
  10. package/ai-orchestration-ecosystem/golden-outputs/implementation-plan-output.md +78 -0
  11. package/ai-orchestration-ecosystem/golden-outputs/memory-proposal-output.md +63 -0
  12. package/ai-orchestration-ecosystem/golden-outputs/product-handoff-output.md +76 -0
  13. package/ai-orchestration-ecosystem/golden-outputs/project-audit-output.md +70 -0
  14. package/ai-orchestration-ecosystem/golden-outputs/qa-release-output.md +68 -0
  15. package/ai-orchestration-ecosystem/manifest.json +35 -0
  16. package/ai-orchestration-ecosystem/onboarding/README.md +89 -0
  17. package/ai-orchestration-ecosystem/onboarding/design.md +95 -0
  18. package/ai-orchestration-ecosystem/onboarding/engineering.md +94 -0
  19. package/ai-orchestration-ecosystem/onboarding/handoff-examples.md +114 -0
  20. package/ai-orchestration-ecosystem/onboarding/product-pm.md +97 -0
  21. package/ai-orchestration-ecosystem/onboarding/qa-release.md +94 -0
  22. package/ai-orchestration-ecosystem/prompts/README.md +43 -0
  23. package/ai-orchestration-ecosystem/prompts/design-figma.md +66 -0
  24. package/ai-orchestration-ecosystem/prompts/implementation.md +69 -0
  25. package/ai-orchestration-ecosystem/prompts/memory.md +59 -0
  26. package/ai-orchestration-ecosystem/prompts/project-start.md +73 -0
  27. package/ai-orchestration-ecosystem/prompts/qa-release.md +65 -0
  28. package/ai-orchestration-ecosystem/protocols/generated-code-linting.md +103 -0
  29. package/ai-orchestration-ecosystem/protocols/stack-selection.md +90 -18
  30. package/ai-orchestration-ecosystem/stack-playbooks/nextjs-vercel-supabase.md +6 -4
  31. package/ai-orchestration-ecosystem/stack-presets/admin-dashboard.md +2 -1
  32. package/ai-orchestration-ecosystem/stack-presets/nextjs-vercel.md +4 -1
  33. package/ai-orchestration-ecosystem/stack-presets/node-api.md +2 -1
  34. package/ai-orchestration-ecosystem/stack-presets/react-vite.md +2 -1
  35. package/ai-orchestration-ecosystem/stack-presets/supabase.md +4 -0
  36. package/ai-orchestration-ecosystem/tasks/implementation-build.md +3 -2
  37. package/ai-orchestration-ecosystem/tasks/verification-qa.md +1 -0
  38. package/ai-orchestration-ecosystem/training/README.md +61 -0
  39. package/ai-orchestration-ecosystem/training/day-1-first-project-audit.md +62 -0
  40. package/ai-orchestration-ecosystem/training/day-2-product-to-design.md +76 -0
  41. package/ai-orchestration-ecosystem/training/day-3-design-to-implementation.md +73 -0
  42. package/ai-orchestration-ecosystem/training/day-4-qa-release.md +71 -0
  43. package/ai-orchestration-ecosystem/training/day-5-operational-memory.md +74 -0
  44. package/package.json +1 -1
  45. package/scripts/verify-package.js +211 -1
@@ -0,0 +1,103 @@
1
+ # Protocol: Generated Code Linting
2
+
3
+ ## Objective
4
+
5
+ Ensure code generated or modified by Sagaz is checked with the project's existing linting, formatting, and static-analysis tools whenever those tools are available and relevant.
6
+
7
+ Sagaz must not invent a new lint stack by default. It should discover and use the project's existing commands first.
8
+
9
+ ## Required Practice
10
+
11
+ 1. Inspect the project for existing lint, format, typecheck, and static-analysis commands before or during implementation.
12
+ 2. Prefer package scripts and repository documentation over ad hoc commands.
13
+ 3. Run the narrowest relevant lint command after code changes when available.
14
+ 4. Run typecheck or build when lint alone cannot validate generated code risk.
15
+ 5. Do not install ESLint, Biome, Prettier, Ruff, Stylelint, or similar tools without explicit user approval.
16
+ 6. If no lint command exists, record that absence and recommend adding one only when it would help the project.
17
+ 7. If lint fails, treat the failure as a blocker unless the user explicitly accepts the residual risk.
18
+ 8. Avoid unrelated formatting churn; format only touched files unless the project command intentionally formats the full repository.
19
+ 9. Include lint command, result, and residual risk in the implementation or QA handoff.
20
+
21
+ ## Tool Discovery
22
+
23
+ Check common sources in this order:
24
+
25
+ - Repository docs such as `README.md`, `CONTRIBUTING.md`, or task runner docs.
26
+ - `package.json` scripts such as `lint`, `format`, `typecheck`, `check`, `biome`, or `eslint`.
27
+ - Monorepo task runners such as Turborepo, Nx, pnpm workspaces, npm workspaces, or yarn workspaces.
28
+ - Language-specific tooling such as Ruff, Black, mypy, gofmt, golangci-lint, cargo fmt, cargo clippy, dotnet format, ktlint, swiftlint, or Android lint.
29
+ - CI configuration when local commands are unclear.
30
+
31
+ ## Required Commands
32
+
33
+ When available and relevant, Sagaz should prefer:
34
+
35
+ ```text
36
+ npm run lint
37
+ npm run typecheck
38
+ npm run build
39
+ pnpm lint
40
+ yarn lint
41
+ bun run lint
42
+ ```
43
+
44
+ Use the package manager already used by the project.
45
+
46
+ For non-JavaScript projects, use the equivalent project-native command.
47
+
48
+ ## Permission Rules
49
+
50
+ Linting existing project code is usually a local verification action.
51
+
52
+ Ask explicit approval before:
53
+
54
+ - Installing or upgrading linting tools.
55
+ - Rewriting the whole repository with a formatter.
56
+ - Running commands that modify large unrelated areas.
57
+ - Running networked package-manager commands.
58
+ - Changing lint rules, formatter config, CI config, or pre-commit hooks.
59
+
60
+ Follow `protocols/permission-contract.md`.
61
+
62
+ ## Handoff Evidence
63
+
64
+ Generated code handoff should include:
65
+
66
+ ```md
67
+ Lint discovery:
68
+ Lint command:
69
+ Typecheck command:
70
+ Format command:
71
+ Commands run:
72
+ Result:
73
+ Failures:
74
+ Fixes applied:
75
+ Residual risk:
76
+ ```
77
+
78
+ If lint was not run:
79
+
80
+ ```md
81
+ Lint not run:
82
+ Reason:
83
+ Recommended next step:
84
+ Risk:
85
+ ```
86
+
87
+ ## Blocking Conditions
88
+
89
+ - A relevant lint command exists and fails.
90
+ - Generated code introduces lint violations.
91
+ - Typecheck fails after generated code changes.
92
+ - The only available lint command would rewrite unrelated files and the user has not approved it.
93
+ - The project lacks linting and the change is high risk without an alternative verification method.
94
+
95
+ ## Output
96
+
97
+ When Sagaz changes code, the final response or handoff should state whether lint was:
98
+
99
+ - run and passed,
100
+ - run and failed,
101
+ - unavailable,
102
+ - skipped with reason,
103
+ - deferred pending user approval.
@@ -1,32 +1,104 @@
1
- # Protocol: Stack Selection
1
+ # Protocol: Stack Selection
2
2
 
3
3
  ## Objective
4
4
 
5
- Define how Sagaz should handle Stack Selection while keeping the process clear, low-token, safe, and verifiable.
5
+ Define how Sagaz selects and explains a project stack, including when to recommend TypeScript strict mode and Supabase.
6
+
7
+ Sagaz should prefer boring, maintainable, production-friendly choices that fit the user's goal, existing repository, team skill, cost, deployment target, and future-change needs.
6
8
 
7
9
  ## Required Practice
8
10
 
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.
11
+ 1. Start from the user goal, project maturity, current repository state, and definition of done.
12
+ 2. Reuse the existing stack when it is healthy and fits the goal.
13
+ 3. Compare meaningful alternatives when the stack is not already fixed.
14
+ 4. Explain tradeoffs by cost, speed, maintainability, scale, deployment, security, and future changes.
15
+ 5. Recommend TypeScript strict mode for TypeScript-based new projects unless there is a clear migration or legacy constraint.
16
+ 6. Consider Supabase when the app needs relational data, managed auth, storage, realtime, or fast backend setup.
17
+ 7. Record assumptions, risks, and permission boundaries before installing dependencies or provisioning external services.
18
+ 8. Reference relevant stack presets and playbooks.
19
+ 9. Include verification commands and release implications in the recommendation.
20
+
21
+ ## TypeScript Strict Policy
22
+
23
+ For new TypeScript projects, Sagaz should default to:
24
+
25
+ - `typescript`
26
+ - `strict: true`
27
+ - `noImplicitAny: true` through strict mode
28
+ - typecheck script such as `npm run typecheck` when supported by the stack
29
+ - linting via the project's selected lint tool
30
+
31
+ For existing TypeScript projects:
32
+
33
+ - Inspect `tsconfig.json` before recommending changes.
34
+ - Preserve existing constraints unless the user approves a migration.
35
+ - If `strict` is disabled, recommend a staged strict migration when risk is meaningful.
36
+ - Do not flip strict mode on a large existing codebase without a migration plan and user approval.
37
+
38
+ If TypeScript is not appropriate, explain why and name the verification alternative.
39
+
40
+ ## Supabase Policy
41
+
42
+ Consider Supabase when the project needs:
43
+
44
+ - relational data with managed Postgres,
45
+ - authentication,
46
+ - row-level security,
47
+ - user-uploaded files,
48
+ - realtime features,
49
+ - generated types from database schema,
50
+ - fast full-stack delivery without operating database infrastructure directly.
14
51
 
15
- ## Standard Recommendation Format
52
+ Do not recommend Supabase automatically when:
53
+
54
+ - the app is static and has no backend data,
55
+ - the user already has a committed backend platform,
56
+ - compliance or data residency constraints are unresolved,
57
+ - the project needs a database architecture Supabase does not fit,
58
+ - vendor coupling is unacceptable.
59
+
60
+ When recommending Supabase, Sagaz must include:
61
+
62
+ - data model strategy,
63
+ - RLS policy plan,
64
+ - migration plan,
65
+ - backup and restore plan,
66
+ - environment variable plan,
67
+ - local or preview environment strategy,
68
+ - permission needed before creating or changing Supabase resources.
69
+
70
+ Use `stack-presets/supabase.md`, `stack-playbooks/nextjs-vercel-supabase.md`, and `protocols/mcp-connector-policy.md` when relevant.
71
+
72
+ ## Recommendation Format
16
73
 
17
74
  ```md
18
- Recommendation:
19
- Why now:
20
- What changes:
21
- Benefit:
22
- Risk:
75
+ Recommended stack:
76
+ Why this fits:
77
+ Alternatives considered:
78
+ TypeScript strict decision:
79
+ Supabase decision:
80
+ Deployment target:
81
+ Cost and operational impact:
82
+ Security and data impact:
83
+ Verification commands:
84
+ Migration or setup steps:
23
85
  Permission required:
86
+ Residual risk:
24
87
  ```
88
+
25
89
  ## Blocking Conditions
26
90
 
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.
91
+ - The project already has a stack and Sagaz has not inspected it.
92
+ - The recommendation changes database, auth, hosting, or language without user approval.
93
+ - TypeScript strict migration would cause broad breakage and no migration plan exists.
94
+ - Supabase would introduce unresolved compliance, data residency, backup, RLS, or vendor-coupling risk.
95
+ - Required secrets or external account access would be needed without approval.
31
96
  - Verification evidence is missing for the risk level.
32
-
97
+
98
+ ## Output
99
+
100
+ Sagaz stack recommendations should be concise, but must explicitly state:
101
+
102
+ - whether TypeScript strict is recommended, already enabled, deferred, or not applicable,
103
+ - whether Supabase is recommended, deferred, rejected, or already present,
104
+ - what must be verified before implementation begins.
@@ -14,9 +14,10 @@ Operate a Next.js application deployed on Vercel with Supabase for auth, databas
14
14
 
15
15
  1. Inspect `package.json` scripts and package manager.
16
16
  2. Confirm Node.js version and lockfile.
17
- 3. Confirm whether Supabase is already configured.
18
- 4. Identify required env vars for local, preview, and production.
19
- 5. Apply `protocols/permission-contract.md` before touching Vercel or Supabase accounts.
17
+ 3. Inspect `tsconfig.json` and confirm TypeScript strict status.
18
+ 4. Confirm whether Supabase is already configured.
19
+ 5. Identify required env vars for local, preview, and production.
20
+ 6. Apply `protocols/permission-contract.md` before touching Vercel or Supabase accounts.
20
21
 
21
22
  Common commands:
22
23
 
@@ -33,10 +34,12 @@ Use the project's actual package manager if it is not npm.
33
34
 
34
35
  - Typecheck or build.
35
36
  - Lint if configured.
37
+ - TypeScript strict compatibility or migration notes.
36
38
  - Unit/integration tests for business logic.
37
39
  - Playwright smoke test for critical flows.
38
40
  - Accessibility and responsive checks for core pages.
39
41
  - Supabase RLS review when user data exists.
42
+ - Generated Supabase TypeScript types when schema is available.
40
43
  - Env var audit for secrets and public variables.
41
44
 
42
45
  ## Deployment
@@ -61,4 +64,3 @@ Preview URL:
61
64
  Risks:
62
65
  Permission needed:
63
66
  ```
64
-
@@ -7,7 +7,7 @@ Operational dashboards, internal tools, CRM-like interfaces, analytics panels, a
7
7
  ## Default Stack
8
8
 
9
9
  - React or Next.js
10
- - TypeScript
10
+ - TypeScript with `strict: true` for new projects
11
11
  - shadcn/ui, another component library, or a strict internal design system
12
12
  - Tables, filters, forms, role permissions, and audit logs
13
13
  - Playwright for critical workflows
@@ -52,4 +52,5 @@ Operational dashboards, internal tools, CRM-like interfaces, analytics panels, a
52
52
  - error states
53
53
  - destructive-action confirmations
54
54
  - audit trail needs
55
+ - TypeScript strict compatibility
55
56
  - responsive behavior
@@ -7,10 +7,11 @@ Production web apps, SaaS products, dashboards, marketing sites with dynamic fea
7
7
  ## Default Stack
8
8
 
9
9
  - Next.js
10
- - TypeScript
10
+ - TypeScript with `strict: true` for new projects
11
11
  - Tailwind CSS or an existing design system
12
12
  - shadcn/ui when the project needs customizable React components and no established component system exists
13
13
  - Vercel
14
+ - Supabase when auth, relational data, storage, or realtime features are needed
14
15
  - Playwright
15
16
  - GitHub Actions
16
17
 
@@ -27,6 +28,7 @@ Production web apps, SaaS products, dashboards, marketing sites with dynamic fea
27
28
  - Good performance defaults.
28
29
  - Works well for full-stack web applications.
29
30
  - Easy to evolve from prototype to production.
31
+ - Strong fit with Supabase when managed auth, Postgres, storage, realtime, RLS, and generated TypeScript types are useful.
30
32
 
31
33
  ## Tradeoffs
32
34
 
@@ -39,6 +41,7 @@ Production web apps, SaaS products, dashboards, marketing sites with dynamic fea
39
41
  - The user wants a serious browser-based app.
40
42
  - SEO or performance matters.
41
43
  - Deployment simplicity matters.
44
+ - The app needs TypeScript strict, managed backend services, or Supabase-friendly auth/data flows.
42
45
 
43
46
  ## Avoid When
44
47
 
@@ -7,7 +7,7 @@ Backend APIs, integrations, webhooks, automation services, and full-stack apps n
7
7
  ## Default Stack
8
8
 
9
9
  - Node.js
10
- - TypeScript
10
+ - TypeScript with `strict: true` for new projects
11
11
  - Fastify or Express based on project needs
12
12
  - Zod or similar runtime validation
13
13
  - Postgres or managed database
@@ -37,4 +37,5 @@ Backend APIs, integrations, webhooks, automation services, and full-stack apps n
37
37
  - logging and observability
38
38
  - rate limiting
39
39
  - integration tests
40
+ - typecheck and lint
40
41
  - deployment and rollback
@@ -7,7 +7,7 @@ Client-heavy apps, dashboards, internal tools, prototypes, and static sites that
7
7
  ## Default Stack
8
8
 
9
9
  - React
10
- - TypeScript
10
+ - TypeScript with `strict: true` for new projects
11
11
  - Vite
12
12
  - Tailwind CSS or existing CSS architecture
13
13
  - shadcn/ui when using Tailwind CSS and the app needs reusable, accessible UI components
@@ -36,3 +36,4 @@ Client-heavy apps, dashboards, internal tools, prototypes, and static sites that
36
36
  - The app is mostly client-side.
37
37
  - The project needs simplicity and speed.
38
38
  - The backend already exists.
39
+ - TypeScript strict and lint/typecheck feedback are useful for maintainability.
@@ -11,6 +11,7 @@ Apps needing managed Postgres, authentication, storage, edge functions, and fast
11
11
  - Supabase Storage when user-uploaded files are needed
12
12
  - Supabase Edge Functions when lightweight backend functions are needed
13
13
  - Local Supabase CLI or preview environment strategy for schema and policy testing
14
+ - Generated TypeScript types from the Supabase schema when the app uses TypeScript
14
15
 
15
16
  ## Strengths
16
17
 
@@ -24,6 +25,7 @@ Apps needing managed Postgres, authentication, storage, edge functions, and fast
24
25
  - Row-level security must be designed and tested carefully.
25
26
  - Vendor-specific features create some coupling.
26
27
  - Production backup and migration strategy must be explicit.
28
+ - TypeScript projects should use generated Supabase types and strict mode where practical.
27
29
 
28
30
  ## Use When
29
31
 
@@ -40,3 +42,5 @@ Apps needing managed Postgres, authentication, storage, edge functions, and fast
40
42
  - auth flows
41
43
  - environment variables
42
44
  - local or preview environment strategy
45
+ - generated TypeScript types
46
+ - TypeScript strict compatibility
@@ -38,7 +38,8 @@ Active workflow owner squad.
38
38
  - Changes are scoped to the active task.
39
39
  - Implementation maps to acceptance criteria.
40
40
  - Risky changes are isolated, reversible, or explicitly justified.
41
- - Tests, build checks, or manual verification steps are identified.
41
+ - Existing lint, format, typecheck, tests, build checks, or manual verification steps are identified.
42
+ - Generated or modified code follows `protocols/generated-code-linting.md`.
42
43
 
43
44
  ## Handoff
44
45
 
@@ -53,7 +54,7 @@ Active owner squad -> verification or audit squad based on the active workflow.
53
54
 
54
55
  ## Verification
55
56
 
56
- Check against the implementation plan, active workflow contract, and relevant engineering protocols.
57
+ Check against the implementation plan, active workflow contract, `protocols/generated-code-linting.md`, and relevant engineering protocols.
57
58
 
58
59
  ## Stop Condition
59
60
 
@@ -30,6 +30,7 @@ Active workflow owner squad or code-audit squad when independent review is neede
30
30
 
31
31
  - `template:qa-report`.
32
32
  - Test, build, lint, typecheck, visual, accessibility, security, or manual verification evidence.
33
+ - Generated code linting evidence from `protocols/generated-code-linting.md` when code changed.
33
34
  - Defects found and recommended fixes.
34
35
  - Go/no-go verdict with residual risks.
35
36
 
@@ -0,0 +1,61 @@
1
+ # Sagaz Training Track
2
+
3
+ ## Purpose
4
+
5
+ Provide a guided practice path for teams learning Sagaz through short exercises.
6
+
7
+ Use this track after reading `ADOPTION.md`, `onboarding/README.md`, and `prompts/README.md`.
8
+
9
+ ## Use When
10
+
11
+ - A team is adopting Sagaz for the first time.
12
+ - A new team member needs hands-on practice.
13
+ - A project lead wants to verify that PMs, designers, engineers, QA, and release reviewers understand Sagaz handoffs.
14
+ - The team wants to practice permission gates before using Sagaz on production work.
15
+
16
+ ## Training Sequence
17
+
18
+ 1. `day-1-first-project-audit.md`: inspect a project without changing files.
19
+ 2. `day-2-product-to-design.md`: turn product intent into design-ready context.
20
+ 3. `day-3-design-to-implementation.md`: move from design handoff to implementation plan.
21
+ 4. `day-4-qa-release.md`: verify work and prepare release readiness.
22
+ 5. `day-5-operational-memory.md`: propose durable project/team preferences safely.
23
+
24
+ ## Prerequisites
25
+
26
+ - Codex Desktop installed.
27
+ - Sagaz installed and verified with `npx sagaz-ai doctor`.
28
+ - A low-risk repository for practice.
29
+ - Git available if the exercise includes repository status.
30
+ - Agreement that Sagaz should not push, deploy, publish, or perform destructive operations during training.
31
+
32
+ ## Invocation
33
+
34
+ Start every exercise with `Sagaz:` and explicitly state whether file changes are allowed.
35
+
36
+ For the safest training mode, use:
37
+
38
+ ```text
39
+ Sagaz: follow this training exercise. Do not change files, install dependencies, use external connectors, commit, push, deploy, or publish unless I explicitly approve.
40
+ ```
41
+
42
+ ## Handoff
43
+
44
+ Each exercise should end with:
45
+
46
+ - What Sagaz inspected.
47
+ - What Sagaz recommended.
48
+ - What evidence was produced.
49
+ - What risks or assumptions remain.
50
+ - What permission would be needed for the next step.
51
+ - Which training exercise should come next.
52
+
53
+ ## Verification
54
+
55
+ Training is successful when:
56
+
57
+ - The team can invoke Sagaz without custom coaching.
58
+ - Sagaz identifies workflow, squad, risk, permission level, and handoff.
59
+ - The user understands when Sagaz may act and when it must ask.
60
+ - No remote operation happens during training unless explicitly approved.
61
+ - The final handoff is understandable to the next role.
@@ -0,0 +1,62 @@
1
+ # Day 1: First Project Audit
2
+
3
+ ## Purpose
4
+
5
+ Practice using Sagaz to inspect an existing project safely before making changes.
6
+
7
+ ## Use When
8
+
9
+ - A team member is opening Sagaz in a project for the first time.
10
+ - The project structure, stack, risks, or test commands are not yet clear.
11
+ - The team wants to practice inspection-only behavior.
12
+
13
+ ## Estimated Time
14
+
15
+ 20 to 30 minutes.
16
+
17
+ ## Prerequisites
18
+
19
+ - Open a low-risk repository in Codex Desktop.
20
+ - Confirm Sagaz is installed with `npx sagaz-ai doctor`.
21
+ - Do not approve file changes during this exercise.
22
+
23
+ ## Invocation
24
+
25
+ ```text
26
+ Sagaz: audit this project and tell me what workflow, stack playbook, risks, tests, and next implementation step you recommend. Do not change files yet.
27
+ ```
28
+
29
+ ## What To Observe
30
+
31
+ - Sagaz should inspect project structure before recommending action.
32
+ - Sagaz should identify likely stack and tooling.
33
+ - Sagaz should explain which workflow or squad fits.
34
+ - Sagaz should list unknowns and risks.
35
+ - Sagaz should ask before changing files or running high-impact commands.
36
+
37
+ ## Handoff
38
+
39
+ Expected handoff:
40
+
41
+ - Project summary.
42
+ - Stack observations.
43
+ - Recommended workflow.
44
+ - Suggested next squad.
45
+ - Risks and unknowns.
46
+ - Permission needed for the first implementation or planning step.
47
+
48
+ ## Verification
49
+
50
+ Success criteria:
51
+
52
+ - No files were changed.
53
+ - No dependency was installed.
54
+ - No GitHub, deploy, or publish operation was attempted.
55
+ - The next step is clear enough for a PM, designer, or engineer to approve.
56
+
57
+ ## Common Mistakes
58
+
59
+ - Asking Sagaz to implement immediately.
60
+ - Approving broad file changes before the stack is understood.
61
+ - Treating guesses as project facts.
62
+ - Skipping test discovery.
@@ -0,0 +1,76 @@
1
+ # Day 2: Product To Design
2
+
3
+ ## Purpose
4
+
5
+ Practice turning a product idea into a design-ready handoff.
6
+
7
+ ## Use When
8
+
9
+ - Product intent exists but UX flow, screens, or states are unclear.
10
+ - PMs and designers need a shared brief.
11
+ - The team wants to practice handoff quality before Figma or implementation work.
12
+
13
+ ## Estimated Time
14
+
15
+ 30 to 45 minutes.
16
+
17
+ ## Prerequisites
18
+
19
+ - A product idea or feature request.
20
+ - Day 1 completed or project context already understood.
21
+ - No approval for Figma MCP or external design writes yet.
22
+
23
+ ## Invocation
24
+
25
+ ```text
26
+ Sagaz: act as the product team and prepare a design-ready handoff.
27
+
28
+ Goal:
29
+ -
30
+
31
+ Users:
32
+ -
33
+
34
+ Constraints:
35
+ -
36
+
37
+ Definition of done:
38
+ -
39
+
40
+ Do not use Figma MCP or change files. Produce scope, acceptance criteria, risks, and the design handoff.
41
+ ```
42
+
43
+ ## What To Observe
44
+
45
+ - Sagaz should separate goals, non-goals, assumptions, and risks.
46
+ - Sagaz should produce testable acceptance criteria.
47
+ - Sagaz should identify screens, states, and design questions.
48
+ - Sagaz should recommend whether Design Studio should work next.
49
+
50
+ ## Handoff
51
+
52
+ Expected handoff:
53
+
54
+ - Problem statement.
55
+ - Users and jobs.
56
+ - Scope and non-goals.
57
+ - Acceptance criteria.
58
+ - Screen/state inventory.
59
+ - Open questions for design.
60
+ - Permission needed before Figma MCP or design-file changes.
61
+
62
+ ## Verification
63
+
64
+ Success criteria:
65
+
66
+ - A designer can continue without rereading the whole thread.
67
+ - Acceptance criteria are testable.
68
+ - Design unknowns are explicit.
69
+ - External connector usage still requires approval.
70
+
71
+ ## Common Mistakes
72
+
73
+ - Skipping non-goals.
74
+ - Asking for visual output before user flows are clear.
75
+ - Omitting empty, loading, error, and success states.
76
+ - Treating design assumptions as approved requirements.
@@ -0,0 +1,73 @@
1
+ # Day 3: Design To Implementation
2
+
3
+ ## Purpose
4
+
5
+ Practice converting a design handoff into an implementation plan.
6
+
7
+ ## Use When
8
+
9
+ - A UX flow, UI mockup, or design brief exists.
10
+ - Engineering needs a safe implementation path.
11
+ - The team wants to confirm scope, files, tests, and risks before code changes.
12
+
13
+ ## Estimated Time
14
+
15
+ 30 to 45 minutes.
16
+
17
+ ## Prerequisites
18
+
19
+ - Day 2 completed or an equivalent design handoff.
20
+ - A repository open in Codex Desktop.
21
+ - Agreement on whether file changes are allowed.
22
+
23
+ ## Invocation
24
+
25
+ ```text
26
+ Sagaz: convert this design/product handoff into an implementation plan.
27
+
28
+ Handoff:
29
+ -
30
+
31
+ Rules:
32
+ - inspect the project first
33
+ - use existing patterns
34
+ - keep the diff focused
35
+ - identify tests before coding
36
+
37
+ Do not change files until you propose the plan and ask for approval.
38
+ ```
39
+
40
+ ## What To Observe
41
+
42
+ - Sagaz should inspect existing code patterns.
43
+ - Sagaz should identify likely files or modules.
44
+ - Sagaz should call out accessibility, responsive, and state requirements.
45
+ - Sagaz should produce a focused plan instead of broad refactors.
46
+ - Sagaz should name the permission level for implementation.
47
+
48
+ ## Handoff
49
+
50
+ Expected handoff:
51
+
52
+ - Implementation plan.
53
+ - Files or areas likely involved.
54
+ - Test plan.
55
+ - Risks and assumptions.
56
+ - Permission required to edit files.
57
+ - Recommended next engineering action.
58
+
59
+ ## Verification
60
+
61
+ Success criteria:
62
+
63
+ - Plan is scoped.
64
+ - Tests are proportional to risk.
65
+ - Existing patterns are respected.
66
+ - The team knows exactly what approval would allow Sagaz to do next.
67
+
68
+ ## Common Mistakes
69
+
70
+ - Implementing without inspecting the codebase.
71
+ - Changing design scope during engineering.
72
+ - Refactoring unrelated areas.
73
+ - Forgetting responsive or accessibility constraints.