msproject-gen
v0.2.1
Published
Generate Microsoft Project (MSPDI XML) files from a structured Markdown estimation.
Readme
Project Estimator
Generate Microsoft Project (MSPDI XML) files from a structured Markdown estimation.
What it does
- Parses a Markdown estimation file into sections, tasks, and roles.
- Calculates project management hours automatically.
- Produces MSPDI XML and a CSV report.
- Validates role hours and required sections.
Requirements
- Node.js
- TypeScript
Install
npm installInstall skill (short)
Copy the skill folder into your Codex skills directory so an agent can reuse it:
cp -R skills/msproject-gen ~/.codex/skills/msproject-genInstall from registry (for reuse)
Install from your npm registry:
npm install msproject-genIf you publish under a scope:
npm install @your-scope/msproject-genRun the CLI after install (use your own files):
npx msproject-gen \
--template "/path/to/template.xml" \
--input "/path/to/estimation.md" \
--roles "/path/to/roles.yml" \
--output "./project.xml" \
--csv "./project.csv"Publish
npm run publish:packageThis runs npm publish, which triggers prepublishOnly to build before publishing.
Only dist/ and docs are included in the package.
Quick start (local repo)
Build and run the CLI:
npm run build
node dist/cli.js \
--template "example/Estimación Experian.xml" \
--input inputs/estimacion_experian.md \
--roles inputs/roles_map_final.yml \
--output results/estimacion_experian_generated.xml \
--csv results/estimacion_experian_generated.csvProject layout
inputs/Markdown inputs and the roles map.example/Golden MSPDI XML template and source artifacts.results/Generated XML/CSV outputs.src/Source code.dist/Compiled CLI output.
Input format (Markdown)
The file uses:
- Front‑matter for project metadata.
#for sections.##(and deeper) for tasks.workandrolesunder tasks.- Optional
idanddepends_onfor dependencies. - Optional scheduling settings in front‑matter:
project.calendar,project.workday_hours.
Example:
---
project:
name: "Estimación Logitech"
start_date: 2023-03-08T09:00:00
pm_percentage: 13
calendar: workdays
workday_hours: 8
---
# 1. Entrega de Prerequisitos
enabled: yes
## Archivo de entrada
- type: CLIENTE
- notes: Entregar firmado
## Tarea interna
- work: 4h
- roles: AWS Software Developer=4hScheduling options:
project.calendar:workdays(Mon–Fri) orall_days(Mon–Sun).project.workday_hours: hours per workday (default 8).
More examples:
Nested tasks:
# 6. Análisis y Diseño
enabled: yes
## Documento Tecnico
### Borrador inicial
- work: 3h
- roles: AWS Software Developer=3h
### Revisión
- work: 2h
- roles: Quality Engineer=2hDisabled section:
# 8. Transición Ambiente QA
enabled: noRole aliases (from the roles map):
## Pruebas funcionales
- work: 6h
- roles: QA=6hDependencies with IDs:
# 6. Análisis y Diseño
enabled: yes
id: analisis
## KickOff
- id: kickoff
- work: 0h
- roles: PM=0h
## Backend API
- id: backend
- work: 8h
- roles: AWS Software Developer=8h
- depends_on: kickoff
## Frontend UI
- id: frontend
- work: 8h
- roles: AWS Software Developer=8h
- depends_on: kickoffRoles map (YAML)
inputs/roles_map_final.yml defines canonical roles and aliases. Roles found in the MSPDI template are merged at runtime.
Example snippet:
canonical_roles:
- name: "AWS Software Developer"
aliases:
- Dev
- DeveloperCLI examples
Generate a Logitech estimation:
node dist/cli.js \
--template "example/Estimación Experian.xml" \
--input inputs/template_estimacion.md \
--roles inputs/roles_map_final.yml \
--output results/estimacion_logitech_generated.xml \
--csv results/estimacion_logitech_generated.csvInstall and run from a registry in another project:
npm install msproject-gen
npx msproject-gen \
--template "/path/to/template.xml" \
--input "/path/to/estimation.md" \
--roles "/path/to/roles.yml" \
--output "./project.xml" \
--csv "./project.csv"Helper script (in this repo):
npm run estimate:experianAgent usage
For a step‑by‑step agent workflow (install, inputs, dependencies, outputs), see:
docs/agent-usage.md
Tests and quality
npm test
npx ultracite checkCoverage target: 85% minimum.
Project rules (summary)
- Use functions and plain objects (no classes).
- Prefer data‑driven branching over if/else chains and ternaries.
- Keep logic simple and explicit.
- Use Vitest for tests and Ultracite for linting.
Output
- MSPDI XML:
results/*.xml - CSV report:
results/*.csv
