Skip to content

Commit a286b37

Browse files
committed
chore: serena
1 parent bc44721 commit a286b37

File tree

5 files changed

+190
-0
lines changed

5 files changed

+190
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Code Style and Conventions
2+
3+
## General Conventions
4+
- **Language**: TypeScript for configuration and components
5+
- **Framework**: React components using Docusaurus patterns
6+
- **Styling**: CSS Modules pattern (index.module.css files)
7+
8+
## Documentation Patterns
9+
- Tutorial pages follow: introduction → explanation → code examples
10+
- Reference pages start with hidden TOC: `<nav className="hidden">### FunctionName</nav>`
11+
- Use custom components: `<FunctionDefinition>`, `<Signature>`, `<Latex>`
12+
- Mini-recipes format: `**To <do something>**, <description>`
13+
14+
## File Organization
15+
- Components in `src/components/`
16+
- Pages in `src/pages/`
17+
- Documentation in `docs/` with subdirectories for each product
18+
- CSS modules alongside components
19+
20+
## Build Conventions
21+
- Changelogs copied from sibling repositories during build
22+
- API docs auto-generated from TypeScript definitions
23+
- Production builds go to submodules/cortex-js.github.io/
24+
25+
## Important Notes
26+
- NEVER add comments unless explicitly requested
27+
- Follow existing patterns in the codebase
28+
- Prefer editing existing files over creating new ones
29+
- Don't create documentation files unless explicitly requested
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# CortexJS.io Project Overview
2+
3+
## Purpose
4+
Documentation website for the CortexJS ecosystem, specifically for MathLive (math editor) and Compute Engine (mathematical computation library).
5+
6+
## Tech Stack
7+
- **Framework**: Docusaurus v3 (React-based static site generator)
8+
- **Language**: TypeScript/JavaScript
9+
- **Styling**: CSS Modules
10+
- **Deployment**: GitHub Pages (via submodule to cortex-js.github.io)
11+
- **Build Tools**: npm, bash scripts
12+
13+
## Architecture
14+
- Static documentation site generated from Markdown files
15+
- API documentation auto-generated from TypeScript .d.ts files
16+
- Custom React components for documentation (FunctionDefinition, Signature, Latex, CodePlayground)
17+
- Deployment via Git submodule to separate GitHub Pages repository
18+
19+
## Key Directories
20+
- `docs/` - Markdown documentation source
21+
- `src/` - React components and pages
22+
- `build/` - Generated output
23+
- `scripts/` - Build automation
24+
- `submodules/cortex-js.github.io/` - Deployment target
25+
26+
## External Dependencies
27+
- References sibling directories `../mathlive/` and `../compute-engine/` for source files
28+
- Changelogs and API docs are copied from these during build
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Suggested Commands for CortexJS.io Development
2+
3+
## Development Commands
4+
- `npm start` - Start local development server (Docusaurus dev mode)
5+
- `npm run build` - Build the site (runs bash scripts/build.sh)
6+
- `npm run serve` - Serve the built site locally
7+
8+
## Content Updates
9+
- `npm run update` - Update dependent modules and regenerate API docs
10+
- `npm run stage` - Create production build in submodules/cortex-js.github.io/
11+
- `npm run deploy` - Deploy staged changes to GitHub Pages
12+
13+
## Utility Commands
14+
- `npm run clear` - Clear Docusaurus cache
15+
- `npm run swizzle` - Eject Docusaurus components for customization
16+
17+
## Git Commands (Darwin/macOS)
18+
- `git status` - Check current changes
19+
- `git diff` - View unstaged changes
20+
- `git add .` - Stage all changes
21+
- `git commit -m "message"` - Commit changes
22+
- `git push` - Push to remote
23+
24+
## File Operations
25+
- `ls -la` - List files with details
26+
- `find . -name "*.ts"` - Find TypeScript files
27+
- `grep -r "pattern" .` - Search for pattern in files
28+
29+
## Testing & Validation
30+
- Manual browser testing after build
31+
- No automated test suite currently exists
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Task Completion Checklist
2+
3+
When completing a task in the CortexJS.io project:
4+
5+
## Before Marking Complete
6+
1. **Build Verification**
7+
- Run `npm run build` to ensure no build errors
8+
- Check that all files compile correctly
9+
10+
2. **Manual Testing**
11+
- Start dev server with `npm start`
12+
- Verify changes work in browser
13+
- Test on different viewports if UI changes
14+
15+
3. **Code Quality**
16+
- Ensure code follows existing patterns
17+
- No unnecessary comments added
18+
- CSS follows CSS Modules pattern
19+
- React components follow Docusaurus conventions
20+
21+
4. **Documentation Updates**
22+
- Update relevant .md files if needed
23+
- Ensure API docs regenerate properly if changed
24+
25+
## Validation Steps
26+
- No automated tests exist - rely on manual verification
27+
- Visual validation in browser is critical
28+
- Check console for JavaScript errors
29+
- Verify links work correctly
30+
31+
## Important Reminders
32+
- NEVER commit unless explicitly asked
33+
- Prefer editing existing files over creating new ones
34+
- Follow existing code patterns exactly

.serena/project.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
2+
# * For C, use cpp
3+
# * For JavaScript, use typescript
4+
# Special requirements:
5+
# * csharp: Requires the presence of a .sln file in the project folder.
6+
language: typescript
7+
8+
# whether to use the project's gitignore file to ignore files
9+
# Added on 2025-04-07
10+
ignore_all_files_in_gitignore: true
11+
# list of additional paths to ignore
12+
# same syntax as gitignore, so you can use * and **
13+
# Was previously called `ignored_dirs`, please update your config if you are using that.
14+
# Added (renamed)on 2025-04-07
15+
ignored_paths: []
16+
17+
# whether the project is in read-only mode
18+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
19+
# Added on 2025-04-18
20+
read_only: false
21+
22+
23+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
24+
# Below is the complete list of tools for convenience.
25+
# To make sure you have the latest list of tools, and to view their descriptions,
26+
# execute `uv run scripts/print_tool_overview.py`.
27+
#
28+
# * `activate_project`: Activates a project by name.
29+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
30+
# * `create_text_file`: Creates/overwrites a file in the project directory.
31+
# * `delete_lines`: Deletes a range of lines within a file.
32+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
33+
# * `execute_shell_command`: Executes a shell command.
34+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
35+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
36+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
37+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
38+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file or directory.
39+
# * `initial_instructions`: Gets the initial instructions for the current project.
40+
# Should only be used in settings where the system prompt cannot be set,
41+
# e.g. in clients you have no control over, like Claude Desktop.
42+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
43+
# * `insert_at_line`: Inserts content at a given line in a file.
44+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
45+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
46+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
47+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
48+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
49+
# * `read_file`: Reads a file within the project directory.
50+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
51+
# * `remove_project`: Removes a project from the Serena configuration.
52+
# * `replace_lines`: Replaces a range of lines within a file with new content.
53+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
54+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
55+
# * `search_for_pattern`: Performs a search for a pattern in the project.
56+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
57+
# * `switch_modes`: Activates modes by providing a list of their names
58+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
59+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
60+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
61+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
62+
excluded_tools: []
63+
64+
# initial prompt for the project. It will always be given to the LLM upon activating the project
65+
# (contrary to the memories, which are loaded on demand).
66+
initial_prompt: ""
67+
68+
project_name: "cortexjs.io"

0 commit comments

Comments
 (0)