d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
2.8 KiB
2.8 KiB
HarmonyOS App Project CLAUDE.md
This is a project-level CLAUDE.md example for HarmonyOS applications. Place it at your project root.
Project Overview
[Briefly describe your app - features, target devices, API level]
Core Rules
1. Tech Stack Constraints
- Platform: HarmonyOS (ArkTS/TypeScript), prefer latest stable official APIs
- State Management: V2 only (
@ComponentV2,@Local,@Param,@Event,@Provider,@Consumer,@Monitor,@Computed) - Routing: Navigation only (
Navigation+NavPathStack+NavDestination) - Architecture: MVVM with modular layers - View renders only, all business logic in ViewModel
- Component priority: in-module reusable components > cross-module shared components > third-party libraries
2. Code Organization
- Prefer many small files over few large files
- High cohesion, low coupling
- Target 200-400 lines per file, max 800 lines
- Organize by feature/domain, not by type
3. Code Style
- No emojis in code, comments, or documentation
- Immutability - never mutate objects directly
- Double quotes for strings; semicolons required
- Never use
var- preferconst, thenlet - No
anytype - complete type annotations for all methods, parameters, return values - Naming:
camelCasefor variables/functions,PascalCasefor classes/interfaces,UPPER_SNAKE_CASEfor constants - File header:
@file+@author; all methods need JSDoc with@paramand@returns
4. Layout & Interaction
- Use
layoutWeight(1)for even distribution - avoidSpaceAround/SpaceBetween - Use percentages / layout weights / adaptive units - no hardcoded fixed dimensions (except icons)
- Define UI constants as resources, reference via
$r() - Support both light and dark themes for new color resources
5. Build & Validation
# Build HAP package
hvigorw assembleHap -p product=default
- Run build after every implementation to verify compilation
- Refer to official Huawei developer docs for uncertain API usage - never guess
6. Testing
- TDD: write tests first
- Unit tests for utility functions and ViewModels
- UI tests for critical user flows
- Minimum 80% coverage for business logic
7. Security
- No hardcoded secrets
- Verify permissions in
module.json5before using system APIs - Validate all user input
- Use HTTPS for all network requests
File Structure
src/
|-- entry/ # App entry, framework initialization
|-- core/ # Core framework layer
|-- shared/ # Shared contracts layer
|-- packages/ # Business feature packages
Available Commands
/plan- Create implementation plan/code-review- Code quality review/build-fix- Fix build errors
Git Workflow
- Conventional commits:
feat:,fix:,refactor:,docs:,test: - No direct commits to main branch
- PRs require review
- All tests must pass before merge