Skip to content
Back to skills

Grammar And Qa

ASecurity

"Understand, validate, and debug deepjazz abstract grammar tokens

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
documentationpythonbashdebugging

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill grammar-and-qa --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Grammar And Qa?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Grammar And Qa
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-grammar-and-qa/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-grammar-and-qa)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: grammar-and-qa
description: "Understand, validate, and debug deepjazz abstract grammar tokens
  and note-cleanup behavior without training."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# grammar-and-qa

Use this sub-skill when a deepjazz task is about abstract grammar tokens,
`music21` note/chord roundtrips, or QA cleanup of generated notes. This is
legacy deepjazz operating knowledge, not a modern general-purpose music theory
library.

## Route here for

- Explaining `parse_melody(fullMeasureNotes, fullMeasureChords)` and
  `unparse_grammar(m1_grammar, m1_chords)` behavior.
- Diagnosing grammar tokens such as `R,0.125`, `C,0.250`, or
  `S,0.250,<M2,m-3>`.
- Running a no-training `music21` smoke check around parsing, pruning,
  unparsing, and cleanup.
- Debugging zero-length notes, adjacent duplicate notes, missing chords, or
  malformed token fields.

## Route elsewhere

- MIDI file selection, hard-coded part indices, and Metheny measure extraction
  belong to the sibling `midi-preprocessing` sub-skill.
- Corpus slicing, LSTM training, generated grammar sampling, playback, and MIDI
  writing belong to the sibling `lstm-generation` sub-skill.

## Read and run

- Read [references/grammar-reference.md](references/grammar-reference.md) when
  you need token syntax, token classes, interval-field handling, or the
  parse/unparse relationship.
- Read [references/qa-reference.md](references/qa-reference.md) when you need
  the required `prune_grammar -> unparse_grammar -> prune_notes ->
  clean_up_notes` order and structural validation signals.
- Read [references/troubleshooting.md](references/troubleshooting.md) when
  grammar unparsing fails, chords are missing, Python 2 compatibility errors
  appear, or generated notes still contain zero lengths/duplicates.
- Run [scripts/grammar_roundtrip_smoke.py](scripts/grammar_roundtrip_smoke.py)
  for a tiny deterministic-by-seed smoke check that imports only `music21` and
  avoids training, playback, downloads, network, and writes.

## Minimal safe workflow

1. Inspect the token fields with the grammar reference before editing generated
   grammar. The implementation splits tokens by commas; do not rely on compact
   comment-only interval notation.
2. If the runtime only needs a dependency/cleanup sanity check, run:

   ```bash
   python scripts/grammar_roundtrip_smoke.py --seed 7 --json
   ```

3. For generated grammar, keep the legacy order:
   `prune_grammar`, then `unparse_grammar`, then `prune_notes`, then
   `clean_up_notes`.
4. Treat exact pitches as nondeterministic. Prefer structural checks: token
   classes, element counts, valid float durations, at least one generated note,
   no zero-length notes after cleanup, and no adjacent same-offset note chords.

Files in this skill

  • SKILL.md2.7 KB
  • references/grammar-reference.md5.4 KB
  • references/qa-reference.md3.3 KB
  • references/troubleshooting.md4.3 KB
  • scripts/grammar_roundtrip_smoke.py15.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.