mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 14:32:10 +01:00
🔧 chore: improve skills cross-references and CLAUDE.md guidance
- Add --amend option with safety rules to commit command - Add logging skill cross-references to angular-template and html-template - Fix logging skill name from logging-helper to logging - Add extended thinking triggers, context monitoring, and code investigation rules to CLAUDE.md
This commit is contained in:
@@ -174,6 +174,42 @@ Example of splitting commits:
|
||||
## Command Options
|
||||
|
||||
- `--no-verify`: Skip running the pre-commit checks (lint, build, generate:docs)
|
||||
- `--amend`: Amend the previous commit (RESTRICTED - see rules below)
|
||||
|
||||
## Amend Rules (CRITICAL)
|
||||
|
||||
**ONLY use `--amend` in these specific cases:**
|
||||
|
||||
1. **Adding pre-commit hook fixes**: If a pre-commit hook modified files (formatting, linting auto-fixes), you may amend to include those changes.
|
||||
|
||||
2. **Before amending, ALWAYS verify:**
|
||||
```bash
|
||||
# Check authorship - NEVER amend another developer's commit
|
||||
git log -1 --format='%an %ae'
|
||||
|
||||
# Check not pushed - NEVER amend pushed commits
|
||||
git status # Should show "Your branch is ahead of..."
|
||||
```
|
||||
|
||||
3. **If either check fails:**
|
||||
- Create a NEW commit instead
|
||||
- Never amend commits authored by others
|
||||
- Never amend commits already pushed to remote
|
||||
|
||||
**Example workflow for pre-commit hook changes:**
|
||||
```bash
|
||||
# 1. Initial commit triggers pre-commit hook
|
||||
git commit -m "feat(scope): add feature"
|
||||
# Hook modifies files...
|
||||
|
||||
# 2. Verify safe to amend
|
||||
git log -1 --format='%an %ae' # Your name/email
|
||||
git status # "Your branch is ahead..."
|
||||
|
||||
# 3. Stage hook changes and amend
|
||||
git add .
|
||||
git commit --amend --no-edit
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ Guide for modern Angular 20+ template patterns: control flow, lazy loading, proj
|
||||
**Related Skills:** These skills work together when writing Angular templates:
|
||||
- **[html-template](../html-template/SKILL.md)** - E2E testing attributes (`data-what`, `data-which`) and ARIA accessibility
|
||||
- **[tailwind](../tailwind/SKILL.md)** - ISA design system styling (colors, typography, spacing, layout)
|
||||
- **[logging](../logging/SKILL.md)** - MANDATORY logging in all Angular files using `@isa/core/logging`
|
||||
|
||||
## Control Flow (Angular 17+)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ Use this skill when:
|
||||
**Works seamlessly with:**
|
||||
- **[angular-template](../angular-template/SKILL.md)** - Angular template syntax, control flow, and modern patterns
|
||||
- **[tailwind](../tailwind/SKILL.md)** - ISA design system styling for visual design
|
||||
- **[logging](../logging/SKILL.md)** - MANDATORY logging in all Angular components using `@isa/core/logging`
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
name: logging-helper
|
||||
name: logging
|
||||
description: This skill should be used when working with Angular components, directives, services, pipes, guards, or TypeScript classes. Logging is MANDATORY in all Angular files. Implements @isa/core/logging with logger() factory pattern, appropriate log levels, lazy evaluation for performance, error handling, and avoids console.log and common mistakes.
|
||||
---
|
||||
|
||||
|
||||
46
CLAUDE.md
46
CLAUDE.md
@@ -112,6 +112,52 @@ angular-template → html-template → logging → tailwind
|
||||
|
||||
Use `/clear` between unrelated tasks to prevent context degradation.
|
||||
|
||||
### Long-Running Task Pattern
|
||||
|
||||
For complex tasks approaching context limits:
|
||||
1. Dump progress to a `.md` file (e.g., `progress.md`)
|
||||
2. Use `/clear` to reset context
|
||||
3. Resume by reading the progress file
|
||||
4. Continue from where you left off
|
||||
|
||||
### Context Monitoring
|
||||
|
||||
- Use `/context` to check current token usage
|
||||
- Fresh session baseline: ~20k tokens
|
||||
- Consider `/compact` when approaching 150k tokens
|
||||
- Prefer `/clear` over `/compact` when starting new topics
|
||||
|
||||
## Extended Thinking
|
||||
|
||||
Use progressive thinking depth for complex analysis:
|
||||
|
||||
| Trigger | Thinking Budget | Use Case |
|
||||
|---------|----------------|----------|
|
||||
| `"think"` | ~4k tokens | Basic analysis, simple decisions |
|
||||
| `"think hard"` | ~10k tokens | Moderate complexity, multi-factor decisions |
|
||||
| `"think harder"` | ~16k tokens | Deep analysis, architectural decisions |
|
||||
| `"ultrathink"` | ~32k tokens | Maximum depth, critical planning |
|
||||
|
||||
**Examples:**
|
||||
- "Think about how to structure this component"
|
||||
- "Think hard about the best approach for state management"
|
||||
- "Ultrathink about the architecture for this feature"
|
||||
|
||||
## Code Investigation (MANDATORY)
|
||||
|
||||
**Never speculate about code you haven't read.**
|
||||
|
||||
If user references a specific file:
|
||||
1. **READ the file first** using the Read tool
|
||||
2. **THEN provide analysis** based on actual contents
|
||||
3. If file doesn't exist, **say so explicitly**
|
||||
|
||||
**Anti-Hallucination Rules:**
|
||||
- Never describe code you haven't opened
|
||||
- Never assume file contents based on names
|
||||
- Never guess API signatures without documentation
|
||||
- Always verify imports and dependencies exist
|
||||
|
||||
## Implementation Decisions
|
||||
|
||||
| Task Type | Required Agent | Escalation Path |
|
||||
|
||||
Reference in New Issue
Block a user