@gillcash/necktie 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.opencode/command/necktie-critique.md +5 -0
  2. package/.opencode/command/necktie-reverse.md +5 -0
  3. package/.opencode/command/necktie-review.md +5 -0
  4. package/.opencode/command/necktie.md +5 -0
  5. package/.opencode/plugins/necktie-frontmatter.cjs +12 -0
  6. package/.opencode/plugins/necktie.mjs +35 -0
  7. package/.qoder/rules/necktie.md +18 -0
  8. package/.qoder-plugin/plugin.json +13 -0
  9. package/AGENTS.md +18 -0
  10. package/LICENSE +22 -0
  11. package/NOTICE +7 -0
  12. package/README.es.md +84 -0
  13. package/README.ko.md +84 -0
  14. package/README.md +232 -0
  15. package/assets/logo-dark.png +0 -0
  16. package/assets/necktie-icon-pack-preview.png +0 -0
  17. package/commands/necktie-critique.toml +2 -0
  18. package/commands/necktie-reverse.toml +2 -0
  19. package/commands/necktie-review.toml +2 -0
  20. package/commands/necktie.toml +2 -0
  21. package/core/necktie-core.md +18 -0
  22. package/hooks/copilot-hooks.json +13 -0
  23. package/hooks/hooks.json +27 -0
  24. package/hooks/necktie-context.js +43 -0
  25. package/hooks/qoder-hooks.json +26 -0
  26. package/package.json +55 -0
  27. package/pi-extension/index.js +29 -0
  28. package/pi-extension/package.json +9 -0
  29. package/plugin.json +14 -0
  30. package/skills/necktie/SKILL.md +95 -0
  31. package/skills/necktie/agents/openai.yaml +6 -0
  32. package/skills/necktie/references/loop-protocol.md +85 -0
  33. package/skills/necktie/scripts/necktie_loop.py +199 -0
  34. package/skills/necktie-critique/SKILL.md +48 -0
  35. package/skills/necktie-critique/agents/openai.yaml +6 -0
  36. package/skills/necktie-reverse/SKILL.md +41 -0
  37. package/skills/necktie-reverse/agents/openai.yaml +6 -0
  38. package/skills/necktie-reverse/references/blueprint-template.md +54 -0
  39. package/skills/necktie-review/SKILL.md +61 -0
  40. package/skills/necktie-review/agents/openai.yaml +6 -0
  41. package/skills/necktie-review/references/reviewer-rubric.md +29 -0
  42. package/skills/necktie-review/scripts/validate_review.py +110 -0
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Challenge an inquiry and surface material blind spots
3
+ ---
4
+
5
+ Use $necktie-critique on: $ARGUMENTS. Test goal alignment, assumptions, evidence needs, and the strongest unasked expert question.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Compile iterative context into one executable brief
3
+ ---
4
+
5
+ Use $necktie-reverse on: $ARGUMENTS. Produce a self-contained brief that can be executed in a fresh session from raw evidence.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Independently gate a candidate deliverable
3
+ ---
4
+
5
+ Use $necktie-review on: $ARGUMENTS. Judge the exact candidate against its brief, evidence, criteria, and verification; return APPROVE, REVISE, or BLOCK.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Run the explicit, bounded Necktie Loop
3
+ ---
4
+
5
+ Use $necktie for this goal: $ARGUMENTS. Frame, baseline, critique, reverse, execute, review, and verify. Return the final deliverable, reusable execution brief, verification record, material overlooked consideration, and strongest unasked question.
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ function parseCommandFile(filePath) {
4
+ const fs = require("node:fs");
5
+ const content = fs.readFileSync(filePath, "utf8");
6
+ const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);
7
+ if (!match) return null;
8
+ const description = match[1].match(/description:\s*(.+)/)?.[1]?.trim();
9
+ return { description, template: match[2].trim() };
10
+ }
11
+
12
+ module.exports = { parseCommandFile };
@@ -0,0 +1,35 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { createRequire } from "node:module";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const require = createRequire(import.meta.url);
8
+ const { parseCommandFile } = require("./necktie-frontmatter.cjs");
9
+ const root = path.resolve(__dirname, "../..");
10
+ const skillsDir = path.join(root, "skills");
11
+
12
+ function coreContext() {
13
+ return fs.readFileSync(path.join(root, "core", "necktie-core.md"), "utf8").trim();
14
+ }
15
+
16
+ export default async function necktiePlugin() {
17
+ return {
18
+ config: async (config) => {
19
+ config.command ||= {};
20
+ const commandDir = path.join(__dirname, "..", "command");
21
+ for (const file of fs.readdirSync(commandDir).filter((name) => name.endsWith(".md"))) {
22
+ const parsed = parseCommandFile(path.join(commandDir, file));
23
+ if (parsed) config.command[path.basename(file, ".md")] = parsed;
24
+ }
25
+ config.skills ||= {};
26
+ config.skills.paths ||= [];
27
+ if (!config.skills.paths.includes(skillsDir)) config.skills.paths.push(skillsDir);
28
+ },
29
+ "experimental.chat.system.transform": async (_input, output) => {
30
+ const context = coreContext();
31
+ if (output.system.length) output.system[output.system.length - 1] += `\n\n${context}`;
32
+ else output.system.push(context);
33
+ },
34
+ };
35
+ }
@@ -0,0 +1,18 @@
1
+ # Necktie Core
2
+
3
+ Necktie is active for every response.
4
+
5
+ Before acting, align the requested output with the user's real goal, intended reader, acceptance criteria, constraints, available evidence, and authority. Make the smallest intervention that fully satisfies those conditions. Reuse trusted sources and native capabilities before adding new machinery.
6
+
7
+ Before the final response:
8
+
9
+ 1. Check the work in proportion to its risk. Correct material errors that you can resolve.
10
+ 2. Identify any material consideration the user may have overlooked relative to the goal.
11
+ 3. Identify the strongest unasked question that a genuine subject-matter expert would ask, but include it only when its answer could change the decision, result, or risk.
12
+ 4. Ask the user a question only when the answer would materially change the objective, evidence, authority, or deliverable. Otherwise state the necessary assumption and proceed.
13
+
14
+ Never trade away security, privacy, accessibility, input validation at trust boundaries, error handling that prevents data loss, or an explicit requirement. Do not expand scope merely because an adjacent improvement is attractive.
15
+
16
+ Keep the response clean. Add an `Overlooked` or `Strongest unasked question` note only when it contains material information; do not emit empty ritual or boilerplate. Give concise conclusions, evidence, assumptions, and verification results. Do not reveal private chain-of-thought.
17
+
18
+ Do not run the full Necktie Loop unless the user invokes `/necktie`, `$necktie`, `@necktie`, or explicitly requests the Necktie workflow. The full loop is: frame, baseline, critique, reverse, execute, review, verify.
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "necktie",
3
+ "version": "0.2.0",
4
+ "description": "Necktie Core on every response, plus an explicit bounded review loop.",
5
+ "author": { "name": "gillcash", "url": "https://github.com/gillcash" },
6
+ "homepage": "https://github.com/gillcash/necktie",
7
+ "repository": "https://github.com/gillcash/necktie",
8
+ "license": "MIT",
9
+ "keywords": ["agent-loop", "review", "verification"],
10
+ "skills": "./skills/",
11
+ "rules": "./.qoder/rules/",
12
+ "hooks": "./hooks/qoder-hooks.json"
13
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,18 @@
1
+ # Necktie Core
2
+
3
+ Necktie is active for every response.
4
+
5
+ Before acting, align the requested output with the user's real goal, intended reader, acceptance criteria, constraints, available evidence, and authority. Make the smallest intervention that fully satisfies those conditions. Reuse trusted sources and native capabilities before adding new machinery.
6
+
7
+ Before the final response:
8
+
9
+ 1. Check the work in proportion to its risk. Correct material errors that you can resolve.
10
+ 2. Identify any material consideration the user may have overlooked relative to the goal.
11
+ 3. Identify the strongest unasked question that a genuine subject-matter expert would ask, but include it only when its answer could change the decision, result, or risk.
12
+ 4. Ask the user a question only when the answer would materially change the objective, evidence, authority, or deliverable. Otherwise state the necessary assumption and proceed.
13
+
14
+ Never trade away security, privacy, accessibility, input validation at trust boundaries, error handling that prevents data loss, or an explicit requirement. Do not expand scope merely because an adjacent improvement is attractive.
15
+
16
+ Keep the response clean. Add an `Overlooked` or `Strongest unasked question` note only when it contains material information; do not emit empty ritual or boilerplate. Give concise conclusions, evidence, assumptions, and verification results. Do not reveal private chain-of-thought.
17
+
18
+ Do not run the full Necktie Loop unless the user invokes `/necktie`, `$necktie`, `@necktie`, or explicitly requests the Necktie workflow. The full loop is: frame, baseline, critique, reverse, execute, review, verify.
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DietrichGebert
4
+ Copyright (c) 2026 gillcash
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,7 @@
1
+ Necktie 0.2.0
2
+ Copyright (c) 2026 gillcash
3
+
4
+ This project was structurally derived from Ponytail by Dietrich Gebert. It retains portions of Ponytail's cross-host packaging, adapter patterns, and test architecture under the MIT License. Necktie's behavior, workflow, documentation, branding, and command surface have been substantially rewritten.
5
+
6
+ Ponytail: https://github.com/DietrichGebert/ponytail
7
+ Copyright (c) 2026 Dietrich Gebert
package/README.es.md ADDED
@@ -0,0 +1,84 @@
1
+ <p align="center"><img src="assets/logo-dark.png" width="220" alt="Logotipo de Necktie"></p>
2
+
3
+ <h1 align="center">Necktie</h1>
4
+
5
+ <p align="center"><em>the angel of late-stage capitalism for your AI agent</em></p>
6
+
7
+ Necktie añade una revisión breve a cada respuesta del agente y ofrece un flujo explícito y limitado para trabajo importante. Invoque `/necktie` para encuadrar, establecer una línea base, criticar, revertir, ejecutar, revisar y verificar un objetivo.
8
+
9
+ ## Distinga las dos capas
10
+
11
+ | Capa | Activación | Resultado |
12
+ | --- | --- | --- |
13
+ | Necktie Core | En cada respuesta, mediante el mecanismo nativo del host | Comprueba el objetivo y el trabajo, corrige errores materiales e identifica omisiones y la pregunta experta no formulada más importante |
14
+ | Necktie Loop | Solo con `/necktie`, `$necktie`, `@necktie` o una petición explícita | Ejecuta siete fases con cuatro skills y una puerta de revisión finita |
15
+
16
+ Necktie no usa un modo de encendido o apagado, un servicio de fondo ni niveles persistentes. Desinstale o desactive el plugin para dejar de usar Core.
17
+
18
+ ## Ejecute el ejemplo
19
+
20
+ ```text
21
+ /necktie Evalúa la fiabilidad de los datos KPI de una tienda de alquiler de herramientas y equipos. Crea un plan de controles apto para decisiones a partir de evidencia admisible y verifica cada afirmación material.
22
+ ```
23
+
24
+ ```text
25
+ frame -> baseline -> critique -> reverse -> execute -> review -> verify
26
+ ^ |
27
+ | v
28
+ revise <- REVISE
29
+ ```
30
+
31
+ Las decisiones son `APPROVE`, `REVISE` y `BLOCK`. El ciclo se detiene después de tres decisiones de revisión, cuando el mismo problema sobrevive tres revisiones consecutivas o cuando falta evidencia, autoridad o una decisión material del usuario.
32
+
33
+ ## Instale Necktie
34
+
35
+ ### Claude Code
36
+
37
+ ```text
38
+ /plugin marketplace add gillcash/necktie
39
+ /plugin install necktie@necktie
40
+ ```
41
+
42
+ ### Codex
43
+
44
+ ```bash
45
+ codex plugin marketplace add gillcash/necktie
46
+ codex plugin add necktie@necktie
47
+ ```
48
+
49
+ Abra `/hooks`, revise y autorice los hooks, y después inicie un hilo nuevo.
50
+
51
+ ### Otros hosts
52
+
53
+ | Host | Instalación o mecanismo |
54
+ | --- | --- |
55
+ | GitHub Copilot CLI | `copilot plugin marketplace add gillcash/necktie`, luego `copilot plugin install necktie@necktie` |
56
+ | Pi | `pi install git:github.com/gillcash/necktie` |
57
+ | OpenCode | `{"plugin":["@gillcash/necktie"]}` |
58
+ | Gemini CLI | `gemini extensions install https://github.com/gillcash/necktie` |
59
+ | Antigravity | `agy plugin install https://github.com/gillcash/necktie` |
60
+ | Hermes | `hermes plugins install gillcash/necktie --enable` |
61
+ | Devin | `devin plugins install gillcash/necktie` |
62
+ | Grok Build | `grok plugin install gillcash/necktie --trust` |
63
+ | Swival | `swival skills add --global https://github.com/gillcash/necktie` |
64
+ | OpenClaw | Instale los cuatro skills desde `.openclaw/skills/` o ClawHub |
65
+
66
+ Cursor, Windsurf, Cline, Copilot Chat, Kiro, Qoder, Aider, Zed, CodeWhale, Junie, Amp y Jules usan el archivo de reglas correspondiente incluido en el repositorio. Consulte [la documentación de hosts](docs/host-support.md). Una regla estática proporciona Core, pero no crea comandos.
67
+
68
+ ## Use los cuatro skills
69
+
70
+ - `necktie`: controla el ciclo completo.
71
+ - `necktie-critique`: cuestiona la consulta y las omisiones materiales.
72
+ - `necktie-reverse`: compila el recorrido en una instrucción ejecutable independiente.
73
+ - `necktie-review`: devuelve `APPROVE`, `REVISE` o `BLOCK`.
74
+
75
+ ## Valide el proyecto
76
+
77
+ ```bash
78
+ npm run build:adapters
79
+ npm test
80
+ ```
81
+
82
+ `core/necktie-core.md` es la única fuente de las reglas generadas. El proyecto conserva la atribución de la base de adaptadores Ponytail en [NOTICE](NOTICE) y usa la [licencia MIT](LICENSE).
83
+
84
+ Esta documentación sigue principalmente una práctica orientada a ISO 24495-1 para las tareas del lector y se complementa con controles orientados a ASD-STE100 para términos, comandos, condiciones y estados. Esto no es una declaración de conformidad.
package/README.ko.md ADDED
@@ -0,0 +1,84 @@
1
+ <p align="center"><img src="assets/logo-dark.png" width="220" alt="Necktie 로고"></p>
2
+
3
+ <h1 align="center">Necktie</h1>
4
+
5
+ <p align="center"><em>the angel of late-stage capitalism for your AI agent</em></p>
6
+
7
+ Necktie는 에이전트의 모든 응답에 간결한 품질 점검을 적용하고, 중요한 작업을 위한 명시적이고 제한된 워크플로를 제공합니다. `/necktie`를 호출하면 목표를 프레임하고, 기준안을 만들고, 비평하고, 역설계하고, 실행하고, 검토하고, 검증합니다.
8
+
9
+ ## 두 계층을 구분하십시오
10
+
11
+ | 계층 | 실행 시점 | 결과 |
12
+ | --- | --- | --- |
13
+ | Necktie Core | 호스트의 기본 훅 또는 지침 메커니즘을 통해 모든 응답에서 실행 | 목표 적합성과 작업을 점검하고, 중요한 오류와 누락을 찾으며, 결과를 바꿀 수 있는 가장 중요한 미질문을 제시 |
14
+ | Necktie Loop | `/necktie`, `$necktie`, `@necktie` 또는 명시적 요청이 있을 때만 실행 | 네 개의 스킬과 유한한 검토 게이트로 일곱 단계를 실행 |
15
+
16
+ Necktie는 켜기/끄기 모드, 백그라운드 서비스 또는 지속적인 강도 수준을 사용하지 않습니다. Core를 사용하지 않으려면 플러그인을 제거하거나 비활성화하십시오.
17
+
18
+ ## 예제를 실행하십시오
19
+
20
+ ```text
21
+ /necktie 공구 및 장비 대여점의 KPI 데이터 신뢰성을 평가하십시오. 적격 증거를 사용해 의사결정용 통제 계획을 만들고 모든 중요한 주장을 검증하십시오.
22
+ ```
23
+
24
+ ```text
25
+ frame -> baseline -> critique -> reverse -> execute -> review -> verify
26
+ ^ |
27
+ | v
28
+ revise <- REVISE
29
+ ```
30
+
31
+ 검토 결정은 `APPROVE`, `REVISE`, `BLOCK`입니다. 세 번의 수정 결정이 기록되거나, 같은 문제가 세 번 연속 남거나, 새로운 증거·권한·중요한 사용자 결정이 필요하면 루프가 중지됩니다.
32
+
33
+ ## Necktie를 설치하십시오
34
+
35
+ ### Claude Code
36
+
37
+ ```text
38
+ /plugin marketplace add gillcash/necktie
39
+ /plugin install necktie@necktie
40
+ ```
41
+
42
+ ### Codex
43
+
44
+ ```bash
45
+ codex plugin marketplace add gillcash/necktie
46
+ codex plugin add necktie@necktie
47
+ ```
48
+
49
+ `/hooks`를 열어 훅을 검토하고 신뢰한 다음 새 스레드를 시작하십시오.
50
+
51
+ ### 다른 호스트
52
+
53
+ | 호스트 | 설치 또는 메커니즘 |
54
+ | --- | --- |
55
+ | GitHub Copilot CLI | `copilot plugin marketplace add gillcash/necktie` 후 `copilot plugin install necktie@necktie` |
56
+ | Pi | `pi install git:github.com/gillcash/necktie` |
57
+ | OpenCode | `{"plugin":["@gillcash/necktie"]}` |
58
+ | Gemini CLI | `gemini extensions install https://github.com/gillcash/necktie` |
59
+ | Antigravity | `agy plugin install https://github.com/gillcash/necktie` |
60
+ | Hermes | `hermes plugins install gillcash/necktie --enable` |
61
+ | Devin | `devin plugins install gillcash/necktie` |
62
+ | Grok Build | `grok plugin install gillcash/necktie --trust` |
63
+ | Swival | `swival skills add --global https://github.com/gillcash/necktie` |
64
+ | OpenClaw | `.openclaw/skills/` 또는 ClawHub에서 네 스킬 설치 |
65
+
66
+ Cursor, Windsurf, Cline, Copilot Chat, Kiro, Qoder, Aider, Zed, CodeWhale, Junie, Amp, Jules는 저장소에 포함된 해당 규칙 파일을 사용합니다. [호스트 문서](docs/host-support.md)를 참조하십시오. 정적 규칙은 Core를 제공하지만 슬래시 명령을 만들지는 않습니다.
67
+
68
+ ## 네 스킬을 사용하십시오
69
+
70
+ - `necktie`: 전체 루프를 제어합니다.
71
+ - `necktie-critique`: 질문과 중요한 누락을 비평합니다.
72
+ - `necktie-reverse`: 반복 과정을 독립 실행 가능한 지침으로 컴파일합니다.
73
+ - `necktie-review`: `APPROVE`, `REVISE`, `BLOCK` 중 하나를 반환합니다.
74
+
75
+ ## 프로젝트를 검증하십시오
76
+
77
+ ```bash
78
+ npm run build:adapters
79
+ npm test
80
+ ```
81
+
82
+ `core/necktie-core.md`는 생성 규칙의 단일 원본입니다. 프로젝트는 [NOTICE](NOTICE)에 Ponytail 어댑터 기반의 귀속을 보존하며 [MIT 라이선스](LICENSE)를 사용합니다.
83
+
84
+ 이 문서는 독자 작업을 위해 ISO 24495-1 지향 방식을 주로 사용하고, 용어·명령·조건·상태를 위해 ASD-STE100 지향 통제를 보완적으로 사용합니다. 이는 적합성 선언이 아닙니다.
package/README.md ADDED
@@ -0,0 +1,232 @@
1
+ <p align="center">
2
+ <img src="assets/logo-dark.png" width="220" alt="Necktie logo">
3
+ </p>
4
+
5
+ <h1 align="center">Necktie</h1>
6
+
7
+ <p align="center"><em>the angel of late-stage capitalism for your AI agent</em></p>
8
+
9
+ Necktie adds a compact quality check to every agent response and provides an explicit, bounded workflow for consequential work. Invoke `/necktie` to frame, baseline, critique, reverse, execute, review, and verify a goal.
10
+
11
+ ## Know the two layers
12
+
13
+ | Layer | When it runs | What it does |
14
+ | --- | --- | --- |
15
+ | Necktie Core | Every response, through the host's native hook or instruction mechanism | Checks goal fit and work quality, corrects material errors, surfaces material omissions, and asks the strongest unasked expert question when it matters |
16
+ | Necktie Loop | Only after `/necktie`, `$necktie`, `@necktie`, or an explicit request | Runs the seven-phase workflow with four cooperating skills and a finite review gate |
17
+
18
+ Necktie does not use an on/off mode, background service, or persistent operating level. Remove or disable the plugin when you do not want Necktie Core.
19
+
20
+ ## Use the portable plugin
21
+
22
+ The root `plugin.json` targets the [Agent Plugins 1.0.0 specification](https://agent-plugins.org/). The portable layer contains the four skills in the standard `skills/` location. Host-specific lifecycle hooks, commands, and rule files extend that interoperability floor without changing the portable skill definitions.
23
+
24
+ `necktie-mcp/` is an optional retrieval fallback. It is not required by the plugin or loop, and MCP alone does not make Core active on every response.
25
+
26
+ ## Run the loop
27
+
28
+ ```text
29
+ /necktie Assess KPI data reliability for a tool and equipment rental store. Build a decision-ready control plan from eligible evidence and verify every material claim.
30
+ ```
31
+
32
+ On a skill-oriented host, use:
33
+
34
+ ```text
35
+ $necktie Assess KPI data reliability for a tool and equipment rental store. Build a decision-ready control plan from eligible evidence and verify every material claim.
36
+ ```
37
+
38
+ The loop returns the requested artifact, a reusable execution brief, a review decision, a verification record, known limitations, and the strongest unasked question when it could affect action.
39
+
40
+ ## Follow the seven phases
41
+
42
+ ```text
43
+ frame -> baseline -> critique -> reverse -> execute -> review -> verify
44
+ ^ |
45
+ | v
46
+ revise <- REVISE
47
+ ```
48
+
49
+ | Phase | Required result |
50
+ | --- | --- |
51
+ | Frame | Outcome, reader, scope, constraints, source classes, and acceptance criteria |
52
+ | Baseline | Smallest plausible approach and its assumptions |
53
+ | Critique | Material omissions, framing defects, evidence needs, and strongest unasked question |
54
+ | Reverse | One self-contained execution brief for a fresh session |
55
+ | Execute | Candidate built from eligible raw evidence |
56
+ | Review | Independent `APPROVE`, `REVISE`, or `BLOCK` decision |
57
+ | Verify | Test, render, calculation, or inspection in the intended environment |
58
+
59
+ `REVISE` returns the candidate to the author. The loop stops after three revision decisions, after the same unresolved issue appears in three consecutive reviews, or when a material blocker requires new evidence, authority, or user direction.
60
+
61
+ ## Install
62
+
63
+ Node.js must be available to hosts that run the lifecycle hook. Review third-party hooks before you trust them.
64
+
65
+ ### Claude Code
66
+
67
+ Send these as separate commands:
68
+
69
+ ```text
70
+ /plugin marketplace add gillcash/necktie
71
+ /plugin install necktie@necktie
72
+ ```
73
+
74
+ ### Codex
75
+
76
+ ```bash
77
+ codex plugin marketplace add gillcash/necktie
78
+ codex plugin add necktie@necktie
79
+ ```
80
+
81
+ Start Codex, open `/hooks`, review and trust the Necktie hooks, and start a new thread. The same installation applies to the Codex desktop app after restart.
82
+
83
+ ### GitHub Copilot CLI
84
+
85
+ ```bash
86
+ copilot plugin marketplace add gillcash/necktie
87
+ copilot plugin install necktie@necktie
88
+ ```
89
+
90
+ Copilot namespaces commands. For example, use `/necktie:necktie` and `/necktie:necktie-review`.
91
+
92
+ ### Pi
93
+
94
+ ```bash
95
+ pi install git:github.com/gillcash/necktie
96
+ ```
97
+
98
+ ### OpenCode
99
+
100
+ Use the published package:
101
+
102
+ ```json
103
+ { "plugin": ["@gillcash/necktie"] }
104
+ ```
105
+
106
+ Or use a checkout:
107
+
108
+ ```json
109
+ { "plugin": ["./.opencode/plugins/necktie.mjs"] }
110
+ ```
111
+
112
+ The OpenCode adapter injects Core on each turn and registers all four commands and skills.
113
+
114
+ ### Gemini CLI and Antigravity
115
+
116
+ ```bash
117
+ gemini extensions install https://github.com/gillcash/necktie
118
+ ```
119
+
120
+ ```bash
121
+ agy plugin install https://github.com/gillcash/necktie
122
+ ```
123
+
124
+ These hosts use `AGENTS.md` as the always-on context and load the bundled skills through the extension.
125
+
126
+ ### Qoder
127
+
128
+ Run Qoder from a checkout or copy `.qoder/rules/necktie.md` into the target project's `.qoder/rules/`. For hook-based per-prompt and subagent injection, install `hooks/qoder-hooks.json` in the project's Qoder settings and replace the plugin-root placeholder with the absolute checkout path if required by that host version.
129
+
130
+ ### Hermes Agent
131
+
132
+ ```bash
133
+ hermes plugins install gillcash/necktie --enable
134
+ ```
135
+
136
+ Restart Hermes. It injects Core before each model call and registers `necktie:<skill>` plus the four slash commands.
137
+
138
+ ### Swival
139
+
140
+ ```bash
141
+ swival skills add --global https://github.com/gillcash/necktie
142
+ swival skills add necktie
143
+ ```
144
+
145
+ Use `$necktie` to invoke the loop. Copy `AGENTS.md` to the project or global Swival instructions location for Core.
146
+
147
+ ### Devin CLI
148
+
149
+ ```bash
150
+ devin plugins install gillcash/necktie
151
+ ```
152
+
153
+ Use `/necktie:necktie`, `/necktie:necktie-critique`, `/necktie:necktie-reverse`, or `/necktie:necktie-review`.
154
+
155
+ ### OpenClaw
156
+
157
+ ```bash
158
+ clawhub install necktie
159
+ clawhub install necktie-critique
160
+ clawhub install necktie-reverse
161
+ clawhub install necktie-review
162
+ ```
163
+
164
+ Without ClawHub, copy the required directories from `.openclaw/skills/` into `~/.openclaw/skills/`. Install the Core rule separately as `AGENTS.md` when the host does not keep a skill active on every response.
165
+
166
+ ### Grok Build
167
+
168
+ ```bash
169
+ grok plugin install gillcash/necktie --trust
170
+ ```
171
+
172
+ Enable `necktie` in `/plugins`, then start a new session. Grok exposes the four skills. Its plugin lifecycle cannot inject Core reliably on every response, so use the repository `AGENTS.md` in the project for the always-on layer.
173
+
174
+ ### Static-rule hosts
175
+
176
+ Necktie covers the remaining Ponytail-supported hosts through their persistent instruction file:
177
+
178
+ | Host | Install this file |
179
+ | --- | --- |
180
+ | Cursor | `.cursor/rules/necktie.mdc` |
181
+ | Windsurf | `.windsurf/rules/necktie.md` |
182
+ | Cline | `.clinerules/necktie.md` |
183
+ | GitHub Copilot Chat | `.github/copilot-instructions.md` |
184
+ | Kiro | `.kiro/steering/necktie.md` |
185
+ | Qoder | `.qoder/rules/necktie.md` |
186
+ | Aider, Zed, CodeWhale, Amp, Jules | `AGENTS.md` |
187
+ | Junie | `AGENTS.md`, selected as the project guidelines file |
188
+
189
+ These adapters provide Core on every response when the host honors the installed rule. A static rule does not create slash commands; invoke the loop in plain language or install the four skills through that host's skill mechanism.
190
+
191
+ See [docs/host-support.md](docs/host-support.md) for adapter boundaries and verification checks.
192
+
193
+ ## Use the four skills
194
+
195
+ - `necktie` controls the complete loop.
196
+ - `necktie-critique` challenges the inquiry and exposes material blind spots.
197
+ - `necktie-reverse` compiles the successful trajectory into a fresh-session brief.
198
+ - `necktie-review` returns an independent `APPROVE`, `REVISE`, or `BLOCK` decision.
199
+
200
+ The Core can recommend a material next step, but it must not silently launch the full loop.
201
+
202
+ ## Keep an auditable run packet
203
+
204
+ Most runs need no file. Create a packet only when the work must be resumable or auditable:
205
+
206
+ ```bash
207
+ python skills/necktie/scripts/necktie_loop.py init --goal "Assess KPI data reliability for a tool and equipment rental store" --output .necktie/run.json
208
+ python skills/necktie/scripts/necktie_loop.py transition --file .necktie/run.json --to baseline --note "Sources classified"
209
+ python skills/necktie/scripts/necktie_loop.py show --file .necktie/run.json
210
+ python skills/necktie-review/scripts/validate_review.py review.json
211
+ ```
212
+
213
+ The Python scripts use only the standard library. They record states, decisions, and verification evidence, not private reasoning.
214
+
215
+ ## Develop and validate
216
+
217
+ ```bash
218
+ npm run build:adapters
219
+ npm test
220
+ python C:/Users/you/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/necktie
221
+ python C:/Users/you/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py .
222
+ ```
223
+
224
+ `core/necktie-core.md` is the single source for generated instruction adapters. Do not edit generated copies directly.
225
+
226
+ This README is governed primarily by ISO 24495-1-oriented plain-language practice because its intended readers must install, invoke, evaluate, and safely modify Necktie, misunderstanding could cause invalid setup, unintended workflow activation, weakened review independence, or unreliable deliverables, and the document requires both reader-level organization and technical semantic control. It is supplemented by ASD-STE100-oriented controls for consistent terms, commands, conditions, status values, and stopping rules.
227
+
228
+ This is a writing profile, not a claim of conformity. See [docs/process-provenance.md](docs/process-provenance.md) for the generalized design provenance and source boundaries.
229
+
230
+ ## License
231
+
232
+ Necktie is available under the [MIT License](LICENSE). [NOTICE](NOTICE) preserves attribution for the inherited Ponytail adapter foundation.
Binary file
@@ -0,0 +1,2 @@
1
+ description = "Challenge an inquiry and surface material blind spots"
2
+ prompt = "Use $necktie-critique on: {{args}}. Test goal alignment, assumptions, evidence needs, and the strongest unasked expert question."
@@ -0,0 +1,2 @@
1
+ description = "Compile iterative context into one executable brief"
2
+ prompt = "Use $necktie-reverse on: {{args}}. Produce a self-contained brief that can be executed in a fresh session from raw evidence."
@@ -0,0 +1,2 @@
1
+ description = "Independently gate a candidate deliverable"
2
+ prompt = "Use $necktie-review on: {{args}}. Judge the exact candidate against its brief, evidence, criteria, and verification; return APPROVE, REVISE, or BLOCK."
@@ -0,0 +1,2 @@
1
+ description = "Run the explicit, bounded Necktie Loop"
2
+ prompt = "Use $necktie for this goal: {{args}}. Frame, baseline, critique, reverse, execute, review, and verify. Return the final deliverable, reusable execution brief, verification record, material overlooked consideration, and strongest unasked question."
@@ -0,0 +1,18 @@
1
+ # Necktie Core
2
+
3
+ Necktie is active for every response.
4
+
5
+ Before acting, align the requested output with the user's real goal, intended reader, acceptance criteria, constraints, available evidence, and authority. Make the smallest intervention that fully satisfies those conditions. Reuse trusted sources and native capabilities before adding new machinery.
6
+
7
+ Before the final response:
8
+
9
+ 1. Check the work in proportion to its risk. Correct material errors that you can resolve.
10
+ 2. Identify any material consideration the user may have overlooked relative to the goal.
11
+ 3. Identify the strongest unasked question that a genuine subject-matter expert would ask, but include it only when its answer could change the decision, result, or risk.
12
+ 4. Ask the user a question only when the answer would materially change the objective, evidence, authority, or deliverable. Otherwise state the necessary assumption and proceed.
13
+
14
+ Never trade away security, privacy, accessibility, input validation at trust boundaries, error handling that prevents data loss, or an explicit requirement. Do not expand scope merely because an adjacent improvement is attractive.
15
+
16
+ Keep the response clean. Add an `Overlooked` or `Strongest unasked question` note only when it contains material information; do not emit empty ritual or boilerplate. Give concise conclusions, evidence, assumptions, and verification results. Do not reveal private chain-of-thought.
17
+
18
+ Do not run the full Necktie Loop unless the user invokes `/necktie`, `$necktie`, `@necktie`, or explicitly requests the Necktie workflow. The full loop is: frame, baseline, critique, reverse, execute, review, verify.
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [
5
+ {
6
+ "type": "command",
7
+ "bash": "node \"${PLUGIN_ROOT}/hooks/necktie-context.js\" SessionStart copilot",
8
+ "powershell": "node \"${PLUGIN_ROOT}\\hooks\\necktie-context.js\" SessionStart copilot",
9
+ "timeoutSec": 10
10
+ }
11
+ ]
12
+ }
13
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node -e \"const r=process.argv[1],e=process.argv[2],g=e&&!e.startsWith('$'+'{')?e:'',p=g||r;require(p+'/hooks/necktie-context.js').main(['SessionStart',g])\" \"${CLAUDE_PLUGIN_ROOT}\" \"${extensionPath}\"",
10
+ "additionalContextLimit": 1200
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "SubagentStart": [
16
+ {
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "node -e \"const r=process.argv[1],e=process.argv[2],g=e&&!e.startsWith('$'+'{')?e:'',p=g||r;require(p+'/hooks/necktie-context.js').main(['SubagentStart',g])\" \"${CLAUDE_PLUGIN_ROOT}\" \"${extensionPath}\"",
21
+ "additionalContextLimit": 1200
22
+ }
23
+ ]
24
+ }
25
+ ]
26
+ }
27
+ }