Initial commit

This commit is contained in:
Zzzz
2026-04-27 18:40:30 +08:00
commit 2120774b05
112 changed files with 12308 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
# Workspace Index - Zzzz
> Journal tracking for AI development sessions.
---
## Current Status
<!-- @@@auto:current-status -->
- **Active File**: `journal-1.md`
- **Total Sessions**: 1
- **Last Active**: 2026-04-27
<!-- @@@/auto:current-status -->
---
## Active Documents
<!-- @@@auto:active-documents -->
| File | Lines | Status |
|------|-------|--------|
| `journal-1.md` | ~110 | Active |
<!-- @@@/auto:active-documents -->
---
## Session History
<!-- @@@auto:session-history -->
| # | Date | Title | Commits | Branch |
|---|------|-------|---------|--------|
| 1 | 2026-04-27 | Bootstrap Guidelines | - | `-` |
<!-- @@@/auto:session-history -->
---
## Notes
- Sessions are appended to journal files
- New journal file created when current exceeds 2000 lines
- Use `add_session.py` to record sessions
+110
View File
@@ -0,0 +1,110 @@
# Journal - Zzzz (Part 1)
> AI development session journal
> Started: 2026-04-27
---
## Session 1: Bootstrap Guidelines
**Date**: 2026-04-27
**Task**: Bootstrap Guidelines
### Summary
Populated Trellis backend/frontend specs for the JSP + Servlet + MySQL + Tomcat library management system and archived the bootstrap task.
### Main Changes
# Project Requirements From Developer
## Source
Captured on 2026-04-27 during the Trellis bootstrap-guidelines task from
developer-provided project facts.
## Architecture And Stack
- The system uses B/S architecture with a typical layered design.
- The application stack is JSP + Servlet, MySQL, Tomcat, developed in IDEA.
- The layers are presentation, controller, business/service, DAO, and data.
## Data Layer
MySQL is the data layer and stores:
- Book information.
- Book category information.
- Reader information.
- Borrowing records.
- Administrator information.
- Role and permission information.
- System logs.
Core entity tables should include book information, book categories, reader
information, borrowing records, administrators, role permissions, and system
logs. Use primary keys and foreign keys to preserve data integrity.
## DAO Layer
The data access layer uses DAO classes to perform database CRUD. DAOs should own
SQL/database access concerns and should not contain presentation or business
workflow logic.
## Business And Service Layer
The service layer handles:
- Book warehousing/intake.
- Borrowing and returning.
- Inventory status updates.
- Overdue statistics.
- Permission checks.
## Controller Layer
Servlet controllers handle request dispatch, parameter validation, and result
return. Controllers should coordinate request/response flow and call services
for business behavior.
## Presentation Layer
JSP/CSS pages handle page display and user interaction.
The frontend approach is image-first: UI should be designed or generated as
images first, then JSP/CSS pages should restore and implement the image
faithfully.
## Core Modules
- Login and permission management for administrator, librarian, and reader
roles.
- Book information management for create, update, delete, category
maintenance, and inventory status.
- Reader information management for profiles, borrowing eligibility, and
contact information.
- Borrowing and return management for borrow, return, renew, overdue handling,
and automatic collection status updates.
- Book search and statistics for combined search by title, author, category,
and ID, plus borrowing rankings, inventory reports, and overdue reports.
- System maintenance and logs for key operation logs, data backup support, and
exception tracing.
### Git Commits
(No commits - planning session)
### Testing
- [OK] (Add test results)
### Status
[OK] **Completed**
### Next Steps
- None - task complete
+125
View File
@@ -0,0 +1,125 @@
# Workspace Index
> Records of all AI Agent work records across all developers
---
## Overview
This directory tracks records for all developers working with AI Agents on this project.
### File Structure
```
workspace/
|-- index.md # This file - main index
+-- {developer}/ # Per-developer directory
|-- index.md # Personal index with session history
|-- tasks/ # Task files
| |-- *.json # Active tasks
| +-- archive/ # Archived tasks by month
+-- journal-N.md # Journal files (sequential: 1, 2, 3...)
```
---
## Active Developers
| Developer | Last Active | Sessions | Active File |
|-----------|-------------|----------|-------------|
| (none yet) | - | - | - |
---
## Getting Started
### For New Developers
Run the initialization script:
```bash
python3 ./.trellis/scripts/init_developer.py <your-name>
```
This will:
1. Create your identity file (gitignored)
2. Create your progress directory
3. Create your personal index
4. Create initial journal file
### For Returning Developers
1. Get your developer name:
```bash
python3 ./.trellis/scripts/get_developer.py
```
2. Read your personal index:
```bash
cat .trellis/workspace/$(python3 ./.trellis/scripts/get_developer.py)/index.md
```
---
## Guidelines
### Journal File Rules
- **Max 2000 lines** per journal file
- When limit is reached, create `journal-{N+1}.md`
- Update your personal `index.md` when creating new files
### Session Record Format
Each session should include:
- Summary: One-line description
- Branch: Which branch the work was done on
- Main Changes: What was modified
- Git Commits: Commit hashes and messages
- Next Steps: What to do next
---
## Session Template
Use this template when recording sessions:
```markdown
## Session {N}: {Title}
**Date**: YYYY-MM-DD
**Task**: {task-name}
**Branch**: `{branch-name}`
### Summary
{One-line summary}
### Main Changes
- {Change 1}
- {Change 2}
### Git Commits
| Hash | Message |
|------|---------|
| `abc1234` | {commit message} |
### Testing
- [OK] {Test result}
### Status
[OK] **Completed** / # **In Progress** / [P] **Blocked**
### Next Steps
- {Next step 1}
- {Next step 2}
```
---
**Language**: All documentation must be written in **English**.