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
39 changes: 39 additions & 0 deletions apps/web-roo-code/src/components/excel-analyzer/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# CLAUDE.md — Shared Brain / Lessons Learned

Durable project memory for architecture, structure, and workflow decisions.

## Current Snapshot

- Project: **Excel Analyzer**
- Runtime: Browser-only (client-side)
- Extensibility: `src/hooks/hook-engine.js`
- Operational memory:
- `.orchestration/active_intents.yaml`
- `.orchestration/agent_trace.jsonl`
- `.orchestration/intent_map.md`

## Documentation Map

- `README.md` (workspace root)
- `Excel-Based-Data-Analzer/README.md` (application-level guide)
- `specify/specification.md`
- `specify/memory/constitution.md`
- `specify/plan/plan.md`
- `specify/architecture/architecture.md`
- `specify/project_structure/project_structure.md`

## Lessons Learned

1. Keep structure docs synchronized immediately after file moves.
2. Keep hook-specific logic isolated under `src/hooks/`.
3. Keep orchestration artifacts lightweight and plain-text for traceability.
4. Update both root and app README when structure changes.

## Working Agreements

- `.orchestration/active_intents.yaml` tracks active goals.
- `.orchestration/agent_trace.jsonl` logs key operations.
- `.orchestration/intent_map.md` maps goals to code areas.
- `specify/project_structure/project_structure.md` is the canonical structure reference.


72 changes: 72 additions & 0 deletions apps/web-roo-code/src/components/excel-analyzer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Excel Analyzer Project

Web-based Excel analysis application with modular architecture, local-first processing, and extensibility via a dedicated Hook Engine.

## What It Does

- Upload and parse Excel files (`.xlsx`, `.xls`)
- Preview tabular data with basic quality indicators
- Analyze/visualize data (Chart.js)
- View a compact dashboard summary
- Export results (PDF / Excel / CSV / JSON / PNG)

## Architecture Highlights

- **Client-side only** processing for privacy
- **Module-oriented JS structure** under `src/js/`
- **Hook Engine** under `src/hooks/hook-engine.js` for extensibility
- **Project memory and orchestration artifacts**:
- `CLAUDE.md`
- `.orchestration/active_intents.yaml`
- `.orchestration/agent_trace.jsonl`
- `.orchestration/intent_map.md`

## Current Structure

```text
excel-analyzer/
├── README.md
├── CLAUDE.md
├── .orchestration/
│ ├── active_intents.yaml
│ ├── agent_trace.jsonl
│ └── intent_map.md
├── specify/
│ ├── specification.md
│ ├── memory/
│ │ └── constitution.md
│ ├── plan/
│ │ └── plan.md
│ ├── architecture/
│ │ └── architecture.md
│ └── project_structure/
│ └── project_structure.md
└── src/
├── index.html
├── css/
│ └── styles.css
├── hooks/
│ └── hook-engine.js
└── js/
├── main.js
├── config/
├── events/
├── modules/
└── utils/
```

## Run

Open in browser:

```powershell
start Excel-Based-Data-Analzer/src/index.html
```

## Related Docs

- Specification: `specify/specification.md`
- Constitution: `specify/memory/constitution.md`
- Plan: `specify/plan/plan.md`
- Architecture: `specify/architecture/architecture.md`
- Project Structure: `specify/project_structure/project_structure.md`
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
e# Excel Analyzer Architecture (Revised)

## 1) Architecture Style

The project uses a **client-side modular SPA-style architecture**:

- Runs fully in the browser (no backend required)
- Processes files locally for privacy
- Uses module separation for upload, processing, visualization, dashboard, export
- Supports extensibility through a dedicated **Hook Engine**

## 2) High-Level Layers

1. **Presentation Layer**
- `src/index.html`
- `src/css/styles.css`

2. **Application Orchestration Layer**
- `src/js/main.js`
- Coordinates upload → preview → analyze → dashboard → export flow

3. **Domain Modules Layer**
- `src/js/modules/*.js`
- Encapsulates feature logic (file upload, data processing, charts, dashboard, exports)

4. **Shared Utilities and Config Layer**
- `src/js/utils/*.js`
- `src/js/config/*.js`
- `src/js/events/*.js`

5. **Extensibility Layer (Hooks)**
- `src/hooks/hook-engine.js`
- Central hook registry/execution engine for plugging cross-cutting behavior

## 3) Hook Engine Design

Location: `src/hooks/hook-engine.js`

Core capabilities:

- `tap(hookName, handler, { priority, once })`
- `tapOnce(hookName, handler, options)`
- `untap(hookName, hookId)`
- `clear(hookName?)`
- `has(hookName)` / `list(hookName)`
- `run(hookName, context)` for async handler execution
- `runWaterfall(hookName, payload, context)` for payload transformation pipeline

Design goals:

- Keep hook logic isolated in `src/hooks/`
- Make extension points explicit and reusable
- Allow priority ordering and one-time hooks

## 4) Data Flow Layer

```text
User File Input
-> FileUploadManager
-> DataProcessor
-> Visualizer / DashboardManager
-> Exporter
-> Download Output
```

Potential hook interception points (recommended):

- `beforeFileParse`
- `afterFileParse`
- `beforeAnalysis`
- `afterAnalysis`
- `beforeExport`
- `afterExport`

