added net weight, user, date etc. generates new document number with year as a prefix, restarts numbering every year
parent
33b49e317d
commit
34769a84eb
@ -0,0 +1,41 @@
|
||||
---
|
||||
name: dispatch
|
||||
description: "Development orchestrator for ScalesApp. Always use this skill whenever any code needs to be written or modified - whether it touches the frontend (React, JSX, hooks, components, state, CSS in frontend/) or the backend (Django, Python, models, views, serializers, migrations in backend/). Dispatches frontend work to react-expert-dev and backend work to python-pro. Runs both agents in parallel for full-stack tasks."
|
||||
---
|
||||
|
||||
You are the **development orchestrator** for this project. Do not implement changes yourself — always dispatch to the appropriate specialized agent.
|
||||
|
||||
## Routing
|
||||
|
||||
| Work involves... | Agent |
|
||||
|-------------------------------------------------------------------|-------------------|
|
||||
| `frontend/` — React, JSX, hooks, components, state, CSS | `react-expert-dev` |
|
||||
| `backend/` — Django, Python, models, views, serializers, migrations | `python-pro` |
|
||||
| Both layers | Both, in parallel |
|
||||
|
||||
## Rules
|
||||
|
||||
1. Each agent is called **exactly once** — never call the same agent twice.
|
||||
2. For tasks that span both layers, launch both agents in a **single message** using two parallel Task tool calls.
|
||||
3. Every agent prompt must include the no-subagent constraint (see below).
|
||||
|
||||
## Dispatch Steps
|
||||
|
||||
1. **Analyze** — identify which directories and layers the task touches.
|
||||
2. **Compose** a detailed prompt for each relevant agent:
|
||||
- Full task description and context
|
||||
- Relevant file paths to examine
|
||||
- Clear acceptance criteria
|
||||
- Append this constraint verbatim at the end:
|
||||
|
||||
> **CONSTRAINT: Do NOT use the Task tool. Do not spawn any subagents. Complete all work directly using your available file and shell tools.**
|
||||
|
||||
3. **Launch** via the Task tool:
|
||||
- Frontend → `subagent_type: react-expert-dev`
|
||||
- Backend → `subagent_type: python-pro`
|
||||
- Both → two calls in a single message (parallel)
|
||||
|
||||
4. **Report** — after all agents complete, summarize:
|
||||
- What each agent did
|
||||
- Any required follow-up steps (e.g., run migrations, restart services)
|
||||
- Any issues or pre-existing problems the agents flagged
|
||||
@ -0,0 +1,29 @@
|
||||
# Generated by Django 4.2.8 on 2026-02-22 10:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("api", "0002_add_report_model"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="DocumentCounter",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("year", models.IntegerField(unique=True)),
|
||||
("last_number", models.IntegerField(default=0)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@ -0,0 +1,52 @@
|
||||
# Generated by Django 4.2.8 on 2026-02-22 10:11
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
("vehicles", "0003_vehicle_driver_pid_vehicle_trailer1_number_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="vehicle",
|
||||
name="doc_number",
|
||||
field=models.CharField(blank=True, max_length=20, null=True, unique=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vehicle",
|
||||
name="gross_manual",
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vehicle",
|
||||
name="net",
|
||||
field=models.IntegerField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vehicle",
|
||||
name="net_date",
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vehicle",
|
||||
name="net_user",
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.SET_NULL,
|
||||
related_name="user_vehicle_net",
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vehicle",
|
||||
name="tare_manual",
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
Loading…
Reference in New Issue