Skills.MD
# Code completion checklist
Execute these quality gates before finishing any code work cycle to ensure the codebase is production-ready.
## When to use this skill
Use this skill when:
- Implementing new features
- Fixing bugs
- Refactoring code
- Modifying existing functionality
- Making any changes to C# source code
- Adding or updating indicators
- A human reminds you to run the "code completion checklist"
## Required tools
- #tool:runCommands - Execute shell commands for linting, building, testing
- #tool:read - Read error output and configuration files
## Workflow
### Step 0: Remove dead code
Before running quality gates:
- Delete obsolete or commented-out code
- Remove unused imports, variables, helper methods
- Strip debugging aids (`Console.WriteLine`, breakpoints)
- Remove scratch files (`.bak`, `.new`, `.debug.*`)
### Step 1: Run linters
Execute linting for all code (markdown + .NET):
```bash
dotnet format --severity info --no-restore
npx markdownlint-cli2 --fix
```
Success criteria: **Zero linting errors and zero warnings**. All warnings must be fixed before completing work.
CRITICAL: Suppressing warnings is not an appropriate way to resolve lint or build warnings.
Individual checks (if needed):
```bash
# Roslynator only (fast)
roslynator fix --properties TargetFramework=net10.0 --severity-level info --verbosity normal
# .NET format only
dotnet format --severity info --no-restore
# Markdown only
npx markdownlint-cli2 --fix
```
VS Code tasks: `Lint: All (fix)` or `Lint: .NET code & markdown files (fix)` (faster)
Handle failures:
- Review reported issues
- Fix manually or re-run fix commands
- For unfixable issues, document justification and seek approval
- Re-run lint to verify
### Step 2: Build solution
Verify compilation and build artifacts:
```bash
dotnet build "Stock.Indicators.sln" -v minimal --nologo
```
Success criteria: All projects compile without errors. No build warnings.
VS Code task: `Build: .NET Solution (incremental)`
Handle failures:
- Review compilation errors and warnings
- Fix code issues, type errors, or configuration problems
- Ensure all packages are restored (`dotnet restore`)
- Re-run build to verify
### Step 3: Run test suites
Execute all unit tests (integration tests run in CI only):
```bash
dotnet test "Stock.Indicators.sln" --no-restore --nologo
```
Success criteria: All tests pass. No test failures. Coverage ≥ 98% (validated in CI/CD via Codacy).
VS Code task: `Test: Unit tests`
Handle failures:
- Review test output and failure messages
- Fix code or update tests as appropriate
- Re-run test suite to verify
### Step 4: Update documentation
When changing indicators or public APIs:
- Update XML documentation for changed public APIs
- Update `docs/_indicators/{IndicatorName}.md` for indicator changes
- Update `src/MigrationGuide.V3.md` for breaking changes
- Update obsolete bridge files (`src/Obsolete.V3.*.cs`) for deprecated APIs
### Step 5: Verify and commit
After all gates pass:
```bash
dotnet format --verify-no-changes --severity info --no-restore
dotnet build "Stock.Indicators.sln" -v minimal --nologo
dotnet test "Stock.Indicators.sln" --no-build --nologo
npx markdownlint-cli2
```
- Review changes for completeness
- Address any remaining warnings
- Document intentional deviations
- Commit changes if working in unattended mode
## Quality standards
Before marking work complete:
- **Zero linting errors and zero warnings** - all warnings must be fixed
- **Zero build warnings and zero errors** - all compilation warnings must be addressed
- All projects build successfully
- All tests pass with no warnings
- Coverage threshold maintained (≥ 98% validated in CI/CD)
- Documentation updated for public API changes
- Migration bridges updated for breaking changes
**Critical**: Treat all warnings as errors. Do not ignore, defer, suppress, or accept warnings regardless of scope, type, or reason. Warnings indicate issues that must be resolved.
Abbreviated verification command:
```bash
dotnet format --no-restore && dotnet build && dotnet test --no-restore && npx markdownlint-cli2
```
## Required indicator components
For new or updated indicators, MUST include:
- Series implementation (`*.StaticSeries.cs`)
- Catalog entry and registration (`*.Catalog.cs`)
- Unit tests with full coverage (`*.Tests.cs`)
- Documentation (`docs/_indicators/{Name}.md`)
- Regression test baseline (if algorithm changed)
- Performance benchmark (for complex indicators)
## Required migration bridge
When changing public APIs, MUST:
- Add `[Obsolete]` attribute with migration message
- Update `src/MigrationGuide.V3.md`
- Update bridge files:
- `src/Obsolete.V3.Indicators.cs`
- `src/Obsolete.V3.Other.cs`
## Best practices
- Run linters frequently during development, not just at the end
- Address linting errors as they appear
- Use VS Code tasks for quick access to quality gates
- Run specific tests during active development
- Document exceptions when disabling analyzer rules
## Quick reference
| Gate | Command | VS Code task |
| ------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| Lint .NET (fix) | `roslynator fix --properties TargetFramework=net10.0 --severity-level info` | `Lint: .NET Roslynator (fix)` |
| Lint all (fix) | `dotnet format --severity info --no-restore && npx markdownlint-cli2 --fix` | `Lint: All (fix)` |
| Lint markdown (fix) | `npx markdownlint-cli2 --fix` | `Lint: Markdown (fix)` |
| Build | `dotnet build -v minimal --nologo` | `Build: .NET Solution (incremental)` |
| Test | `dotnet test --no-restore --nologo` | `Test: Unit tests` |
| Full check | `dotnet format --no-restore && dotnet build && dotnet test --no-restore && npx markdownlint-cli2` | Run sequentially |
## Configuration files
Linting:
- Analyzers: #file:../../../src/Directory.Build.props
- .NET format: #file:../../../.editorconfig
- Roslynator: Global configuration
- Markdown: #file:../../../.markdownlint-cli2.jsonc
Build:
- Solution: #file:../../../Stock.Indicators.sln
- Project: #file:../../../src/Indicators.csproj
- Dependencies: #file:../../../src/Directory.Packages.props
Test:
- Unit tests: #file:../../../tests/tests.unit.runsettings
- Regression: #file:../../../tests/tests.regression.runsettings
- Integration: #file:../../../tests/tests.integration.runsettings
## About maintenance of this file
When lint/build/test commands change or new quality gates are added, update this skill file to reflect current workflow
---
Last updated: January 2, 2026
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「code-completion」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次