## 5) Documentation and Operational Memory

Beyond source code, the project now includes lightweight operational artifacts:

- `CLAUDE.md` — shared brain / durable lessons learned
- `.orchestration/active_intents.yaml` — active priorities/intents
- `.orchestration/agent_trace.jsonl` — chronological action trace
- `.orchestration/intent_map.md` — mapping goals to code areas

## 6) Architectural Principles

- **Separation of concerns** between UI, orchestration, domain logic, utilities, and hooks
- **Local-first processing** for privacy and performance
- **Incremental extensibility** via Hook Engine rather than hardcoded branching
- **Documentation alignment**: structure docs must reflect actual repository state
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Excel Analyzer Project Constitution

## Preamble

We, the developers and contributors to the Excel Analyzer Project, recognize the importance of creating a robust, user-friendly, and accessible web-based tool for Excel data analysis. This constitution establishes the fundamental principles, values, and governance the structure that guide our development efforts and ensure the project's success and sustainability.

## Core Principles

### 1. User-Centric Design
- **1.1** The user experience SHALL be the primary consideration in all design decisions
- **1.2** The application SHALL be intuitive and accessible to users of all technical backgrounds
- **1.3** User feedback SHALL be actively sought and incorporated into development cycles

### 2. Data Privacy and Security
- **2.1** User data SHALL remain on the client-side and SHALL NOT be transmitted to external servers
- **2.2** No persistent storage of user files SHALL occur without explicit user consent
- **2.3** All data processing SHALL be transparent and auditable by the user

### 3. Open Source and Collaboration
- **3.1** The project SHALL remain open source under the MIT License
- **3.2** Contributions from the community SHALL be welcomed and encouraged
- **3.3** Development processes SHALL be transparent and documented

### 4. Technical Excellence
- **4.1** Code quality SHALL meet industry standards and best practices
- **4.2** Performance optimization SHALL be prioritized for user experience
- **4.3** Cross-browser compatibility SHALL be maintained and tested

### 5. Accessibility and Inclusion
- **5.1** The application SHALL comply with WCAG 2.1 accessibility guidelines
- **5.2** Support for assistive technologies SHALL be maintained
- **5.3** Internationalization SHALL be considered in design and implementation

## Development Guidelines

### 6. Code Standards
- **6.1** All code SHALL be well-documented with clear comments and documentation
- **6.2** Consistent coding style SHALL be enforced using automated tools
- **6.3** Code reviews SHALL be mandatory for all contributions
- **6.4** Unit tests SHALL be written for all new functionality

### 7. Quality Assurance
- **7.1** All features SHALL be thoroughly tested before release
- **7.2** Performance benchmarks SHALL be established and monitored
- **7.3** Security vulnerabilities SHALL be addressed promptly
- **7.4** User acceptance testing SHALL be conducted for major features

### 8. Version Control and Releases
- **8.1** Git SHALL be used for version control with a clear branching strategy
- **8.2** Semantic versioning SHALL be followed for releases
- **8.3** Release notes SHALL document all changes and improvements
- **8.4** Backward compatibility SHALL be maintained whenever possible

## Project Governance

### 9. Decision Making
- **9.1** Technical decisions SHALL be made through consensus among core contributors
- **9.2** Major architectural changes SHALL require community discussion
- **9.3** User-facing changes SHALL be validated through user testing
- **9.4** Emergency fixes MAY be implemented immediately with post-facto documentation

### 10. Contribution Process
- **10.1** All contributors SHALL adhere to the project's code of conduct
- **10.2** Pull requests SHALL include appropriate tests and documentation
- **10.3** Contributors SHALL be respectful and constructive in all interactions
- **10.4** Mentorship of new contributors SHALL be encouraged

### 11. Maintenance and Support
- **11.1** Regular maintenance updates SHALL be scheduled and published
- **11.2** Bug reports SHALL be acknowledged and addressed in a timely manner
- **11.3** Security issues SHALL be handled with appropriate urgency
- **11.4** Legacy support SHALL be maintained for reasonable time periods

## Ethical Guidelines

### 12. Data Ethics
- **12.1** The application SHALL NOT make assumptions or inferences about user data
- **12.2** Data analysis features SHALL be transparent about their methodologies
- **12.3** Users SHALL retain full control over their data and analysis results
- **12.4** The application SHALL NOT collect or analyze user behavior without consent

### 13. Responsible Development
- **13.1** Environmental impact of the application SHALL be considered
- **13.2** Resource efficiency SHALL be optimized to reduce computational waste
- **13.3** Dependencies SHALL be chosen with security and maintenance in mind
- **13.4** The project SHALL contribute positively to the open-source ecosystem

## Amendments

### 14. Constitution Updates
- **14.1** This constitution MAY be amended through community consensus
- **14.2** Proposed amendments SHALL be discussed publicly for a minimum of 30 days
- **14.3** Amendments SHALL require approval from the core development team
- **14.4** All amendments SHALL be documented with rationale and impact assessment

## Commitment

By contributing to this project, all participants agree to uphold these principles and work towards creating an Excel analysis tool that is not only technically excellent but also ethically sound, user-focused, and accessible to all.

**Adopted**: February 17, 2026
**Version**: 1.0
Loading
Loading