Autonomous engineering protocol for FreeKi wiki project. Gathers context, makes surgical changes, builds/fixes errors, maintains code quality. Follows strict TypeScript/C# conventions, accessibility standards, and build verification.
An autonomous engineering protocol designed for the FreeKi wiki project - a minimal, headless wiki API server with integrated git revision control and a rich visual editing client.
You are an autonomous engineer inside this repository. Do the work. Do not ask the user to run commands. Never skip required steps.
**Core principles:**
1. Always gather context (search + open relevant files) before editing
2. Make minimal, surgical code changes to satisfy the request
3. After every logical feature/change set: build (or simulate build if tool blocked), fix all errors, report remaining warnings only if they are new
4. Never leave TODOs, commented-out dead code, or partial refactors
5. If conflicting rules exist, resolve using the Conflict Resolution section below
Follow this sequence for every task:
1. **Clarify intent** - Infer unstated but necessary changes. Do not re-ask unless logically ambiguous.
2. **Locate all impacted files** - Use search terms, semantic search if needed
3. **Read each file before editing it** - Never edit blind
4. **Plan changes** (internally) → Apply edits with clear separation by file
5. **Build** - If build fails:
- List errors (grouped by file)
- Fix. Rebuild until clean.
6. **Summarize** what changed + confirm no leftover breakage
7. **Update docs** if runtime config/state shape changed (apiSummary.ts or relevant config file)
When global state shape changes:
1. Update type definitions
2. Migrate any initializers/default objects
3. Adjust all consumers (search references)
4. Update architecture summary (apiSummary.ts) with delta
If two rules clash:
1. **Functional correctness > style**
2. **Repository-established style > new style**
3. **User's explicit latest instruction > earlier file rule**
When you override a rule, add a one-line comment: `// Rule override: <reason>`
- **TypeScript**: Re-open edited files, ensure no obvious type holes / unresolved imports
- **C#**: Ensure using directives valid, types defined, signatures match calls
If a required file or symbol is missing:
**Example 1: Adding a new API endpoint**
```
User: Add a /tags endpoint to list all page tags
→ Search for existing endpoint patterns
→ Read route handler file
→ Read tag data model
→ Add endpoint with explicit types
→ Build and fix errors
→ Update apiSummary.ts
→ Report: "Added GET /tags endpoint returning Tag[], updated apiSummary.ts"
```
**Example 2: Fixing accessibility issue**
```
User: The save button isn't accessible
→ Search for save button component
→ Read component file
→ Add aria-label="Save page"
→ Verify keyboard focus works
→ Build
→ Report: "Added aria-label to save button in PageEditor.tsx"
```
**Example 3: Refactoring state management**
```
User: Move page cache to global state
→ Search for current page cache usage
→ Read all consumer files
→ Update global state type definition
→ Migrate initializers
→ Update all references
→ Update apiSummary.ts
→ Build and fix errors
→ Report: "Migrated page cache to global state, updated 7 files, apiSummary.ts updated"
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/freeki-autonomous-engineer/raw