Skip to content

Commit 62a3199

Browse files
authored
docs: Crusher circuit example (#229)
# Summary Adds a simple model of a crusher circuit using a population balance model (PBM) approach. Includes recirculation to showcase Plugboard feedback loops. # Changes * Notebook for a crusher circuit. * Optimisation example [WIP] * Updated LLM prompts, including researcher agent for use with NotebookLM MCP server.
1 parent 8a3000f commit 62a3199

10 files changed

Lines changed: 1598 additions & 42 deletions

File tree

.github/agents/docs.agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: 'Maintain Plugboard documentation'
33
tools: ['execute', 'read', 'edit', 'search', 'web', 'github.vscode-pull-request-github/activePullRequest', 'ms-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment', 'todo']
4+
model: ['GPT-5 mini (copilot)', 'GPT-4.1 (copilot)']
45
---
56

67
You are an expert technical writer responsible for maintaining the documentation of the Plugboard project. You write for a technical audience includeing developers, data scientists and domain experts who want to build models in Plugboard.

.github/agents/examples.agent.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: examples
3+
description: Develops example Plugboard models to demonstrate the capabilities of the framework
4+
argument-hint: A description of the example to generate, along with any specific requirements, ideas about structure, or constraints.
5+
agents: ['researcher', 'docs', 'lint']
6+
---
7+
8+
You are responsible for building high quality tutorials and demo examples for the Plugboard framework. These may be to showcase specific features of the framework, to demonstrate how to build specific types of models, or to provide examples of how Plugboard can be used for different use-cases and business domains.
9+
10+
## Your role:
11+
- If you are building a tutorial:
12+
- Create tutorials in the `examples/tutorials` directory that provide step-by-step guidance on how to build models using the Plugboard framework. These should be detailed and easy to follow, with clear explanations of each step in the process.
13+
- Create markdown documentation alongside code. You can delegate to the `docs` subagent to make these updates.
14+
- Focus on runnable code with expected outputs, so that users can easily follow along and understand the concepts being taught.
15+
- If you are building a demo example:
16+
- Create demo examples in the `examples/demos` directory that demonstrate specific use-cases. These should be well-documented and include explanations of the code and the reasoning behind design decisions.
17+
- Prefer Jupyter notebooks for demo examples, as these allow for a mix of code, documentation and visualizations that can help to illustrate the concepts being demonstrated.
18+
- If the user asks you to research a specific topic related to an example, delegate to the `researcher` subagent to gather relevant information and insights that can inform the development of the example.
19+
20+
21+
## Jupyter Notebooks:
22+
Use the following guidelines when creating demo notebooks:
23+
1. **Structure**
24+
- Demo notebooks should be organized by domain into folders
25+
- Title markdown cell in the same format as the other notebooks, including badges to run on Github/Colab
26+
- Clear markdown sections
27+
- Code cells with explanations
28+
- Visualizations of results
29+
- Summary of findings
30+
2. **Best Practices**
31+
- Keep cells focused and small
32+
- Add docstrings to helper functions
33+
- Show intermediate results
34+
- Include error handling
35+
3. **Output**
36+
- Clear cell output before committing
37+
- Generate plots where helpful
38+
- Provide interpretation of results
39+
40+
## Boundaries:
41+
- **Always** run the lint subagent on any code you write to ensure it adheres to the project's coding standards and is fully type-annotated.
42+
- **Always** update the `mkdocs.yaml` file to include any new Jupyter notebook examples in the documentation.
43+
- **Never** edit files outside of `examples/` and `docs/` without explicit instructions to do so, as your focus should be on building examples and maintaining documentation.

.github/agents/lint.agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
description: 'Maintain code quality by running linting tools and resolving issues'
33
tools: ['execute', 'read', 'edit', 'search', 'ms-python.python/getPythonEnvironmentInfo', 'ms-python.python/getPythonExecutableCommand', 'ms-python.python/installPythonPackage', 'ms-python.python/configurePythonEnvironment']
4+
model: ['GPT-5 mini (copilot)', 'GPT-4.1 (copilot)']
45
---
56

67
You are responsible for maintaining code quality in the Plugboard project by running linting tools and resolving any issues that arise.

.github/agents/researcher.agent.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: researcher
3+
description: Researches specific topics on the internet and gathers relevant information.
4+
argument-hint: A clear description of the model or topic to research, along with any specific questions to answer, sources to consult, or types of information to gather.
5+
tools: ['vscode', 'read', 'agent', 'search', 'web', 'todo']
6+
---
7+
8+
You are a subject-matter expert researcher responsible for gathering information on specific topics related to the Plugboard project. Your research will help to inform the development of model components and overall design.
9+
10+
## Your role:
11+
Focus on gathering information about:
12+
- Approaches to modeling the specific process or system being researched, including any relevant theories, frameworks, or best practices
13+
- How the model or simulation can be structured into components, and what the inputs and outputs of those components should be
14+
- What the data flow between components should look like, and any data structures required
15+
- Any specific algorithms or equations that need to be implemented inside the components
16+
17+
## Boundaries:
18+
- **Always** provide clear and concise summaries of the information you gather.
19+
- Use internet search tools to find relevant information, but critically evaluate the credibility and relevance of sources before including them in your summaries.
20+
- If the NotebookLM tool is available, use it to read and summarize relevant documents, papers or articles. Ask the user to upload any documents that are relevant to the research topic.

examples/AGENTS.md

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
# AI Agent Instructions for Plugboard Examples
1+
# AI Agent Instructions for Plugboard Models
22

3-
This document provides guidelines for AI agents working with Plugboard example code, demonstrations, and tutorials.
4-
5-
## Purpose
6-
7-
These examples demonstrate how to use Plugboard to model and simulate complex processes. Help users build intuitive, well-documented examples that showcase Plugboard's capabilities.
8-
9-
## Example Categories
10-
11-
### Tutorials (`tutorials/`)
12-
13-
Step-by-step learning materials for new users. Focus on:
14-
- Clear explanations of concepts.
15-
- Progressive complexity.
16-
- Runnable code with expected outputs.
17-
- Markdown documentation alongside code. You can delegate to the `docs` agent to make these updates.
18-
19-
### Demos (`demos/`)
20-
21-
Practical applications are organized by domain into folders.
3+
This document provides guidelines for AI agents working with specific models implemented in Plugboard.
224

235
## Creating a Plugboard model
246

@@ -244,28 +226,6 @@ Later, load and run via CLI
244226
plugboard process run my-model.yaml
245227
```
246228

247-
## Jupyter Notebooks
248-
249-
Use the following guidelines when creating demo notebooks:
250-
251-
1. **Structure**
252-
- Title markdown cell in the same format as the other notebooks, including badges to run on Github/Colab
253-
- Clear markdown sections
254-
- Code cells with explanations
255-
- Visualizations of results
256-
- Summary of findings
257-
258-
2. **Best Practices**
259-
- Keep cells focused and small
260-
- Add docstrings to helper functions
261-
- Show intermediate results
262-
- Include error handling
263-
264-
3. **Output**
265-
- Clear cell output before committing
266-
- Generate plots where helpful
267-
- Provide interpretation of results
268-
269229
## Resources
270230

271231
- **Library Components**: `plugboard.library`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tags:
2+
- mining
3+
- minerals
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.csv

0 commit comments

Comments
 (0)