- Auto-detect fields from workspace. Non-obvious:
versions.rosetta — read from Rosetta plugin path in current LLM context, e.g. "2.0.43"; versions is for GAIN suite tools only (rosetta, specflow, etc.), not the project
- Ask user for anything unresolved in a single batch. All fields optional. Prioritize critical fields first. Leave placeholders for skipped fields
- If
gain.json already exists: read it, ask only about gaps and placeholders; never overwrite confirmed values
- If running as subagent: output
gain_json_draft (template with auto-detected values filled in, all other fields left as template placeholders) to orchestrator; instruct orchestrator to ask user to fill in each placeholder field, and leave any unanswered fields exactly as the placeholder in the template
gain.json
{
"description": "[PROJECT_DESCRIPTION - one sentence: what this project/product is and does]",
"servicesDescription": {
"[SERVICE_NAME]": "[SERVICE_DESCRIPTION - what this service does]"
},
"codingAgents": [
"[CODING_AGENTS - e.g. cursor, claude-code, codex, copilot]"
],
"sdlc": {
"issue_tracker": "[ISSUE_TRACKER - e.g. Jira, GitHub Issues, Linear]",
"issue_tracker_project": "[ISSUE_TRACKER_URL - e.g. https://myorg.atlassian.net/jira/...]",
"wiki": "[WIKI - e.g. Confluence, Notion, GitHub Wiki]",
"wiki_project": "[WIKI_URL - e.g. https://myorg.atlassian.net/wiki/...]",
"test_management": "[TEST_MANAGEMENT - e.g. TestRail, Zephyr; omit if not used]",
"test_management_project": "[TEST_MANAGEMENT_PROJECT - project key or URL]",
"scm": "[SCM - e.g. GitHub, GitLab, Bitbucket]",
"scm_project": "[SCM_URL - e.g. https://github.com/org/repo]",
"build_management": "[BUILD_MANAGEMENT - e.g. GitHub Actions, Jenkins, CircleCI]",
"build_management_project": "[BUILD_MANAGEMENT_URL - e.g. https://github.com/org/repo/actions]",
"ux": "[UX_TOOL - e.g. Figma, Sketch; omit if not applicable]",
"ux_project": "[UX_PROJECT - project name or URL]",
"infrastructure": "[INFRASTRUCTURE - e.g. Kubernetes, ECS, serverless]",
"infrastructure_project": "[INFRASTRUCTURE_PROJECT - project name or cluster name]",
"iac": "[IAC_TOOL - e.g. Terraform, Pulumi, CDK; omit if not applicable]",
"iac_project": "[IAC_PROJECT - project or workspace name]",
"hosting": "[HOSTING - e.g. AWS, GCP, Azure, on-prem]",
"hosting_project": "[HOSTING_PROJECT - project or account name]",
"monitoring": "[MONITORING - e.g. Prometheus, Datadog, New Relic]",
"monitoring_project": "[MONITORING_PROJECT - dashboard URL or project name]",
"logging": "[LOGGING - e.g. Grafana, Splunk, ELK]",
"logging_project": "[LOGGING_PROJECT - dashboard URL or project name]",
"security": "[SECURITY_TOOL - e.g. Vault, AWS Secrets Manager; omit if not applicable]",
"security_project": "[SECURITY_PROJECT - project or namespace]",
"collaboration_project": "[COLLABORATION_PROJECT - team or community name]",
"unit_tests": "[UNIT_TESTS_LOCATION - e.g. in-repository, separate repo]",
"integration_tests": "[INTEGRATION_TESTS_LOCATION - e.g. in-repository]",
"e2e_tests": "[E2E_TESTS_LOCATION - e.g. in-repository, separate repo]",
"performance_tests": "[PERFORMANCE_TESTS_LOCATION - omit if none]",
"testing_harness": "[TESTING_HARNESS - main test entry point or script name; omit if standard]",
"code_graph": "[CODE_GRAPH_TOOL - e.g. GitNexus, CodeScene; omit if not used]"
},
"vocabulary": {
"[TERM]": "[DEFINITION - domain-specific term AI should know; add more entries as needed]"
},
"versions": {
"rosetta": "[ROSETTA_VERSION]"
}
}
1---2name: init-workspace-context3description: Classify workspace mode.4license: Apache-2.05---67<init_workspace_context>89<role>10Workspace initialization classifier — fast, precise, zero-waste.11</role>1213<when_to_use_skill>14Initialization must behave differently for fresh, existing, or plugin workspaces. Misclassifying the mode overwrites config, skips setup, or duplicates work. First skill in the init flow — runs before all others. Also generates or updates `gain.json` with SDLC tooling configuration collected from the user.15</when_to_use_skill>1617<core_concepts>18- All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed19- Three modes: install (no files per `bootstrap_rosetta_files`), upgrade (some files per `bootstrap_rosetta_files` exist), plugin (LLM context already contains "RUNNING AS A PLUGIN")20- `gain.json` is the single source of truth for SDLC tooling; it wins in conflicts with other files21</core_concepts>2223<process>241. Check existing LLM context for "RUNNING AS A PLUGIN": If already there → set mode = plugin252. If not plugin, scan workspace for existing files per `bootstrap_rosetta_files`263. Any found → mode = upgrade; none → mode = install274. Scan for multiple sub-repositories with independent documentation roots → set composite flag, treat git repos as modules, requires use of `large-workspace-handling` skill285. Build file inventory: path and status for each file per `bootstrap_rosetta_files`296. Generate or update repository root `gain.json` — follow the `gain_json_generation` section below307. Return: mode (install|upgrade|plugin), plugin_active, composite, existing_files list, gain_json_status (created|updated|skipped|pending_user_input)31</process>3233<gain_json_generation>34351. Auto-detect fields from workspace. Non-obvious: `versions.rosetta` — read from Rosetta plugin path in current LLM context, e.g. "2.0.43"; `versions` is for GAIN suite tools only (rosetta, specflow, etc.), not the project362. Ask user for anything unresolved in a single batch. All fields optional. Prioritize critical fields first. Leave placeholders for skipped fields373. If `gain.json` already exists: read it, ask only about gaps and placeholders; never overwrite confirmed values384. If running as subagent: output `gain_json_draft` (template with auto-detected values filled in, all other fields left as template placeholders) to orchestrator; instruct orchestrator to ask user to fill in each placeholder field, and leave any unanswered fields exactly as the placeholder in the template3940</gain_json_generation>4142<templates>4344### gain.json4546```json47{48 "description": "[PROJECT_DESCRIPTION - one sentence: what this project/product is and does]",49 "servicesDescription": {50 "[SERVICE_NAME]": "[SERVICE_DESCRIPTION - what this service does]"51 },52 "codingAgents": [53 "[CODING_AGENTS - e.g. cursor, claude-code, codex, copilot]"54 ],55 "sdlc": {56 "issue_tracker": "[ISSUE_TRACKER - e.g. Jira, GitHub Issues, Linear]",57 "issue_tracker_project": "[ISSUE_TRACKER_URL - e.g. https://myorg.atlassian.net/jira/...]",58 "wiki": "[WIKI - e.g. Confluence, Notion, GitHub Wiki]",59 "wiki_project": "[WIKI_URL - e.g. https://myorg.atlassian.net/wiki/...]",60 "test_management": "[TEST_MANAGEMENT - e.g. TestRail, Zephyr; omit if not used]",61 "test_management_project": "[TEST_MANAGEMENT_PROJECT - project key or URL]",62 "scm": "[SCM - e.g. GitHub, GitLab, Bitbucket]",63 "scm_project": "[SCM_URL - e.g. https://github.com/org/repo]",64 "build_management": "[BUILD_MANAGEMENT - e.g. GitHub Actions, Jenkins, CircleCI]",65 "build_management_project": "[BUILD_MANAGEMENT_URL - e.g. https://github.com/org/repo/actions]",66 "ux": "[UX_TOOL - e.g. Figma, Sketch; omit if not applicable]",67 "ux_project": "[UX_PROJECT - project name or URL]",68 "infrastructure": "[INFRASTRUCTURE - e.g. Kubernetes, ECS, serverless]",69 "infrastructure_project": "[INFRASTRUCTURE_PROJECT - project name or cluster name]",70 "iac": "[IAC_TOOL - e.g. Terraform, Pulumi, CDK; omit if not applicable]",71 "iac_project": "[IAC_PROJECT - project or workspace name]",72 "hosting": "[HOSTING - e.g. AWS, GCP, Azure, on-prem]",73 "hosting_project": "[HOSTING_PROJECT - project or account name]",74 "monitoring": "[MONITORING - e.g. Prometheus, Datadog, New Relic]",75 "monitoring_project": "[MONITORING_PROJECT - dashboard URL or project name]",76 "logging": "[LOGGING - e.g. Grafana, Splunk, ELK]",77 "logging_project": "[LOGGING_PROJECT - dashboard URL or project name]",78 "security": "[SECURITY_TOOL - e.g. Vault, AWS Secrets Manager; omit if not applicable]",79 "security_project": "[SECURITY_PROJECT - project or namespace]",80 "collaboration_project": "[COLLABORATION_PROJECT - team or community name]",81 "unit_tests": "[UNIT_TESTS_LOCATION - e.g. in-repository, separate repo]",82 "integration_tests": "[INTEGRATION_TESTS_LOCATION - e.g. in-repository]",83 "e2e_tests": "[E2E_TESTS_LOCATION - e.g. in-repository, separate repo]",84 "performance_tests": "[PERFORMANCE_TESTS_LOCATION - omit if none]",85 "testing_harness": "[TESTING_HARNESS - main test entry point or script name; omit if standard]",86 "code_graph": "[CODE_GRAPH_TOOL - e.g. GitNexus, CodeScene; omit if not used]"87 },88 "vocabulary": {89 "[TERM]": "[DEFINITION - domain-specific term AI should know; add more entries as needed]"90 },91 "versions": {92 "rosetta": "[ROSETTA_VERSION]"93 }94}95```9697</templates>9899</init_workspace_context>