@cat-factory/prompt-fragments 0.9.55 → 0.10.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.
- package/dist/collections/style.d.ts +11 -0
- package/dist/collections/style.d.ts.map +1 -0
- package/dist/collections/style.js +64 -0
- package/dist/collections/style.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PromptFragment } from '@cat-factory/contracts';
|
|
2
|
+
export declare const styleFragments: PromptFragment[];
|
|
3
|
+
/**
|
|
4
|
+
* The style fragments a NEW document task is pre-seeded with (default-on, user-removable
|
|
5
|
+
* like any block pin). The source of truth for "which style fragments a document task
|
|
6
|
+
* starts with" — the board service seeds these onto a document task's `fragmentIds` at
|
|
7
|
+
* creation, so the `doc-aware` authoring/review kinds fold them in without the prompt
|
|
8
|
+
* hard-coding the guidance.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS: readonly string[];
|
|
11
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../src/collections/style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAY5D,eAAO,MAAM,cAAc,EAAE,cAAc,EA4C1C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mCAAmC,EAAE,SAAS,MAAM,EAGhE,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Universal WRITING-STYLE fragments for the document-authoring track. Unlike the
|
|
2
|
+
// technical collections (node/react/acceptance/design), these are source- and
|
|
3
|
+
// stack-neutral: they govern HOW prose is written, not what a service is built with.
|
|
4
|
+
// They fold into the document-authoring kinds via the `doc-aware` trait (the same
|
|
5
|
+
// engine path `code-aware` uses for the technical fragments), and are pre-selected by
|
|
6
|
+
// default on a document task (see `DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS`), user-removable
|
|
7
|
+
// like any block pin. Because the `doc-reviewer` companion also carries `doc-aware`, the
|
|
8
|
+
// SAME bodies reach it as review criteria — style guidance is both an instruction to the
|
|
9
|
+
// writer and a check by the reviewer.
|
|
10
|
+
export const styleFragments = [
|
|
11
|
+
{
|
|
12
|
+
id: 'style.anti-llmisms',
|
|
13
|
+
version: '1.0.0',
|
|
14
|
+
title: 'Avoid LLM tells',
|
|
15
|
+
category: 'Writing style',
|
|
16
|
+
summary: 'Cut the machine-written tells: filler adverbs, hedging, throat-clearing, bullet inflation.',
|
|
17
|
+
body: [
|
|
18
|
+
'Write like a human editor, not a language model. Avoid the tells that mark machine-written prose:',
|
|
19
|
+
'- Drop filler intensifiers and cliches: "delve", "crucial", "vital", "seamless", "robust",',
|
|
20
|
+
' "leverage", "utilize" (write "use"), "in the realm of", "navigate the landscape",',
|
|
21
|
+
' "it is important to note", "it is worth noting", "when it comes to".',
|
|
22
|
+
'- Cut throat-clearing and hedging: "In today\'s fast-paced world", "As we all know",',
|
|
23
|
+
' "It goes without saying", "Needless to say", "Arguably", "In conclusion". State the point.',
|
|
24
|
+
'- No summary that merely restates what was just said, and no section that only previews',
|
|
25
|
+
' the next one. Every paragraph must add information.',
|
|
26
|
+
'- Do not inflate into bullet lists what is a sentence, and do not end every bullet with a',
|
|
27
|
+
' parallel flourish. Use a list only for genuinely enumerable items.',
|
|
28
|
+
'- Do not overuse em-dashes, rhetorical questions, or the "It\'s not just X, it\'s Y" frame.',
|
|
29
|
+
'- Prefer plain, specific words over vague grandeur. Concrete nouns and real numbers beat',
|
|
30
|
+
' adjectives. If a sentence survives deletion with no loss of meaning, delete it.',
|
|
31
|
+
].join('\n'),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'style.concise-actionable',
|
|
35
|
+
version: '1.0.0',
|
|
36
|
+
title: 'Concise and actionable',
|
|
37
|
+
category: 'Writing style',
|
|
38
|
+
summary: 'Lead with the point, active voice, one idea per paragraph; every recommendation names an actor and an action.',
|
|
39
|
+
body: [
|
|
40
|
+
'Write to be read fast and acted on:',
|
|
41
|
+
'- Lead with the conclusion. Put the answer, decision, or recommendation in the first',
|
|
42
|
+
' sentence of a section, then support it. Do not build up to it.',
|
|
43
|
+
'- Active voice, present tense, second person where you address the reader. Name the actor:',
|
|
44
|
+
' "the operator restarts the worker", not "the worker should be restarted".',
|
|
45
|
+
'- One idea per paragraph; one job per sentence. Break a long sentence into short ones.',
|
|
46
|
+
'- Every recommendation is actionable: it names WHO does WHAT, and when it applies. Replace',
|
|
47
|
+
' "consideration should be given to caching" with "cache the catalog response for 60s".',
|
|
48
|
+
'- Prefer concrete examples, commands, and tables over abstract description.',
|
|
49
|
+
'- Cut ruthlessly. Say it once, in the fewest words that stay precise. Length is not thoroughness.',
|
|
50
|
+
].join('\n'),
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* The style fragments a NEW document task is pre-seeded with (default-on, user-removable
|
|
55
|
+
* like any block pin). The source of truth for "which style fragments a document task
|
|
56
|
+
* starts with" — the board service seeds these onto a document task's `fragmentIds` at
|
|
57
|
+
* creation, so the `doc-aware` authoring/review kinds fold them in without the prompt
|
|
58
|
+
* hard-coding the guidance.
|
|
59
|
+
*/
|
|
60
|
+
export const DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS = [
|
|
61
|
+
'style.anti-llmisms',
|
|
62
|
+
'style.concise-actionable',
|
|
63
|
+
];
|
|
64
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../src/collections/style.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,8EAA8E;AAC9E,qFAAqF;AACrF,kFAAkF;AAClF,sFAAsF;AACtF,yFAAyF;AACzF,yFAAyF;AACzF,yFAAyF;AACzF,sCAAsC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C;QACE,EAAE,EAAE,oBAAoB;QACxB,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,eAAe;QACzB,OAAO,EACL,4FAA4F;QAC9F,IAAI,EAAE;YACJ,mGAAmG;YACnG,4FAA4F;YAC5F,qFAAqF;YACrF,wEAAwE;YACxE,sFAAsF;YACtF,8FAA8F;YAC9F,yFAAyF;YACzF,uDAAuD;YACvD,2FAA2F;YAC3F,sEAAsE;YACtE,6FAA6F;YAC7F,0FAA0F;YAC1F,mFAAmF;SACpF,CAAC,IAAI,CAAC,IAAI,CAAC;KACb;IACD;QACE,EAAE,EAAE,0BAA0B;QAC9B,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,wBAAwB;QAC/B,QAAQ,EAAE,eAAe;QACzB,OAAO,EACL,+GAA+G;QACjH,IAAI,EAAE;YACJ,qCAAqC;YACrC,sFAAsF;YACtF,kEAAkE;YAClE,4FAA4F;YAC5F,6EAA6E;YAC7E,wFAAwF;YACxF,4FAA4F;YAC5F,yFAAyF;YACzF,6EAA6E;YAC7E,mGAAmG;SACpG,CAAC,IAAI,CAAC,IAAI,CAAC;KACb;CACF,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAsB;IACpE,oBAAoB;IACpB,0BAA0B;CAC3B,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PromptFragment } from '@cat-factory/contracts';
|
|
2
2
|
export type { PromptFragment } from '@cat-factory/contracts';
|
|
3
3
|
export declare const FRAGMENTS: PromptFragment[];
|
|
4
|
+
export { DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS } from './collections/style.js';
|
|
4
5
|
/** Fragments keyed by id for O(1) lookup during prompt composition. */
|
|
5
6
|
export declare const FRAGMENTS_BY_ID: ReadonlyMap<string, PromptFragment>;
|
|
6
7
|
/** Register a custom prompt fragment into the universal pool. Re-registering an id replaces it. */
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAgB5D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,eAAO,MAAM,SAAS,EAAE,cAAc,EAMrC,CAAA;AAID,OAAO,EAAE,mCAAmC,EAAE,MAAM,wBAAwB,CAAA;AAE5E,uEAAuE;AACvE,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAE/D,CAAA;AAYD,mGAAmG;AACnG,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAErE;AAED,wDAAwD;AACxD,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,IAAI,CAEjF;AAED,oFAAoF;AACpF,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,EAAE,CAMrD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAElE"}
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,17 @@ import { acceptanceFragments } from './collections/acceptance.js';
|
|
|
2
2
|
import { designFragments } from './collections/design.js';
|
|
3
3
|
import { nodeFragments } from './collections/node.js';
|
|
4
4
|
import { reactFragments } from './collections/react.js';
|
|
5
|
+
import { styleFragments } from './collections/style.js';
|
|
5
6
|
export const FRAGMENTS = [
|
|
6
7
|
...nodeFragments,
|
|
7
8
|
...reactFragments,
|
|
8
9
|
...acceptanceFragments,
|
|
9
10
|
...designFragments,
|
|
11
|
+
...styleFragments,
|
|
10
12
|
];
|
|
13
|
+
// Re-export the document-task style defaults so the board service can seed a new document
|
|
14
|
+
// task's fragment selection from the same source of truth the catalog is built from.
|
|
15
|
+
export { DEFAULT_DOCUMENT_STYLE_FRAGMENT_IDS } from './collections/style.js';
|
|
11
16
|
/** Fragments keyed by id for O(1) lookup during prompt composition. */
|
|
12
17
|
export const FRAGMENTS_BY_ID = new Map(FRAGMENTS.map((fragment) => [fragment.id, fragment]));
|
|
13
18
|
// Installation-level extension point for the universal fragment pool, mirroring the
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAavD,MAAM,CAAC,MAAM,SAAS,GAAqB;IACzC,GAAG,aAAa;IAChB,GAAG,cAAc;IACjB,GAAG,mBAAmB;IACtB,GAAG,eAAe;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAavD,MAAM,CAAC,MAAM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