Skip to content
Back to skills

Np Core Layout

ASecurity

Learn and record how a content layer is organized so contributions land in the right place. Use when onboarding a content or team layer, when np-doctor reports layer-layout inferred, when a contribution has no route, or on "where should this go".

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentspythongobashgit

Works with

  • cli

Security analysis

A100/100

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

Scanned November 9, 2026

npx -y skills add pat-browne/nervepack --skill np-core-layout --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Np Core Layout?

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

Security grade badge for Np Core Layout
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pat-browne-np-core-layout/badge)](https://www.skillsdirectory.com/skills/pat-browne-np-core-layout)

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: np-core-layout
description: Learn and record how a content layer is organized so contributions land in the right place. Use when onboarding a content or team layer, when np-doctor reports layer-layout inferred, when a contribution has no route, or on "where should this go".
---

# np-core-layout

A layer declares where its content lives in `.nervepack/layout.json`. The engine
owns the kinds. The layer owns the paths. Links and `INDEX.md` make content
findable, so directory structure is human convenience, not a contract.

## Kinds

| Kind | Meaning |
|---|---|
| `skill` | Behavioral how-to the agent loads |
| `knowledge` | A synthesis page the user wrote |
| `reference` | Curated external source material |
| `roadmap` | Deferred work |
| `prompt` | A recurring agent prompt |

A layer may split one kind into **variants**, each with a `when` rule that says how
to choose. Topics and concepts are one layer's split of `knowledge`, not an engine
concept.

## When to run the interview

- Onboarding a new personal or team layer.
- `cli.py doctor` reports `layer-layout` as inferred, or with open questions.
- A contribution reports no route for its kind.

## The interview

1. Read the current state:
   ```bash
   NP="${NP_DIR:-$HOME/Code/nervepack}/engine/nervepack_engine/cli.py"
   python3 "$NP" layout show --layer personal
   python3 "$NP" layout questions --layer personal
   ```
2. Read every doc in the layout's `derived_from` list **before you ask anything**.
   Prose often answers a question, and an answered question is never asked.
3. Reconcile the prose against the inferred routes. Where they disagree, the disk
   wins: inference reports what pages actually do. Record what the prose settles.
4. Ask the user **one question**. Never batch them.
5. Apply the answer to the layout, then **re-run** `layout questions` against the
   updated layout. One answer often settles several questions.
6. Ask the next surviving question. Repeat until the list is empty.
7. Record and show the result:
   ```bash
   printf '%s' "$LAYOUT_JSON" | python3 "$NP" layout record --layer personal
   git -C "$LAYER" diff -- .nervepack/layout.json
   ```
8. Ask before committing. The manifest is a repo file, and a team layer needs a PR.

## Drift

Content added after the interview lands in directories no route names.
`python3 "$NP" layout drift --layer personal` lists them from page frontmatter.
A directory whose pages all declare one `type:` or `kind:` is clear. Add `--apply`
to record a variant for it (`reference` when the value is reference or source,
else `knowledge`). A mixed or untyped directory becomes an `unmapped-dir:<path>`
open question for this interview. Every sync runs the same pass (param
`sync.layout_drift`) and never commits the manifest.

Step 5 is the rule that matters. Asking a question a prior answer already resolved
is the failure this protocol exists to prevent.

## Hard rules

- Never invent a directory. If a kind has no home, ask.
- Never write a route that leaves the layer root. `route()` refuses it anyway,
  because a team manifest is remote-writable input.
- A directory that is not a contribution target goes in `unmapped`, so the
  interview stops asking about it.
- Do not migrate the layer's files. The manifest describes the tree that exists.
- Do not edit the engine to add a path. That is the bug this skill removes.

Worked example, the manifest field reference, the answer-to-route mapping, and the
read-only-layer cache: references/interview.md

See [[np-core-contribute]] for what happens after a route resolves, and
[[np-core-onboard]] for where this runs during setup.

Files in this skill

  • SKILL.md3.2 KB
  • references/interview.md4.6 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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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