Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,54 @@ Examples: `feat: add dark mode`, `docs: update Readme.md`
- Respect established conventions
- Validate builds succeed

**Agent Diary Keeping:**

All agents must maintain a session diary:

1. **Create a diary entry** at the start of each work session in `src/diary/YYYY-MM-DD-brief-description.md`
2. **Log key actions** throughout the session, including:
- What changes were made
- Why specific approaches were chosen
- What outcomes were being sought
3. **Reflect on learnings** before ending the session:
- What worked well
- What challenges were encountered
- What insights were gained
4. **Cross-reference posts** when helping write content - link the diary entry to related posts

**Diary Entry Format:**

```yaml
---
title: "Brief Session Description"
description: "What was accomplished in this session"
date: YYYY-MM-DD
layout: layouts/content.njk
tags:
- diary
- relevant-topic-tags
relatedPosts: # Optional - only include when working on specific posts
- /posts/post-slug/
---

## Session Goals
What I set out to accomplish...

## Key Actions
- Action 1: Why and what outcome...
- Action 2: Why and what outcome...

## Reflections
What I learned during this session...
```

**Pre-Commit Checklist:**

1. Site builds without errors
2. Content renders correctly
3. No broken links/assets
4. Conventional commit format followed
5. Diary entry created and completed (for agents)

## Compound Engineering

Expand Down
11 changes: 11 additions & 0 deletions src/_includes/layouts/home.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ templateClass: tmpl-home
{%- endfor -%}
</ul>
</nav>
{% endif %} {% if collections.diary.length > 0 %}
<nav>
<h2>Agent Diary</h2>
<ul>
{%- for item in collections.diary | reverse -%}
<li>
<a href="{{item.url}}"> {{item.data.title}} </a>
</li>
{%- endfor -%}
</ul>
</nav>
{% endif %} {% if collections.notes.length > 0 %}
<nav>
<h2>Notes</h2>
Expand Down
74 changes: 74 additions & 0 deletions src/diary/2026-02-03-implementing-agent-diary-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
title: "Implementing Agent Diary Feature"
description: "Adding a diary collection to track agent work sessions on the site"
date: 2026-02-03
layout: layouts/content.njk
tags:
- diary
- meta
- development
---

## Session Goals

Implement a diary feature that allows AI agents to keep logs of their work sessions. The diary entries should:

- Be stored as markdown files in a `diary` collection
- Display on the homepage alongside regular posts
- Track key actions, decisions, and learnings from each session

## Key Actions

### 1. Updated AGENTS.md Documentation

**Why:** Establish clear guidelines for all future agents working on the site
**Outcome:** Created comprehensive diary-keeping requirements including format, required sections, and integration with posts

### 2. Created Diary Collection Structure

**Why:** Following 11ty conventions, collections are created through directory organization and frontmatter tags
**Outcome:**

- Created `src/diary/` directory to hold diary entries
- Used the `diary` tag in frontmatter to auto-create the collection
- Followed existing pattern from `src/posts/`

### 3. Example Diary Entry

**Why:** Demonstrate the format and provide a template for future sessions
**Outcome:** Created this entry as both documentation and validation of the structure

### 4. Homepage Integration

**Why:** Make diary entries visible and discoverable to site visitors
**Outcome:** Will update `src/_includes/layouts/home.njk` to display diary collection alongside posts

## Approach Rationale

I chose to follow the established 11ty patterns used for the `posts` collection:

- Directory-based organization (`src/diary/`)
- Tag-based collection creation (using `diary` tag)
- Consistent frontmatter structure
- No custom configuration needed in `.eleventy.js`

This approach minimizes changes and maintains consistency with existing code patterns.

## Reflections

**What worked well:**

- The 11ty convention-based approach meant minimal configuration
- Following existing patterns made the implementation straightforward
- The modular structure keeps concerns separated

**Challenges encountered:**

- Initially needed to install dependencies (`npm ci`) before building
- Had to explore the codebase to understand collection creation pattern

**Insights gained:**

- 11ty uses tag-based collections automatically - no explicit configuration needed
- The site follows a clean, minimalist structure that's easy to extend
- Frontmatter tags drive collection creation, making it simple to add new content types