Markdown Converter
Agent skill for markdown-converter
Idle Dyson Swarm is a Unity incremental/idle game where players build a network of facilities to generate science and expand across the universe.
Sign in to like and favorite skills
Idle Dyson Swarm is a Unity incremental/idle game where players build a network of facilities to generate science and expand across the universe.
The codebase is undergoing architectural modernization. See migration documentation in:
Assets/Scripts/Services/README.md - Service layer architectureDocumentation/ folderFacilityBuildingPresenter, GameStateService)I prefix (e.g., IGameStateService, IFacilityService)_ prefix (e.g., _gameState, _facilityService)Science, InfinityData)GetResearchLevel, TryGetFacility)researchId, facilityId)Oracle.textColourBlue)The project uses typed ID wrappers to prevent ID mixing errors:
using IdleDysonSwarm.Data; FacilityId facilityId = new FacilityId("assembly_lines"); SkillId skillId = new SkillId("faster_production"); ResearchId researchId = new ResearchId("science_boost");
Key points:
IdleDysonSwarm.Data namespaceAlways prefer services over direct Oracle access:
// ❌ Old pattern (avoid in new code) using static Expansion.Oracle; double science = StaticInfinityData.Science; // ✅ New pattern (use this) using IdleDysonSwarm.Services; private IGameStateService _gameState; private void Awake() { _gameState = ServiceLocator.Get<IGameStateService>(); } private void UpdateUI() { double science = _gameState.Science; }
Available Services:
IGameStateService - Core game state (InfinityData, PrestigeData, SkillTreeData, Science, Research)IGameDataService - Definition data (facilities, skills, research, effects)IFacilityService - Facility management operationsService registration:
ServiceProvider MonoBehaviour at startupServiceLocator.Get<TService>() in Awake() to inject dependenciesAssets/Scripts/Services/README.md for detailed documentationUse scriptable conditions for unlock/visibility logic instead of hardcoded checks:
// ❌ Old pattern (hardcoded logic) if (StaticInfinityData.assemblyLines[0] >= 10 && StaticPrestigeData.hasUnlockedX) { // Show UI element } // ✅ New pattern (scriptable conditions) [SerializeField] private ScriptableCondition unlockCondition; private void UpdateUI() { if (unlockCondition != null && unlockCondition.IsMet()) { // Show UI element } }
Benefits:
The
Oracle class is a legacy static singleton being phased out:
Current state:
using static Expansion.Oracle;// Nested enums Oracle.BuyMode mode = Oracle.BuyMode.Buy1; // Color constants string text = $"{Oracle.textColourBlue}Science</color>";
Data access patterns:
PrestigePlus: Access via Oracle.StaticSaveSettings.prestigePlus (not StaticPrestigePlus)SecretBuffState: Build via ModifierSystem.BuildSecretBuffState(Oracle.StaticPrestigeData) (not StaticSecrets)Assets/ Unity assets, code, scenes, prefabs, plugins.Packages/ Unity package manifest + lock data.ProjectSettings/ Unity project configuration.Library/, Temp/, Logs/, UserSettings/ generated Unity output (not source).Documentation/ project docs, plans, and references.Documentation/Code/ (create as needed) design/contract notes for complex or central scripts.Recordings/ image sequences and captures.STRUCTURE.md additional high-level project map.UIElementsSchema/ UIElements schema assets.steam_appid.txt Steam AppID for local runs.Assets/Scripts/ ├── Buildings/ # Building logic and presenters ├── Classes/ # Shared classes and helpers ├── Conditions/ # Scriptable conditions (Phase 2) ├── Data/ # ScriptableObject definitions, typed IDs, condition system ├── Editor/ # Editor-side code in the Scripts tree ├── Expansion/ # Oracle, research, Dream1 era logic ├── Incremental/ # Incremental game loop logic ├── NewsTicker/ # News feed handling ├── Research/ # Research UI helpers ├── Services/ # Service layer + service locator ├── SkillTreeStuff/ # Skill tree logic and UI ├── Systems/ # Core gameplay systems, stats, facilities, migrations, platform, audio ├── UI/ # UI theme and simulation types ├── UnityPurchasing/ # In-app purchase integration ├── User Interface/ # UI panels, toggles, side-panel logic └── Blindsided/Utilities/ # Shared utility components
Assets/Scenes/ game scenes (Load.unity, Game.unity).Assets/Data/ top-level ScriptableObjects and config assets.Assets/Prefabs/ prefab variants (notably Assets/Prefabs/Buildings/).Assets/Presets/ Unity presets.Assets/Resources/ runtime resources (IAP catalog, audio).Assets/Editor/ editor tooling and validation helpers.Assets/Editor Default Resources/ editor-only assets.Assets/Plugins/ third-party plugins (Easy Save 3, Sirenix, Google Play Games, etc.).Assets/ExternalDependencyManager/ EDM4U Google dependency manager.Assets/KeyStore/ Android keystore material.Assets/Extensions/ platform extensions (Google Play Games, etc.).Assets/MPUIKit/, Assets/TextMesh Pro/, Assets/Fonts/, Assets/Sprites/, Assets/Sounds/ UI + art assets.Documentation/ALLACHIEVEMENTS.md and Documentation/AchievementIdeas.md.Documentation/AchievementPackageForEve/ achievement package materials.Documentation/Archive/ legacy plans, refactors, and notes.Documentation/SaveBackups/ save data backups.Documentation/savedebugging/ save debugging notes.Documentation/Console/editor-console.json Unity Editor log snapshot for agents.Always use TryGet pattern for data lookups to avoid null reference exceptions:
if (_dataService.TryGetFacility(facilityId, out var definition)) { // Use definition safely string name = definition.displayName; } else { Debug.LogWarning($"Facility not found: {facilityId}"); }
Facilities have both auto-purchased and manually-purchased counts:
double[] counts = _facilityService.GetFacilityCount(facilityId); double autoCount = counts[0]; // Auto-purchased double manualCount = counts[1]; // Manually-purchased double totalCount = autoCount + manualCount;
All public APIs should have XML documentation:
/// <summary> /// Gets the current level of a research upgrade. /// </summary> /// <param name="researchId">The unique identifier of the research.</param> /// <returns>The current research level, or 0 if not researched.</returns> public double GetResearchLevel(string researchId) { // Implementation }
Assets/Tests/MockGameStateService for testing presenter logic without Oracle dependency[Test] public void Science_CanBeModified() { // Arrange _mockGameState.SetScience(1000); // Act _mockGameState.Science -= 500; // Assert Assert.AreEqual(500, _mockGameState.Science); }
For agent-friendly console access, a lightweight Editor script writes a JSON snapshot of recent logs.
Output file:
Documentation/Console/editor-console.jsonControls (Unity menu):
Tools/Console Log Buffer/Filter/Include LogsTools/Console Log Buffer/Filter/Include WarningsTools/Console Log Buffer/Filter/Include ErrorsTools/Console Log Buffer/ClearBehavior:
Error:
CS0246: The type or namespace name 'FacilityId' could not be found
Solution: Add
using IdleDysonSwarm.Data;
Error:
CS0103: The name 'BuyMode' does not exist in the current context
Solution: Use
Oracle.BuyMode instead of BuyMode (or add using static Expansion.Oracle;)
Error:
CS0177: The out parameter 'definition' must be assigned before control leaves the current method
Solution: Initialize out parameter to null at start of method:
public bool TryGetFacility(string id, out FacilityDefinition definition) { definition = null; // Initialize first return _registry != null && _registry.TryGetFacility(id, out definition); }
Error:
CS1061: 'DysonVerseInfinityData' does not contain a definition for 'datacenters'
Solution: Use correct casing (camelCase for fields/properties):
dataCenters not datacenters
Full documentation: See
.claude/git-workflow.md for comprehensive git rules.
git reset --hard without asking - This command destroys uncommitted changes permanently. Always ask the user for confirmation before running any destructive git commands (reset --hard, clean -fd, checkout ., etc.)feature/description - New functionalityrefactor/description - Code restructuring (behavior unchanged)fix/description - Bug fixesphase/N-description - Multi-part architectural changesFollow conventional commits (imperative mood):
feat: Add service layer foundation refactor: Migrate FacilityBuildingPresenter to use services fix: Resolve compilation errors in GameDataService docs: Add comprehensive README for service layer test: Add unit tests for mock service layer
Add
trailer to commits when Claude contributed to the changes:Co-Authored-By
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Before creating a PR, run the
agent on all modified files.code-simplify
The agent will:
This ensures PRs are clean and don't introduce unnecessary complexity.
Include:
Global skills are stored in
~/.claude/skills/ and are available across all projects. Project-level skills go in .claude/skills/.
create-pr (global: ~/.claude/skills/create-pr/SKILL.md) - Commit, push, create PR, and optionally merge in one stepDo not make assumptions. If a request, requirement, expected behavior, acceptance criteria, asset reference, platform target, build step, or test/verification approach is ambiguous or underspecified, stop and ask the user clarifying questions before changing code/content. If multiple interpretations are plausible, enumerate them briefly and ask which one is intended.
Assets/Plugins/ unless explicitly requestedOracle.BuyMode, Oracle.textColourBlueWhen editing any script (C# under
Assets/Scripts/** or Assets/Editor/**, plus any build/tooling scripts in-repo), do a documentation pass as part of the same change.
If the code is unclear, do not guess. Use repo search to find who calls it / what it calls, inspect referenced assets (ScriptableObjects, prefabs, scenes), and then document what you learned in that same edit.
In the file being edited:
Also add/refresh a companion doc under
Documentation/Code/ named after the script/class. That doc should capture: contract/behavior expectations, data flow, save/load implications, performance pitfalls, and quick verification steps.
When adding a new system/service/subsystem, renaming/moving script folders, or changing how major systems connect, update
AGENTS.md (and STRUCTURE.md when it's a structural change) in the same PR.
Do not do "documentation cleanup" inside
Assets/Plugins/** unless explicitly requested; instead document integration points and expectations in our code.
When asked to do a Windows Steam build/upload for Idle Dyson Swarm:
C:\Users\mattr\Documents\Unity\Builds\IdleDysonSwarm.C:\Users\mattr\Documents\steamcmd\Scripts\upload_idle_dyson_swarm_windows.bat.4348570, Windows depot: 4348571.C:\Users\mattr\Documents\steamcmd\Scripts\app_build_4348570_windows.vdfC:\Users\mattr\Documents\steamcmd\Scripts\depot_build_4348571_windows.vdfAssets/Scripts/Services/README.mdAssets/Tests/Services/ServiceLayerExampleTests.csAGENTS.md and STRUCTURE.mdWhen in doubt: