Initial commit
This commit is contained in:
commit
737865149c
|
|
@ -0,0 +1,71 @@
|
|||
# Core Agent Rules
|
||||
|
||||
The repository is the source of truth.
|
||||
|
||||
Never rely on conversational memory.
|
||||
|
||||
Always work from repository files.
|
||||
|
||||
# Workflow
|
||||
|
||||
Before work:
|
||||
1. Read memory-bank/activeContext.md
|
||||
2. Identify the active task file
|
||||
3. Read only the active task file
|
||||
4. Determine the task mode
|
||||
5. Load only the matching mode rule file
|
||||
|
||||
Task modes:
|
||||
- RESEARCH -> .clinerules/modes/research.md
|
||||
- PLANNING -> .clinerules/modes/planning.md
|
||||
- IMPLEMENTATION -> .clinerules/modes/implementation.md
|
||||
- TESTING -> .clinerules/modes/testing.md
|
||||
- RECOVERY -> .clinerules/modes/recovery.md
|
||||
|
||||
# Global Constraints
|
||||
|
||||
- Work on ONE task only.
|
||||
- Edit only files allowed by the task.
|
||||
- Do not broaden scope.
|
||||
- Do not refactor unrelated code.
|
||||
- Do not start side quests.
|
||||
- Prefer many small files.
|
||||
- Prefer small patches.
|
||||
- Record important findings in repo files.
|
||||
- Leave the repository resumable.
|
||||
|
||||
# Tool Use
|
||||
|
||||
Prefer MCP servers when available.
|
||||
|
||||
Use filesystem MCP for:
|
||||
- listing files/directories
|
||||
- reading files
|
||||
- searching repo content
|
||||
- creating files
|
||||
- patching files
|
||||
- checking diffs
|
||||
|
||||
Use git MCP for:
|
||||
- git status
|
||||
- git diff
|
||||
- git log
|
||||
- branch inspection
|
||||
- reviewing changed files
|
||||
|
||||
Do not use slower built-in file tools when filesystem MCP can do the same job.
|
||||
|
||||
Before stopping:
|
||||
- inspect changes with git diff/status
|
||||
- update task state
|
||||
- update memory-bank/activeContext.md
|
||||
- record next exact action
|
||||
- record meaningful commands/results in memory-bank/commandLog.md
|
||||
|
||||
# Recovery
|
||||
|
||||
If uncertain:
|
||||
- stop
|
||||
- reread activeContext.md
|
||||
- reread the active task
|
||||
- continue only from the next exact action
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# Implementation Mode
|
||||
|
||||
Implement only the active task objective.
|
||||
|
||||
Before editing:
|
||||
- read the active task
|
||||
- read only relevant research files
|
||||
- inspect current code
|
||||
|
||||
During work:
|
||||
- make the smallest useful change
|
||||
- edit only allowed files
|
||||
- avoid unrelated cleanup
|
||||
- run targeted tests when possible
|
||||
|
||||
Do not:
|
||||
- broaden scope
|
||||
- start another task
|
||||
- rewrite unrelated code
|
||||
- silently ignore failures
|
||||
|
||||
End by updating:
|
||||
- active task file
|
||||
- memory-bank/activeContext.md
|
||||
- command log if commands were run
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# Planning Mode
|
||||
|
||||
Do not edit implementation code.
|
||||
|
||||
Use research files to create small task files.
|
||||
|
||||
Each task must be:
|
||||
- narrow
|
||||
- independently testable
|
||||
- resumable
|
||||
- limited to one objective
|
||||
|
||||
Each task must define:
|
||||
- status
|
||||
- mode
|
||||
- objective
|
||||
- allowed files
|
||||
- forbidden actions
|
||||
- relevant research files
|
||||
- completion criteria
|
||||
- next exact action
|
||||
- resume instructions
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# Recovery Mode
|
||||
|
||||
Use when context is missing, stale, or uncertain.
|
||||
|
||||
Do not edit implementation code yet.
|
||||
|
||||
Read:
|
||||
- memory-bank/activeContext.md
|
||||
- active task file
|
||||
- only files named by the active task
|
||||
|
||||
Then summarize:
|
||||
- active task
|
||||
- mode
|
||||
- objective
|
||||
- allowed files
|
||||
- last known state
|
||||
- next exact action
|
||||
|
||||
Continue only from the next exact action.
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# Research Mode
|
||||
|
||||
Do not edit implementation code.
|
||||
|
||||
Allowed outputs:
|
||||
- research/
|
||||
- tasks/ only for follow-up planning/research tasks
|
||||
- memory-bank/
|
||||
|
||||
Create MANY SMALL FILES.
|
||||
|
||||
Target:
|
||||
- 150 lines ideal
|
||||
- 300 lines maximum
|
||||
|
||||
Each file should answer ONE focused question.
|
||||
|
||||
Record:
|
||||
- observed behavior
|
||||
- commands used
|
||||
- dependencies
|
||||
- APIs/interfaces
|
||||
- edge cases
|
||||
- migration risks
|
||||
- test recommendations
|
||||
- open questions
|
||||
|
||||
End by updating:
|
||||
- active task file
|
||||
- memory-bank/activeContext.md
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Testing Mode
|
||||
|
||||
Test only the active task scope.
|
||||
|
||||
Prefer:
|
||||
1. targeted tests
|
||||
2. regression tests
|
||||
3. behavior comparisons
|
||||
4. broader test suites only after targeted tests pass
|
||||
|
||||
Record:
|
||||
- test command
|
||||
- result
|
||||
- failure summary
|
||||
- next exact action
|
||||
|
||||
Do not fix unrelated failures.
|
||||
|
||||
Record unrelated failures in memory-bank/blockers.md.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Cline Local Agent Template
|
||||
|
||||
A lightweight repo-backed workflow system for long-running AI-assisted software migration and porting projects.
|
||||
|
||||
Optimized for:
|
||||
- local models
|
||||
- constrained hardware
|
||||
- resumable workflows
|
||||
- small task decomposition
|
||||
- filesystem/git MCP usage
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Active Context
|
||||
|
||||
## Current Mode
|
||||
None
|
||||
|
||||
## Active Task
|
||||
None
|
||||
|
||||
## Current Objective
|
||||
None
|
||||
|
||||
## Files In Scope
|
||||
None
|
||||
|
||||
## Last Known Status
|
||||
Idle
|
||||
|
||||
## Next Exact Action
|
||||
Select or create a task.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Architecture Notes
|
||||
|
||||
No architecture research completed yet.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Blockers
|
||||
|
||||
No blockers recorded.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Command Log
|
||||
|
||||
Record meaningful commands and results here.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Progress
|
||||
|
||||
## Completed
|
||||
None yet.
|
||||
|
||||
## In Progress
|
||||
None.
|
||||
|
||||
## Next
|
||||
Initialize research structure.
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# Project Brief
|
||||
|
||||
## Goal
|
||||
Long-running software migration/porting effort.
|
||||
|
||||
## Strategy
|
||||
- research first
|
||||
- decompose aggressively
|
||||
- one task at a time
|
||||
- many small files
|
||||
- resumable workflows
|
||||
- repository-backed memory only
|
||||
|
||||
## Source of Truth
|
||||
The repository is the source of truth.
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Workflows
|
||||
|
||||
## Standard Loop
|
||||
1. Read activeContext.md
|
||||
2. Read active task
|
||||
3. Read only relevant files
|
||||
4. Do one small action
|
||||
5. Test/verify
|
||||
6. Update task state
|
||||
7. Stop
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Research Structure
|
||||
|
||||
Prefer MANY SMALL FILES.
|
||||
|
||||
Target:
|
||||
- 150 lines ideal
|
||||
- 300 lines maximum
|
||||
|
||||
Each file should answer ONE focused question.
|
||||
|
||||
Example:
|
||||
research/parser/
|
||||
overview.md
|
||||
interfaces.md
|
||||
error-handling.md
|
||||
edge-cases.md
|
||||
migration-risks.md
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
# TASK-0000
|
||||
|
||||
## Title
|
||||
|
||||
## Status
|
||||
TODO
|
||||
|
||||
## Mode
|
||||
RESEARCH | PLANNING | IMPLEMENTATION | TESTING | RECOVERY
|
||||
|
||||
## Objective
|
||||
|
||||
## Allowed Files
|
||||
|
||||
## Forbidden Actions
|
||||
|
||||
## Relevant Research Files
|
||||
|
||||
## Steps
|
||||
|
||||
## Progress
|
||||
|
||||
## Remaining
|
||||
|
||||
## Completion Criteria
|
||||
|
||||
## Next Exact Action
|
||||
|
||||
## Resume Instructions
|
||||
Read this task file, activeContext.md, and only directly relevant files. Continue from "Next Exact Action".
|
||||
Loading…
Reference in New Issue