@massa-ai/cursor-plugin 1.6.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.
- package/.cursor-plugin/plugin.json +5 -0
- package/README.md +87 -0
- package/agents/massa-ai-architecture-specialist.md +65 -0
- package/agents/massa-ai-audit-specialist.md +81 -0
- package/agents/massa-ai-builder.md +67 -0
- package/agents/massa-ai-context-curator.md +67 -0
- package/agents/massa-ai-documentation-agent.md +65 -0
- package/agents/massa-ai-furps-analyst.md +71 -0
- package/agents/massa-ai-investigator.md +68 -0
- package/agents/massa-ai-mobile-specialist.md +82 -0
- package/agents/massa-ai-navigator.md +75 -0
- package/agents/massa-ai-plan-critic.md +90 -0
- package/agents/massa-ai-planner.md +65 -0
- package/agents/massa-ai-requirements-analyst.md +64 -0
- package/agents/massa-ai-reviewer.md +66 -0
- package/agents/massa-ai-test-engineer.md +66 -0
- package/agents/massa-ai-verification-agent.md +65 -0
- package/hooks/hooks.json +26 -0
- package/hooks/massa-ai-hook +298 -0
- package/install.sh +413 -0
- package/package.json +30 -0
- package/skills/agents/architecture-specialist/SKILL.md +69 -0
- package/skills/agents/audit-specialist/SKILL.md +85 -0
- package/skills/agents/builder/SKILL.md +71 -0
- package/skills/agents/context-curator/SKILL.md +71 -0
- package/skills/agents/documentation-agent/SKILL.md +69 -0
- package/skills/agents/furps-analyst/SKILL.md +74 -0
- package/skills/agents/investigator/SKILL.md +72 -0
- package/skills/agents/mobile-specialist/SKILL.md +86 -0
- package/skills/agents/navigator/SKILL.md +79 -0
- package/skills/agents/plan-critic/SKILL.md +93 -0
- package/skills/agents/planner/SKILL.md +69 -0
- package/skills/agents/requirements-analyst/SKILL.md +68 -0
- package/skills/agents/reviewer/SKILL.md +70 -0
- package/skills/agents/test-engineer/SKILL.md +70 -0
- package/skills/agents/verification-agent/SKILL.md +69 -0
- package/skills/def/SKILL.md +17 -0
- package/skills/find/SKILL.md +19 -0
- package/skills/graph/SKILL.md +16 -0
- package/skills/index/SKILL.md +19 -0
- package/skills/map/SKILL.md +24 -0
- package/skills/massa-ai/SKILL.md +315 -0
- package/skills/massa-ai/personas/README.md +35 -0
- package/skills/massa-ai/personas/ai-native-nodejs-cli-architect.md +76 -0
- package/skills/massa-ai/personas/catalog.json +157 -0
- package/skills/massa-ai/personas/context-skill-harness-engineer-architect.md +74 -0
- package/skills/massa-ai/personas/product-manager.md +67 -0
- package/skills/massa-ai/personas/senior-mobile-engineer.md +74 -0
- package/skills/massa-ai/personas/senior-mobile-qa-automation-engineer.md +75 -0
- package/skills/massa-ai/references/adr-authoring.md +189 -0
- package/skills/massa-ai/references/agent-orchestration.md +221 -0
- package/skills/massa-ai/references/architecture-coupling-lens.md +239 -0
- package/skills/massa-ai/references/architecture-deepening-lens.md +136 -0
- package/skills/massa-ai/references/architecture-domain-lens.md +186 -0
- package/skills/massa-ai/references/architecture-lenses.md +108 -0
- package/skills/massa-ai/references/audit-report-io.md +459 -0
- package/skills/massa-ai/references/audit-scope.md +103 -0
- package/skills/massa-ai/references/code-annotation.md +111 -0
- package/skills/massa-ai/references/codebase-investigation.md +96 -0
- package/skills/massa-ai/references/context-firewall.md +62 -0
- package/skills/massa-ai/references/conversation-feedback.md +104 -0
- package/skills/massa-ai/references/debug-diagnosis-loop.md +140 -0
- package/skills/massa-ai/references/decision-engine.md +73 -0
- package/skills/massa-ai/references/evidence-gate.md +53 -0
- package/skills/massa-ai/references/furps/analyst-role.md +49 -0
- package/skills/massa-ai/references/furps/checklist.md +92 -0
- package/skills/massa-ai/references/furps/intake.md +104 -0
- package/skills/massa-ai/references/furps/report-contract.md +140 -0
- package/skills/massa-ai/references/hook-enforcement.md +137 -0
- package/skills/massa-ai/references/implementation-delivery.md +101 -0
- package/skills/massa-ai/references/installation.md +110 -0
- package/skills/massa-ai/references/lessons.md +119 -0
- package/skills/massa-ai/references/maestro/artifacts-reports.md +69 -0
- package/skills/massa-ai/references/maestro/cli-device.md +65 -0
- package/skills/massa-ai/references/maestro/cloud.md +67 -0
- package/skills/massa-ai/references/maestro/config-env-output.md +76 -0
- package/skills/massa-ai/references/maestro/fact-ledger.md +71 -0
- package/skills/massa-ai/references/maestro/js-scripting.md +70 -0
- package/skills/massa-ai/references/maestro/mcp.md +59 -0
- package/skills/massa-ai/references/maestro/patterns.md +96 -0
- package/skills/massa-ai/references/maestro/selectors.md +91 -0
- package/skills/massa-ai/references/maestro/workspace-execution.md +81 -0
- package/skills/massa-ai/references/maestro/yaml-commands.md +203 -0
- package/skills/massa-ai/references/maestro.md +47 -0
- package/skills/massa-ai/references/mcp-tools.md +296 -0
- package/skills/massa-ai/references/memory-policy.md +103 -0
- package/skills/massa-ai/references/mobile-context.md +113 -0
- package/skills/massa-ai/references/mobile-diagnosis.md +106 -0
- package/skills/massa-ai/references/mobile-figma-matcher/ATTRIBUTION.md +5 -0
- package/skills/massa-ai/references/mobile-figma-matcher/android-compose.md +13 -0
- package/skills/massa-ai/references/mobile-figma-matcher/android-views.md +13 -0
- package/skills/massa-ai/references/mobile-figma-matcher/core.md +117 -0
- package/skills/massa-ai/references/mobile-figma-matcher/ios-swiftui.md +12 -0
- package/skills/massa-ai/references/mobile-figma-matcher/ios-uikit.md +12 -0
- package/skills/massa-ai/references/mobile-figma-matcher/kmp-compose-multiplatform.md +14 -0
- package/skills/massa-ai/references/mobile-figma-matcher/repository-detection.md +77 -0
- package/skills/massa-ai/references/naming-standards.md +47 -0
- package/skills/massa-ai/references/pr-task-fix.md +80 -0
- package/skills/massa-ai/references/project-context.md +76 -0
- package/skills/massa-ai/references/rfc/ATTRIBUTION.md +5 -0
- package/skills/massa-ai/references/rfc/discovery-and-sizing.md +120 -0
- package/skills/massa-ai/references/rfc/document-contract.md +85 -0
- package/skills/massa-ai/references/rfc/quality-and-lifecycle.md +101 -0
- package/skills/massa-ai/references/root-cause-scripts.md +97 -0
- package/skills/massa-ai/references/spec-driven/artifact-store.md +98 -0
- package/skills/massa-ai/references/spec-driven/code-analysis.md +119 -0
- package/skills/massa-ai/references/spec-driven/coding-principles.md +80 -0
- package/skills/massa-ai/references/spec-driven/context-limits.md +64 -0
- package/skills/massa-ai/references/spec-driven/design.md +257 -0
- package/skills/massa-ai/references/spec-driven/discuss.md +182 -0
- package/skills/massa-ai/references/spec-driven/execute.md +471 -0
- package/skills/massa-ai/references/spec-driven/lessons.md +5 -0
- package/skills/massa-ai/references/spec-driven/memory.md +214 -0
- package/skills/massa-ai/references/spec-driven/specify.md +283 -0
- package/skills/massa-ai/references/spec-driven/sub-agents.md +151 -0
- package/skills/massa-ai/references/spec-driven/tasks.md +494 -0
- package/skills/massa-ai/references/spec-driven/validate.md +397 -0
- package/skills/massa-ai/references/subagent-design.md +132 -0
- package/skills/massa-ai/references/synapse-policy.md +160 -0
- package/skills/massa-ai/references/tdd/calibrated-examples.md +54 -0
- package/skills/massa-ai/references/tdd/discovery-and-sizing.md +83 -0
- package/skills/massa-ai/references/tdd/document-contract.md +136 -0
- package/skills/massa-ai/references/tdd/quality-and-lifecycle.md +83 -0
- package/skills/massa-ai/references/the-fool/cognitive-bias-inventory.md +103 -0
- package/skills/massa-ai/references/the-fool/dialectic-synthesis.md +170 -0
- package/skills/massa-ai/references/the-fool/evidence-audit.md +202 -0
- package/skills/massa-ai/references/the-fool/mode-selection-guide.md +113 -0
- package/skills/massa-ai/references/the-fool/pre-mortem-analysis.md +200 -0
- package/skills/massa-ai/references/the-fool/red-team-adversarial.md +206 -0
- package/skills/massa-ai/references/the-fool/socratic-questioning.md +153 -0
- package/skills/massa-ai/references/ticket/atlassian-fix.md +130 -0
- package/skills/massa-ai/references/ticket/intake-and-sources.md +65 -0
- package/skills/massa-ai/references/ticket/templates-and-quality.md +129 -0
- package/skills/massa-ai/references/verification-ladder.md +62 -0
- package/skills/massa-ai/scripts/lessons.py +590 -0
- package/skills/massa-ai/workflows/adr.md +33 -0
- package/skills/massa-ai/workflows/architecture/architecture-audit.md +125 -0
- package/skills/massa-ai/workflows/architecture/architecture-fix.md +110 -0
- package/skills/massa-ai/workflows/bugs/bugs-audit.md +113 -0
- package/skills/massa-ai/workflows/bugs/bugs-fix.md +97 -0
- package/skills/massa-ai/workflows/code-quality/code-quality-audit.md +154 -0
- package/skills/massa-ai/workflows/code-quality/code-quality-fix.md +99 -0
- package/skills/massa-ai/workflows/commit.md +61 -0
- package/skills/massa-ai/workflows/debug.md +86 -0
- package/skills/massa-ai/workflows/design.md +54 -0
- package/skills/massa-ai/workflows/exploration.md +119 -0
- package/skills/massa-ai/workflows/feature.md +52 -0
- package/skills/massa-ai/workflows/general.md +46 -0
- package/skills/massa-ai/workflows/implementation/implementation-audit.md +87 -0
- package/skills/massa-ai/workflows/implementation/implementation-fix.md +90 -0
- package/skills/massa-ai/workflows/long-session.md +44 -0
- package/skills/massa-ai/workflows/maestro/maestro-audit.md +56 -0
- package/skills/massa-ai/workflows/maestro/maestro-fix.md +74 -0
- package/skills/massa-ai/workflows/maestro/maestro.md +68 -0
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-audit.md +68 -0
- package/skills/massa-ai/workflows/mobile-figma/mobile-figma-fix.md +74 -0
- package/skills/massa-ai/workflows/onboarding.md +23 -0
- package/skills/massa-ai/workflows/refactor.md +47 -0
- package/skills/massa-ai/workflows/refinement/furps-refinement.md +81 -0
- package/skills/massa-ai/workflows/requirements/requirements-audit.md +114 -0
- package/skills/massa-ai/workflows/requirements/requirements-fix.md +93 -0
- package/skills/massa-ai/workflows/rfc.md +55 -0
- package/skills/massa-ai/workflows/security/security-audit.md +113 -0
- package/skills/massa-ai/workflows/security/security-fix.md +97 -0
- package/skills/massa-ai/workflows/spec-driven.md +217 -0
- package/skills/massa-ai/workflows/tdd.md +71 -0
- package/skills/massa-ai/workflows/tests/tests-audit.md +114 -0
- package/skills/massa-ai/workflows/tests/tests-fix.md +96 -0
- package/skills/massa-ai/workflows/the-fool.md +82 -0
- package/skills/massa-ai/workflows/ticket.md +42 -0
- package/skills/persona-router/SKILL.md +158 -0
- package/skills/status/SKILL.md +15 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Android Views Figma Contract
|
|
2
|
+
|
|
3
|
+
Load this reference only for Target Surface Packet rows classified as Android Views XML.
|
|
4
|
+
|
|
5
|
+
- Resolve `res/layout`, qualifiers, includes/merges, styles/themes, dimensions, colors/selectors, text appearances, drawables, fonts, strings, binding/adapters, and Material components affecting the surface.
|
|
6
|
+
- Follow aliases to final values. Record the symbolic resource chain and resolved value.
|
|
7
|
+
- Normalize Figma pixels against Android density before comparing `dp`; compare text using `sp`, font scale, font metrics, line height, and actual wrapping.
|
|
8
|
+
- Record device/viewport, density, orientation, API, theme/UI mode, locale, font scale, system bars/insets, app variant, and content state.
|
|
9
|
+
- Verify constraints, weights, intrinsic sizing, RTL, clipping, elevation, state drawables, minimum touch targets, TalkBack labels/order, and keyboard/focus behavior when represented or required.
|
|
10
|
+
- Preserve the repository's Activity/Fragment/navigation ownership, system back behavior, Material interaction feedback, focus traversal, IME handling, and lifecycle-safe state restoration. Figma may represent appearance and selected states but does not define these behaviors by itself.
|
|
11
|
+
- Prefer established styles, resources, and shared Views components over duplicated local values when their resolved behavior matches.
|
|
12
|
+
- Use existing layout previews/renderers, screenshot tests, instrumentation, Espresso/UIAutomator, emulator/device harnesses, and optional Maestro evidence.
|
|
13
|
+
- Never approve or regenerate a screenshot baseline solely to hide a mismatch.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Mobile Figma Core
|
|
2
|
+
|
|
3
|
+
Use this shared reference after `repository-detection.md` identifies one or more target surfaces. It defines Figma evidence, requirements boundaries, asset handling, mapping and comparison semantics, runtime evidence, and parity-claim limits. Load only the platform references named by the Target Surface Packet.
|
|
4
|
+
|
|
5
|
+
## Boundaries
|
|
6
|
+
|
|
7
|
+
- Supported UI stacks are Android Views XML, Android Jetpack Compose, iOS UIKit, iOS SwiftUI, and Kotlin Multiplatform Compose Multiplatform.
|
|
8
|
+
- Flutter, React Native, web styling, generic Figma exploration, variable-only queries, and MCP troubleshooting are out of scope.
|
|
9
|
+
- Figma MCP is mandatory design evidence. A screenshot or pasted description alone is not a design contract.
|
|
10
|
+
- Figma defines visible design intent and represented variants. Product behavior, navigation, data, analytics, error handling, and state transitions require a separate requirements source.
|
|
11
|
+
- Accessibility, platform conventions, localization, safe areas/insets, minimum touch targets, Dynamic Type/font scale, and explicit product requirements outrank literal replication when supported by evidence. Record these as `CONSTRAINT DEVIATION`.
|
|
12
|
+
|
|
13
|
+
## Figma Evidence Packet
|
|
14
|
+
|
|
15
|
+
Build one packet per selected Figma node or desktop selection:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
Figma File/Selection: <URL, file key, or desktop selection>
|
|
19
|
+
Figma Node: <node ID and name>
|
|
20
|
+
Figma Evidence Timestamp: <local timestamp>
|
|
21
|
+
Metadata: <node outline or not needed>
|
|
22
|
+
Design Context: <nodes fetched>
|
|
23
|
+
Screenshot: <artifact/tool result>
|
|
24
|
+
Variables: <variable names, aliases, and resolved values>
|
|
25
|
+
Code Connect: <mapped components or none>
|
|
26
|
+
States/Variants: <default, pressed, disabled, loading, error, dark, etc.>
|
|
27
|
+
Annotations: <relevant design notes or none>
|
|
28
|
+
Assets: <asset inventory and intended repository destinations>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- Use `get_metadata` first for a large or truncated selection, then fetch only relevant children with `get_design_context`.
|
|
32
|
+
- Always obtain `get_design_context` and `get_screenshot` for each comparison frame.
|
|
33
|
+
- Use `get_variable_defs` to resolve colors, typography, spacing, effects, and aliases.
|
|
34
|
+
- Use current Code Connect mappings when available, but verify every mapping against current source and semantics.
|
|
35
|
+
- Treat generated React, Tailwind, or other sample output as design representation, never implementation guidance for a mobile stack.
|
|
36
|
+
- Stop if the selected node cannot be read. Do not replace structured Figma evidence with visual inference.
|
|
37
|
+
|
|
38
|
+
## Asset Contract
|
|
39
|
+
|
|
40
|
+
- Inventory images, icons, SVGs, vectors, animations, and fonts returned by Figma before editing.
|
|
41
|
+
- Figma MCP asset URLs, including localhost URLs, are temporary transport endpoints. Save required assets into the target repository using its existing asset pipeline and reference the durable project asset.
|
|
42
|
+
- Do not leave temporary MCP URLs in source, tests, fixtures, documentation, or generated configuration.
|
|
43
|
+
- Reuse an existing project asset only after verifying visual content, semantics, licensing, scale behavior, and platform rendering.
|
|
44
|
+
- Do not install icon packages or create placeholders when the design supplies the real asset.
|
|
45
|
+
- Preserve vector data when the target stack supports it; otherwise record any conversion and verify rendered output.
|
|
46
|
+
|
|
47
|
+
## Design-To-Code Mapping Matrix
|
|
48
|
+
|
|
49
|
+
Before implementation, or as the basis of an audit, map every visible in-scope element and required state:
|
|
50
|
+
|
|
51
|
+
| ID | Surface ID | Figma Element/State | Existing Component/Token/Asset | Intended Implementation | Requirements Source | Validation Sensor |
|
|
52
|
+
|---|---|---|---|---|---|---|
|
|
53
|
+
|
|
54
|
+
- Reuse existing components only when semantics, states, accessibility, and visual contract match.
|
|
55
|
+
- Prefer established tokens when their resolved values satisfy the Figma contract. A name match is not evidence.
|
|
56
|
+
- When project tokens differ materially, report the conflict and choose the smallest scoped change that preserves system consistency and design intent.
|
|
57
|
+
- Do not promote a screen-local need into a shared design-system API without evidence of reuse or an established local pattern.
|
|
58
|
+
|
|
59
|
+
## Runtime Sensors And Maestro
|
|
60
|
+
|
|
61
|
+
Use the cheapest existing sensor that proves the claim:
|
|
62
|
+
|
|
63
|
+
1. Static source, resource, token, and asset resolution.
|
|
64
|
+
2. Existing previews, layout renderers, or screenshot/snapshot tests.
|
|
65
|
+
3. Existing instrumentation, XCTest, UI tests, or project render harnesses.
|
|
66
|
+
4. Existing emulator, simulator, or device workflow.
|
|
67
|
+
5. Optional Maestro MCP/CLI evidence.
|
|
68
|
+
6. Human or model visual comparison only as labeled `inferential-visual` evidence.
|
|
69
|
+
|
|
70
|
+
Detect Maestro MCP, Maestro CLI, device availability, and applicable existing flows independently. Prefer existing safe flows and fixed configurations. Never install Maestro, start a device, clear app state, change permissions, seed accounts, mutate backend data, or run a destructive flow without explicit approval. Temporary approved flows stay outside tracked source and do not count as durable regression coverage.
|
|
71
|
+
|
|
72
|
+
A passing flow proves reachability and interaction for the tested journey. It does not prove Figma parity. A screenshot is runtime evidence only when its surface, configuration, state, and provenance are recorded.
|
|
73
|
+
|
|
74
|
+
Sensor matrix:
|
|
75
|
+
|
|
76
|
+
| Need | Required evidence |
|
|
77
|
+
|---|---|
|
|
78
|
+
| Relevant state | Explicit Figma variant, requirement, platform default, or touched code path names the state. |
|
|
79
|
+
| Token match | Resolved value equality or documented tolerance from Figma variable -> project token/resource -> rendered value. Name equality alone is insufficient. |
|
|
80
|
+
| Static parity | Source/resource/asset/constraint chain resolves every in-scope row. |
|
|
81
|
+
| Runtime parity | Static parity plus screenshot/snapshot/render/device evidence with surface, configuration, state, and provenance. |
|
|
82
|
+
| Maestro evidence | Existing safe flow only; do not create tracked flows or mutate app/backend/device state without approval. |
|
|
83
|
+
| Complete parity | No unexplained `MISMATCH`, no required `NOT EVALUATED`, and strongest safe runtime sensor recorded for every in-scope surface. |
|
|
84
|
+
|
|
85
|
+
## Comparison Matrix
|
|
86
|
+
|
|
87
|
+
Use one complete matrix across all selected surfaces:
|
|
88
|
+
|
|
89
|
+
| ID | Surface ID | Element/State | Property/Constraint | Figma Value | Resolved Implementation Value | Runtime Evidence | Evidence Class | Status | Confidence | Fix Direction |
|
|
90
|
+
|---|---|---|---|---|---|---|---|---|---|---|
|
|
91
|
+
|
|
92
|
+
Evidence classes:
|
|
93
|
+
|
|
94
|
+
- `deterministic-source`: resolved source, token, resource, asset, or constraint evidence.
|
|
95
|
+
- `deterministic-runtime`: measured hierarchy, geometry, snapshot result, UI assertion, or fixed-configuration artifact.
|
|
96
|
+
- `inferential-visual`: labeled visual comparison without deterministic measurement.
|
|
97
|
+
- `missing`: required evidence is unavailable or unsafe to obtain.
|
|
98
|
+
|
|
99
|
+
Statuses:
|
|
100
|
+
|
|
101
|
+
- `MATCH`: sufficient evidence supports parity for the row and configuration.
|
|
102
|
+
- `MISMATCH`: concrete evidence shows a difference without an overriding constraint.
|
|
103
|
+
- `CONSTRAINT DEVIATION`: an evidenced platform, accessibility, localization, safe-area, or product constraint intentionally differs.
|
|
104
|
+
- `NOT EVALUATED`: evidence is unavailable, ambiguous, stale, or unsafe to obtain.
|
|
105
|
+
|
|
106
|
+
Only `MISMATCH` rows create `MFM-*` findings. Every row and finding must retain its `Surface ID`.
|
|
107
|
+
|
|
108
|
+
## Claim Rules
|
|
109
|
+
|
|
110
|
+
- Never claim complete parity while an in-scope surface has unexplained `MISMATCH` or required `NOT EVALUATED` rows. `NOT EVALUATED` always blocks complete parity for the affected surface.
|
|
111
|
+
- Complete parity requires fixed Figma evidence, a Target Surface Packet, per-surface configurations, deterministic source evidence, strongest available runtime sensors, zero unexplained mismatches, and explicit residual risk.
|
|
112
|
+
- A shared KMP row may match statically while Android or iOS runtime rows remain `NOT EVALUATED`; report those separately.
|
|
113
|
+
- When only source evidence exists, state: `Resolved implementation values align with the extracted Figma contract; runtime visual parity was not evaluated.`
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
Read `ATTRIBUTION.md` when modifying this contract or redistributing adapted Figma implementation guidance.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# iOS SwiftUI Figma Contract
|
|
2
|
+
|
|
3
|
+
Load this reference only for Target Surface Packet rows classified as iOS SwiftUI.
|
|
4
|
+
|
|
5
|
+
- Resolve `View` composition, modifiers, layout containers, environment values, state selection, navigation entry, styles, asset catalogs, symbols, fonts, previews, accessibility modifiers, and UIKit hosting/interoperability affecting the surface.
|
|
6
|
+
- Compare Figma coordinates with SwiftUI points, then account for display scale only for rendered-pixel evidence.
|
|
7
|
+
- Record device/viewport, display scale, orientation, OS version, size classes, color scheme, locale, Dynamic Type category, safe-area assumptions, app scheme/build, and content state.
|
|
8
|
+
- Verify proposed/ideal sizing, layout priorities, safe areas, adaptive stacks/grids, RTL, clipping, shadows, SF Symbols, Dynamic Type, minimum targets, VoiceOver labels/traits/order, focus, and represented state transitions.
|
|
9
|
+
- Preserve established `NavigationStack`, tab, sheet/full-screen-cover, dismissal, gesture, focus/keyboard, sensory feedback, scene state, and restoration ownership. Require product requirements for interactions or transitions not represented by Figma.
|
|
10
|
+
- Prefer established styles, environment tokens, and reusable views when semantics, states, accessibility, and resolved values match.
|
|
11
|
+
- Use existing previews, snapshot tests, XCTest/XCUITest, simulator/device workflows, accessibility inspection, and optional Maestro evidence.
|
|
12
|
+
- Do not add fixed frames or disable Dynamic Type solely to force one screenshot to match.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# iOS UIKit Figma Contract
|
|
2
|
+
|
|
3
|
+
Load this reference only for Target Surface Packet rows classified as iOS UIKit.
|
|
4
|
+
|
|
5
|
+
- Resolve storyboards, XIBs, programmatic views, view controllers, reusable views/cells, Auto Layout constraints, appearance APIs, trait-dependent resources, asset catalogs, fonts, strings, and state configuration.
|
|
6
|
+
- Compare Figma coordinates with UIKit points, then account for device display scale only when validating rendered pixels.
|
|
7
|
+
- Record device/viewport, display scale, orientation, OS version, size classes, appearance, locale, content-size category, safe-area assumptions, app scheme/build, and content state.
|
|
8
|
+
- Verify intrinsic content size, content hugging/compression resistance, safe-area guides, readable-content guides, RTL, clipping, shadows, SF Symbols configuration, Dynamic Type through `UIFontMetrics`, minimum targets, and UIAccessibility labels/traits/order.
|
|
9
|
+
- Preserve established `UINavigationController`, tab, sheet, presentation, dismissal, gesture, keyboard, focus, haptic, and state-restoration behavior. Apply Apple platform conventions when Figma omits native interaction details.
|
|
10
|
+
- Prefer established UIKit components, appearance tokens, and asset-catalog resources when their semantics and resolved behavior match.
|
|
11
|
+
- Use existing previews/render harnesses, snapshot tests, XCTest/XCUITest, simulator/device workflows, accessibility inspection, and optional Maestro evidence.
|
|
12
|
+
- Do not rewrite snapshot references or accessibility identifiers merely to hide a mismatch.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# KMP Compose Multiplatform Figma Contract
|
|
2
|
+
|
|
3
|
+
Load this reference only for shared Compose Multiplatform Target Surface Packet rows.
|
|
4
|
+
|
|
5
|
+
- Resolve common composables, shared state, theme/design tokens, Compose resources, adaptive layout, accessibility semantics, platform adapters, and `expect`/`actual` declarations affecting presentation.
|
|
6
|
+
- Keep business/domain behavior in established shared boundaries. Do not move platform-only UI behavior into common code merely to reduce duplication.
|
|
7
|
+
- Keep navigation hosting, system back/dismissal, permissions, keyboard/focus integration, haptics, lifecycle, and other platform-native UX behind established shared interfaces or platform adapters. Do not force identical mechanics when Android and iOS conventions differ.
|
|
8
|
+
- Compare shared layout values using Compose density-independent units and typography scaling, but record runtime configurations separately for Android and iOS targets.
|
|
9
|
+
- Audit common composables and resources once. Create distinct runtime rows for each requested Android and iOS target because insets, font rendering, accessibility, resource loading, and host integration differ.
|
|
10
|
+
- Load Android Compose for Android-only source sets or hosts, Android Views for XML interop, UIKit for UIKit hosts/wrappers, and SwiftUI for SwiftUI hosts/wrappers.
|
|
11
|
+
- Verify `expect`/`actual`, resource lookup, platform painters/fonts, safe-area/inset adapters, lifecycle/host integration, and platform accessibility when they affect the surface.
|
|
12
|
+
- Prefer shared components and tokens only when they are already the correct ownership boundary. Apply a shared root fix before platform-local overrides when evidence shows a shared cause.
|
|
13
|
+
- Use existing common tests, platform compilation, previews, snapshot/screenshot tests, Android/iOS UI harnesses, and optional Maestro evidence.
|
|
14
|
+
- If one affected platform cannot be rendered or tested, mark its runtime rows `NOT EVALUATED`; do not infer parity from the other platform.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Mobile Figma Repository Detection
|
|
2
|
+
|
|
3
|
+
Use this reference before loading any stack-specific matcher reference. Classify the concrete target module and files, not the repository root or repository name.
|
|
4
|
+
|
|
5
|
+
Monorepositories may contain several valid mobile stacks; classify only modules connected to the requested target.
|
|
6
|
+
|
|
7
|
+
## Target Surface Packet
|
|
8
|
+
|
|
9
|
+
Produce one immutable packet before Figma extraction or implementation comparison:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Repository Classification: <Android | iOS | KMP | monorepo/mixed>
|
|
13
|
+
Target Feature/Flow: <requested target>
|
|
14
|
+
Target Module(s): <module paths>
|
|
15
|
+
Surface IDs: <stable IDs used by matrices and findings>
|
|
16
|
+
Surface Matrix: <surface ID -> module/source set -> UI stack -> Figma node -> runtime targets>
|
|
17
|
+
Detection Evidence: <build files, manifests/projects, source sets, imports, resources, entry points>
|
|
18
|
+
Ambiguities Resolved: <evidence or user decision>
|
|
19
|
+
Excluded Surfaces: <found but out of scope, with reason>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Detection Order
|
|
23
|
+
|
|
24
|
+
1. Resolve the requested feature, flow, files, symbols, commits, branch comparison, or modified-file set.
|
|
25
|
+
2. Locate candidate modules using build configuration, manifests/projects, source sets, and ownership boundaries.
|
|
26
|
+
3. Classify each target surface using at least one build/configuration signal and one source/resource signal when available.
|
|
27
|
+
4. Map each selected surface to its Figma node. A single node may map to several surfaces; separate platform frames require explicit mappings.
|
|
28
|
+
5. Load only the references required by selected surface IDs.
|
|
29
|
+
|
|
30
|
+
## Stack Signals
|
|
31
|
+
|
|
32
|
+
### Android Views XML
|
|
33
|
+
|
|
34
|
+
- Android Gradle plugin or Android module plus `AndroidManifest.xml`.
|
|
35
|
+
- `res/layout`, layout qualifiers, data/view binding, layout inflation, `View`/`ViewGroup`, Fragment/Activity views, story-equivalent navigation hosts, or XML Material components.
|
|
36
|
+
|
|
37
|
+
### Android Jetpack Compose
|
|
38
|
+
|
|
39
|
+
- Android Gradle plugin plus Compose build features/compiler/dependencies.
|
|
40
|
+
- `setContent`, `@Composable`, `androidx.compose` imports, Compose navigation, previews, or Compose UI tests.
|
|
41
|
+
|
|
42
|
+
### iOS UIKit
|
|
43
|
+
|
|
44
|
+
- Xcode project/workspace or Swift package with Apple platform target.
|
|
45
|
+
- `import UIKit`, `UIView`, `UIViewController`, `AppDelegate`/`SceneDelegate`, storyboards, XIBs, Auto Layout constraints, or UIKit snapshot/UI tests.
|
|
46
|
+
|
|
47
|
+
### iOS SwiftUI
|
|
48
|
+
|
|
49
|
+
- Xcode project/workspace or Swift package with Apple platform target.
|
|
50
|
+
- `import SwiftUI`, `View`, `@main App`, hosting controllers, previews, SwiftUI navigation, or SwiftUI snapshot/UI tests.
|
|
51
|
+
|
|
52
|
+
### KMP Compose Multiplatform
|
|
53
|
+
|
|
54
|
+
- Kotlin Multiplatform plugin and source sets such as `commonMain`, `androidMain`, `iosMain`, or configured equivalents.
|
|
55
|
+
- Compose Multiplatform plugin/dependencies and shared `@Composable` UI in a common source set.
|
|
56
|
+
- Common resources, shared UI modules, platform adapters, and `expect`/`actual` declarations affecting presentation.
|
|
57
|
+
|
|
58
|
+
## Mixed And KMP Composition
|
|
59
|
+
|
|
60
|
+
- Do not classify every Compose file in a KMP repository as shared.
|
|
61
|
+
- Shared Compose UI in `commonMain` or the configured common UI source set loads the KMP contract.
|
|
62
|
+
- Compose in `androidMain`, an Android application module, or Android-only host loads Android Compose.
|
|
63
|
+
- Android XML hosts or interop load Android Views in addition to any shared KMP contract.
|
|
64
|
+
- Swift/UIKit/SwiftUI hosts, wrappers, or surrounding native screens load the matching iOS contract.
|
|
65
|
+
- Audit shared composables once, then capture and report runtime evidence separately for each requested Android or iOS target.
|
|
66
|
+
- When a shared fix affects both targets, verify both. Unavailable targets remain `NOT EVALUATED` with explicit risk.
|
|
67
|
+
|
|
68
|
+
## Ambiguity Gate
|
|
69
|
+
|
|
70
|
+
Ask the user only when evidence cannot resolve one of these cases:
|
|
71
|
+
|
|
72
|
+
- The requested feature maps to multiple plausible modules.
|
|
73
|
+
- Legacy and replacement UI stacks both implement the target with no current ownership evidence.
|
|
74
|
+
- Shared Compose Multiplatform UI serves Android and iOS but requested runtime coverage is unspecified.
|
|
75
|
+
- Separate Figma platform frames cannot be mapped reliably to code surfaces.
|
|
76
|
+
|
|
77
|
+
Do not ask merely because the repository contains several mobile stacks. Exclude unrelated surfaces and record why.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Naming Standards
|
|
2
|
+
|
|
3
|
+
Use this reference when a workflow writes code, drafts implementation contracts, audits code quality, or executes findings that introduce, rename, or preserve identifiers.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Names must explain the role, domain concept, or contract they represent without forcing a future agent to infer intent from surrounding code alone.
|
|
8
|
+
|
|
9
|
+
## Source Order
|
|
10
|
+
|
|
11
|
+
Prefer naming evidence in this order:
|
|
12
|
+
|
|
13
|
+
1. Current source and public contracts.
|
|
14
|
+
2. `CONTEXT.md`, glossary files, product docs, specs, tickets, ADRs, and TDDs.
|
|
15
|
+
3. Existing tests, fixtures, schemas, routes, events, commands, screens, and use-case names.
|
|
16
|
+
4. Local surrounding-code vocabulary when no stronger source exists.
|
|
17
|
+
|
|
18
|
+
Code vocabulary is evidence, not truth. When business intent is inferred only from names, mark it as an inference or keep the existing term until stronger evidence exists.
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
- Use domain vocabulary for business concepts, state, policy, workflows, and persisted data.
|
|
23
|
+
- Name technical plumbing by exact role: parser, adapter, transport, serializer, cache, fixture, validator, resolver, mapper, projection, or report.
|
|
24
|
+
- Replace vague names such as `data`, `info`, `result`, `value`, `temp`, `obj`, `item`, `list`, `manager`, `handler`, and `helper` when a more specific role or concept is known.
|
|
25
|
+
- Keep short generic names only for narrow, conventional scopes where they increase clarity: loop indexes, tuple destructuring, common callback names, test placeholders, tiny local transforms, or framework-required signatures.
|
|
26
|
+
- Prefer naming the invariant over naming the implementation detail when that invariant is what callers depend on.
|
|
27
|
+
- Do not rename public contracts, persisted fields, event names, API parameters, CLI flags, fixture keys, or snapshot/test identifiers unless compatibility and migration impact are explicitly in scope.
|
|
28
|
+
- When a rename is the fix, update all call sites, docs, tests, fixtures, snapshots, and generated examples that form the contract; do not weaken validation assets to hide drift.
|
|
29
|
+
- Avoid fabricated domain terms. If no meaningful name is supported by evidence, choose the most precise technical role name and leave the domain uncertainty explicit in the plan, TDD, or audit.
|
|
30
|
+
|
|
31
|
+
## Workflow Use
|
|
32
|
+
|
|
33
|
+
- Feature, spec-driven execution, and implementation execution use this before writing or changing identifiers.
|
|
34
|
+
- TDD uses this when naming proposed components, modules, states, events, schemas, or data fields.
|
|
35
|
+
- Code-quality audit uses this to distinguish real vague-name findings from harmless conventional short names.
|
|
36
|
+
- Code-quality execution uses this to choose precise replacements and protect public compatibility during renames.
|
|
37
|
+
|
|
38
|
+
## Verification
|
|
39
|
+
|
|
40
|
+
Before completion, perform a focused diff review for touched identifiers:
|
|
41
|
+
|
|
42
|
+
- New or renamed identifiers use domain or role-specific vocabulary.
|
|
43
|
+
- Remaining generic names are narrow, conventional, or externally required.
|
|
44
|
+
- Public contracts and persisted names were preserved unless compatibility handling was part of the task.
|
|
45
|
+
- Tests, fixtures, snapshots, schemas, docs, and examples were not weakened to make a rename pass.
|
|
46
|
+
|
|
47
|
+
Report skipped naming checks when the task does not touch code or design identifiers.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# PR Task Fix
|
|
2
|
+
|
|
3
|
+
Load this reference from `workflows/feature.md` and `workflows/refactor.md` before non-trivial implementation or refactor execution that can be decomposed into reviewable task groups.
|
|
4
|
+
|
|
5
|
+
## ADR/TDD Input Gate
|
|
6
|
+
|
|
7
|
+
Before decomposition, inspect the first user prompt, current prompt context, explicitly attached or readable local files, and any already supplied Atlassian MCP source pointers.
|
|
8
|
+
|
|
9
|
+
If there is no ADR or TDD plain text, no attached/readable ADR or TDD file, and no already supplied Atlassian ADR/TDD source, ask whether the user wants to provide an ADR or TDD through Atlassian MCP. Do not ask again when the user has already supplied, declined, or made Atlassian unavailable for this run.
|
|
10
|
+
|
|
11
|
+
Use ADR/TDD input as implementation context, not as permission to bypass the active workflow's scope, source verification, or verification recipe. If the ADR/TDD conflicts with current source or project instructions, surface the conflict and resolve it before implementation.
|
|
12
|
+
|
|
13
|
+
## PR Task Grouping
|
|
14
|
+
|
|
15
|
+
Decompose work into reviewable PR groups before editing. Reuse the TDD task-planning contract:
|
|
16
|
+
|
|
17
|
+
- Prefer Small PRs: `1-200 LOC / 1-3 files`, with a practical sweet spot under `50-100 LOC`.
|
|
18
|
+
- Use Medium PRs: `201-500 LOC / 3-10 files` only when splitting further would break buildability, testability, UI coherence, or implementation dependency order.
|
|
19
|
+
- Treat Large PRs: `500+ LOC / 10+ files` as exceptions requiring a split, stacked PR, feature-flag, or containment rationale before execution.
|
|
20
|
+
|
|
21
|
+
Every PR group must be independently buildable and testable. It must not leave an intermediate state that breaks tests, UI, migrations, public contracts, required runtime behavior, or the active workflow's verification recipe.
|
|
22
|
+
|
|
23
|
+
If a group is too large, split it into two or more groups. If tasks are too small, merge related small work only when the merged group remains independent, reviewable, buildable, and testable.
|
|
24
|
+
|
|
25
|
+
Order non-breaking groups by layer when applicable:
|
|
26
|
+
|
|
27
|
+
1. `Data`: DTOs, DAOs, data sources, repositories, analytics, persistence, and data-layer interfaces.
|
|
28
|
+
2. `Domain`: use cases, models, mappers, configs, exceptions, monitoring, and business rules.
|
|
29
|
+
3. `Presentation/Navigation`: screens, views, view models, actions, states, routes, and navigation.
|
|
30
|
+
|
|
31
|
+
When the target project uses different boundaries, map these labels to the closest repository terms and state the mapping before execution.
|
|
32
|
+
|
|
33
|
+
## Commit Per Group
|
|
34
|
+
|
|
35
|
+
For each PR group:
|
|
36
|
+
|
|
37
|
+
1. Implement only that group's scoped work.
|
|
38
|
+
2. Run the active workflow's verification recipe for that group.
|
|
39
|
+
3. Invoke `workflows/commit.md` to draft or create the commit.
|
|
40
|
+
|
|
41
|
+
Do not duplicate raw commit-message, staging, audit-file exclusion, or Jira-prefix rules here. The commit workflow remains authoritative for commit safety and message generation.
|
|
42
|
+
|
|
43
|
+
If stacked branching is declined, unavailable, or not applicable, continue sequentially on the current branch and still use the commit workflow after each verified group.
|
|
44
|
+
|
|
45
|
+
## Jira-Key Stacked Branches
|
|
46
|
+
|
|
47
|
+
After the PR groups are stable, inspect their Jira keys. Offer stacked branch automation only when every PR group has a confirmed Jira key. Do not create Jira tickets from this reference; ticket creation remains owned by `workflows/ticket.md`.
|
|
48
|
+
|
|
49
|
+
If every group has a Jira key, ask whether the user wants to automatically create separate stacked branches for each Jira task. If the user accepts, ask for:
|
|
50
|
+
|
|
51
|
+
- the base branch to branch off for the first task
|
|
52
|
+
- a branch name pattern containing the exact token `<jira-task-key>`, for example `features/<jira-task-key>`
|
|
53
|
+
|
|
54
|
+
Normalize Jira keys with the commit workflow regex semantics before substitution, preserving uppercase keys unless the user explicitly supplies a lowercase pattern rule. Reject a branch pattern that omits `<jira-task-key>`.
|
|
55
|
+
|
|
56
|
+
Before creating branches:
|
|
57
|
+
|
|
58
|
+
- Verify the working tree is in a safe state for branch creation.
|
|
59
|
+
- Resolve the base branch and fail early if it is missing.
|
|
60
|
+
- Derive all branch names and check for duplicates or existing local branch name collisions.
|
|
61
|
+
- Do not push any branch.
|
|
62
|
+
|
|
63
|
+
Create branches as a stack:
|
|
64
|
+
|
|
65
|
+
1. Create the first task branch from the user-selected base branch.
|
|
66
|
+
2. Implement, validate, and commit the first PR group through `workflows/commit.md`.
|
|
67
|
+
3. Create the second task branch from the first task branch, not from the original base.
|
|
68
|
+
4. Repeat until every task branch has its implementation, verification, and commit.
|
|
69
|
+
|
|
70
|
+
If a branch creation, implementation, verification, or commit fails, stop at that branch, report completed branches and commits, and leave the next exact resume step. Do not skip ahead to later branches.
|
|
71
|
+
|
|
72
|
+
## Completion Report
|
|
73
|
+
|
|
74
|
+
At completion, report:
|
|
75
|
+
|
|
76
|
+
- ADR/TDD source outcome: supplied, Atlassian provided, declined, unavailable, or not needed.
|
|
77
|
+
- PR groups in execution order, with layer, size, Jira key, verification result, and commit result.
|
|
78
|
+
- All created branches and commits in the order they should be pushed.
|
|
79
|
+
- Explicit `No branches were pushed`.
|
|
80
|
+
- Skipped checks, residual risks, memory outcome, and active workflow Evidence Gate status.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Project Context Intake
|
|
2
|
+
|
|
3
|
+
Use this reference at the start of every workflow, before the first substantive
|
|
4
|
+
read, edit, plan, or answer. It defines the minimum project-context sweep that
|
|
5
|
+
makes agent behavior match this repository's actual conventions instead of
|
|
6
|
+
generic defaults.
|
|
7
|
+
|
|
8
|
+
## Principle
|
|
9
|
+
|
|
10
|
+
Host and project instruction files are the highest-precedence description of how
|
|
11
|
+
work is done here. Reading them is cheaper than discovering their rules by
|
|
12
|
+
failing a gate. Read them once per session, honor precedence, and never re-read
|
|
13
|
+
what is already loaded.
|
|
14
|
+
|
|
15
|
+
## Intake Sweep
|
|
16
|
+
|
|
17
|
+
Read in this order. Stop at the first tier that answers the current question;
|
|
18
|
+
continue only when the next decision still needs more.
|
|
19
|
+
|
|
20
|
+
| Tier | Sources | Answers |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| 1 — Agent contract | `AGENTS.md`, `CLAUDE.md`, and any nearest-ancestor copy between the repo root and the working directory | Startup contract, routing, mandatory policies, forbidden actions |
|
|
23
|
+
| 2 — Host config | `.claude/` (`settings.json`, `settings.local.json`, `commands/`, `agents/`, `skills/`, `hooks/`), `.cursor/` (`rules/`, `mcp.json`), `.github/copilot-instructions.md`, `.opencode/`, `.codex/` | Permissions, hooks, host-specific tooling, MCP registrations |
|
|
24
|
+
| 3 — Product docs | `README.md`, `CONTRIBUTING.md`, `docs/`, `ARCHITECTURE.md` | Install/run/build surface, contribution protocol, architecture |
|
|
25
|
+
| 4 — Delivery config | `.github/workflows/`, `CHANGELOG.md`, `package.json` / `Cargo.toml` / `build.gradle*` / `pyproject.toml`, `.tool-versions`, `mise.toml`, `Makefile` | CI gates, release rules, runtime and toolchain pins, task commands |
|
|
26
|
+
| 5 — Live state | `.specs/project/STATE.md`, `.specs/project/FEATURES.json`, `.specs/HANDOFF.md`, `.specs/LESSONS.md` | In-flight work, decisions already made, confirmed lessons |
|
|
27
|
+
|
|
28
|
+
Tier 1 and Tier 3 (`README.md`) are mandatory in every workflow. Tiers 2, 4, and
|
|
29
|
+
5 are read when the task touches host tooling, a gate/release surface, or
|
|
30
|
+
in-flight spec work respectively.
|
|
31
|
+
|
|
32
|
+
## Precedence
|
|
33
|
+
|
|
34
|
+
When two sources conflict, the higher tier wins:
|
|
35
|
+
|
|
36
|
+
1. Explicit user instruction in the current turn.
|
|
37
|
+
2. System/developer instructions.
|
|
38
|
+
3. Nearest-ancestor `AGENTS.md` / `CLAUDE.md` (deeper path beats repo root).
|
|
39
|
+
4. Repo-root `AGENTS.md` / `CLAUDE.md`.
|
|
40
|
+
5. `CONTRIBUTING.md`, then `README.md`, then `docs/`.
|
|
41
|
+
6. Current repository source code.
|
|
42
|
+
7. Recalled memory — context only, never canonical.
|
|
43
|
+
|
|
44
|
+
A conflict between a doc and current source is a finding: report it rather than
|
|
45
|
+
silently picking a side.
|
|
46
|
+
|
|
47
|
+
## Dedupe Guard
|
|
48
|
+
|
|
49
|
+
- Run the sweep once per conversation. Record which tiers were read.
|
|
50
|
+
- Do not re-read a file because a later workflow or reference names it.
|
|
51
|
+
- On a `git pull`, branch switch, or worktree change, re-read Tier 1 and Tier 4 only.
|
|
52
|
+
- Loading a file is not the same as applying it — state which rule you took from it.
|
|
53
|
+
|
|
54
|
+
## Size And Hygiene
|
|
55
|
+
|
|
56
|
+
- Apply `references/context-firewall.md` thresholds to every file in the sweep.
|
|
57
|
+
A `README.md` over 200 lines is summarized, not pasted.
|
|
58
|
+
- Honor the global ignore paths from the `AGENTS.md` bootstrap block. Never index
|
|
59
|
+
or read `node_modules/`, `dist/`, `build/`, `target/`, `.venv/`, `.env*`,
|
|
60
|
+
`*.pem`, `*.key`, `.ssh/`, or `secrets.json` during intake.
|
|
61
|
+
- Never echo secrets found in a config file. Report the key name only.
|
|
62
|
+
|
|
63
|
+
## Failure Handling
|
|
64
|
+
|
|
65
|
+
| Condition | Behavior |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| File absent | Record it as absent and continue. Absence is evidence, not an error. |
|
|
68
|
+
| No `AGENTS.md` and no `CLAUDE.md` | Say the project has no agent contract; fall back to `README.md` + `CONTRIBUTING.md`. |
|
|
69
|
+
| Not a repository | Skip Tiers 4 and 5; run Tiers 1–3 against the working directory. |
|
|
70
|
+
| Conflicting nested contracts | Apply the nearest ancestor, and report the divergence once. |
|
|
71
|
+
| Sweep would exceed the context budget | Summarize per file to its rules-that-apply, and name what was summarized. |
|
|
72
|
+
|
|
73
|
+
## Output
|
|
74
|
+
|
|
75
|
+
Report the sweep in one line: which tiers were read, and the rules taken from
|
|
76
|
+
them that change this task's behavior. Do not restate file contents.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Attribution
|
|
2
|
+
|
|
3
|
+
RFC authoring guidance in this directory adapts material by [Tech Leads Club](https://github.com/tech-leads-club), originally distributed under [Creative Commons Attribution 4.0 International](https://creativecommons.org/licenses/by/4.0/).
|
|
4
|
+
|
|
5
|
+
The material has been modified and integrated into the `massa-ai` workflow architecture. Tech Leads Club does not endorse this adaptation.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# RFC Discovery And Classification
|
|
2
|
+
|
|
3
|
+
Load this reference before source investigation, RFC classification, impact selection, or clarification questions.
|
|
4
|
+
|
|
5
|
+
## Workflow Fit
|
|
6
|
+
|
|
7
|
+
- Use RFC when the decision is open, at least two directions deserve comparison, and stakeholders need feedback or approval.
|
|
8
|
+
- Use ADR when a significant architecture decision is finalized or being formally recorded.
|
|
9
|
+
- Use TDD when the direction is settled and implementation architecture, contracts, rollout, and verification remain.
|
|
10
|
+
- Use spec-driven when the request spans requirements, design, task planning, and implementation.
|
|
11
|
+
- Use a feature, refactor, debug, or general workflow when a durable stakeholder proposal would add no decision value.
|
|
12
|
+
|
|
13
|
+
Route matrix:
|
|
14
|
+
|
|
15
|
+
| User state | Route |
|
|
16
|
+
|---|---|
|
|
17
|
+
| One architecture decision is selected and needs durable consequences recorded | ADR |
|
|
18
|
+
| Two or more options remain open, decision criteria are needed, or stakeholders must review before choosing | RFC |
|
|
19
|
+
| Direction is selected and implementation architecture/contracts/rollout need a blueprint | TDD |
|
|
20
|
+
| Requirements, design, tasks, and execution all need staged approval | Spec-driven |
|
|
21
|
+
|
|
22
|
+
Source relevance requires the source to name at least one target, constraint, risk, dependency, public contract, option, decision criterion, stakeholder, cost, rollout path, or rejected approach for this RFC. Style-only examples cannot support factual claims.
|
|
23
|
+
|
|
24
|
+
## Evidence Order
|
|
25
|
+
|
|
26
|
+
Use the narrowest authoritative evidence first:
|
|
27
|
+
|
|
28
|
+
1. Current repository source, schemas, tests, configuration, and project instructions.
|
|
29
|
+
2. Existing RFC templates and conventions, approved ADRs/TDDs, tickets, metrics, incident records, and supplied research.
|
|
30
|
+
3. Relevant current massa-ai memories, treated as evidence rather than authority.
|
|
31
|
+
4. Internal MCP sources such as Jira, Linear, Confluence, or NotebookLM when supplied or available and relevant.
|
|
32
|
+
5. Official dependency, vendor, standard, or regulatory documentation.
|
|
33
|
+
6. Broader external research only when authoritative local or official evidence cannot answer a material question.
|
|
34
|
+
|
|
35
|
+
Distinguish verified facts, evidence-backed inferences, generated estimates, proposed choices, and unresolved facts. Record the source of consequential claims. When sources conflict and authority remains unclear, ask rather than silently choosing one.
|
|
36
|
+
|
|
37
|
+
## RFC Types
|
|
38
|
+
|
|
39
|
+
Classify the proposal and emphasize its domain concerns:
|
|
40
|
+
|
|
41
|
+
| Type | Required emphasis |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Technical/Architecture | system boundaries, compatibility, migration path, technical and operational risks |
|
|
44
|
+
| Process/Workflow | team impact, ownership, adoption, enforcement, pilot, and rollback if the process fails |
|
|
45
|
+
| Product/Feature | user impact, success metrics, go/no-go criteria, adoption, and support implications |
|
|
46
|
+
| Vendor/Tool Selection | capability fit, total cost, lock-in, support, security, exit strategy, and evaluation evidence |
|
|
47
|
+
| Policy/Compliance | obligations, scope, enforcement, exceptions, audit trail, ownership, and review cadence |
|
|
48
|
+
|
|
49
|
+
## Impact Labels
|
|
50
|
+
|
|
51
|
+
Every RFC must use one preserved label with a short justification:
|
|
52
|
+
|
|
53
|
+
- `HIGH`: affects multiple teams, systems, user groups, material cost, sensitive data, compliance, public compatibility, or a difficult-to-reverse decision.
|
|
54
|
+
- `MEDIUM`: materially affects one team or system, has non-trivial adoption or operational cost, or requires coordinated rollout.
|
|
55
|
+
- `LOW`: limited scope, low coordination cost, and easy reversibility, while still benefiting from explicit stakeholder alignment.
|
|
56
|
+
|
|
57
|
+
## Provider-Specific AskQuestion
|
|
58
|
+
|
|
59
|
+
When mandatory context is missing and the provider exposes `AskQuestion`, use it instead of an unstructured question dump. Preserve these question IDs and choices so separate runs gather consistent inputs:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"title": "RFC Information",
|
|
64
|
+
"questions": [
|
|
65
|
+
{
|
|
66
|
+
"id": "rfc_topic",
|
|
67
|
+
"prompt": "What is the topic or change you want to propose?",
|
|
68
|
+
"options": [{ "id": "free_text", "label": "I'll describe it below" }]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "rfc_impact",
|
|
72
|
+
"prompt": "What is the estimated impact of this change?",
|
|
73
|
+
"options": [
|
|
74
|
+
{ "id": "high", "label": "HIGH - affects multiple teams, systems, or users" },
|
|
75
|
+
{ "id": "medium", "label": "MEDIUM - affects one team or system" },
|
|
76
|
+
{ "id": "low", "label": "LOW - limited scope, easily reversible" }
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "rfc_urgency",
|
|
81
|
+
"prompt": "Is there a due date or urgency?",
|
|
82
|
+
"options": [
|
|
83
|
+
{ "id": "urgent", "label": "Yes, we need a decision soon" },
|
|
84
|
+
{ "id": "planned", "label": "Part of planned roadmap" },
|
|
85
|
+
{ "id": "open", "label": "No fixed deadline" }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "rfc_options",
|
|
90
|
+
"prompt": "Do you have options or alternatives in mind?",
|
|
91
|
+
"options": [
|
|
92
|
+
{ "id": "yes", "label": "Yes, I have 2+ options to compare" },
|
|
93
|
+
{ "id": "one", "label": "I have a preferred option and need alternatives" },
|
|
94
|
+
{ "id": "no", "label": "No, help me structure options" }
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Follow with focused `AskQuestion` calls for missing RACI roles, assumptions, criteria, weights, or options. If `AskQuestion` is unavailable, ask equivalent concise questions in conversation. Ask in the user's language and do not re-ask supplied or discoverable facts.
|
|
102
|
+
|
|
103
|
+
## Mandatory Inputs
|
|
104
|
+
|
|
105
|
+
Do not finalize the RFC without:
|
|
106
|
+
|
|
107
|
+
- a clear action-oriented title and evidence-backed background
|
|
108
|
+
- full RACI: Driver, Approver or Approvers, Contributors, and Informed parties
|
|
109
|
+
- `HIGH`, `MEDIUM`, or `LOW` impact with justification
|
|
110
|
+
- urgency or due date, including explicit `TBD` when the user cannot provide one
|
|
111
|
+
- at least one assumption with owner, confidence, and invalidation trigger
|
|
112
|
+
- at least two decision criteria defined before options, with numeric weights
|
|
113
|
+
- at least two credible options and explicit status quo consideration
|
|
114
|
+
- a recommendation tied back to the weighted criteria
|
|
115
|
+
|
|
116
|
+
When a person or date is unknown, ask for it. If the user cannot supply it, keep the required field visible as `TBD`; never pretend it was resolved.
|
|
117
|
+
|
|
118
|
+
## Language
|
|
119
|
+
|
|
120
|
+
Write the RFC in the same language as the user's request unless another language is requested. Preserve technical identifiers, product names, standards, and common terms such as API, RFC, rollback, and stakeholder when translation would reduce clarity.
|