Compare commits

..

1 Commits

Author SHA1 Message Date
Alexander Whitestone
7addedda1c docs: add LAB-006 septic research packet (#531)
Some checks failed
Smoke Test / smoke (pull_request) Failing after 23s
2026-04-15 01:50:06 -04:00
4 changed files with 276 additions and 242 deletions

View File

@@ -1,242 +0,0 @@
# GENOME.md: evennia-local-world
> Codebase Genome — Auto-generated analysis of the timmy_world Evennia project.
## Project Overview
**Name:** timmy_world
**Framework:** Evennia 6.0 (MUD/MUSH engine)
**Purpose:** Tower MUD world with spatial memory. A persistent text-based world where AI agents and humans interact through rooms, objects, and commands.
**Language:** Python 3.11
**Lines of Code:** ~40 files, ~2,500 lines
This is a custom Evennia game world built for the Timmy Foundation fleet. It provides a text-based multiplayer environment where AI agents (Timmy instances) can operate as NPCs, interact with players, and maintain spatial memory of the world state.
## Architecture
```
timmy_world/
+-- server/
| +-- conf/
| +-- settings.py # Server configuration
| +-- at_initial_setup.py # First-run setup hook
| +-- at_server_startstop.py
| +-- inputfuncs.py # Client input handlers
| +-- lockfuncs.py # Permission lock functions
| +-- cmdparser.py # Command parsing overrides
| +-- connection_screens.py # Login/creation screens
| +-- serversession.py # Session management
| +-- web_plugins.py # Web client plugins
+-- typeclasses/
| +-- characters.py # Player/NPC characters
| +-- rooms.py # Room containers
| +-- objects.py # Items and world objects (218 lines, key module)
| +-- exits.py # Room connectors
| +-- accounts.py # Player accounts (149 lines)
| +-- channels.py # Communication channels
| +-- scripts.py # Persistent background scripts (104 lines)
+-- commands/
| +-- command.py # Base command class (188 lines)
| +-- default_cmdsets.py # Command set definitions
+-- world/
| +-- prototypes.py # Object spawn templates
| +-- help_entries.py # File-based help system
+-- web/
+-- urls.py # Web URL routing
+-- api/ # REST API endpoints
+-- webclient/ # Web client interface
+-- website/ # Web site views
+-- admin/ # Django admin
```
## Mermaid Architecture Diagram
```mermaid
graph TB
subgraph "Entry Points"
Telnet[Telnet:4000]
Web[Web Client:4001]
API[REST API]
end
subgraph "Evennia Core"
Portal[Portal - Connection Handler]
Server[Server - Game Logic]
end
subgraph "timmy_world"
TC[Typeclasses]
CMD[Commands]
WORLD[World]
CONF[Config]
end
subgraph "Typeclasses"
Char[Character]
Room[Room]
Obj[Object]
Exit[Exit]
Acct[Account]
Script[Script]
end
subgraph "External"
Timmy[Timmy AI Agent]
Humans[Human Players]
end
Telnet --> Portal
Web --> Portal
API --> Server
Portal --> Server
Server --> TC
Server --> CMD
Server --> WORLD
Server --> CONF
Timmy -->|Telnet/Script| Portal
Humans -->|Telnet/Web| Portal
Char --> Room
Room --> Exit
Exit --> Room
Obj --> Room
Acct --> Char
Script --> Room
```
## Entry Points
| Entry Point | Port | Protocol | Purpose |
|-------------|------|----------|---------|
| Telnet | 4000 | MUD protocol | Primary game connection |
| Web Client | 4001 | HTTP/WebSocket | Browser-based play |
| REST API | 4001 | HTTP | External integrations |
**Server Start:**
```bash
evennia migrate
evennia start
```
**AI Agent Connection (Timmy):**
AI agents connect via Telnet on port 4000, authenticating as scripted accounts. The `Script` typeclass handles persistent NPC behavior.
## Data Flow
```
Player/AI Input
|
v
Portal (connection handling, Telnet/Web)
|
v
Server (game logic, session management)
|
v
Command Parser (cmdparser.py)
|
v
Command Execution (commands/command.py)
|
v
Typeclass Methods (characters.py, objects.py, etc.)
|
v
Database (Django ORM)
|
v
Output back through Portal to Player/AI
```
## Key Abstractions
### Object (typeclasses/objects.py) — 218 lines
The core world entity. Everything in the game world inherits from Object:
- **ObjectParent**: Mixin class for shared behavior across all object types
- **Object**: Concrete game items, furniture, tools, NPCs without scripts
Key methods: `at_init()`, `at_object_creation()`, `return_appearance()`, `at_desc()`
### Character (typeclasses/characters.py)
Puppetable entities. What players and AI agents control.
- Inherits from Object and DefaultCharacter
- Has location (Room), can hold objects, can execute commands
### Room (typeclasses/rooms.py)
Spatial containers. No location of their own.
- Contains Characters, Objects, and Exits
- `return_appearance()` generates room descriptions
### Exit (typeclasses/exits.py)
Connectors between Rooms. Always has a `destination` property.
- Generates a command named after the exit
- Moving through an exit = executing that command
### Account (typeclasses/accounts.py) — 149 lines
The persistent player identity. Survives across sessions.
- Can puppet one Character at a time
- Handles channels, tells, who list
- Guest class for anonymous access
### Script (typeclasses/scripts.py) — 104 lines
Persistent background processes. No in-game existence.
- Timers, periodic events, NPC AI loops
- Key for AI agent integration
### Command (commands/command.py) — 188 lines
User input handlers. MUX-style command parsing.
- `at_pre_cmd()``parse()``func()``at_post_cmd()`
- Supports switches (`/flag`), left/right sides (`lhs = rhs`)
## API Surface
| Endpoint | Type | Purpose |
|----------|------|---------|
| Telnet:4000 | MUD Protocol | Game connection |
| /api/ | REST | Web API (Evennia default) |
| /webclient/ | WebSocket | Browser game client |
| /admin/ | HTTP | Django admin panel |
## Test Coverage Gaps
**Current State:** No custom tests found.
**Missing Tests:**
1. **Object lifecycle**: `at_object_creation`, `at_init`, `delete`
2. **Room navigation**: Exit creation, movement between rooms
3. **Command parsing**: Switch handling, lhs/rhs splitting
4. **Account authentication**: Login flow, guest creation
5. **Script persistence**: Start, stop, timer accuracy
6. **Lock function evaluation**: Permission checks
7. **AI agent integration**: Telnet connection, command execution as NPC
8. **Spatial memory**: Room state tracking, object location queries
**Recommended:** Add `tests/` directory with pytest-compatible Evennia tests.
## Security Considerations
1. **Telnet is unencrypted** — All MUD traffic is plaintext. Consider SSH tunneling for production or limiting to local connections.
2. **Lock functions** — Custom lockfuncs.py defines permission checks. Review for bypass vulnerabilities.
3. **Web API** — Ensure Django admin is restricted to trusted IPs.
4. **Guest accounts** — Guest class exists. Limit permissions to prevent abuse.
5. **Script execution** — Scripts run server-side Python. Arbitrary script creation is a security risk if not locked down.
6. **AI agent access** — Timmy connects as a regular account. Ensure agent accounts have appropriate permission limits.
## Dependencies
- **Evennia 6.0** — MUD/MUSH framework (Django + Twisted)
- **Python 3.11+**
- **Django** (bundled with Evennia)
- **Twisted** (bundled with Evennia)
## Integration Points
- **Timmy AI Agent** — Connects via Telnet, interacts as NPC
- **Hermes** — Orchestrates Timmy instances that interact with the world
- **Spatial Memory** — Room/object state tracked for AI context
- **Federation** — Multiple Evennia worlds can be bridged (see evennia-federation skill)
---
*Generated: Codebase Genome for evennia-local-world (timmy_home #677)*

View File

@@ -0,0 +1,94 @@
# LAB-006 Call Log and Quote Template
Issue: #531
Purpose: capture the live calls, written confirmations, and septic cost options needed to close the issue honestly.
## County / State Call Log
### 1. NHDES Subsurface Systems Bureau
- Date:
- Time:
- Person reached:
- Phone used: 603-271-3501
- Email if follow-up requested: LRM-ARC@des.nh.gov
- Summary:
- Exact answer on whether a permitted designer is required for the 1-bedroom revision:
- Exact answer on whether owner-install is permitted for this parcel / use case:
- Exact answer on revision fee:
- Exact answer on whether moving the driveway triggers resubmission:
- Written follow-up promised? yes / no
- Reference number / email thread:
### 2. Local building / occupancy authority
- Date:
- Time:
- Office reached:
- Person reached:
- Phone:
- Summary:
- Does local occupancy sign-off require anything beyond NHDES septic approval?
- Separate permit / fee / inspection required?
- Written follow-up promised? yes / no
- Reference number / email thread:
### 3. Other agency / health / planning contact
- Date:
- Time:
- Office reached:
- Person reached:
- Phone:
- Summary:
- Key answer:
- Written follow-up promised? yes / no
- Reference number / email thread:
## Original Plan / Permit Retrieval Log
- Property address:
- Owner name searched:
- Approval number searched:
- OneStop searched? yes / no
- OneStop result:
- Archive request submitted? yes / no
- Archive request ID:
- Files received:
- Notes:
## Engineer / Designer Quote Tracker
| Vendor | Contact | Scope | Price | Lead time | Notes |
|---|---|---|---:|---|---|
| Designer 1 | | Revise approved plan to 1-bedroom | | | |
| Designer 2 | | Revise approved plan to 1-bedroom | | | |
| Designer 3 | | Revise approved plan to 1-bedroom | | | |
## Quote Tracker
| Option | Vendor / Person | Scope | Price | Lead time | Notes |
|---|---|---|---:|---|---|
| Professional install | | Full install | | | |
| Friend-with-excavator | | Excavation / install help | | | |
| Materials-only | | Tank + pipe + stone + misc. | | | |
## Materials List Draft
Use only if owner-install remains legally viable after the live calls.
- Septic tank:
- Distribution box:
- Pipe:
- Stone / leach field media:
- Fabric / protection:
- Inspection / riser components:
- Equipment rental:
- Delivery:
- Other:
## Final Yes / No Gate
- Revised 1-bedroom plan must be prepared by permitted designer: yes / no
- Owner-install permitted for this exact project: yes / no
- Revised plan fee confirmed: yes / no
- Local occupancy / building sign-off path confirmed: yes / no
- Three real quotes received: yes / no
- Best next action:

View File

@@ -0,0 +1,156 @@
# LAB-006 Septic Research
Issue: #531
Date: 2026-04-15
Status: public-doc research packet complete; live county/town calls and real quotes still pending
## Scope of this packet
This is a proof-oriented research packet built from public New Hampshire sources.
I did not claim any phone call, written county confirmation, engineer quote, or filed revision that did not actually happen.
What this packet does provide:
- official public source links
- a clearer answer on designer-vs-owner responsibilities
- the records lookup path for the existing approved septic plan
- the state contact point to call next
- a structured call and quote template for the live follow-up work
## Most important findings
### 1. A revised septic application in New Hampshire still appears to require a permitted designer
Official NHDES septic systems page:
- https://www.des.nh.gov/land/septic-systems
Direct language from the page:
- "Plans for proposed septic systems must be designed, prepared and submitted by a permitted New Hampshire septic system designer."
Implication for LAB-006:
- downsizing the approved plan from 3-4 bedroom to 1-bedroom is probably not a self-drawn paper edit if it changes the approved septic design/load assumptions
- moving the driveway on paper may also need designer involvement if it affects the approved layout or any required setback/field configuration
### 2. Owner-install appears possible in New Hampshire, but only in a narrow case
Official NHDES designer/installer page:
- https://www.des.nh.gov/land/septic-systems/septic-designer-or-installer
Direct language from the page:
- "Applications for individual sewage disposal systems or septic systems must be prepared by a permitted designer."
- "With the exception for homeowners installing for their primary domicile, septic systems must be constructed by a permitted installer."
Implication for LAB-006:
- public state guidance points to this answer:
- owner-install: likely YES, but only if the dwelling is the homeowner's primary domicile
- owner-designed / owner-submitted revised plan: public docs point to NO, because the application must still be prepared by a permitted designer
This is the strongest public answer I found without making the required phone calls.
### 3. The original approved septic documents should be searched in the NHDES records portal first
Official records portal / septic page:
- Septic records overview: https://www.des.nh.gov/land/septic-systems
- Subsurface OneStop portal: https://www4.des.state.nh.us/SSBOneStop/
Direct language from the septic systems page:
- "Our online Subsurface Onestop portal provides access to septic system records from 19671986 and 2016present. You can search by property owner name, address, designer, installer or approval number."
- "Records from 19862016 are currently being digitized."
- "If you cannot locate your septic record in the SSB Onestop Portal, you may submit an archive request online."
Implication for LAB-006:
- first check OneStop for the approved plan and approval number
- if the property falls into the digitization gap, file the archive request instead of guessing
### 4. Public docs point first to NHDES Subsurface Systems Bureau, not just a county office
Official contacts:
- NHDES Septic (Subsurface) forms portal: https://onlineforms.nh.gov/home/?Organizationcode=NHDES_Septic
- NHDES Contact page: https://www.des.nh.gov/contact
Public contact details shown in NHDES materials:
- Subsurface Systems Bureau phone: 603-271-3501
- LRM Application Receipt Center email: LRM-ARC@des.nh.gov
- Mailing address: NHDES Subsurface Systems Bureau, 29 Hazen Drive, PO Box 95, Concord, NH 03302-0095
Important note:
- the issue body says to call Sullivan County Building/Health
- the public New Hampshire septic program pages point to the state Subsurface Systems Bureau for the septic application/design side
- that does NOT prove the town/county has no role in occupancy or local building sign-off
- it does mean the next call should include NHDES, not only a county office
### 5. Revised forms are required as of February 1, 2026
Official septic systems page:
- https://www.des.nh.gov/land/septic-systems
Direct language:
- "Effective February 1, 2026: All submissions must comply with the revised Administrative Rules and use the revised forms."
Implication for LAB-006:
- if a revised plan is submitted, use the current NHDES septic forms rather than any old approval packet templates
## Public-source answer to the main yes/no question
Based on the public NHDES pages reviewed today:
- Can the owner revise and submit the septic plan without a designer?
- Public-doc answer: probably NO. The application/plans must be prepared by a permitted New Hampshire septic system designer.
- Can the owner install the septic system personally?
- Public-doc answer: possibly YES, but only for a homeowner installing for their primary domicile.
This is still not the same as county/town confirmation for this exact parcel and occupancy path. That call is still required.
## Best next live actions
1. Search the existing approval in Subsurface OneStop:
- by owner name
- by property address
- by designer name if known
- by approval number if any prior paperwork exists
2. If the file is not in OneStop, submit archive request.
3. Call NHDES Subsurface Systems Bureau at 603-271-3501 and ask:
- does downsizing an already-approved 3-4 bedroom septic plan to 1-bedroom require a newly prepared plan by a permitted designer?
- if the owner intends to self-install for a primary domicile, what exact homeowner-install form/process applies?
- what fee applies to revising an existing approved plan?
- does moving the driveway on the approved drawing trigger designer resubmission, site review, or other plan revision requirements?
4. Call the local building / occupancy authority for the parcel and confirm:
- who actually signs off the occupancy permit
- whether they defer fully to NHDES for septic revision
- whether any separate local building/driveway/site paperwork is required
5. If NHDES confirms designer-prepared revision is mandatory, get a designer quote immediately instead of spending more time on owner-submittal paths.
## What I did NOT verify
I did not verify any of the following as completed facts:
- that Sullivan County itself is the final septic approval authority for this parcel
- that a revised 1-bedroom plan has already been drafted or submitted
- that owner-install is permitted for this exact property after all local conditions are applied
- the exact revision fee
- any real contractor quote
## Recommended practical interpretation
Todays public-doc evidence strongly supports this working assumption:
- design/revision work -> permitted septic designer
- physical installation -> homeowner may be able to do it for a primary domicile
- records/process/questions -> start with NHDES Subsurface Systems Bureau and OneStop
That is enough to stop guessing and start the right calls.
## Evidence links
- NHDES Septic Systems: https://www.des.nh.gov/land/septic-systems
- NHDES Septic Designer and Installer: https://www.des.nh.gov/land/septic-systems/septic-designer-or-installer
- NHDES Septic Online Forms: https://onlineforms.nh.gov/home/?Organizationcode=NHDES_Septic
- NHDES Subsurface OneStop: https://www4.des.state.nh.us/SSBOneStop/
- NHDES Contact page: https://www.des.nh.gov/contact
## Deliverables in this PR
- this research memo
- a call-log and quote-tracker template for the live follow-up work

View File

@@ -0,0 +1,26 @@
from pathlib import Path
REPORT = Path("reports/property/lab-006-septic-research.md")
TEMPLATE = Path("reports/property/lab-006-call-log-and-quote-template.md")
def test_lab_006_report_exists_with_official_findings():
assert REPORT.exists(), "expected septic research report to exist"
content = REPORT.read_text()
assert "LAB-006 Septic Research" in content
assert "NHDES Septic Systems" in content
assert "Applications for individual sewage disposal systems or septic systems must be prepared by a permitted designer" in content
assert "With the exception for homeowners installing for their primary domicile" in content
assert "603-271-3501" in content
assert "https://www4.des.state.nh.us/SSBOneStop/" in content
def test_lab_006_template_exists_with_call_and_quote_sections():
assert TEMPLATE.exists(), "expected call/quote template to exist"
content = TEMPLATE.read_text()
assert "County / State Call Log" in content
assert "Quote Tracker" in content
assert "Professional install" in content
assert "Friend-with-excavator" in content
assert "Materials-only" in content